diff --git a/API_VERSION b/API_VERSION index cbfd144ed1d..496024ef527 100644 --- a/API_VERSION +++ b/API_VERSION @@ -1 +1 @@ -c5d9f47b11fbac901125e0621faadddc6ac6eb1e \ No newline at end of file +a4f6cd305e695abb9ca7cdf25b8828504e2854d7 \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index e955ccb251c..847696c9c35 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.2.0-beta.1 - 2025-10-29 This release changes the pinned API version to `2025-10-29.preview`. diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 76d911f49fe..927a37ae781 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v2104 \ No newline at end of file +v2125 \ No newline at end of file diff --git a/README.md b/README.md index 5adf73d6cfc..d9c1fe71f0a 100644 --- a/README.md +++ b/README.md @@ -272,6 +272,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 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/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/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/Account.java b/src/main/java/com/stripe/model/Account.java index eb11d409b51..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; @@ -2871,8 +2881,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}. */ @@ -3057,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..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; @@ -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..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; @@ -2536,7 +2537,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/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/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/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/PaymentAttemptRecord.java b/src/main/java/com/stripe/model/PaymentAttemptRecord.java index d597a64705a..8560e43ab63 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; @@ -1872,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; @@ -1883,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; @@ -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/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/PaymentMethod.java b/src/main/java/com/stripe/model/PaymentMethod.java index e9493807d2c..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; @@ -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..e40284f02b6 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; @@ -2166,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; @@ -2177,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; @@ -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/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/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/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/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/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/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/model/financialconnections/Account.java b/src/main/java/com/stripe/model/financialconnections/Account.java index 143a5aa6f3e..028c6e63055 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; @@ -609,6 +613,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/v2/EventDataClassLookup.java b/src/main/java/com/stripe/model/v2/EventDataClassLookup.java index 75fe5e952fd..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); @@ -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); @@ -261,26 +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.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 f8760c0b9b2..370db1c3f8d 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); @@ -194,28 +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.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/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..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 - * '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 @@ -499,6 +507,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 +518,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 +3279,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 +4036,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 +4048,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 @@ -4481,6 +4691,341 @@ 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; + } + } + + /** + * 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; + } } } @@ -5205,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; @@ -5876,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 @@ -6072,21 +6617,13 @@ 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 @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; @@ -6255,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}, @@ -6336,10 +6874,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; @@ -6356,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 96b5161e84f..00000000000 --- a/src/main/java/com/stripe/model/v2/payments/OffSessionPayment.java +++ /dev/null @@ -1,349 +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.List; -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; - - /** 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; - - /** - * 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; - - /** - * 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; - - /** - * 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; - - /** 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 - @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/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/main/java/com/stripe/param/AccountCreateParams.java b/src/main/java/com/stripe/param/AccountCreateParams.java index 1022f5aa67e..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; @@ -15206,8 +15253,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 +15310,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) { @@ -15912,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 b8f79658e1e..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; @@ -15292,8 +15339,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 +15451,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) { @@ -16099,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..6c2c4c88207 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,6054 @@ 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.InnerTax 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 InnerTax { + /** 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 InnerTax(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.InnerTax build() { + return new ChargeCaptureParams.PaymentDetails.CarRentalData.Total.Tax.InnerTax( + 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.InnerTax#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } - /** - * Add all map key/value pairs to `extraParams` map. 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.InnerTax#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.InnerTax 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 InnerTax { + /** 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 InnerTax(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.InnerTax build() { + return new ChargeCaptureParams.PaymentDetails.FlightData.Total.Tax.InnerTax( + 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.InnerTax#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. 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.InnerTax#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 +9644,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 +9670,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 +9719,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 +9730,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 +9800,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 +9832,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 +9934,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 +9945,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 +10064,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 +10079,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 +10101,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 +10116,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 +10127,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.InnerTax 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 InnerTax { + /** 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 InnerTax(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.InnerTax build() { + return new ChargeCaptureParams.PaymentDetails.LodgingData.Total.Tax.InnerTax( + 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.InnerTax#extraParams} for + * the 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.InnerTax#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..6a280ffd29a 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.InnerTax 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 InnerTax { + /** 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 InnerTax(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.InnerTax build() { + return new ChargeUpdateParams.PaymentDetails.CarRentalData.Total.Tax.InnerTax( + 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.InnerTax#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. 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.InnerTax#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.InnerTax 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 InnerTax { + /** 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 InnerTax(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.InnerTax build() { + return new ChargeUpdateParams.PaymentDetails.FlightData.Total.Tax.InnerTax( + 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.InnerTax#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. 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.InnerTax#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.InnerTax 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 InnerTax { + /** 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 InnerTax(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.InnerTax build() { + return new ChargeUpdateParams.PaymentDetails.LodgingData.Total.Tax.InnerTax( + 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.InnerTax#extraParams} for + * the 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.InnerTax#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/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/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/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/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..75fecbfd463 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,6123 @@ 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.InnerTax + 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 InnerTax { + /** 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 InnerTax(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.InnerTax + build() { + return new PaymentIntentCaptureParams.PaymentDetails.CarRentalData.Total.Tax + .InnerTax(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.InnerTax#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. 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.InnerTax#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.InnerTax 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 InnerTax { + /** 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 InnerTax(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.InnerTax + build() { + return new PaymentIntentCaptureParams.PaymentDetails.FlightData.Total.Tax.InnerTax( + 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.InnerTax#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. 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.InnerTax#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 +11395,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 +11421,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 +11471,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 +11483,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 +11553,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 +11586,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 +11691,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 +11702,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 +11822,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 +11837,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 +11859,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 +11874,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 +11885,260 @@ 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.InnerTax 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 InnerTax { + /** 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 InnerTax(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.InnerTax + build() { + return new PaymentIntentCaptureParams.PaymentDetails.LodgingData.Total.Tax.InnerTax( + 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.InnerTax#extraParams} + * for the 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.InnerTax#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 b2f0aa3cbea..b56481c605d 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,1011 @@ 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.InnerTax + 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 InnerTax { + /** 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 InnerTax(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 PaymentIntentConfirmParams.PaymentDetails.CarRentalData.Total.Tax.InnerTax + build() { + return new PaymentIntentConfirmParams.PaymentDetails.CarRentalData.Total.Tax + .InnerTax(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 + * PaymentIntentConfirmParams.PaymentDetails.CarRentalData.Total.Tax.InnerTax#extraParams} + * for the 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 + * PaymentIntentConfirmParams.PaymentDetails.CarRentalData.Total.Tax.InnerTax#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 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); + 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( - PaymentIntentConfirmParams.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( - PaymentIntentConfirmParams.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( - PaymentIntentConfirmParams.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 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); + } - /** 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.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 - * 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 all map key/value pairs to `extraParams` map. A 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.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<>(); + /** 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 PaymentIntentConfirmParams.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 PaymentIntentConfirmParams.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( + PaymentIntentConfirmParams.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( + PaymentIntentConfirmParams.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 - * PaymentIntentConfirmParams.PaymentDetails.Lodging#passengers} for the field - * documentation. - */ - public Builder addPassenger( - PaymentIntentConfirmParams.PaymentDetails.Lodging.Passenger element) { - if (this.passengers == null) { - this.passengers = new ArrayList<>(); - } - this.passengers.add(element); - return this; - } + @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 - * PaymentIntentConfirmParams.PaymentDetails.Lodging#passengers} for the field - * documentation. - */ - public Builder addAllPassenger( - List elements) { - if (this.passengers == null) { - this.passengers = new ArrayList<>(); - } - this.passengers.addAll(elements); - return this; - } + @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 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("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 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("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 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("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"), + + @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 +7013,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 +7051,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 +7111,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 +7122,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 +7180,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 +7189,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 +7204,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 +7225,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 +7236,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 +7255,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 +7286,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 +7297,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 +9487,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 +9589,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,1153 +9600,11981 @@ 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; + } + + 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 PaymentIntentConfirmParams.PaymentDetails.FlightData.Total.ExtraCharge build() { + return new PaymentIntentConfirmParams.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 + * 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 all map key/value pairs to `extraParams` map. A 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; + } + + /** Type of additional charges. */ + public Builder setType( + PaymentIntentConfirmParams.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; + } } - 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; + @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 PaymentIntentConfirmParams.PaymentDetails.FlightData.Total.Tax build() { + return new PaymentIntentConfirmParams.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 + * 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; + } + + /** + * Add all map key/value pairs to `extraParams` map. A 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 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.InnerTax 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 + * 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; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class InnerTax { + /** 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 InnerTax(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.FlightData.Total.Tax.InnerTax + build() { + return new PaymentIntentConfirmParams.PaymentDetails.FlightData.Total.Tax.InnerTax( + 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 + * PaymentIntentConfirmParams.PaymentDetails.FlightData.Total.Tax.InnerTax#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A 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.InnerTax#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 PaymentIntentConfirmParams.PaymentDetails.Lodging build() { + return new PaymentIntentConfirmParams.PaymentDetails.Lodging( + this.address, + this.adults, + this.affiliate, + this.bookingNumber, + this.category, + this.checkinAt, + this.checkoutAt, + this.customerServicePhoneNumber, + this.dailyRoomRateAmount, + this.delivery, + this.extraCharges, + this.extraParams, + this.fireSafetyActCompliance, + this.name, + this.noShow, + this.numberOfRooms, + this.passengers, + this.propertyPhoneNumber, + this.roomClass, + this.roomNights, + this.totalRoomTaxAmount, + this.totalTaxAmount); + } + + /** The lodging location's address. */ + public Builder setAddress( + PaymentIntentConfirmParams.PaymentDetails.Lodging.Address address) { + this.address = address; + return this; + } + + /** The number of adults on the booking. */ + public Builder setAdults(Long adults) { + this.adults = adults; + return this; + } + + /** Affiliate details for this purchase. */ + public Builder setAffiliate( + PaymentIntentConfirmParams.PaymentDetails.Lodging.Affiliate affiliate) { + this.affiliate = affiliate; + return this; + } + + /** The booking number associated with the lodging reservation. */ + public Builder setBookingNumber(String bookingNumber) { + this.bookingNumber = bookingNumber; + return this; + } + + /** The lodging category. */ + public Builder setCategory( + PaymentIntentConfirmParams.PaymentDetails.Lodging.Category category) { + this.category = category; + return this; + } + + /** + * Required. 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( + PaymentIntentConfirmParams.PaymentDetails.Lodging.Delivery delivery) { + this.delivery = delivery; + return this; + } + + /** + * Add an element to `extraCharges` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentConfirmParams.PaymentDetails.Lodging#extraCharges} for the field + * documentation. + */ + public Builder addExtraCharge( + PaymentIntentConfirmParams.PaymentDetails.Lodging.ExtraCharge element) { + if (this.extraCharges == null) { + this.extraCharges = new ArrayList<>(); + } + this.extraCharges.add(element); + return this; + } + + /** + * Add all elements to `extraCharges` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentConfirmParams.PaymentDetails.Lodging#extraCharges} for the field + * documentation. + */ + public Builder addAllExtraCharge( + List elements) { + if (this.extraCharges == null) { + this.extraCharges = new ArrayList<>(); + } + this.extraCharges.addAll(elements); + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentDetails.Lodging#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentDetails.Lodging#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Indicates whether the lodging location is compliant with the Fire Safety Act. */ + public Builder setFireSafetyActCompliance(Boolean fireSafetyActCompliance) { + this.fireSafetyActCompliance = fireSafetyActCompliance; + return this; + } + + /** The name of the lodging location. */ + public Builder setName(String name) { + this.name = name; + return this; + } + + /** + * Indicates if the customer did not keep their booking while failing to cancel the + * reservation. + */ + public Builder setNoShow(Boolean noShow) { + this.noShow = noShow; + return this; + } + + /** The number of rooms on the booking. */ + public Builder setNumberOfRooms(Long numberOfRooms) { + this.numberOfRooms = numberOfRooms; + return this; + } + + /** + * Add an element to `passengers` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentConfirmParams.PaymentDetails.Lodging#passengers} for the field + * documentation. + */ + public Builder addPassenger( + PaymentIntentConfirmParams.PaymentDetails.Lodging.Passenger element) { + if (this.passengers == null) { + this.passengers = new ArrayList<>(); + } + this.passengers.add(element); + return this; + } + + /** + * Add all elements to `passengers` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentConfirmParams.PaymentDetails.Lodging#passengers} for the field + * documentation. + */ + public Builder addAllPassenger( + List elements) { + if (this.passengers == null) { + this.passengers = new ArrayList<>(); + } + this.passengers.addAll(elements); + return this; + } + + /** The phone number of the lodging location. */ + public Builder setPropertyPhoneNumber(String propertyPhoneNumber) { + this.propertyPhoneNumber = propertyPhoneNumber; + return this; + } + + /** The room class for this purchase. */ + public Builder setRoomClass(String roomClass) { + this.roomClass = roomClass; + return this; + } + + /** The number of room nights. */ + public Builder setRoomNights(Long roomNights) { + this.roomNights = roomNights; + return this; + } + + /** The total tax amount associating with the room reservation. */ + public Builder setTotalRoomTaxAmount(Long totalRoomTaxAmount) { + this.totalRoomTaxAmount = totalRoomTaxAmount; + return this; + } + + /** The total tax amount. */ + public Builder setTotalTaxAmount(Long totalTaxAmount) { + this.totalTaxAmount = totalTaxAmount; + return this; + } + } + + @Getter + @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.PaymentDetails.Lodging.Address build() { + return new PaymentIntentConfirmParams.PaymentDetails.Lodging.Address( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.state); + } + + /** City, district, suburb, town, or village. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + public Builder setCountry(String country) { + this.country = country; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentDetails.Lodging.Address#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentDetails.Lodging.Address#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Address line 1, 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 PaymentIntentConfirmParams.PaymentDetails.Lodging.Affiliate build() { + return new PaymentIntentConfirmParams.PaymentDetails.Lodging.Affiliate( + this.extraParams, this.name); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentConfirmParams.PaymentDetails.Lodging.Affiliate#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentConfirmParams.PaymentDetails.Lodging.Affiliate#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Required. The name of the affiliate that originated the purchase. */ + public Builder setName(String name) { + this.name = name; + return this; + } + } + } + + @Getter + @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 PaymentIntentConfirmParams.PaymentDetails.Lodging.Delivery build() { + return new PaymentIntentConfirmParams.PaymentDetails.Lodging.Delivery( + this.extraParams, this.mode, this.recipient); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentDetails.Lodging.Delivery#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentDetails.Lodging.Delivery#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The delivery method for the payment. */ + public Builder setMode( + PaymentIntentConfirmParams.PaymentDetails.Lodging.Delivery.Mode mode) { + this.mode = mode; + return this; + } + + /** Details of the recipient. */ + public Builder setRecipient( + PaymentIntentConfirmParams.PaymentDetails.Lodging.Delivery.Recipient recipient) { + this.recipient = recipient; + return this; + } + } + + @Getter + @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 PaymentIntentConfirmParams.PaymentDetails.Lodging.Delivery.Recipient build() { + return new PaymentIntentConfirmParams.PaymentDetails.Lodging.Delivery.Recipient( + this.email, this.extraParams, this.name, this.phone); + } + + /** The email of the recipient the ticket is delivered to. */ + public Builder setEmail(String email) { + this.email = email; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentConfirmParams.PaymentDetails.Lodging.Delivery.Recipient#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentConfirmParams.PaymentDetails.Lodging.Delivery.Recipient#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The name of the recipient the ticket is delivered to. */ + public Builder setName(String name) { + this.name = name; + return this; + } + + /** The phone number of the recipient the ticket is delivered to. */ + public Builder setPhone(String phone) { + this.phone = phone; + return this; + } + } + } + + public enum Mode implements ApiRequestParams.EnumParam { + @SerializedName("email") + EMAIL("email"), + + @SerializedName("phone") + PHONE("phone"), + + @SerializedName("pickup") + PICKUP("pickup"), + + @SerializedName("post") + POST("post"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Mode(String value) { + this.value = value; + } + } + } + + @Getter + @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 PaymentIntentConfirmParams.PaymentDetails.Lodging.Passenger build() { + return new PaymentIntentConfirmParams.PaymentDetails.Lodging.Passenger( + this.extraParams, this.name); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentConfirmParams.PaymentDetails.Lodging.Passenger#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentConfirmParams.PaymentDetails.Lodging.Passenger#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. Full name of the person or entity on the lodging + * reservation. + */ + public Builder setName(String name) { + this.name = name; + return this; + } + } + } + + public enum Category implements ApiRequestParams.EnumParam { + @SerializedName("hotel") + HOTEL("hotel"), + + @SerializedName("vacation_rental") + VACATION_RENTAL("vacation_rental"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Category(String value) { + this.value = value; + } + } + + public enum ExtraCharge implements ApiRequestParams.EnumParam { + @SerializedName("gift_shop") + GIFT_SHOP("gift_shop"), + + @SerializedName("laundry") + LAUNDRY("laundry"), + + @SerializedName("mini_bar") + MINI_BAR("mini_bar"), + + @SerializedName("other") + OTHER("other"), + + @SerializedName("restaurant") + RESTAURANT("restaurant"), + + @SerializedName("telephone") + TELEPHONE("telephone"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + ExtraCharge(String value) { + this.value = value; + } + } + } + + @Getter + @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 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); + } + + /** Accommodation details for the lodging. */ + public Builder setAccommodation( + PaymentIntentConfirmParams.PaymentDetails.LodgingData.Accommodation accommodation) { + this.accommodation = accommodation; + return this; + } + + /** Affiliate details if applicable. */ + public Builder setAffiliate( + PaymentIntentConfirmParams.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 PaymentIntentConfirmParams.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 PaymentIntentConfirmParams.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 + * 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 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 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(PaymentIntentConfirmParams.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 + * PaymentIntentConfirmParams.PaymentDetails.LodgingData#insurances} for the field + * documentation. + */ + public Builder addInsurance( + PaymentIntentConfirmParams.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 + * PaymentIntentConfirmParams.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(PaymentIntentConfirmParams.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 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); + } + + /** Type of accommodation. */ + public Builder setAccommodationType( + PaymentIntentConfirmParams.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 + * 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; + } + + /** + * Add all map key/value pairs to `extraParams` map. A 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; + } + + /** 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 PaymentIntentConfirmParams.PaymentDetails.LodgingData.Affiliate build() { + return new PaymentIntentConfirmParams.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 + * 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; + } + + /** + * Add all map key/value pairs to `extraParams` map. A 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; + } + + /** 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 PaymentIntentConfirmParams.PaymentDetails.LodgingData.Guest build() { + return new PaymentIntentConfirmParams.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 + * 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; + } + + /** + * Add all map key/value pairs to `extraParams` map. A 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; + } + + /** 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 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); + } + + /** Address of the host. */ + public Builder setAddress( + PaymentIntentConfirmParams.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 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; + } + + /** + * Add all map key/value pairs to `extraParams` map. A 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; + } + + /** Reference number for the host. */ + public Builder setHostReference(String hostReference) { + this.hostReference = hostReference; + return this; + } + + /** Type of host. */ + public Builder setHostType( + PaymentIntentConfirmParams.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 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); + } + + /** 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 + * 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; + } + + /** + * Add all map key/value pairs to `extraParams` map. A 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; + } + + /** + * 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 Insurance { + /** Required. Price 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. + * Instead, each key/value pair is serialized as if the key is a root-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") + String insuranceCompanyName; + + /** 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.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 PaymentIntentConfirmParams.PaymentDetails.LodgingData.Insurance build() { + return new PaymentIntentConfirmParams.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; + } + + /** + * Add a key/value pair to `extraParams` map. A 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 all map key/value pairs to `extraParams` map. A 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; + } + + /** 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.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") + 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. + * Instead, each key/value pair is serialized as if the key is a root-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, + 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.prepaidAmount = prepaidAmount; + this.tax = tax; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long amount; + + private Long cashAdvances; + + private String 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 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. 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.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 + * PaymentIntentConfirmParams.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( + PaymentIntentConfirmParams.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") + String corporateClientCode; + + /** Coupon code. */ + @SerializedName("coupon") + String 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( + String corporateClientCode, String coupon, Map extraParams) { + this.corporateClientCode = corporateClientCode; + this.coupon = coupon; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String corporateClientCode; + + private String coupon; + + 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); + } + + /** 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; + } + + /** + * Add a key/value pair to `extraParams` map. A 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; + } + } + } + + @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 PaymentIntentConfirmParams.PaymentDetails.LodgingData.Total.ExtraCharge build() { + return new PaymentIntentConfirmParams.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 + * 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; + } + + /** + * Add all map key/value pairs to `extraParams` map. A 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; + } + + /** Type of extra charge. */ + public Builder setType( + PaymentIntentConfirmParams.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 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.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.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 + * PaymentIntentConfirmParams.PaymentDetails.LodgingData.Total.Tax#taxes} for the field + * documentation. + */ + public Builder addTax( + PaymentIntentConfirmParams.PaymentDetails.LodgingData.Total.Tax.InnerTax 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 + * 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; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class InnerTax { + /** 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 InnerTax(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.InnerTax + build() { + return new PaymentIntentConfirmParams.PaymentDetails.LodgingData.Total.Tax.InnerTax( + 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.InnerTax#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A 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.InnerTax#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 Subscription { + /** Affiliate details for this purchase. */ + @SerializedName("affiliate") + Affiliate affiliate; + + /** Info whether the subscription will be auto renewed upon expiry. */ + @SerializedName("auto_renewal") + Boolean autoRenewal; + + /** Subscription billing details for this purchase. */ + @SerializedName("billing_interval") + BillingInterval billingInterval; + + /** Subscription end time. Measured in seconds since the Unix epoch. */ + @SerializedName("ends_at") + Long endsAt; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. Name of the product on subscription. e.g. Apple Music + * Subscription + */ + @SerializedName("name") + String name; + + /** Subscription start time. Measured in seconds since the Unix epoch. */ + @SerializedName("starts_at") + Long startsAt; + + private Subscription( + Affiliate affiliate, + Boolean autoRenewal, + BillingInterval billingInterval, + Long endsAt, + Map extraParams, + String name, + Long startsAt) { + this.affiliate = affiliate; + this.autoRenewal = autoRenewal; + this.billingInterval = billingInterval; + this.endsAt = endsAt; + this.extraParams = extraParams; + this.name = name; + this.startsAt = startsAt; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Affiliate affiliate; + + private Boolean autoRenewal; + + private BillingInterval billingInterval; + + private Long endsAt; + + private Map extraParams; + + private String name; + + private Long startsAt; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentDetails.Subscription build() { + return new PaymentIntentConfirmParams.PaymentDetails.Subscription( + this.affiliate, + this.autoRenewal, + this.billingInterval, + this.endsAt, + this.extraParams, + this.name, + this.startsAt); + } + + /** Affiliate details for this purchase. */ + public Builder setAffiliate( + PaymentIntentConfirmParams.PaymentDetails.Subscription.Affiliate affiliate) { + this.affiliate = affiliate; + return this; + } + + /** Info whether the subscription will be auto renewed upon expiry. */ + public Builder setAutoRenewal(Boolean autoRenewal) { + this.autoRenewal = autoRenewal; + return this; + } + + /** Subscription billing details for this purchase. */ + public Builder setBillingInterval( + PaymentIntentConfirmParams.PaymentDetails.Subscription.BillingInterval + billingInterval) { + this.billingInterval = billingInterval; + return this; + } + + /** Subscription end time. Measured in seconds since the Unix epoch. */ + public Builder setEndsAt(Long endsAt) { + this.endsAt = endsAt; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentDetails.Subscription#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentDetails.Subscription#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. Name of the product on subscription. e.g. Apple Music + * Subscription + */ + public Builder setName(String name) { + this.name = name; + return this; + } + + /** Subscription start time. Measured in seconds since the Unix epoch. */ + public Builder setStartsAt(Long startsAt) { + this.startsAt = startsAt; + return this; + } + } + + @Getter + @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 PaymentIntentConfirmParams.PaymentDetails.Subscription.Affiliate build() { + return new PaymentIntentConfirmParams.PaymentDetails.Subscription.Affiliate( + this.extraParams, this.name); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentConfirmParams.PaymentDetails.Subscription.Affiliate#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentConfirmParams.PaymentDetails.Subscription.Affiliate#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Required. The name of the affiliate that originated the purchase. */ + public Builder setName(String name) { + this.name = name; + return this; + } + } + } + + @Getter + @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 PaymentIntentConfirmParams.PaymentDetails.Subscription.BillingInterval build() { + return new PaymentIntentConfirmParams.PaymentDetails.Subscription.BillingInterval( + this.count, this.extraParams, this.interval); + } + + /** + * Required. The number of intervals, as an whole number greater than 0. + * Stripe multiplies this by the interval type to get the overall duration. + */ + public Builder setCount(Long count) { + this.count = count; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentConfirmParams.PaymentDetails.Subscription.BillingInterval#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentConfirmParams.PaymentDetails.Subscription.BillingInterval#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. Specifies a type of interval unit. Either {@code day}, + * {@code week}, {@code month} or {@code year}. + */ + public Builder setInterval( + PaymentIntentConfirmParams.PaymentDetails.Subscription.BillingInterval.Interval + interval) { + this.interval = interval; + return this; + } + } + + public enum Interval implements ApiRequestParams.EnumParam { + @SerializedName("day") + DAY("day"), + + @SerializedName("month") + MONTH("month"), + + @SerializedName("week") + WEEK("week"), + + @SerializedName("year") + YEAR("year"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Interval(String value) { + this.value = value; + } + } + } + } + } + + @Getter + @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 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 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); + } + + /** + * If this is an {@code acss_debit} PaymentMethod, this hash contains details about the ACSS + * Debit payment method. + */ + public Builder setAcssDebit( + PaymentIntentConfirmParams.PaymentMethodData.AcssDebit acssDebit) { + this.acssDebit = acssDebit; + return this; + } + + /** + * If this is an {@code affirm} PaymentMethod, this hash contains details about the Affirm + * payment method. + */ + public Builder setAffirm(PaymentIntentConfirmParams.PaymentMethodData.Affirm affirm) { + this.affirm = affirm; + return this; + } + + /** + * If this is an {@code AfterpayClearpay} PaymentMethod, this hash contains details about the + * AfterpayClearpay payment method. + */ + public Builder setAfterpayClearpay( + PaymentIntentConfirmParams.PaymentMethodData.AfterpayClearpay afterpayClearpay) { + this.afterpayClearpay = afterpayClearpay; + return this; + } + + /** + * If this is an {@code Alipay} PaymentMethod, this hash contains details about the Alipay + * payment method. + */ + public Builder setAlipay(PaymentIntentConfirmParams.PaymentMethodData.Alipay alipay) { + this.alipay = alipay; + return this; + } + + /** + * This field indicates whether this payment method can be shown again to its customer in a + * checkout flow. Stripe products such as Checkout and Elements use this field to determine + * whether a payment method can be shown as a saved payment method in a checkout flow. The + * field defaults to {@code unspecified}. + */ + public Builder setAllowRedisplay( + PaymentIntentConfirmParams.PaymentMethodData.AllowRedisplay allowRedisplay) { + this.allowRedisplay = allowRedisplay; + return this; + } + + /** + * If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. + */ + public Builder setAlma(PaymentIntentConfirmParams.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( + PaymentIntentConfirmParams.PaymentMethodData.AmazonPay amazonPay) { + this.amazonPay = amazonPay; + return this; + } + + /** + * If this is an {@code au_becs_debit} PaymentMethod, this hash contains details about the + * bank account. + */ + public Builder setAuBecsDebit( + PaymentIntentConfirmParams.PaymentMethodData.AuBecsDebit auBecsDebit) { + this.auBecsDebit = auBecsDebit; + return this; + } + + /** + * If this is a {@code bacs_debit} PaymentMethod, this hash contains details about the Bacs + * Direct Debit bank account. + */ + public Builder setBacsDebit( + PaymentIntentConfirmParams.PaymentMethodData.BacsDebit bacsDebit) { + this.bacsDebit = bacsDebit; + return this; + } + + /** + * If this is a {@code bancontact} PaymentMethod, this hash contains details about the + * Bancontact payment method. + */ + public Builder setBancontact( + PaymentIntentConfirmParams.PaymentMethodData.Bancontact bancontact) { + this.bancontact = bancontact; + return this; + } + + /** + * 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; + } + + /** + * Billing information associated with the PaymentMethod that may be used or required by + * particular types of payment methods. + */ + public Builder setBillingDetails( + PaymentIntentConfirmParams.PaymentMethodData.BillingDetails billingDetails) { + this.billingDetails = billingDetails; + return this; + } + + /** + * If this is a {@code blik} PaymentMethod, this hash contains details about the BLIK payment + * method. + */ + public Builder setBlik(PaymentIntentConfirmParams.PaymentMethodData.Blik blik) { + this.blik = blik; + return this; + } + + /** + * If this is a {@code boleto} PaymentMethod, this hash contains details about the Boleto + * payment method. + */ + public Builder setBoleto(PaymentIntentConfirmParams.PaymentMethodData.Boleto boleto) { + this.boleto = boleto; + return this; + } + + /** + * If this is a {@code cashapp} PaymentMethod, this hash contains details about the Cash App + * Pay payment method. + */ + public Builder setCashapp(PaymentIntentConfirmParams.PaymentMethodData.Cashapp cashapp) { + this.cashapp = cashapp; + return this; + } + + /** + * If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment + * method. + */ + public Builder setCrypto(PaymentIntentConfirmParams.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( + PaymentIntentConfirmParams.PaymentMethodData.CustomerBalance customerBalance) { + this.customerBalance = customerBalance; + return this; + } + + /** + * If this is an {@code eps} PaymentMethod, this hash contains details about the EPS payment + * method. + */ + public Builder setEps(PaymentIntentConfirmParams.PaymentMethodData.Eps eps) { + this.eps = eps; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PaymentIntentConfirmParams.PaymentMethodData#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PaymentIntentConfirmParams.PaymentMethodData#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * If this is an {@code fpx} PaymentMethod, this hash contains details about the FPX payment + * method. + */ + public Builder setFpx(PaymentIntentConfirmParams.PaymentMethodData.Fpx fpx) { + this.fpx = fpx; + return this; + } + + /** + * If this is a {@code giropay} PaymentMethod, this hash contains details about the Giropay + * payment method. + */ + public Builder setGiropay(PaymentIntentConfirmParams.PaymentMethodData.Giropay giropay) { + this.giropay = giropay; + return this; + } + + /** + * If this is a Gopay PaymentMethod, this hash contains details about the Gopay payment + * method. + */ + public Builder setGopay(PaymentIntentConfirmParams.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(PaymentIntentConfirmParams.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( + PaymentIntentConfirmParams.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(PaymentIntentConfirmParams.PaymentMethodData.Ideal ideal) { + this.ideal = ideal; + return this; + } + + /** + * If this is an {@code interac_present} PaymentMethod, this hash contains details about the + * Interac Present payment method. + */ + public Builder setInteracPresent( + PaymentIntentConfirmParams.PaymentMethodData.InteracPresent interacPresent) { + this.interacPresent = interacPresent; + return this; + } + + /** + * If this is a {@code 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; + } + + /** + * If this is a {@code klarna} PaymentMethod, this hash contains details about the Klarna + * payment method. + */ + public Builder setKlarna(PaymentIntentConfirmParams.PaymentMethodData.Klarna klarna) { + this.klarna = klarna; + return this; + } + + /** + * If this is a {@code konbini} PaymentMethod, this hash contains details about the Konbini + * payment method. + */ + public Builder setKonbini(PaymentIntentConfirmParams.PaymentMethodData.Konbini konbini) { + this.konbini = konbini; + return this; + } + + /** + * If this is 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; + } + + /** + * If this is an {@code Link} PaymentMethod, this hash contains details about the Link payment + * method. + */ + public Builder setLink(PaymentIntentConfirmParams.PaymentMethodData.Link link) { + this.link = link; + return this; + } + + /** + * If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment + * method. + */ + public Builder setMbWay(PaymentIntentConfirmParams.PaymentMethodData.MbWay mbWay) { + this.mbWay = mbWay; + return this; + } + + /** + * Add a key/value pair to `metadata` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PaymentIntentConfirmParams.PaymentMethodData#metadata} for the field documentation. + */ + public Builder putMetadata(String key, String value) { + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `metadata` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PaymentIntentConfirmParams.PaymentMethodData#metadata} for the field + * documentation. + */ + public Builder putAllMetadata(Map map) { + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.putAll(map); + return this; + } + + /** + * If this is a {@code mobilepay} PaymentMethod, this hash contains details about the + * MobilePay payment method. + */ + public Builder setMobilepay( + PaymentIntentConfirmParams.PaymentMethodData.Mobilepay mobilepay) { + this.mobilepay = mobilepay; + return this; + } + + /** + * If this is a {@code multibanco} PaymentMethod, this hash contains details about the + * Multibanco payment method. + */ + public Builder setMultibanco( + PaymentIntentConfirmParams.PaymentMethodData.Multibanco multibanco) { + this.multibanco = multibanco; + return this; + } + + /** + * If this is 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; + } + + /** + * 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; + } + + /** + * If this is an {@code oxxo} PaymentMethod, this hash contains details about the OXXO payment + * method. + */ + public Builder setOxxo(PaymentIntentConfirmParams.PaymentMethodData.Oxxo oxxo) { + this.oxxo = oxxo; + return this; + } + + /** + * If this is a {@code p24} PaymentMethod, this hash contains details about the P24 payment + * method. + */ + public Builder setP24(PaymentIntentConfirmParams.PaymentMethodData.P24 p24) { + this.p24 = p24; + return this; + } + + /** + * If this is a {@code 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; + } + + /** + * 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; + } + + /** + * If this is a {@code paynow} PaymentMethod, this hash contains details about the PayNow + * payment method. + */ + public Builder setPaynow(PaymentIntentConfirmParams.PaymentMethodData.Paynow paynow) { + this.paynow = paynow; + return this; + } + + /** + * If this is a {@code paypal} PaymentMethod, this hash contains details about the PayPal + * payment method. + */ + public Builder setPaypal(PaymentIntentConfirmParams.PaymentMethodData.Paypal paypal) { + this.paypal = paypal; + return this; + } + + /** + * If this is a {@code paypay} PaymentMethod, this hash contains details about the PayPay + * payment method. + */ + public Builder setPaypay(PaymentIntentConfirmParams.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(PaymentIntentConfirmParams.PaymentMethodData.Payto payto) { + this.payto = payto; + return this; + } + + /** + * If this is a {@code pix} PaymentMethod, this hash contains details about the Pix payment + * method. + */ + public Builder setPix(PaymentIntentConfirmParams.PaymentMethodData.Pix pix) { + this.pix = pix; + return this; + } + + /** + * If this is a {@code promptpay} PaymentMethod, this hash contains details about the + * PromptPay payment method. + */ + public Builder setPromptpay( + PaymentIntentConfirmParams.PaymentMethodData.Promptpay promptpay) { + this.promptpay = promptpay; + return this; + } + + /** + * 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; + } + + /** + * Options to configure Radar. See Radar + * Session for more information. + */ + public Builder setRadarOptions( + PaymentIntentConfirmParams.PaymentMethodData.RadarOptions radarOptions) { + this.radarOptions = radarOptions; + return this; + } + + /** + * If this is a {@code rechnung} PaymentMethod, this hash contains details about the Rechnung + * payment method. + */ + public Builder setRechnung(PaymentIntentConfirmParams.PaymentMethodData.Rechnung rechnung) { + this.rechnung = rechnung; + return this; + } + + /** + * If this is a {@code revolut_pay} PaymentMethod, this hash contains details about the + * Revolut Pay payment method. + */ + public Builder setRevolutPay( + PaymentIntentConfirmParams.PaymentMethodData.RevolutPay revolutPay) { + this.revolutPay = revolutPay; + return this; + } + + /** + * If this is a {@code samsung_pay} PaymentMethod, this hash contains details about the + * SamsungPay payment method. + */ + public Builder setSamsungPay( + PaymentIntentConfirmParams.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(PaymentIntentConfirmParams.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( + PaymentIntentConfirmParams.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( + PaymentIntentConfirmParams.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(PaymentIntentConfirmParams.PaymentMethodData.Sofort sofort) { + this.sofort = sofort; + return this; + } + + /** 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 swish} PaymentMethod, this hash contains details about the Swish + * payment method. + */ + public Builder setSwish(PaymentIntentConfirmParams.PaymentMethodData.Swish swish) { + this.swish = swish; + return this; + } + + /** + * If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment + * method. + */ + public Builder setTwint(PaymentIntentConfirmParams.PaymentMethodData.Twint twint) { + this.twint = twint; + return this; + } + + /** + * Required. The type of the PaymentMethod. An additional hash is included on + * the PaymentMethod with a name matching this value. It contains additional information + * specific to the PaymentMethod type. + */ + public Builder setType(PaymentIntentConfirmParams.PaymentMethodData.Type type) { + this.type = type; + return this; + } + + /** + * If this is an {@code us_bank_account} PaymentMethod, this hash contains details about the + * US bank account payment method. + */ + public Builder setUsBankAccount( + PaymentIntentConfirmParams.PaymentMethodData.UsBankAccount usBankAccount) { + this.usBankAccount = usBankAccount; + return this; + } + + /** + * If this is an {@code wechat_pay} PaymentMethod, this hash contains details about the + * wechat_pay payment method. + */ + public Builder setWechatPay( + PaymentIntentConfirmParams.PaymentMethodData.WechatPay wechatPay) { + this.wechatPay = wechatPay; + return this; + } + + /** + * If this is a {@code zip} PaymentMethod, this hash contains details about the Zip payment + * method. + */ + public Builder setZip(PaymentIntentConfirmParams.PaymentMethodData.Zip zip) { + this.zip = zip; + return this; + } + } + + @Getter + @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 PaymentIntentConfirmParams.PaymentMethodData.AcssDebit build() { + return new PaymentIntentConfirmParams.PaymentMethodData.AcssDebit( + this.accountNumber, this.extraParams, this.institutionNumber, this.transitNumber); + } + + /** Required. Customer's bank account number. */ + public Builder setAccountNumber(String accountNumber) { + this.accountNumber = accountNumber; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.AcssDebit#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.AcssDebit#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Required. Institution number of the customer's bank. */ + public Builder setInstitutionNumber(String institutionNumber) { + this.institutionNumber = institutionNumber; + return this; + } + + /** Required. Transit number of the customer's bank. */ + public Builder setTransitNumber(String transitNumber) { + this.transitNumber = transitNumber; + return this; + } + } + } + + @Getter + @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 PaymentIntentConfirmParams.PaymentMethodData.Affirm build() { + return new PaymentIntentConfirmParams.PaymentMethodData.Affirm(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Affirm#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Affirm#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + + @Getter + @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 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 { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Alipay(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodData.Alipay build() { + return new PaymentIntentConfirmParams.PaymentMethodData.Alipay(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Alipay#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Alipay#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + + @Getter + @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 PaymentIntentConfirmParams.PaymentMethodData.Alma build() { + return new PaymentIntentConfirmParams.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 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; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map 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 { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private AmazonPay(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodData.AmazonPay build() { + return new PaymentIntentConfirmParams.PaymentMethodData.AmazonPay(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.AmazonPay#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.AmazonPay#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class AuBecsDebit { + /** Required. The account number for the bank account. */ + @SerializedName("account_number") + String accountNumber; + + /** Required. Bank-State-Branch number of the bank account. */ + @SerializedName("bsb_number") + String bsbNumber; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private AuBecsDebit(String accountNumber, String bsbNumber, Map extraParams) { + this.accountNumber = accountNumber; + this.bsbNumber = bsbNumber; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String accountNumber; + + private String bsbNumber; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodData.AuBecsDebit build() { + return new PaymentIntentConfirmParams.PaymentMethodData.AuBecsDebit( + this.accountNumber, this.bsbNumber, this.extraParams); + } + + /** Required. The account number for the bank account. */ + public Builder setAccountNumber(String accountNumber) { + this.accountNumber = accountNumber; + return this; + } + + /** Required. Bank-State-Branch number of the bank account. */ + public Builder setBsbNumber(String bsbNumber) { + this.bsbNumber = bsbNumber; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.AuBecsDebit#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.AuBecsDebit#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + + @Getter + @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; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Sort code of the bank account. (e.g., {@code 10-20-30}) */ + @SerializedName("sort_code") + String sortCode; + + private BacsDebit(String accountNumber, Map extraParams, String sortCode) { + this.accountNumber = accountNumber; + this.extraParams = extraParams; + this.sortCode = sortCode; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String accountNumber; + + private Map extraParams; + + private String sortCode; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodData.BacsDebit build() { + return new PaymentIntentConfirmParams.PaymentMethodData.BacsDebit( + this.accountNumber, this.extraParams, this.sortCode); + } + + /** Account number of the bank account that the funds will be debited from. */ + public Builder setAccountNumber(String accountNumber) { + this.accountNumber = accountNumber; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.BacsDebit#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.BacsDebit#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Sort code of the bank account. (e.g., {@code 10-20-30}) */ + public Builder setSortCode(String sortCode) { + this.sortCode = sortCode; + return this; + } + } + } + + @Getter + @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); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Bancontact#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Bancontact#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + + @Getter + @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 PaymentIntentConfirmParams.PaymentMethodData.Billie build() { + return new PaymentIntentConfirmParams.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 PaymentIntentConfirmParams.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 PaymentIntentConfirmParams.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") + String taxId; + + 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; + } + + 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 String taxId; + + /** 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); + } + + /** Billing address. */ + public Builder setAddress( + PaymentIntentConfirmParams.PaymentMethodData.BillingDetails.Address address) { + this.address = address; + return this; + } + + /** Billing address. */ + public Builder setAddress(EmptyParam address) { + this.address = address; + return this; + } + + /** Email address. */ + public Builder setEmail(String email) { + this.email = email; + return this; + } + + /** Email address. */ + public Builder setEmail(EmptyParam email) { + this.email = email; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.BillingDetails#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.BillingDetails#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Full name. */ + public Builder setName(String name) { + this.name = name; + return this; + } + + /** Full name. */ + public Builder setName(EmptyParam name) { + this.name = name; + return this; + } + + /** Billing phone number (including extension). */ + public Builder setPhone(String phone) { + this.phone = phone; + return this; + } + + /** Billing phone number (including extension). */ + public Builder setPhone(EmptyParam phone) { + this.phone = phone; + return this; + } + + /** + * 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 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 Blik { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Blik(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodData.Blik build() { + return new PaymentIntentConfirmParams.PaymentMethodData.Blik(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Blik#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Blik#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + + @Getter + @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; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String taxId; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodData.Boleto build() { + return new PaymentIntentConfirmParams.PaymentMethodData.Boleto( + this.extraParams, this.taxId); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Boleto#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Boleto#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. The tax ID of the customer (CPF for individual consumers or + * CNPJ for businesses consumers) + */ + public Builder setTaxId(String taxId) { + this.taxId = taxId; + return this; + } + } + } + + @Getter + @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 PaymentIntentConfirmParams.PaymentMethodData.Cashapp build() { + return new PaymentIntentConfirmParams.PaymentMethodData.Cashapp(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Cashapp#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Cashapp#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + + @Getter + @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.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 PaymentIntentConfirmParams.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 PaymentIntentConfirmParams.PaymentMethodData.CustomerBalance build() { + return new PaymentIntentConfirmParams.PaymentMethodData.CustomerBalance(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.CustomerBalance#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.CustomerBalance#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + + @Getter + @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.PaymentMethodData.Eps#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Eps#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + + public enum Bank implements ApiRequestParams.EnumParam { + @SerializedName("arzte_und_apotheker_bank") + ARZTE_UND_APOTHEKER_BANK("arzte_und_apotheker_bank"), + + @SerializedName("austrian_anadi_bank_ag") + AUSTRIAN_ANADI_BANK_AG("austrian_anadi_bank_ag"), + + @SerializedName("bank_austria") + BANK_AUSTRIA("bank_austria"), + + @SerializedName("bankhaus_carl_spangler") + BANKHAUS_CARL_SPANGLER("bankhaus_carl_spangler"), + + @SerializedName("bankhaus_schelhammer_und_schattera_ag") + BANKHAUS_SCHELHAMMER_UND_SCHATTERA_AG("bankhaus_schelhammer_und_schattera_ag"), + + @SerializedName("bawag_psk_ag") + BAWAG_PSK_AG("bawag_psk_ag"), + + @SerializedName("bks_bank_ag") + BKS_BANK_AG("bks_bank_ag"), + + @SerializedName("brull_kallmus_bank_ag") + BRULL_KALLMUS_BANK_AG("brull_kallmus_bank_ag"), + + @SerializedName("btv_vier_lander_bank") + BTV_VIER_LANDER_BANK("btv_vier_lander_bank"), + + @SerializedName("capital_bank_grawe_gruppe_ag") + CAPITAL_BANK_GRAWE_GRUPPE_AG("capital_bank_grawe_gruppe_ag"), + + @SerializedName("deutsche_bank_ag") + DEUTSCHE_BANK_AG("deutsche_bank_ag"), + + @SerializedName("dolomitenbank") + DOLOMITENBANK("dolomitenbank"), + + @SerializedName("easybank_ag") + EASYBANK_AG("easybank_ag"), + + @SerializedName("erste_bank_und_sparkassen") + ERSTE_BANK_UND_SPARKASSEN("erste_bank_und_sparkassen"), + + @SerializedName("hypo_alpeadriabank_international_ag") + HYPO_ALPEADRIABANK_INTERNATIONAL_AG("hypo_alpeadriabank_international_ag"), + + @SerializedName("hypo_bank_burgenland_aktiengesellschaft") + HYPO_BANK_BURGENLAND_AKTIENGESELLSCHAFT("hypo_bank_burgenland_aktiengesellschaft"), + + @SerializedName("hypo_noe_lb_fur_niederosterreich_u_wien") + HYPO_NOE_LB_FUR_NIEDEROSTERREICH_U_WIEN("hypo_noe_lb_fur_niederosterreich_u_wien"), + + @SerializedName("hypo_oberosterreich_salzburg_steiermark") + HYPO_OBEROSTERREICH_SALZBURG_STEIERMARK("hypo_oberosterreich_salzburg_steiermark"), + + @SerializedName("hypo_tirol_bank_ag") + HYPO_TIROL_BANK_AG("hypo_tirol_bank_ag"), + + @SerializedName("hypo_vorarlberg_bank_ag") + HYPO_VORARLBERG_BANK_AG("hypo_vorarlberg_bank_ag"), + + @SerializedName("marchfelder_bank") + MARCHFELDER_BANK("marchfelder_bank"), + + @SerializedName("oberbank_ag") + OBERBANK_AG("oberbank_ag"), + + @SerializedName("raiffeisen_bankengruppe_osterreich") + RAIFFEISEN_BANKENGRUPPE_OSTERREICH("raiffeisen_bankengruppe_osterreich"), + + @SerializedName("schoellerbank_ag") + SCHOELLERBANK_AG("schoellerbank_ag"), + + @SerializedName("sparda_bank_wien") + SPARDA_BANK_WIEN("sparda_bank_wien"), + + @SerializedName("volksbank_gruppe") + VOLKSBANK_GRUPPE("volksbank_gruppe"), + + @SerializedName("volkskreditbank_ag") + VOLKSKREDITBANK_AG("volkskreditbank_ag"), + + @SerializedName("vr_bank_braunau") + VR_BANK_BRAUNAU("vr_bank_braunau"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Bank(String value) { + this.value = value; + } + } + } + + @Getter + @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 PaymentIntentConfirmParams.PaymentMethodData.Fpx build() { + return new PaymentIntentConfirmParams.PaymentMethodData.Fpx( + this.accountHolderType, this.bank, this.extraParams); + } + + /** Account holder type for FPX transaction. */ + public Builder setAccountHolderType( + PaymentIntentConfirmParams.PaymentMethodData.Fpx.AccountHolderType accountHolderType) { + this.accountHolderType = accountHolderType; + return this; + } + + /** Required. The customer's bank. */ + public Builder setBank(PaymentIntentConfirmParams.PaymentMethodData.Fpx.Bank bank) { + this.bank = bank; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Fpx#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Fpx#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + + public enum AccountHolderType implements ApiRequestParams.EnumParam { + @SerializedName("company") + COMPANY("company"), + + @SerializedName("individual") + INDIVIDUAL("individual"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + AccountHolderType(String value) { + this.value = value; + } + } + + public enum Bank implements ApiRequestParams.EnumParam { + @SerializedName("affin_bank") + AFFIN_BANK("affin_bank"), + + @SerializedName("agrobank") + AGROBANK("agrobank"), + + @SerializedName("alliance_bank") + ALLIANCE_BANK("alliance_bank"), + + @SerializedName("ambank") + AMBANK("ambank"), + + @SerializedName("bank_islam") + BANK_ISLAM("bank_islam"), + + @SerializedName("bank_muamalat") + BANK_MUAMALAT("bank_muamalat"), + + @SerializedName("bank_of_china") + BANK_OF_CHINA("bank_of_china"), + + @SerializedName("bank_rakyat") + BANK_RAKYAT("bank_rakyat"), + + @SerializedName("bsn") + BSN("bsn"), + + @SerializedName("cimb") + CIMB("cimb"), + + @SerializedName("deutsche_bank") + DEUTSCHE_BANK("deutsche_bank"), + + @SerializedName("hong_leong_bank") + HONG_LEONG_BANK("hong_leong_bank"), + + @SerializedName("hsbc") + HSBC("hsbc"), + + @SerializedName("kfh") + KFH("kfh"), + + @SerializedName("maybank2e") + MAYBANK2E("maybank2e"), + + @SerializedName("maybank2u") + MAYBANK2U("maybank2u"), + + @SerializedName("ocbc") + OCBC("ocbc"), + + @SerializedName("pb_enterprise") + PB_ENTERPRISE("pb_enterprise"), + + @SerializedName("public_bank") + PUBLIC_BANK("public_bank"), + + @SerializedName("rhb") + RHB("rhb"), + + @SerializedName("standard_chartered") + STANDARD_CHARTERED("standard_chartered"), + + @SerializedName("uob") + UOB("uob"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Bank(String value) { + this.value = value; + } + } + } + + @Getter + @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 PaymentIntentConfirmParams.PaymentMethodData.Giropay build() { + return new PaymentIntentConfirmParams.PaymentMethodData.Giropay(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Giropay#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Giropay#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + + @Getter + @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 + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map 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 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 PaymentIntentConfirmParams.PaymentMethodData.Grabpay build() { + return new PaymentIntentConfirmParams.PaymentMethodData.Grabpay(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Grabpay#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Grabpay#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + + @Getter + @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 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.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 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); + 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 PaymentIntentConfirmParams.PaymentMethodData.Ideal build() { + return new PaymentIntentConfirmParams.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(PaymentIntentConfirmParams.PaymentMethodData.Ideal.Bank bank) { + this.bank = bank; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Ideal#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Ideal#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + + public enum Bank implements ApiRequestParams.EnumParam { + @SerializedName("abn_amro") + ABN_AMRO("abn_amro"), + + @SerializedName("asn_bank") + ASN_BANK("asn_bank"), + + @SerializedName("bunq") + BUNQ("bunq"), + + @SerializedName("buut") + BUUT("buut"), + + @SerializedName("finom") + FINOM("finom"), + + @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 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; + this.extraParams = extraParams; + this.month = month; + this.year = year; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long day; + + private Map extraParams; + + private Long month; + + private Long year; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodData.Klarna.Dob build() { + return new PaymentIntentConfirmParams.PaymentMethodData.Klarna.Dob( + this.day, this.extraParams, this.month, this.year); + } + + /** Required. The day of birth, between 1 and 31. */ + public Builder setDay(Long day) { + this.day = day; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Klarna.Dob#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Klarna.Dob#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Required. The month of birth, between 1 and 12. */ + public Builder setMonth(Long month) { + this.month = month; + return this; + } + + /** Required. The four-digit year of birth. */ + public Builder setYear(Long year) { + this.year = year; + return this; + } + } + } + } + + @Getter + @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 PaymentIntentConfirmParams.PaymentMethodData.Konbini build() { + return new PaymentIntentConfirmParams.PaymentMethodData.Konbini(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Konbini#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Konbini#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + + @Getter + @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 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.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 PaymentIntentConfirmParams.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 PaymentIntentConfirmParams.PaymentMethodData.Link build() { + return new PaymentIntentConfirmParams.PaymentMethodData.Link(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Link#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Link#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + + @Getter + @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); + } + + /** + * Add a key/value pair to `extraParams` map. A map 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<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map 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<>(); + } + 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); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Mobilepay#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Mobilepay#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + + @Getter + @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); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Multibanco#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Multibanco#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + + @Getter + @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); + } + + /** + * Add a key/value pair to `extraParams` map. A map 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 putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map 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 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( + 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); + } + + /** + * 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 PaymentIntentConfirmParams.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 PaymentIntentConfirmParams.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 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; - /** - * Required. The tax ID of the customer (CPF for individual consumers or CNPJ - * for businesses consumers) - */ - @SerializedName("tax_id") - String taxId; + private Object bancontact; - private Boleto(Map extraParams, String taxId) { - this.extraParams = extraParams; - this.taxId = taxId; - } + private Object billie; - public static Builder builder() { - return new Builder(); - } + private Object blik; - public static class Builder { - private Map extraParams; + private Object boleto; - private String taxId; + private Object card; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodData.Boleto build() { - return new PaymentIntentConfirmParams.PaymentMethodData.Boleto( - this.extraParams, this.taxId); - } + private Object cardPresent; - /** - * Add a key/value pair to `extraParams` map. A map 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; - } + private Object cashapp; - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Boleto#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } + private Object crypto; - /** - * 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; - } - } - } + private Object customerBalance; - @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 Object eps; - private Cashapp(Map extraParams) { - this.extraParams = extraParams; - } + private Map extraParams; - public static Builder builder() { - return new Builder(); - } + private Object fpx; - public static class Builder { - private Map extraParams; + private Object giropay; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodData.Cashapp build() { - return new PaymentIntentConfirmParams.PaymentMethodData.Cashapp(this.extraParams); - } + private Object 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.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; - } + private Object 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.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; - } - } - } + private Object idBankTransfer; - @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 Object ideal; - private Crypto(Map extraParams) { - this.extraParams = extraParams; - } + private Object interacPresent; - public static Builder builder() { - return new Builder(); - } + private Object kakaoPay; - public static class Builder { - private Map extraParams; + private Object klarna; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodData.Crypto build() { - return new PaymentIntentConfirmParams.PaymentMethodData.Crypto(this.extraParams); - } + private Object 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 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; - } + private Object 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 PaymentIntentConfirmParams.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; - } - } - } + private Object link; - @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 Object mbWay; - private CustomerBalance(Map extraParams) { - this.extraParams = extraParams; - } + private Object mobilepay; - public static Builder builder() { - return new Builder(); - } + private Object multibanco; - public static class Builder { - private Map extraParams; + private Object naverPay; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodData.CustomerBalance build() { - return new PaymentIntentConfirmParams.PaymentMethodData.CustomerBalance(this.extraParams); - } + private Object nzBankAccount; - /** - * Add a key/value pair to `extraParams` map. A map 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; - } + private Object oxxo; - /** - * Add all map key/value pairs to `extraParams` map. A map 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; - } - } - } + private Object p24; - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Eps { - /** The customer's bank. */ - @SerializedName("bank") - Bank bank; + private Object payByBank; + + private Object payco; + + private Object paynow; + + private Object paypal; + + private Object 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 Object payto; - private Eps(Bank bank, Map extraParams) { - this.bank = bank; - this.extraParams = extraParams; - } + private Object pix; - public static Builder builder() { - return new Builder(); - } + private Object promptpay; - public static class Builder { - private Bank bank; + private Object qris; - private Map extraParams; + private Object rechnung; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodData.Eps build() { - return new PaymentIntentConfirmParams.PaymentMethodData.Eps(this.bank, this.extraParams); - } + private Object revolutPay; - /** The customer's bank. */ - public Builder setBank(PaymentIntentConfirmParams.PaymentMethodData.Eps.Bank bank) { - this.bank = bank; - return this; - } + private Object samsungPay; - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Eps#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + private Object satispay; - /** - * Add all map key/value pairs to `extraParams` map. A map 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; - } - } + private Object sepaDebit; - public enum Bank implements ApiRequestParams.EnumParam { - @SerializedName("arzte_und_apotheker_bank") - ARZTE_UND_APOTHEKER_BANK("arzte_und_apotheker_bank"), + private Object shopeepay; - @SerializedName("austrian_anadi_bank_ag") - AUSTRIAN_ANADI_BANK_AG("austrian_anadi_bank_ag"), + private Object sofort; - @SerializedName("bank_austria") - BANK_AUSTRIA("bank_austria"), + private Object stripeBalance; - @SerializedName("bankhaus_carl_spangler") - BANKHAUS_CARL_SPANGLER("bankhaus_carl_spangler"), + private Object swish; - @SerializedName("bankhaus_schelhammer_und_schattera_ag") - BANKHAUS_SCHELHAMMER_UND_SCHATTERA_AG("bankhaus_schelhammer_und_schattera_ag"), + private Object twint; - @SerializedName("bawag_psk_ag") - BAWAG_PSK_AG("bawag_psk_ag"), + private Object usBankAccount; - @SerializedName("bks_bank_ag") - BKS_BANK_AG("bks_bank_ag"), + private Object wechatPay; - @SerializedName("brull_kallmus_bank_ag") - BRULL_KALLMUS_BANK_AG("brull_kallmus_bank_ag"), + private Object zip; - @SerializedName("btv_vier_lander_bank") - BTV_VIER_LANDER_BANK("btv_vier_lander_bank"), + /** 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); + } - @SerializedName("capital_bank_grawe_gruppe_ag") - CAPITAL_BANK_GRAWE_GRUPPE_AG("capital_bank_grawe_gruppe_ag"), + /** + * 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; + } - @SerializedName("deutsche_bank_ag") - DEUTSCHE_BANK_AG("deutsche_bank_ag"), + /** + * 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; + } - @SerializedName("dolomitenbank") - DOLOMITENBANK("dolomitenbank"), + /** + * 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; + } - @SerializedName("easybank_ag") - EASYBANK_AG("easybank_ag"), + /** + * 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; + } - @SerializedName("erste_bank_und_sparkassen") - ERSTE_BANK_UND_SPARKASSEN("erste_bank_und_sparkassen"), + /** + * 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; + } - @SerializedName("hypo_alpeadriabank_international_ag") - HYPO_ALPEADRIABANK_INTERNATIONAL_AG("hypo_alpeadriabank_international_ag"), + /** + * 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; + } - @SerializedName("hypo_bank_burgenland_aktiengesellschaft") - HYPO_BANK_BURGENLAND_AKTIENGESELLSCHAFT("hypo_bank_burgenland_aktiengesellschaft"), + /** + * 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; + } - @SerializedName("hypo_noe_lb_fur_niederosterreich_u_wien") - HYPO_NOE_LB_FUR_NIEDEROSTERREICH_U_WIEN("hypo_noe_lb_fur_niederosterreich_u_wien"), + /** + * 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; + } - @SerializedName("hypo_oberosterreich_salzburg_steiermark") - HYPO_OBEROSTERREICH_SALZBURG_STEIERMARK("hypo_oberosterreich_salzburg_steiermark"), + /** + * 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; + } - @SerializedName("hypo_tirol_bank_ag") - HYPO_TIROL_BANK_AG("hypo_tirol_bank_ag"), + /** + * 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; + } - @SerializedName("hypo_vorarlberg_bank_ag") - HYPO_VORARLBERG_BANK_AG("hypo_vorarlberg_bank_ag"), + /** + * 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; + } - @SerializedName("marchfelder_bank") - MARCHFELDER_BANK("marchfelder_bank"), + /** + * 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("oberbank_ag") - OBERBANK_AG("oberbank_ag"), + /** + * 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; + } - @SerializedName("raiffeisen_bankengruppe_osterreich") - RAIFFEISEN_BANKENGRUPPE_OSTERREICH("raiffeisen_bankengruppe_osterreich"), + /** + * 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; + } - @SerializedName("schoellerbank_ag") - SCHOELLERBANK_AG("schoellerbank_ag"), + /** + * 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; + } - @SerializedName("sparda_bank_wien") - SPARDA_BANK_WIEN("sparda_bank_wien"), + /** + * 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("volksbank_gruppe") - VOLKSBANK_GRUPPE("volksbank_gruppe"), + /** + * 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; + } - @SerializedName("volkskreditbank_ag") - VOLKSKREDITBANK_AG("volkskreditbank_ag"), + /** + * 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; + } - @SerializedName("vr_bank_braunau") - VR_BANK_BRAUNAU("vr_bank_braunau"); + /** + * 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; + } - @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(EmptyParam billie) { + this.billie = billie; + return this; + } - Bank(String value) { - this.value = value; - } + /** + * 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; } - } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Fpx { - /** Account holder type for FPX transaction. */ - @SerializedName("account_holder_type") - AccountHolderType accountHolderType; + /** + * 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; + } - /** Required. The customer's bank. */ - @SerializedName("bank") - Bank bank; + /** + * 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; + } /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized 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 boleto} PaymentMethod, this sub-hash contains details about the Boleto + * payment method options. */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + public Builder setBoleto(EmptyParam boleto) { + this.boleto = boleto; + return this; + } - private Fpx(AccountHolderType accountHolderType, Bank bank, Map extraParams) { - this.accountHolderType = accountHolderType; - this.bank = bank; - this.extraParams = extraParams; + /** Configuration for any card payments attempted on this PaymentIntent. */ + public Builder setCard(PaymentIntentConfirmParams.PaymentMethodOptions.Card card) { + this.card = card; + return this; } - public static Builder builder() { - return new Builder(); + /** Configuration for any card payments attempted on this PaymentIntent. */ + public Builder setCard(EmptyParam card) { + this.card = card; + return this; } - public static class Builder { - private AccountHolderType accountHolderType; + /** + * 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; + } - private Bank bank; + /** + * 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(PaymentIntentConfirmParams.PaymentMethodOptions.Cashapp cashapp) { + this.cashapp = cashapp; + return this; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodData.Fpx build() { - return new PaymentIntentConfirmParams.PaymentMethodData.Fpx( - this.accountHolderType, this.bank, this.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; + } - /** Account holder type for FPX transaction. */ - public Builder setAccountHolderType( - PaymentIntentConfirmParams.PaymentMethodData.Fpx.AccountHolderType accountHolderType) { - this.accountHolderType = accountHolderType; - 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; + } - /** Required. The customer's bank. */ - public Builder setBank(PaymentIntentConfirmParams.PaymentMethodData.Fpx.Bank bank) { - this.bank = bank; - 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; + } - /** - * Add a key/value pair to `extraParams` map. A map 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; - } + /** + * 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; + } - /** - * Add all map key/value pairs to `extraParams` map. A map 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; - } + /** + * 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; } - public enum AccountHolderType implements ApiRequestParams.EnumParam { - @SerializedName("company") - COMPANY("company"), + /** + * 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; + } - @SerializedName("individual") - INDIVIDUAL("individual"); + /** + * 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; + } - @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#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } - AccountHolderType(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#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("affin_bank") - AFFIN_BANK("affin_bank"), + /** + * 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; + } - @SerializedName("agrobank") - AGROBANK("agrobank"), + /** + * 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("alliance_bank") - ALLIANCE_BANK("alliance_bank"), + /** + * 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; + } - @SerializedName("ambank") - AMBANK("ambank"), + /** + * 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("bank_islam") - BANK_ISLAM("bank_islam"), + /** + * 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; + } - @SerializedName("bank_muamalat") - BANK_MUAMALAT("bank_muamalat"), + /** + * 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("bank_of_china") - BANK_OF_CHINA("bank_of_china"), + /** + * 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; + } - @SerializedName("bank_rakyat") - BANK_RAKYAT("bank_rakyat"), + /** + * 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("bsn") - BSN("bsn"), + /** + * 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; + } - @SerializedName("cimb") - CIMB("cimb"), + /** + * 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("deutsche_bank") - DEUTSCHE_BANK("deutsche_bank"), + /** + * 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; + } - @SerializedName("hong_leong_bank") - HONG_LEONG_BANK("hong_leong_bank"), + /** + * 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("hsbc") - HSBC("hsbc"), + /** + * 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; + } - @SerializedName("kfh") - KFH("kfh"), + /** + * 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("maybank2e") - MAYBANK2E("maybank2e"), + /** + * 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; + } - @SerializedName("maybank2u") - MAYBANK2U("maybank2u"), + /** + * 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; + } - @SerializedName("ocbc") - OCBC("ocbc"), + /** + * 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; + } - @SerializedName("pb_enterprise") - PB_ENTERPRISE("pb_enterprise"), + /** + * 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; + } - @SerializedName("public_bank") - PUBLIC_BANK("public_bank"), + /** + * 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; + } - @SerializedName("rhb") - RHB("rhb"), + /** + * 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; + } - @SerializedName("standard_chartered") - STANDARD_CHARTERED("standard_chartered"), + /** + * 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; + } - @SerializedName("uob") - UOB("uob"); + /** + * 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; + } - @Getter(onMethod_ = {@Override}) - private final String value; + /** + * 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; + } - Bank(String value) { - this.value = value; - } + /** + * 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 - @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 mb_way} PaymentMethod, this sub-hash contains details about the MB WAY + * payment method options. */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + public Builder setMbWay(PaymentIntentConfirmParams.PaymentMethodOptions.MbWay mbWay) { + this.mbWay = mbWay; + return this; + } - private Giropay(Map extraParams) { - this.extraParams = extraParams; + /** + * 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 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( + PaymentIntentConfirmParams.PaymentMethodOptions.Mobilepay mobilepay) { + this.mobilepay = mobilepay; + return this; } - public static class Builder { - private Map extraParams; + /** + * 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; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodData.Giropay build() { - return new PaymentIntentConfirmParams.PaymentMethodData.Giropay(this.extraParams); - } + /** + * 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; + } - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Giropay#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + /** + * 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; + } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Giropay#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } + /** + * 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; } - } - @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 naver_pay} PaymentMethod, this sub-hash contains details about the + * Naver Pay payment method options. */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + public Builder setNaverPay(EmptyParam naverPay) { + this.naverPay = naverPay; + return this; + } - private Gopay(Map extraParams) { - this.extraParams = 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( + 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 Map extraParams; + /** + * 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; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodData.Gopay build() { - return new PaymentIntentConfirmParams.PaymentMethodData.Gopay(this.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; + } - /** - * Add a key/value pair to `extraParams` map. A map 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 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(PaymentIntentConfirmParams.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 PaymentIntentConfirmParams.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 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 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 pay_by_bank} PaymentMethod, this sub-hash contains details about the + * PayByBank payment method options. */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - - private Grabpay(Map extraParams) { - this.extraParams = extraParams; + public Builder setPayByBank( + PaymentIntentConfirmParams.PaymentMethodOptions.PayByBank payByBank) { + this.payByBank = payByBank; + return this; } - public static Builder builder() { - return new Builder(); + /** + * 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; } - public static class Builder { - private Map extraParams; - - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodData.Grabpay build() { - return new PaymentIntentConfirmParams.PaymentMethodData.Grabpay(this.extraParams); - } - - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Grabpay#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } - - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Grabpay#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } + /** + * 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; } - } - - @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. + * If this is a {@code payco} PaymentMethod, this sub-hash contains details about the PAYCO + * payment method options. */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - - private IdBankTransfer(Bank bank, Map extraParams) { - this.bank = bank; - this.extraParams = extraParams; + 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(PaymentIntentConfirmParams.PaymentMethodOptions.Paynow paynow) { + this.paynow = paynow; + return this; } - public static class Builder { - private Bank bank; + /** + * 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; + } - 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.IdBankTransfer build() { - return new PaymentIntentConfirmParams.PaymentMethodData.IdBankTransfer( - this.bank, 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; + } - /** Bank where the account is held. */ - public Builder setBank( - PaymentIntentConfirmParams.PaymentMethodData.IdBankTransfer.Bank bank) { - this.bank = bank; - 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 a key/value pair to `extraParams` map. A map 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); - 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 map key/value pairs to `extraParams` map. A map 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); - 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; } - public enum Bank implements ApiRequestParams.EnumParam { - @SerializedName("bca") - BCA("bca"), + /** + * 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; + } - @SerializedName("bni") - BNI("bni"), + /** + * 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; + } - @SerializedName("bri") - BRI("bri"), + /** + * 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; + } - @SerializedName("cimb") - CIMB("cimb"), + /** + * 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; + } - @SerializedName("permata") - PERMATA("permata"); + /** + * 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(onMethod_ = {@Override}) - private final String value; + /** + * 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; + } - Bank(String value) { - this.value = value; - } + /** + * 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; } - } - @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 rechnung} PaymentMethod, this sub-hash contains details about the + * Rechnung payment method options. */ - @SerializedName("bank") - Bank bank; + public Builder setRechnung( + PaymentIntentConfirmParams.PaymentMethodOptions.Rechnung rechnung) { + this.rechnung = rechnung; + 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 rechnung} PaymentMethod, this sub-hash contains details about the + * Rechnung payment method options. */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - - private Ideal(Bank bank, Map extraParams) { - this.bank = bank; - this.extraParams = extraParams; + 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( + PaymentIntentConfirmParams.PaymentMethodOptions.RevolutPay revolutPay) { + this.revolutPay = revolutPay; + return this; } - public static class Builder { - private Bank bank; - - private Map extraParams; - - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodData.Ideal build() { - return new PaymentIntentConfirmParams.PaymentMethodData.Ideal( - this.bank, this.extraParams); - } - - /** - * The customer's bank. 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; - } - - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Ideal#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } - - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Ideal#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } + /** + * 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; } - 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"), + /** + * 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; + } - @SerializedName("ing") - ING("ing"), + /** + * 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("knab") - KNAB("knab"), + /** + * 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; + } - @SerializedName("moneyou") - MONEYOU("moneyou"), + /** + * 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("n26") - N26("n26"), + /** + * 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; + } - @SerializedName("nn") - NN("nn"), + /** + * 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("rabobank") - RABOBANK("rabobank"), + /** + * 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; + } - @SerializedName("regiobank") - REGIOBANK("regiobank"), + /** + * 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; + } - @SerializedName("revolut") - REVOLUT("revolut"), + /** + * 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; + } - @SerializedName("sns_bank") - SNS_BANK("sns_bank"), + /** + * 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; + } - @SerializedName("triodos_bank") - TRIODOS_BANK("triodos_bank"), + /** + * 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; + } - @SerializedName("van_lanschot") - VAN_LANSCHOT("van_lanschot"), + /** + * 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("yoursafe") - YOURSAFE("yoursafe"); + /** + * 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; + } - @Getter(onMethod_ = {@Override}) - private final String value; + /** + * 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; + } - Bank(String value) { - this.value = value; - } + /** + * 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; } - } - @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 twint} PaymentMethod, this sub-hash contains details about the TWINT + * payment method options. */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + public Builder setTwint(EmptyParam twint) { + this.twint = twint; + return this; + } - private InteracPresent(Map extraParams) { - this.extraParams = 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; } - 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( + PaymentIntentConfirmParams.PaymentMethodOptions.WechatPay wechatPay) { + this.wechatPay = wechatPay; + return this; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodData.InteracPresent build() { - return new PaymentIntentConfirmParams.PaymentMethodData.InteracPresent(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 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; - } + /** + * 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 all map key/value pairs to `extraParams` map. A map 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; - } + /** + * 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 KakaoPay { + 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. @@ -10594,8 +21584,59 @@ public static class KakaoPay { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private KakaoPay(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() { @@ -10605,16 +21646,29 @@ public static Builder 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.PaymentMethodData.KakaoPay build() { - return new PaymentIntentConfirmParams.PaymentMethodData.KakaoPay(this.extraParams); + 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.PaymentMethodData.KakaoPay#extraParams} for - * the field documentation. + * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.AcssDebit#extraParams} + * for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -10627,8 +21681,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.KakaoPay#extraParams} for - * the field documentation. + * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.AcssDebit#extraParams} + * for the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -10637,86 +21691,105 @@ public Builder putAllExtraParam(Map map) { 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); + /** Additional fields for Mandate creation. */ + public Builder setMandateOptions( + PaymentIntentConfirmParams.PaymentMethodOptions.AcssDebit.MandateOptions + mandateOptions) { + this.mandateOptions = mandateOptions; + return this; } - /** Customer's date of birth. */ - public Builder setDob(PaymentIntentConfirmParams.PaymentMethodData.Klarna.Dob dob) { - 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}. + */ + public Builder setSetupFutureUsage( + PaymentIntentConfirmParams.PaymentMethodOptions.AcssDebit.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.PaymentMethodData.Klarna#extraParams} for the - * field documentation. + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

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

If you've already set {@code setup_future_usage} 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 putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); + public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; return this; } /** - * Add all map key/value pairs to `extraParams` map. A map 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. + * 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(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 Dob { - /** Required. The day of birth, between 1 and 31. */ - @SerializedName("day") - Long day; + 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 @@ -10728,19 +21801,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; + /** + * Description of the mandate interval. Only required if 'payment_schedule' parameter is + * 'interval' or 'combined'. + */ + @SerializedName("interval_description") + String intervalDescription; - /** Required. The four-digit year of birth. */ - @SerializedName("year") - Long year; + /** Payment schedule for the mandate. */ + @SerializedName("payment_schedule") + PaymentSchedule paymentSchedule; - private Dob(Long day, Map extraParams, Long month, Long year) { - this.day = day; + /** 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.month = month; - this.year = year; + this.intervalDescription = intervalDescription; + this.paymentSchedule = paymentSchedule; + this.transactionType = transactionType; } public static Builder builder() { @@ -10748,30 +21834,53 @@ public static Builder builder() { } public static class Builder { - private Long day; + private Object customMandateUrl; private Map extraParams; - private Long month; + private String intervalDescription; - private Long year; + private PaymentSchedule paymentSchedule; + + private TransactionType transactionType; /** 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); + public PaymentIntentConfirmParams.PaymentMethodOptions.AcssDebit.MandateOptions build() { + return new PaymentIntentConfirmParams.PaymentMethodOptions.AcssDebit.MandateOptions( + this.customMandateUrl, + this.extraParams, + this.intervalDescription, + this.paymentSchedule, + this.transactionType); } - /** Required. The day of birth, between 1 and 31. */ - public Builder setDay(Long day) { - this.day = day; + /** + * 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.PaymentMethodData.Klarna.Dob#extraParams} + * map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.AcssDebit.MandateOptions#extraParams} * for the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -10785,7 +21894,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.Klarna.Dob#extraParams} + * map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.AcssDebit.MandateOptions#extraParams} * for the field documentation. */ public Builder putAllExtraParam(Map map) { @@ -10793,317 +21903,124 @@ public Builder putAllExtraParam(Map map) { 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 PaymentIntentConfirmParams.PaymentMethodData.Konbini build() { - return new PaymentIntentConfirmParams.PaymentMethodData.Konbini(this.extraParams); - } - - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Konbini#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } - - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Konbini#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } - } - } - - @Getter - @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 PaymentIntentConfirmParams.PaymentMethodData.KrCard build() { - return new PaymentIntentConfirmParams.PaymentMethodData.KrCard(this.extraParams); - } + return this; + } - /** - * Add a key/value pair to `extraParams` map. A map 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<>(); + /** + * 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; } - this.extraParams.put(key, value); - return this; - } - /** - * Add all map key/value pairs to `extraParams` map. A map 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<>(); + /** Payment schedule for the mandate. */ + public Builder setPaymentSchedule( + PaymentIntentConfirmParams.PaymentMethodOptions.AcssDebit.MandateOptions + .PaymentSchedule + paymentSchedule) { + this.paymentSchedule = paymentSchedule; + 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; + /** Transaction type of the mandate. */ + public Builder setTransactionType( + PaymentIntentConfirmParams.PaymentMethodOptions.AcssDebit.MandateOptions + .TransactionType + transactionType) { + this.transactionType = transactionType; + return this; + } + } - private Link(Map extraParams) { - this.extraParams = extraParams; - } + 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"); - /** 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; - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Link#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + PaymentSchedule(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.Link#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + 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; } - 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; + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"), - private MbWay(Map extraParams) { - this.extraParams = extraParams; - } + @SerializedName("off_session") + OFF_SESSION("off_session"), - public static Builder builder() { - return new Builder(); - } + @SerializedName("on_session") + ON_SESSION("on_session"); - 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.MbWay build() { - return new PaymentIntentConfirmParams.PaymentMethodData.MbWay(this.extraParams); + 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 PaymentIntentConfirmParams.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; - } + public enum VerificationMethod implements ApiRequestParams.EnumParam { + @SerializedName("automatic") + AUTOMATIC("automatic"), - /** - * Add all map key/value pairs to `extraParams` map. A map 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<>(); - } - this.extraParams.putAll(map); - return this; + @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 Mobilepay { + 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. + * 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(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - - private Mobilepay(Map extraParams) { - this.extraParams = extraParams; - } - - public static Builder builder() { - return new Builder(); - } - - public static class Builder { - private Map extraParams; - - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodData.Mobilepay build() { - return new PaymentIntentConfirmParams.PaymentMethodData.Mobilepay(this.extraParams); - } - - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Mobilepay#extraParams} for - * the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } - - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Mobilepay#extraParams} for - * the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } - } - } + @SerializedName("capture_method") + ApiRequestParams.EnumParam captureMethod; - @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. @@ -11113,8 +22030,45 @@ public static class Multibanco { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Multibanco(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() { @@ -11122,17 +22076,55 @@ public static Builder 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.PaymentMethodData.Multibanco build() { - return new PaymentIntentConfirmParams.PaymentMethodData.Multibanco(this.extraParams); + 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.PaymentMethodData.Multibanco#extraParams} for + * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.Affirm#extraParams} for * the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -11146,7 +22138,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.PaymentMethodOptions.Affirm#extraParams} for * the field documentation. */ public Builder putAllExtraParam(Map map) { @@ -11156,12 +22148,88 @@ public Builder putAllExtraParam(Map map) { 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 NaverPay { + 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. @@ -11172,15 +22240,48 @@ public static class NaverPay { Map extraParams; /** - * Whether to use Naver Pay points or a card to fund this transaction. If not provided, this - * defaults to {@code card}. + * 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("funding") - Funding funding; + @SerializedName("reference") + String reference; - private NaverPay(Map extraParams, 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}. + */ + @SerializedName("setup_future_usage") + SetupFutureUsage setupFutureUsage; + + private AfterpayClearpay( + ApiRequestParams.EnumParam captureMethod, + Map extraParams, + String reference, + SetupFutureUsage setupFutureUsage) { + this.captureMethod = captureMethod; this.extraParams = extraParams; - this.funding = funding; + this.reference = reference; + this.setupFutureUsage = setupFutureUsage; } public static Builder builder() { @@ -11188,21 +22289,58 @@ public static Builder builder() { } public static class Builder { + private ApiRequestParams.EnumParam captureMethod; + private Map extraParams; - private Funding funding; + private String reference; + + private SetupFutureUsage setupFutureUsage; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodData.NaverPay build() { - return new PaymentIntentConfirmParams.PaymentMethodData.NaverPay( - this.extraParams, this.funding); + 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.PaymentMethodData.NaverPay#extraParams} for - * the field documentation. + * map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.AfterpayClearpay#extraParams} for the + * field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -11215,8 +22353,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.NaverPay#extraParams} for - * the field documentation. + * map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.AfterpayClearpay#extraParams} for the + * field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -11227,27 +22366,67 @@ public Builder putAllExtraParam(Map map) { } /** - * Whether to use Naver Pay points or a card to fund this transaction. If not provided, this - * defaults to {@code card}. + * 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 setFunding( - PaymentIntentConfirmParams.PaymentMethodData.NaverPay.Funding funding) { - this.funding = funding; + 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 Funding implements ApiRequestParams.EnumParam { - @SerializedName("card") - CARD("card"), + public enum CaptureMethod implements ApiRequestParams.EnumParam { + @SerializedName("manual") + MANUAL("manual"); - @SerializedName("points") - POINTS("points"); + @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; - Funding(String value) { + SetupFutureUsage(String value) { this.value = value; } } @@ -11255,26 +22434,7 @@ public enum Funding implements ApiRequestParams.EnumParam { @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; - + 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. @@ -11284,28 +22444,35 @@ public static class NzBankAccount { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - @SerializedName("reference") - String reference; - - /** Required. The suffix of the bank account number. */ - @SerializedName("suffix") - String suffix; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + *

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

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

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

If you've already set {@code setup_future_usage} 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 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; + private Alipay(Map extraParams, ApiRequestParams.EnumParam setupFutureUsage) { this.extraParams = extraParams; - this.reference = reference; - this.suffix = suffix; + this.setupFutureUsage = setupFutureUsage; } public static Builder builder() { @@ -11313,64 +22480,21 @@ public static Builder 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; + private ApiRequestParams.EnumParam setupFutureUsage; /** 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); - } - - /** - * 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; + 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.PaymentMethodData.NzBankAccount#extraParams} - * for the field documentation. + * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.Alipay#extraParams} for + * the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -11383,8 +22507,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.NzBankAccount#extraParams} - * for the field documentation. + * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.Alipay#extraParams} for + * the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -11394,22 +22518,99 @@ public Builder putAllExtraParam(Map map) { return this; } - public Builder setReference(String reference) { - this.reference = 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}. + */ + 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; } + } - /** Required. The suffix of the bank account number. */ - public Builder setSuffix(String suffix) { - this.suffix = suffix; - 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 Oxxo { + 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. @@ -11419,7 +22620,8 @@ public static class Oxxo { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Oxxo(Map extraParams) { + private Alma(ApiRequestParams.EnumParam captureMethod, Map extraParams) { + this.captureMethod = captureMethod; this.extraParams = extraParams; } @@ -11428,17 +22630,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 PaymentIntentConfirmParams.PaymentMethodData.Oxxo build() { - return new PaymentIntentConfirmParams.PaymentMethodData.Oxxo(this.extraParams); + 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.PaymentMethodData.Oxxo#extraParams} for the + * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.Alma#extraParams} for the * field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -11452,7 +22688,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.Oxxo#extraParams} for the + * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.Alma#extraParams} for the * field documentation. */ public Builder putAllExtraParam(Map map) { @@ -11463,14 +22699,35 @@ 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 P24 { - /** The customer's bank. */ - @SerializedName("bank") - Bank bank; + 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 @@ -11481,9 +22738,35 @@ public static class P24 { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private P24(Bank bank, Map extraParams) { - this.bank = 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. + */ + @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() { @@ -11491,26 +22774,54 @@ public static Builder builder() { } public static class Builder { - private Bank bank; + private ApiRequestParams.EnumParam captureMethod; private Map extraParams; + private ApiRequestParams.EnumParam setupFutureUsage; + /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodData.P24 build() { - return new PaymentIntentConfirmParams.PaymentMethodData.P24(this.bank, this.extraParams); + public PaymentIntentConfirmParams.PaymentMethodOptions.AmazonPay build() { + return new PaymentIntentConfirmParams.PaymentMethodOptions.AmazonPay( + this.captureMethod, this.extraParams, this.setupFutureUsage); } - /** The customer's bank. */ - public Builder setBank(PaymentIntentConfirmParams.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( + 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.PaymentMethodData.P24#extraParams} for the - * field documentation. + * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.AmazonPay#extraParams} + * for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -11523,8 +22834,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.P24#extraParams} for the - * field documentation. + * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.AmazonPay#extraParams} + * for the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -11533,91 +22844,83 @@ 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"), + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

If the payment method is {@code card_present} and isn't a digital wallet, Stripe + * creates and attaches a generated_card + * payment method representing the card to the Customer 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; + } - @SerializedName("plus_bank") - PLUS_BANK("plus_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("santander_przelew24") - SANTANDER_PRZELEW24("santander_przelew24"), + public enum CaptureMethod implements ApiRequestParams.EnumParam { + @SerializedName("manual") + MANUAL("manual"); - @SerializedName("tmobile_usbugi_bankowe") - TMOBILE_USBUGI_BANKOWE("tmobile_usbugi_bankowe"), + @Getter(onMethod_ = {@Override}) + private final String value; - @SerializedName("toyota_bank") - TOYOTA_BANK("toyota_bank"), + CaptureMethod(String value) { + this.value = value; + } + } - @SerializedName("velobank") - VELOBANK("velobank"), + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"), - @SerializedName("volkswagen_bank") - VOLKSWAGEN_BANK("volkswagen_bank"); + @SerializedName("off_session") + OFF_SESSION("off_session"); @Getter(onMethod_ = {@Override}) private final String value; - Bank(String value) { + SetupFutureUsage(String value) { this.value = value; } } @@ -11625,7 +22928,7 @@ public enum Bank implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) - public static class PayByBank { + 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. @@ -11635,8 +22938,47 @@ public static class PayByBank { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private PayByBank(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() { @@ -11646,16 +22988,21 @@ 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 PaymentIntentConfirmParams.PaymentMethodData.PayByBank build() { - return new PaymentIntentConfirmParams.PaymentMethodData.PayByBank(this.extraParams); + 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.PaymentMethodData.PayByBank#extraParams} for - * the field documentation. + * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.AuBecsDebit#extraParams} + * for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -11668,8 +23015,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.PayByBank#extraParams} for - * the field documentation. + * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.AuBecsDebit#extraParams} + * for the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -11678,12 +23025,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( + 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 Payco { + 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. @@ -11693,8 +23128,53 @@ public static class Payco { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Payco(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() { @@ -11704,16 +23184,23 @@ 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.PaymentMethodData.Payco build() { - return new PaymentIntentConfirmParams.PaymentMethodData.Payco(this.extraParams); + 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.PaymentMethodData.Payco#extraParams} for the - * field documentation. + * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.BacsDebit#extraParams} + * for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -11726,8 +23213,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.Payco#extraParams} for the - * field documentation. + * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.BacsDebit#extraParams} + * for the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -11736,128 +23223,201 @@ public Builder putAllExtraParam(Map map) { 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; + /** Additional fields for Mandate creation. */ + public Builder setMandateOptions( + PaymentIntentConfirmParams.PaymentMethodOptions.BacsDebit.MandateOptions + mandateOptions) { + this.mandateOptions = mandateOptions; + return this; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodData.Paynow build() { - return new PaymentIntentConfirmParams.PaymentMethodData.Paynow(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( + PaymentIntentConfirmParams.PaymentMethodOptions.BacsDebit.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.PaymentMethodData.Paynow#extraParams} for the - * field documentation. + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

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

If you've already set {@code setup_future_usage} 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 putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); + public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; return this; } /** - * Add all map key/value pairs to `extraParams` map. A map 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. + * 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(String targetDate) { + this.targetDate = targetDate; 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; - } + @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; - public static Builder builder() { - return new Builder(); - } + /** + * 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; - public static class Builder { - private Map extraParams; + private MandateOptions(Map extraParams, Object referencePrefix) { + this.extraParams = extraParams; + this.referencePrefix = referencePrefix; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodData.Paypal build() { - return new PaymentIntentConfirmParams.PaymentMethodData.Paypal(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.Paypal#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 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; } - this.extraParams.put(key, value); - return this; } + } - /** - * Add all map key/value pairs to `extraParams` map. A map 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; + 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 Paypay { + 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. @@ -11867,8 +23427,45 @@ public static class Paypay { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Paypay(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() { @@ -11878,16 +23475,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 PaymentIntentConfirmParams.PaymentMethodData.Paypay build() { - return new PaymentIntentConfirmParams.PaymentMethodData.Paypay(this.extraParams); + 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.PaymentMethodData.Paypay#extraParams} for the - * field documentation. + * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.Bancontact#extraParams} + * for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -11900,8 +23502,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.Paypay#extraParams} for the - * field documentation. + * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.Bancontact#extraParams} + * for the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -11910,111 +23512,132 @@ public Builder putAllExtraParam(Map map) { 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; + /** + * 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; + } - private Payto( - String accountNumber, String bsbNumber, Map extraParams, String payId) { - this.accountNumber = accountNumber; - this.bsbNumber = bsbNumber; - this.extraParams = extraParams; - 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( + PaymentIntentConfirmParams.PaymentMethodOptions.Bancontact.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 String accountNumber; + public enum PreferredLanguage implements ApiRequestParams.EnumParam { + @SerializedName("de") + DE("de"), - private String bsbNumber; + @SerializedName("en") + EN("en"), - private Map extraParams; + @SerializedName("fr") + FR("fr"), - private String payId; + @SerializedName("nl") + NL("nl"); - /** 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); - } + @Getter(onMethod_ = {@Override}) + private final String value; - /** The account number for the bank account. */ - public Builder setAccountNumber(String accountNumber) { - this.accountNumber = accountNumber; - return this; + PreferredLanguage(String value) { + this.value = value; } + } - /** Bank-State-Branch number of the bank account. */ - public Builder setBsbNumber(String bsbNumber) { - this.bsbNumber = bsbNumber; - 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 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; - } + @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 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; - } + @Getter(onMethod_ = {@Override}) + private final String value; - /** The PayID alias for the bank account. */ - public Builder setPayId(String payId) { - this.payId = payId; - return this; + SetupFutureUsage(String value) { + this.value = value; } } } @Getter @EqualsAndHashCode(callSuper = false) - public static class Pix { + 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. @@ -12024,7 +23647,8 @@ public static class Pix { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Pix(Map extraParams) { + private Billie(ApiRequestParams.EnumParam captureMethod, Map extraParams) { + this.captureMethod = captureMethod; this.extraParams = extraParams; } @@ -12033,75 +23657,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 PaymentIntentConfirmParams.PaymentMethodData.Pix build() { - return new PaymentIntentConfirmParams.PaymentMethodData.Pix(this.extraParams); + public PaymentIntentConfirmParams.PaymentMethodOptions.Billie build() { + return new PaymentIntentConfirmParams.PaymentMethodOptions.Billie( + this.captureMethod, 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. + * 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 putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); + public Builder setCaptureMethod( + PaymentIntentConfirmParams.PaymentMethodOptions.Billie.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 PaymentIntentConfirmParams.PaymentMethodData.Pix#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(EmptyParam captureMethod) { + this.captureMethod = captureMethod; 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 + * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.Billie#extraParams} for * the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -12115,7 +23715,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.Promptpay#extraParams} for + * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.Billie#extraParams} for * the field documentation. */ public Builder putAllExtraParam(Map map) { @@ -12126,11 +23726,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 Qris { + 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. @@ -12140,8 +23759,39 @@ public static class Qris { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Qris(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() { @@ -12149,17 +23799,31 @@ 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.PaymentMethodData.Qris build() { - return new PaymentIntentConfirmParams.PaymentMethodData.Qris(this.extraParams); + 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.PaymentMethodData.Qris#extraParams} for the + * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.Blik#extraParams} for the * field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -12173,7 +23837,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.Qris#extraParams} for the + * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.Blik#extraParams} for the * field documentation. */ public Builder putAllExtraParam(Map map) { @@ -12183,95 +23847,91 @@ public Builder putAllExtraParam(Map map) { 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. + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

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

If you've already set {@code setup_future_usage} 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 putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); + public Builder setSetupFutureUsage( + PaymentIntentConfirmParams.PaymentMethodOptions.Blik.SetupFutureUsage + setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; return this; } /** - * Add all map key/value pairs to `extraParams` map. A map 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. + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

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

If you've already set {@code setup_future_usage} 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 putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); + public Builder setSetupFutureUsage(EmptyParam 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. - */ - public Builder setSession(String session) { - this.session = session; - 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 @@ -12282,9 +23942,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() { @@ -12292,26 +23982,32 @@ 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 PaymentIntentConfirmParams.PaymentMethodData.Rechnung build() { - return new PaymentIntentConfirmParams.PaymentMethodData.Rechnung( - this.dob, this.extraParams); + public PaymentIntentConfirmParams.PaymentMethodOptions.Boleto build() { + return new PaymentIntentConfirmParams.PaymentMethodOptions.Boleto( + this.expiresAfterDays, this.extraParams, this.setupFutureUsage); } - /** Required. Customer's date of birth */ - public Builder setDob(PaymentIntentConfirmParams.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 PaymentIntentConfirmParams.PaymentMethodData.Rechnung#extraParams} for + * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.Boleto#extraParams} for * the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -12325,7 +24021,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.Rechnung#extraParams} for + * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.Boleto#extraParams} for * the field documentation. */ public Builder putAllExtraParam(Map map) { @@ -12335,111 +24031,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 static Builder builder() { - return new Builder(); + public Builder setSetupFutureUsage( + PaymentIntentConfirmParams.PaymentMethodOptions.Boleto.SetupFutureUsage + 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 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; - } + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

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

If you've already set {@code setup_future_usage} 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; + } + } - /** Required. The month of birth, between 1 and 12. */ - public Builder setMonth(Long month) { - this.month = month; - return this; - } + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"), - /** Required. The four-digit year of birth. */ - public Builder setYear(Long year) { - this.year = year; - return this; - } + @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 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") + 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. @@ -12449,66 +24145,198 @@ public static class RevolutPay { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private RevolutPay(Map extraParams) { - this.extraParams = extraParams; - } + /** + * Installment configuration for payments attempted on this PaymentIntent. + * + *

For more information, see the installments integration guide. + */ + @SerializedName("installments") + Installments installments; - public static Builder builder() { - return new Builder(); - } + /** Configuration options for setting up an eMandate for cards issued in India. */ + @SerializedName("mandate_options") + MandateOptions mandateOptions; - 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. + */ + @SerializedName("moto") + Boolean moto; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodData.RevolutPay build() { - return new PaymentIntentConfirmParams.PaymentMethodData.RevolutPay(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. + */ + @SerializedName("network") + Network network; - /** - * Add a key/value pair to `extraParams` map. A map 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; - } + /** + * Request ability to decrement the + * authorization for this PaymentIntent. + */ + @SerializedName("request_decremental_authorization") + RequestDecrementalAuthorization requestDecrementalAuthorization; - /** - * Add all map key/value pairs to `extraParams` map. A map 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; - } - } - } + /** + * Request ability to capture beyond the standard + * authorization validity window for this PaymentIntent. + */ + @SerializedName("request_extended_authorization") + RequestExtendedAuthorization requestExtendedAuthorization; - @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. + * Request ability to increment the + * authorization for this PaymentIntent. */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + @SerializedName("request_incremental_authorization") + RequestIncrementalAuthorization requestIncrementalAuthorization; - private SamsungPay(Map extraParams) { + /** + * 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() { @@ -12516,206 +24344,117 @@ public static Builder builder() { } public static class Builder { + private ApiRequestParams.EnumParam captureMethod; + + private String cvcToken; + private Map extraParams; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodData.SamsungPay build() { - return new PaymentIntentConfirmParams.PaymentMethodData.SamsungPay(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 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; - } + 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 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; - } - } - } + private Boolean moto; - @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 Network network; - private Satispay(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 PaymentIntentConfirmParams.PaymentMethodData.Satispay build() { - return new PaymentIntentConfirmParams.PaymentMethodData.Satispay(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 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; - } + 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 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; - } - } - } + private RequestPartialAuthorization requestPartialAuthorization; - @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; + private RequestThreeDSecure requestThreeDSecure; - /** Required. IBAN of the bank account. */ - @SerializedName("iban") - String iban; + private Boolean requireCvcRecollection; - private SepaDebit(Map extraParams, String iban) { - this.extraParams = extraParams; - this.iban = iban; - } + private ApiRequestParams.EnumParam setupFutureUsage; - public static Builder builder() { - return new Builder(); - } + private Object statementDescriptorSuffixKana; - public static class Builder { - private Map extraParams; + private Object statementDescriptorSuffixKanji; - private String iban; + private Object statementDetails; + + private ThreeDSecure threeDSecure; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodData.SepaDebit build() { - return new PaymentIntentConfirmParams.PaymentMethodData.SepaDebit( - this.extraParams, this.iban); + 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); } /** - * Add a key/value pair to `extraParams` map. A map 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. + * 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 putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); + public Builder setCaptureMethod( + PaymentIntentConfirmParams.PaymentMethodOptions.Card.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 PaymentIntentConfirmParams.PaymentMethodData.SepaDebit#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); - return this; - } - - /** Required. IBAN of the bank account. */ - public Builder setIban(String iban) { - this.iban = iban; + 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; } - } - } - - @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. + * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.Card#extraParams} for the + * field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -12728,8 +24467,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.Shopeepay#extraParams} for - * the field documentation. + * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.Card#extraParams} for the + * field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -12738,2672 +24477,3135 @@ public Builder putAllExtraParam(Map map) { 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; + /** + * 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; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodData.Sofort build() { - return new PaymentIntentConfirmParams.PaymentMethodData.Sofort( - this.country, this.extraParams); + /** 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; } /** - * Required. Two-letter ISO code representing the country the bank account - * is located in. + * 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 setCountry( - PaymentIntentConfirmParams.PaymentMethodData.Sofort.Country country) { - this.country = country; + public Builder setMoto(Boolean moto) { + this.moto = moto; return this; } /** - * Add a key/value pair to `extraParams` map. A map 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. + * 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 putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); + public Builder setNetwork( + PaymentIntentConfirmParams.PaymentMethodOptions.Card.Network network) { + this.network = network; return this; } /** - * Add all map key/value pairs to `extraParams` map. A map 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. + * Request ability to decrement the + * authorization for this PaymentIntent. */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); + public Builder setRequestDecrementalAuthorization( + PaymentIntentConfirmParams.PaymentMethodOptions.Card.RequestDecrementalAuthorization + requestDecrementalAuthorization) { + this.requestDecrementalAuthorization = requestDecrementalAuthorization; 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"); + /** + * 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; + } - @Getter(onMethod_ = {@Override}) - private final String value; + /** + * Request ability to increment the + * authorization for this PaymentIntent. + */ + public Builder setRequestIncrementalAuthorization( + PaymentIntentConfirmParams.PaymentMethodOptions.Card.RequestIncrementalAuthorization + requestIncrementalAuthorization) { + this.requestIncrementalAuthorization = requestIncrementalAuthorization; + return this; + } - Country(String value) { - this.value = value; + /** + * Request ability to make multiple + * captures for this PaymentIntent. + */ + public Builder setRequestMulticapture( + PaymentIntentConfirmParams.PaymentMethodOptions.Card.RequestMulticapture + requestMulticapture) { + this.requestMulticapture = requestMulticapture; + 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; + /** + * Request ability to overcapture + * for this PaymentIntent. + */ + public Builder setRequestOvercapture( + PaymentIntentConfirmParams.PaymentMethodOptions.Card.RequestOvercapture + requestOvercapture) { + this.requestOvercapture = requestOvercapture; + 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 partial authorization on this PaymentIntent. */ + public Builder setRequestPartialAuthorization( + PaymentIntentConfirmParams.PaymentMethodOptions.Card.RequestPartialAuthorization + requestPartialAuthorization) { + this.requestPartialAuthorization = requestPartialAuthorization; + return this; + } - /** - * The source_type - * of the balance - */ - @SerializedName("source_type") - SourceType sourceType; + /** + * 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; + } - private StripeBalance( - String account, Map extraParams, SourceType sourceType) { - this.account = account; - this.extraParams = extraParams; - this.sourceType = sourceType; - } + /** + * 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 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( + PaymentIntentConfirmParams.PaymentMethodOptions.Card.SetupFutureUsage + setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } - public static class Builder { - private String account; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

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

If you've already set {@code setup_future_usage} 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; + } - private Map 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. + */ + public Builder setStatementDescriptorSuffixKana(String statementDescriptorSuffixKana) { + this.statementDescriptorSuffixKana = statementDescriptorSuffixKana; + return this; + } - private SourceType sourceType; + /** + * 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; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodData.StripeBalance build() { - return new PaymentIntentConfirmParams.PaymentMethodData.StripeBalance( - this.account, this.extraParams, this.sourceType); + /** + * 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(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( + 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 PaymentIntentConfirmParams.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( + PaymentIntentConfirmParams.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 PaymentIntentConfirmParams.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( - PaymentIntentConfirmParams.PaymentMethodData.StripeBalance.SourceType sourceType) { - this.sourceType = sourceType; + public Builder setThreeDSecure( + PaymentIntentConfirmParams.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 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; + } + } - private Swish(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 PaymentIntentConfirmParams.PaymentMethodData.Swish build() { - return new PaymentIntentConfirmParams.PaymentMethodData.Swish(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 PaymentIntentConfirmParams.PaymentMethodData.Swish#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 PaymentIntentConfirmParams.PaymentMethodData.Swish#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 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 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); - } + private 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.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; - } + /** 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); + } - /** - * Add all map key/value pairs to `extraParams` map. A map 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; - } - } - } + /** + * 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; + } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class UsBankAccount { - /** Account holder type: individual or company. */ - @SerializedName("account_holder_type") - AccountHolderType accountHolderType; + /** + * Add a key/value pair to `extraParams` map. A 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; + } - /** Account number of the bank account. */ - @SerializedName("account_number") - String accountNumber; + /** + * Add all map key/value pairs to `extraParams` map. A 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; + } - /** Account type: checkings or savings. Defaults to checking if omitted. */ - @SerializedName("account_type") - AccountType accountType; + /** + * 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; + } - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-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 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; + } + } - /** The ID of a Financial Connections Account to use as a payment method. */ - @SerializedName("financial_connections_account") - String financialConnectionsAccount; + public enum Interval implements ApiRequestParams.EnumParam { + @SerializedName("month") + MONTH("month"); - /** Routing number of the bank account. */ - @SerializedName("routing_number") - String routingNumber; + @Getter(onMethod_ = {@Override}) + private final String 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; - } + Interval(String value) { + this.value = value; + } + } - public static Builder builder() { - return new Builder(); - } + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("bonus") + BONUS("bonus"), - public static class Builder { - private AccountHolderType accountHolderType; + @SerializedName("fixed_count") + FIXED_COUNT("fixed_count"), - private String accountNumber; + @SerializedName("revolving") + REVOLVING("revolving"); - private AccountType accountType; + @Getter(onMethod_ = {@Override}) + private final String value; - private Map extraParams; + Type(String value) { + this.value = value; + } + } + } + } - private String financialConnectionsAccount; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class MandateOptions { + /** Required. Amount to be charged for future payments. */ + @SerializedName("amount") + Long amount; - private String routingNumber; + /** + * 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; - /** 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); - } + /** + * A description of the mandate or subscription that is meant to be displayed to the + * customer. + */ + @SerializedName("description") + String description; - /** Account holder type: individual or company. */ - public Builder setAccountHolderType( - PaymentIntentConfirmParams.PaymentMethodData.UsBankAccount.AccountHolderType - accountHolderType) { - this.accountHolderType = accountHolderType; - 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; - /** Account number of the bank account. */ - public Builder setAccountNumber(String accountNumber) { - this.accountNumber = accountNumber; - 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; - /** Account type: checkings or savings. Defaults to checking if omitted. */ - public Builder setAccountType( - PaymentIntentConfirmParams.PaymentMethodData.UsBankAccount.AccountType accountType) { - this.accountType = accountType; - return this; - } + /** + * Required. Specifies payment frequency. One of {@code day}, {@code week}, + * {@code month}, {@code year}, or {@code sporadic}. + */ + @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.PaymentMethodData.UsBankAccount#extraParams} - * for the field documentation. + * 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 putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + @SerializedName("interval_count") + Long intervalCount; + + /** Required. Unique identifier for the mandate or subscription. */ + @SerializedName("reference") + String reference; /** - * Add all map key/value pairs to `extraParams` map. A map 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. + * Required. Start date of the mandate or subscription. Start date should + * not be lesser than yesterday. */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } + @SerializedName("start_date") + Long startDate; - /** The ID of a Financial Connections Account to use as a payment method. */ - public Builder setFinancialConnectionsAccount(String financialConnectionsAccount) { - this.financialConnectionsAccount = financialConnectionsAccount; - return this; + /** 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; } - /** Routing number of the bank account. */ - public Builder setRoutingNumber(String routingNumber) { - this.routingNumber = routingNumber; - return this; + public static Builder builder() { + return new Builder(); } - } - public enum AccountHolderType implements ApiRequestParams.EnumParam { - @SerializedName("company") - COMPANY("company"), + public static class Builder { + private Long amount; - @SerializedName("individual") - INDIVIDUAL("individual"); + private AmountType amountType; - @Getter(onMethod_ = {@Override}) - private final String value; + private String description; - AccountHolderType(String value) { - this.value = value; - } - } + private Long endDate; - public enum AccountType implements ApiRequestParams.EnumParam { - @SerializedName("checking") - CHECKING("checking"), + private Map extraParams; - @SerializedName("savings") - SAVINGS("savings"); + private Interval interval; - @Getter(onMethod_ = {@Override}) - private final String value; + private Long intervalCount; - AccountType(String value) { - this.value = value; - } - } - } + private String reference; - @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 Long startDate; - private WechatPay(Map extraParams) { - this.extraParams = extraParams; - } + private List< + PaymentIntentConfirmParams.PaymentMethodOptions.Card.MandateOptions.SupportedType> + supportedTypes; - public static Builder builder() { - return new Builder(); - } + /** 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); + } - public static class Builder { - private Map extraParams; + /** Required. Amount to be charged for future payments. */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodData.WechatPay build() { - return new PaymentIntentConfirmParams.PaymentMethodData.WechatPay(this.extraParams); - } + /** + * 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; + } - /** - * Add a key/value pair to `extraParams` map. A map 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<>(); + /** + * 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; } - this.extraParams.put(key, value); - return this; - } - /** - * Add all map key/value pairs to `extraParams` map. A map 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<>(); + /** + * Add a key/value pair to `extraParams` map. A 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; } - 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; + /** + * Add all map key/value pairs to `extraParams` map. A 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; + } - private Zip(Map extraParams) { - this.extraParams = extraParams; - } + /** + * 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; + } - 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 Map extraParams; + /** Required. Unique identifier for the mandate or subscription. */ + public Builder setReference(String reference) { + this.reference = reference; + return this; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodData.Zip build() { - return new PaymentIntentConfirmParams.PaymentMethodData.Zip(this.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; + } - /** - * Add a key/value pair to `extraParams` map. A map 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<>(); + /** + * 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; } - this.extraParams.put(key, value); - return this; - } - /** - * Add all map key/value pairs to `extraParams` map. A map 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<>(); + /** + * 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; } - this.extraParams.putAll(map); - return this; } - } - } - public enum AllowRedisplay implements ApiRequestParams.EnumParam { - @SerializedName("always") - ALWAYS("always"), + public enum AmountType implements ApiRequestParams.EnumParam { + @SerializedName("fixed") + FIXED("fixed"), - @SerializedName("limited") - LIMITED("limited"), + @SerializedName("maximum") + MAXIMUM("maximum"); - @SerializedName("unspecified") - UNSPECIFIED("unspecified"); + @Getter(onMethod_ = {@Override}) + private final String value; - @Getter(onMethod_ = {@Override}) - private final String value; + AmountType(String value) { + this.value = value; + } + } - AllowRedisplay(String value) { - this.value = value; - } - } + public enum Interval implements ApiRequestParams.EnumParam { + @SerializedName("day") + DAY("day"), - public enum Type implements ApiRequestParams.EnumParam { - @SerializedName("acss_debit") - ACSS_DEBIT("acss_debit"), + @SerializedName("month") + MONTH("month"), - @SerializedName("affirm") - AFFIRM("affirm"), + @SerializedName("sporadic") + SPORADIC("sporadic"), - @SerializedName("afterpay_clearpay") - AFTERPAY_CLEARPAY("afterpay_clearpay"), + @SerializedName("week") + WEEK("week"), - @SerializedName("alipay") - ALIPAY("alipay"), + @SerializedName("year") + YEAR("year"); - @SerializedName("alma") - ALMA("alma"), + @Getter(onMethod_ = {@Override}) + private final String value; - @SerializedName("amazon_pay") - AMAZON_PAY("amazon_pay"), + Interval(String value) { + this.value = value; + } + } - @SerializedName("au_becs_debit") - AU_BECS_DEBIT("au_becs_debit"), + public enum SupportedType implements ApiRequestParams.EnumParam { + @SerializedName("india") + INDIA("india"); - @SerializedName("bacs_debit") - BACS_DEBIT("bacs_debit"), + @Getter(onMethod_ = {@Override}) + private final String value; - @SerializedName("bancontact") - BANCONTACT("bancontact"), + SupportedType(String value) { + this.value = value; + } + } + } - @SerializedName("billie") - BILLIE("billie"), + @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("blik") - BLIK("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("boleto") - BOLETO("boleto"), + /** Phone number (e.g., a toll-free number that customers can call). */ + @SerializedName("phone") + String phone; - @SerializedName("cashapp") - CASHAPP("cashapp"), + private StatementDetails(Address address, Map extraParams, String phone) { + this.address = address; + this.extraParams = extraParams; + this.phone = phone; + } - @SerializedName("crypto") - CRYPTO("crypto"), + public static Builder builder() { + return new Builder(); + } - @SerializedName("customer_balance") - CUSTOMER_BALANCE("customer_balance"), + public static class Builder { + private Address address; - @SerializedName("eps") - EPS("eps"), + private Map extraParams; - @SerializedName("fpx") - FPX("fpx"), + private String phone; - @SerializedName("giropay") - GIROPAY("giropay"), + /** 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); + } - @SerializedName("gopay") - GOPAY("gopay"), + /** 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; + } - @SerializedName("grabpay") - GRABPAY("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 + * 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; + } - @SerializedName("id_bank_transfer") - ID_BANK_TRANSFER("id_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.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("ideal") - IDEAL("ideal"), + /** Phone number (e.g., a toll-free number that customers can call). */ + public Builder setPhone(String phone) { + this.phone = phone; + return this; + } + } - @SerializedName("kakao_pay") - KAKAO_PAY("kakao_pay"), + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Address { + /** City, district, suburb, town, or village. */ + @SerializedName("city") + String city; - @SerializedName("klarna") - KLARNA("klarna"), + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + @SerializedName("country") + String country; - @SerializedName("konbini") - KONBINI("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; - @SerializedName("kr_card") - KR_CARD("kr_card"), + /** Address line 1, such as the street, PO Box, or company name. */ + @SerializedName("line1") + String line1; - @SerializedName("link") - LINK("link"), + /** Address line 2, such as the apartment, suite, unit, or building. */ + @SerializedName("line2") + String line2; - @SerializedName("mb_way") - MB_WAY("mb_way"), + /** ZIP or postal code. */ + @SerializedName("postal_code") + String postalCode; - @SerializedName("mobilepay") - MOBILEPAY("mobilepay"), + /** State, county, province, or region. */ + @SerializedName("state") + String state; - @SerializedName("multibanco") - MULTIBANCO("multibanco"), + 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("naver_pay") - NAVER_PAY("naver_pay"), + public static Builder builder() { + return new Builder(); + } - @SerializedName("nz_bank_account") - NZ_BANK_ACCOUNT("nz_bank_account"), + public static class Builder { + private String city; - @SerializedName("oxxo") - OXXO("oxxo"), + private String country; - @SerializedName("p24") - P24("p24"), + private Map extraParams; - @SerializedName("pay_by_bank") - PAY_BY_BANK("pay_by_bank"), + private String line1; - @SerializedName("payco") - PAYCO("payco"), + private String line2; - @SerializedName("paynow") - PAYNOW("paynow"), + private String postalCode; - @SerializedName("paypal") - PAYPAL("paypal"), + private String state; - @SerializedName("paypay") - PAYPAY("paypay"), + /** 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); + } - @SerializedName("payto") - PAYTO("payto"), + /** City, district, suburb, town, or village. */ + public Builder setCity(String city) { + this.city = city; + return this; + } - @SerializedName("pix") - PIX("pix"), + /** + * Two-letter country code (ISO 3166-1 alpha-2). + */ + public Builder setCountry(String country) { + this.country = country; + return this; + } - @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 + * 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; + } - @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 + * 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; + } - @SerializedName("rechnung") - RECHNUNG("rechnung"), + /** Address line 2, such as the apartment, suite, unit, or building. */ + public Builder setLine2(String line2) { + this.line2 = line2; + return this; + } - @SerializedName("revolut_pay") - REVOLUT_PAY("revolut_pay"), + /** ZIP or postal code. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } - @SerializedName("samsung_pay") - SAMSUNG_PAY("samsung_pay"), + /** State, county, province, or region. */ + public Builder setState(String state) { + this.state = state; + return this; + } + } + } + } - @SerializedName("satispay") - SATISPAY("satispay"), + @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; - @SerializedName("sepa_debit") - SEPA_DEBIT("sepa_debit"), + /** + * 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; - @SerializedName("shopeepay") - SHOPEEPAY("shopeepay"), + /** + * 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; - @SerializedName("sofort") - SOFORT("sofort"), + /** The exemption requested via 3DS and accepted by the issuer at authentication time. */ + @SerializedName("exemption_indicator") + ExemptionIndicator exemptionIndicator; - @SerializedName("stripe_balance") - STRIPE_BALANCE("stripe_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. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - @SerializedName("swish") - SWISH("swish"), + /** + * 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; - @SerializedName("twint") - TWINT("twint"), + /** + * 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; - @SerializedName("us_bank_account") - US_BANK_ACCOUNT("us_bank_account"), + /** + * Required. For 3D Secure 1, the XID. For 3D Secure 2, the Directory + * Server Transaction ID (dsTransID). + */ + @SerializedName("transaction_id") + String transactionId; - @SerializedName("wechat_pay") - WECHAT_PAY("wechat_pay"), + /** Required. The version of 3D Secure that was performed. */ + @SerializedName("version") + Version version; - @SerializedName("zip") - ZIP("zip"); + 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; + } - @Getter(onMethod_ = {@Override}) - private final String value; + public static Builder builder() { + return new Builder(); + } - Type(String value) { - this.value = value; - } - } - } + public static class Builder { + private AresTransStatus aresTransStatus; - @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; + private String cryptogram; - /** - * If this is an {@code affirm} PaymentMethod, this sub-hash contains details about the Affirm - * payment method options. - */ - @SerializedName("affirm") - Object affirm; + private ElectronicCommerceIndicator electronicCommerceIndicator; - /** - * 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; + private ExemptionIndicator exemptionIndicator; - /** - * If this is a {@code alipay} PaymentMethod, this sub-hash contains details about the Alipay - * payment method options. - */ - @SerializedName("alipay") - Object alipay; + 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 NetworkOptions networkOptions; - /** - * 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; + private String requestorChallengeIndicator; - /** - * 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; + private String transactionId; - /** - * 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; + private Version version; - /** - * If this is a {@code bancontact} PaymentMethod, this sub-hash contains details about the - * Bancontact payment method options. - */ - @SerializedName("bancontact") - Object bancontact; + /** 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); + } - /** - * If this is a {@code billie} PaymentMethod, this sub-hash contains details about the Billie - * payment method options. - */ - @SerializedName("billie") - Object billie; + /** 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; + } - /** - * If this is a {@code blik} PaymentMethod, this sub-hash contains details about the BLIK - * payment method options. - */ - @SerializedName("blik") - Object blik; + /** + * 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 boleto} PaymentMethod, this sub-hash contains details about the Boleto - * payment method options. - */ - @SerializedName("boleto") - Object boleto; + /** + * 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; + } - /** Configuration for any card payments attempted on this PaymentIntent. */ - @SerializedName("card") - Object card; + /** + * Add a key/value pair to `extraParams` map. A 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; + } - /** - * 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; + /** + * Add all map key/value pairs to `extraParams` map. A 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; + } - /** - * If this is a {@code cashapp} PaymentMethod, this sub-hash contains details about the Cash App - * Pay payment method options. - */ - @SerializedName("cashapp") - Object cashapp; + /** + * 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; + } - /** - * If this is a {@code crypto} PaymentMethod, this sub-hash contains details about the Crypto - * payment method options. - */ - @SerializedName("crypto") - Object crypto; + /** + * 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 customer balance} PaymentMethod, this sub-hash contains details about the - * customer balance payment method options. - */ - @SerializedName("customer_balance") - Object customerBalance; + /** + * 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 eps} PaymentMethod, this sub-hash contains details about the EPS payment - * method options. - */ - @SerializedName("eps") - Object eps; + /** Required. The version of 3D Secure that was performed. */ + public Builder setVersion( + PaymentIntentConfirmParams.PaymentMethodOptions.Card.ThreeDSecure.Version version) { + this.version = version; + 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 NetworkOptions { + /** Cartes Bancaires-specific 3DS fields. */ + @SerializedName("cartes_bancaires") + CartesBancaires cartesBancaires; - /** - * If this is a {@code fpx} PaymentMethod, this sub-hash contains details about the FPX payment - * method options. - */ - @SerializedName("fpx") - Object 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; - /** - * If this is a {@code giropay} PaymentMethod, this sub-hash contains details about the Giropay - * payment method options. - */ - @SerializedName("giropay") - Object giropay; + private NetworkOptions(CartesBancaires cartesBancaires, Map extraParams) { + this.cartesBancaires = cartesBancaires; + this.extraParams = extraParams; + } - /** - * If this is a {@code gopay} PaymentMethod, this sub-hash contains details about the Gopay - * payment method options. - */ - @SerializedName("gopay") - Object gopay; + public static Builder builder() { + return new Builder(); + } - /** - * If this is a {@code grabpay} PaymentMethod, this sub-hash contains details about the Grabpay - * payment method options. - */ - @SerializedName("grabpay") - Object grabpay; + public static class Builder { + private CartesBancaires cartesBancaires; - /** - * 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 Map extraParams; - /** - * If this is a {@code ideal} PaymentMethod, this sub-hash contains details about the Ideal - * payment method options. - */ - @SerializedName("ideal") - Object ideal; + /** 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); + } - /** - * 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; + /** Cartes Bancaires-specific 3DS fields. */ + public Builder setCartesBancaires( + PaymentIntentConfirmParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions + .CartesBancaires + cartesBancaires) { + this.cartesBancaires = cartesBancaires; + return this; + } - /** - * 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; + /** + * Add a key/value pair to `extraParams` map. A 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; + } - /** - * If this is a {@code klarna} PaymentMethod, this sub-hash contains details about the Klarna - * payment method options. - */ - @SerializedName("klarna") - Object klarna; + /** + * Add all map key/value pairs to `extraParams` map. A 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; + } + } - /** - * If this is a {@code konbini} PaymentMethod, this sub-hash contains details about the Konbini - * payment method options. - */ - @SerializedName("konbini") - Object konbini; + @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 kr_card} PaymentMethod, this sub-hash contains details about the KR Card - * payment method options. - */ - @SerializedName("kr_card") - Object krCard; + /** + * 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; - /** - * If this is a {@code link} PaymentMethod, this sub-hash contains details about the Link - * payment method options. - */ - @SerializedName("link") - Object link; + /** + * 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 mb_way} PaymentMethod, this sub-hash contains details about the MB WAY - * payment method options. - */ - @SerializedName("mb_way") - Object 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; - /** - * If this is a {@code MobilePay} PaymentMethod, this sub-hash contains details about the - * MobilePay payment method options. - */ - @SerializedName("mobilepay") - Object mobilepay; + private CartesBancaires( + CbAvalgo cbAvalgo, + String cbExemption, + Long cbScore, + Map extraParams) { + this.cbAvalgo = cbAvalgo; + this.cbExemption = cbExemption; + this.cbScore = cbScore; + this.extraParams = extraParams; + } - /** - * If this is a {@code multibanco} PaymentMethod, this sub-hash contains details about the - * Multibanco payment method options. - */ - @SerializedName("multibanco") - Object multibanco; + 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. - */ - @SerializedName("naver_pay") - Object naverPay; + public static class Builder { + private CbAvalgo cbAvalgo; - /** - * 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 String cbExemption; - /** - * If this is a {@code oxxo} PaymentMethod, this sub-hash contains details about the OXXO - * payment method options. - */ - @SerializedName("oxxo") - Object oxxo; + private Long cbScore; - /** - * If this is a {@code p24} PaymentMethod, this sub-hash contains details about the Przelewy24 - * payment method options. - */ - @SerializedName("p24") - Object p24; + private Map extraParams; - /** - * 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; + /** 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); + } - /** - * If this is a {@code payco} PaymentMethod, this sub-hash contains details about the PAYCO - * payment method options. - */ - @SerializedName("payco") - Object payco; + /** + * 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; + } - /** - * If this is a {@code paynow} PaymentMethod, this sub-hash contains details about the PayNow - * payment method options. - */ - @SerializedName("paynow") - Object paynow; + /** + * 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; + } - /** - * If this is a {@code paypal} PaymentMethod, this sub-hash contains details about the PayPal - * payment method options. - */ - @SerializedName("paypal") - Object paypal; + /** + * 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; + } - /** - * If this is a {@code paypay} PaymentMethod, this sub-hash contains details about the PayPay - * payment method options. - */ - @SerializedName("paypay") - Object 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.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; + } - /** - * If this is a {@code payto} PaymentMethod, this sub-hash contains details about the PayTo - * payment method options. - */ - @SerializedName("payto") - Object 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.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; + } + } - /** - * If this is a {@code pix} PaymentMethod, this sub-hash contains details about the Pix payment - * method options. - */ - @SerializedName("pix") - Object pix; + public enum CbAvalgo implements ApiRequestParams.EnumParam { + @SerializedName("0") + N0("0"), - /** - * If this is a {@code promptpay} PaymentMethod, this sub-hash contains details about the - * PromptPay payment method options. - */ - @SerializedName("promptpay") - Object promptpay; + @SerializedName("1") + N1("1"), - /** - * If this is a {@code qris} PaymentMethod, this sub-hash contains details about the QRIS - * payment method options. - */ - @SerializedName("qris") - Object qris; + @SerializedName("2") + N2("2"), - /** - * If this is a {@code rechnung} PaymentMethod, this sub-hash contains details about the - * Rechnung payment method options. - */ - @SerializedName("rechnung") - Object rechnung; + @SerializedName("3") + N3("3"), - /** - * 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("4") + N4("4"), - /** - * 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("A") + A("A"); - /** - * If this is a {@code satispay} PaymentMethod, this sub-hash contains details about the - * Satispay payment method options. - */ - @SerializedName("satispay") - Object satispay; + @Getter(onMethod_ = {@Override}) + private final String value; - /** - * 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; + CbAvalgo(String value) { + this.value = value; + } + } + } + } - /** - * If this is a {@code shopeepay} PaymentMethod, this sub-hash contains details about the - * ShopeePay payment method options. - */ - @SerializedName("shopeepay") - Object shopeepay; + public enum AresTransStatus implements ApiRequestParams.EnumParam { + @SerializedName("A") + A("A"), - /** - * If this is a {@code sofort} PaymentMethod, this sub-hash contains details about the SOFORT - * payment method options. - */ - @SerializedName("sofort") - Object sofort; + @SerializedName("C") + C("C"), - /** - * 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("I") + I("I"), - /** - * If this is a {@code Swish} PaymentMethod, this sub-hash contains details about the Swish - * payment method options. - */ - @SerializedName("swish") - Object swish; + @SerializedName("N") + N("N"), - /** - * If this is a {@code twint} PaymentMethod, this sub-hash contains details about the TWINT - * payment method options. - */ - @SerializedName("twint") - Object twint; + @SerializedName("R") + R("R"), - /** - * 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; + @SerializedName("U") + U("U"), - /** - * 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("Y") + Y("Y"); - /** - * If this is a {@code zip} PaymentMethod, this sub-hash contains details about the Zip payment - * method options. - */ - @SerializedName("zip") - Object zip; + @Getter(onMethod_ = {@Override}) + private final String value; - 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; - } + 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 Object acssDebit; + @SerializedName("02") + N02("02"), - private Object affirm; + @SerializedName("05") + N05("05"), - private Object afterpayClearpay; + @SerializedName("06") + N06("06"), - private Object alipay; + @SerializedName("07") + N07("07"); - private Object alma; + @Getter(onMethod_ = {@Override}) + private final String value; - private Object amazonPay; + ElectronicCommerceIndicator(String value) { + this.value = value; + } + } - private Object auBecsDebit; + public enum ExemptionIndicator implements ApiRequestParams.EnumParam { + @SerializedName("low_risk") + LOW_RISK("low_risk"), - private Object bacsDebit; + @SerializedName("none") + NONE("none"); - private Object bancontact; + @Getter(onMethod_ = {@Override}) + private final String value; - private Object billie; + ExemptionIndicator(String value) { + this.value = value; + } + } - private Object blik; + public enum Version implements ApiRequestParams.EnumParam { + @SerializedName("1.0.2") + N1__0__2("1.0.2"), - private Object boleto; + @SerializedName("2.1.0") + N2__1__0("2.1.0"), - private Object card; + @SerializedName("2.2.0") + N2__2__0("2.2.0"); - private Object cardPresent; + @Getter(onMethod_ = {@Override}) + private final String value; - private Object cashapp; + Version(String value) { + this.value = value; + } + } + } + + public enum CaptureMethod implements ApiRequestParams.EnumParam { + @SerializedName("manual") + MANUAL("manual"); - private Object crypto; + @Getter(onMethod_ = {@Override}) + private final String value; - private Object customerBalance; + CaptureMethod(String value) { + this.value = value; + } + } - private Object eps; + public enum Network implements ApiRequestParams.EnumParam { + @SerializedName("amex") + AMEX("amex"), - private Map extraParams; + @SerializedName("cartes_bancaires") + CARTES_BANCAIRES("cartes_bancaires"), - private Object fpx; + @SerializedName("diners") + DINERS("diners"), - private Object giropay; + @SerializedName("discover") + DISCOVER("discover"), - private Object gopay; + @SerializedName("eftpos_au") + EFTPOS_AU("eftpos_au"), - private Object grabpay; + @SerializedName("girocard") + GIROCARD("girocard"), - private Object idBankTransfer; + @SerializedName("interac") + INTERAC("interac"), - private Object ideal; + @SerializedName("jcb") + JCB("jcb"), - private Object interacPresent; + @SerializedName("link") + LINK("link"), - private Object kakaoPay; + @SerializedName("mastercard") + MASTERCARD("mastercard"), - private Object klarna; + @SerializedName("unionpay") + UNIONPAY("unionpay"), - private Object konbini; + @SerializedName("unknown") + UNKNOWN("unknown"), - private Object krCard; + @SerializedName("visa") + VISA("visa"); - private Object link; + @Getter(onMethod_ = {@Override}) + private final String value; - private Object mbWay; + Network(String value) { + this.value = value; + } + } - private Object mobilepay; + public enum RequestDecrementalAuthorization implements ApiRequestParams.EnumParam { + @SerializedName("if_available") + IF_AVAILABLE("if_available"), - private Object multibanco; + @SerializedName("never") + NEVER("never"); - private Object naverPay; + @Getter(onMethod_ = {@Override}) + private final String value; - private Object nzBankAccount; + RequestDecrementalAuthorization(String value) { + this.value = value; + } + } - private Object oxxo; + public enum RequestExtendedAuthorization implements ApiRequestParams.EnumParam { + @SerializedName("if_available") + IF_AVAILABLE("if_available"), - private Object p24; + @SerializedName("never") + NEVER("never"); - private Object payByBank; + @Getter(onMethod_ = {@Override}) + private final String value; - private Object payco; + RequestExtendedAuthorization(String value) { + this.value = value; + } + } - private Object paynow; + public enum RequestIncrementalAuthorization implements ApiRequestParams.EnumParam { + @SerializedName("if_available") + IF_AVAILABLE("if_available"), - private Object paypal; + @SerializedName("never") + NEVER("never"); - private Object paypay; + @Getter(onMethod_ = {@Override}) + private final String value; - private Object payto; + RequestIncrementalAuthorization(String value) { + this.value = value; + } + } - private Object pix; + public enum RequestMulticapture implements ApiRequestParams.EnumParam { + @SerializedName("if_available") + IF_AVAILABLE("if_available"), - private Object promptpay; + @SerializedName("never") + NEVER("never"); - private Object qris; + @Getter(onMethod_ = {@Override}) + private final String value; - private Object rechnung; + RequestMulticapture(String value) { + this.value = value; + } + } - private Object revolutPay; + public enum RequestOvercapture implements ApiRequestParams.EnumParam { + @SerializedName("if_available") + IF_AVAILABLE("if_available"), - private Object samsungPay; + @SerializedName("never") + NEVER("never"); - private Object satispay; + @Getter(onMethod_ = {@Override}) + private final String value; - private Object sepaDebit; + RequestOvercapture(String value) { + this.value = value; + } + } - private Object shopeepay; + public enum RequestPartialAuthorization implements ApiRequestParams.EnumParam { + @SerializedName("if_available") + IF_AVAILABLE("if_available"), - private Object sofort; + @SerializedName("never") + NEVER("never"); - private Object stripeBalance; + @Getter(onMethod_ = {@Override}) + private final String value; - private Object swish; + RequestPartialAuthorization(String value) { + this.value = value; + } + } - private Object twint; + public enum RequestThreeDSecure implements ApiRequestParams.EnumParam { + @SerializedName("any") + ANY("any"), - private Object usBankAccount; + @SerializedName("automatic") + AUTOMATIC("automatic"), - private Object wechatPay; + @SerializedName("challenge") + CHALLENGE("challenge"); - private Object zip; + @Getter(onMethod_ = {@Override}) + private final String value; - /** 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); + RequestThreeDSecure(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( - PaymentIntentConfirmParams.PaymentMethodOptions.AcssDebit acssDebit) { - this.acssDebit = acssDebit; - return this; - } + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"), - /** - * 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; - } + @SerializedName("off_session") + OFF_SESSION("off_session"), - /** - * 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; - } + @SerializedName("on_session") + ON_SESSION("on_session"); - /** - * 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( - PaymentIntentConfirmParams.PaymentMethodOptions.AfterpayClearpay afterpayClearpay) { - this.afterpayClearpay = afterpayClearpay; - return this; + SetupFutureUsage(String value) { + this.value = value; + } } + } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class CardPresent { /** - * If this is a {@code afterpay_clearpay} PaymentMethod, this sub-hash contains details about - * the Afterpay Clearpay 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 setAfterpayClearpay(EmptyParam afterpayClearpay) { - this.afterpayClearpay = afterpayClearpay; - return this; - } + @SerializedName("capture_method") + CaptureMethod captureMethod; /** - * If this is a {@code alipay} PaymentMethod, this sub-hash contains details about the Alipay - * 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 setAlipay(PaymentIntentConfirmParams.PaymentMethodOptions.Alipay alipay) { - this.alipay = alipay; - return this; - } + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; /** - * If this is a {@code alipay} PaymentMethod, this sub-hash contains details about the Alipay - * payment method options. + * Request ability to capture this payment beyond the standard authorization + * validity window. */ - public Builder setAlipay(EmptyParam alipay) { - this.alipay = alipay; - return this; - } + @SerializedName("request_extended_authorization") + Boolean requestExtendedAuthorization; /** - * If this is a {@code alma} PaymentMethod, this sub-hash contains details about the Alma - * 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 setAlma(PaymentIntentConfirmParams.PaymentMethodOptions.Alma alma) { - this.alma = alma; - return this; - } + @SerializedName("request_incremental_authorization_support") + Boolean requestIncrementalAuthorizationSupport; /** - * If this is a {@code alma} PaymentMethod, this sub-hash contains details about the Alma - * payment method options. + * Network routing priority on co-branded EMV cards supporting domestic debit and + * international card schemes. */ - public Builder setAlma(EmptyParam alma) { - this.alma = alma; - return this; - } + @SerializedName("routing") + Routing routing; - /** - * 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; + 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; } - /** - * 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; + 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( - PaymentIntentConfirmParams.PaymentMethodOptions.AuBecsDebit auBecsDebit) { - this.auBecsDebit = auBecsDebit; - return this; - } + public static class Builder { + private CaptureMethod captureMethod; - /** - * 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; - } + 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( - PaymentIntentConfirmParams.PaymentMethodOptions.BacsDebit bacsDebit) { - this.bacsDebit = bacsDebit; - return this; - } + private Boolean requestExtendedAuthorization; - /** - * 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; - } + private Boolean requestIncrementalAuthorizationSupport; - /** - * 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; - } + private Routing routing; - /** - * 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; - } + /** 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); + } - /** - * 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; - } + /** + * 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; + } - /** - * 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; - } + /** + * Add a key/value pair to `extraParams` map. A 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; + } - /** - * 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; - } + /** + * Add all map key/value pairs to `extraParams` map. A 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; + } - /** - * 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; - } + /** + * 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 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; - } + /** + * 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 boleto} PaymentMethod, this sub-hash contains details about the Boleto - * payment method options. - */ - public Builder setBoleto(EmptyParam boleto) { - this.boleto = boleto; - 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; + } } - /** Configuration for any card payments attempted on this PaymentIntent. */ - public Builder setCard(PaymentIntentConfirmParams.PaymentMethodOptions.Card card) { - this.card = card; - 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; - /** Configuration for any card payments attempted on this PaymentIntent. */ - public Builder setCard(EmptyParam card) { - this.card = card; - return this; - } + /** Routing requested priority. */ + @SerializedName("requested_priority") + RequestedPriority requestedPriority; - /** - * 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; - } + private Routing(Map extraParams, RequestedPriority requestedPriority) { + this.extraParams = extraParams; + this.requestedPriority = requestedPriority; + } - /** - * 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; - } + public static Builder builder() { + return new Builder(); + } - /** - * 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; - } + 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. - */ - public Builder setCashapp(EmptyParam cashapp) { - this.cashapp = cashapp; - return this; - } + private RequestedPriority requestedPriority; - /** - * 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; - } + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodOptions.CardPresent.Routing build() { + return new PaymentIntentConfirmParams.PaymentMethodOptions.CardPresent.Routing( + this.extraParams, this.requestedPriority); + } - /** - * 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; - } + /** + * Add a key/value pair to `extraParams` map. A 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; + } - /** - * 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; - } + /** + * Add all map key/value pairs to `extraParams` map. A 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; + } - /** - * 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; - } + /** Routing requested priority. */ + public Builder setRequestedPriority( + PaymentIntentConfirmParams.PaymentMethodOptions.CardPresent.Routing.RequestedPriority + requestedPriority) { + this.requestedPriority = requestedPriority; + 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; - } + public enum RequestedPriority implements ApiRequestParams.EnumParam { + @SerializedName("domestic") + DOMESTIC("domestic"), - /** - * 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; - } + @SerializedName("international") + INTERNATIONAL("international"); - /** - * Add a key/value pair to `extraParams` map. A 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; - } + @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#extraParams} for the field - * documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + RequestedPriority(String value) { + this.value = value; + } } - 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; - } + public enum CaptureMethod implements ApiRequestParams.EnumParam { + @SerializedName("manual") + MANUAL("manual"), - /** - * 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("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 giropay} PaymentMethod, this sub-hash contains details about the - * Giropay 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 setGiropay(PaymentIntentConfirmParams.PaymentMethodOptions.Giropay giropay) { - this.giropay = giropay; - return this; - } + @SerializedName("capture_method") + ApiRequestParams.EnumParam captureMethod; /** - * If this is a {@code giropay} PaymentMethod, this sub-hash contains details about the - * Giropay 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 setGiropay(EmptyParam giropay) { - this.giropay = giropay; - return this; - } + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; /** - * If this is a {@code gopay} PaymentMethod, this sub-hash contains details about the Gopay - * 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 setGopay(PaymentIntentConfirmParams.PaymentMethodOptions.Gopay gopay) { - this.gopay = gopay; - return this; - } + @SerializedName("setup_future_usage") + ApiRequestParams.EnumParam setupFutureUsage; - /** - * 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; + private Cashapp( + ApiRequestParams.EnumParam captureMethod, + Map extraParams, + ApiRequestParams.EnumParam setupFutureUsage) { + this.captureMethod = captureMethod; + this.extraParams = extraParams; + this.setupFutureUsage = setupFutureUsage; } - /** - * 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; + public static Builder builder() { + return new Builder(); } - /** - * 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; - } + public static class Builder { + private ApiRequestParams.EnumParam captureMethod; - /** - * 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; - } + 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. - */ - public Builder setIdBankTransfer(EmptyParam idBankTransfer) { - this.idBankTransfer = idBankTransfer; - return this; - } + private ApiRequestParams.EnumParam setupFutureUsage; - /** - * 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; - } + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodOptions.Cashapp build() { + return new PaymentIntentConfirmParams.PaymentMethodOptions.Cashapp( + this.captureMethod, this.extraParams, this.setupFutureUsage); + } - /** - * 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; - } + /** + * 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; + } - /** - * 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; + /** + * 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; + } } - /** - * 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; - } + public enum CaptureMethod implements ApiRequestParams.EnumParam { + @SerializedName("manual") + MANUAL("manual"); - /** - * 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; - } + @Getter(onMethod_ = {@Override}) + private final String value; - /** - * 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; + CaptureMethod(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(PaymentIntentConfirmParams.PaymentMethodOptions.Klarna klarna) { - this.klarna = klarna; - return this; - } + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"), - /** - * 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; - } + @SerializedName("off_session") + OFF_SESSION("off_session"), - /** - * 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; - } + @SerializedName("on_session") + ON_SESSION("on_session"); - /** - * 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; - } + @Getter(onMethod_ = {@Override}) + private final String value; - /** - * 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; + SetupFutureUsage(String value) { + this.value = value; + } } + } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Crypto { /** - * If this is a {@code kr_card} PaymentMethod, this sub-hash contains details about the KR - * Card 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 setKrCard(EmptyParam krCard) { - this.krCard = krCard; - return this; - } + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; /** - * If this is a {@code link} PaymentMethod, this sub-hash contains details about the Link - * payment method options. + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + *

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

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

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

If you've already set {@code setup_future_usage} 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 setLink(PaymentIntentConfirmParams.PaymentMethodOptions.Link link) { - this.link = link; - return this; - } + @SerializedName("setup_future_usage") + SetupFutureUsage setupFutureUsage; - /** - * 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; + private Crypto(Map extraParams, SetupFutureUsage setupFutureUsage) { + this.extraParams = extraParams; + this.setupFutureUsage = setupFutureUsage; } - /** - * 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; + public static Builder builder() { + return new Builder(); } - /** - * 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 static class Builder { + private Map extraParams; - /** - * 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; - } + private SetupFutureUsage setupFutureUsage; - /** - * 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; + /** 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; + } } - /** - * 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; + 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 multibanco} PaymentMethod, this sub-hash contains details about the - * Multibanco payment method options. + * Configuration for the bank transfer funding type, if the {@code funding_type} is set to + * {@code bank_transfer}. */ - public Builder setMultibanco(EmptyParam multibanco) { - this.multibanco = multibanco; - return this; - } + @SerializedName("bank_transfer") + BankTransfer bankTransfer; /** - * 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( - PaymentIntentConfirmParams.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. + * 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 setNaverPay(EmptyParam naverPay) { - this.naverPay = naverPay; - return this; - } + @SerializedName("funding_type") + FundingType fundingType; /** - * If this is a {@code nz_bank_account} PaymentMethod, this sub-hash contains details about - * the NZ BECS Direct Debit 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 setNzBankAccount( - PaymentIntentConfirmParams.PaymentMethodOptions.NzBankAccount nzBankAccount) { - this.nzBankAccount = nzBankAccount; - 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 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(PaymentIntentConfirmParams.PaymentMethodOptions.Oxxo oxxo) { - this.oxxo = oxxo; - return this; + 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; + } } - /** - * 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; - } + @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; - /** - * 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 Type type; - /** - * 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.PaymentMethodOptions.CustomerBalance.BankTransfer + build() { + return new PaymentIntentConfirmParams.PaymentMethodOptions.CustomerBalance.BankTransfer( + this.euBankTransfer, this.extraParams, this.requestedAddressTypes, this.type); + } - /** - * 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; - } + /** Configuration for the eu_bank_transfer funding type. */ + public Builder setEuBankTransfer( + PaymentIntentConfirmParams.PaymentMethodOptions.CustomerBalance.BankTransfer + .EuBankTransfer + euBankTransfer) { + this.euBankTransfer = euBankTransfer; + 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.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 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.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 payco} PaymentMethod, this sub-hash contains details about the PAYCO - * payment method options. - */ - public Builder setPayco(EmptyParam payco) { - this.payco = payco; - 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; + } - /** - * 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; - } + /** + * 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; + } - /** - * 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; - } + /** + * 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; + } + } - /** - * 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; - } + @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; - /** - * 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; - } + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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. - */ - public Builder setPaypay(PaymentIntentConfirmParams.PaymentMethodOptions.Paypay paypay) { - this.paypay = paypay; - return this; - } + private EuBankTransfer(String country, Map extraParams) { + this.country = country; + this.extraParams = 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; - } + 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(PaymentIntentConfirmParams.PaymentMethodOptions.Payto payto) { - this.payto = payto; - return this; - } + public static class Builder { + private String country; - /** - * 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; - } + 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; + } - /** - * 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; - } + /** + * Add a key/value pair to `extraParams` map. A 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; + } - /** - * 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 all map key/value pairs to `extraParams` map. A 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; + } + } + } - /** - * 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; - } + public enum RequestedAddressType implements ApiRequestParams.EnumParam { + @SerializedName("aba") + ABA("aba"), - /** - * 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; - } + @SerializedName("iban") + IBAN("iban"), - /** - * 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; - } + @SerializedName("sepa") + SEPA("sepa"), - /** - * 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; - } + @SerializedName("sort_code") + SORT_CODE("sort_code"), - /** - * 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; - } + @SerializedName("spei") + SPEI("spei"), - /** - * 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; - } + @SerializedName("swift") + SWIFT("swift"), - /** - * 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; - } + @SerializedName("zengin") + ZENGIN("zengin"); - /** - * 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; - } + @Getter(onMethod_ = {@Override}) + private final String value; - /** - * 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; - } + RequestedAddressType(String value) { + this.value = value; + } + } - /** - * 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; - } + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("eu_bank_transfer") + EU_BANK_TRANSFER("eu_bank_transfer"), - /** - * 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; - } + @SerializedName("gb_bank_transfer") + GB_BANK_TRANSFER("gb_bank_transfer"), - /** - * 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("jp_bank_transfer") + JP_BANK_TRANSFER("jp_bank_transfer"), - /** - * 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; - } + @SerializedName("mx_bank_transfer") + MX_BANK_TRANSFER("mx_bank_transfer"), - /** - * 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("us_bank_transfer") + US_BANK_TRANSFER("us_bank_transfer"); - /** - * 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; - } + @Getter(onMethod_ = {@Override}) + private final String value; - /** - * 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; + Type(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(PaymentIntentConfirmParams.PaymentMethodOptions.Sofort sofort) { - this.sofort = sofort; - return this; - } + public enum FundingType implements ApiRequestParams.EnumParam { + @SerializedName("bank_transfer") + BANK_TRANSFER("bank_transfer"); - /** - * 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(onMethod_ = {@Override}) + private final String value; - /** - * 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; + FundingType(String value) { + this.value = value; + } } - /** - * 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 enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"); - /** - * 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; - } + @Getter(onMethod_ = {@Override}) + private final String value; - /** - * 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; + SetupFutureUsage(String value) { + this.value = value; + } } + } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Eps { /** - * If this is a {@code twint} PaymentMethod, this sub-hash contains details about the TWINT - * 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 setTwint(PaymentIntentConfirmParams.PaymentMethodOptions.Twint twint) { - this.twint = twint; - return this; - } + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; /** - * If this is a {@code twint} PaymentMethod, this sub-hash contains details about the TWINT - * 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 setTwint(EmptyParam twint) { - this.twint = twint; - return this; - } + @SerializedName("setup_future_usage") + SetupFutureUsage setupFutureUsage; - /** - * 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; + private Eps(Map extraParams, SetupFutureUsage setupFutureUsage) { + this.extraParams = extraParams; + this.setupFutureUsage = setupFutureUsage; } - /** - * 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 Builder builder() { + return new Builder(); } - /** - * 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; - } + 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(EmptyParam wechatPay) { - this.wechatPay = wechatPay; - return this; - } + private SetupFutureUsage setupFutureUsage; - /** - * 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; + /** 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; + } } - /** - * 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; + 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 AcssDebit { + 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. @@ -15413,10 +27615,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. * @@ -15441,31 +27639,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") - String targetDate; - - /** Bank account verification method. */ - @SerializedName("verification_method") - VerificationMethod verificationMethod; + SetupFutureUsage setupFutureUsage; - private AcssDebit( - Map extraParams, - MandateOptions mandateOptions, - ApiRequestParams.EnumParam setupFutureUsage, - String targetDate, - VerificationMethod verificationMethod) { + private Fpx(Map extraParams, SetupFutureUsage setupFutureUsage) { this.extraParams = extraParams; - this.mandateOptions = mandateOptions; this.setupFutureUsage = setupFutureUsage; - this.targetDate = targetDate; - this.verificationMethod = verificationMethod; } public static Builder builder() { @@ -15475,29 +27653,19 @@ public static Builder builder() { public static class Builder { private Map extraParams; - private MandateOptions mandateOptions; - - private ApiRequestParams.EnumParam setupFutureUsage; - - private String targetDate; - - private VerificationMethod verificationMethod; + private SetupFutureUsage setupFutureUsage; /** 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.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.AcssDebit#extraParams} - * for the field documentation. + * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.Fpx#extraParams} for the + * field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -15510,8 +27678,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.PaymentMethodOptions.Fpx#extraParams} for the + * field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -15521,14 +27689,6 @@ public Builder putAllExtraParam(Map 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. @@ -15554,258 +27714,146 @@ public Builder setMandateOptions( * 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) { + PaymentIntentConfirmParams.PaymentMethodOptions.Fpx.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; - } - - /** 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; + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"); - 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; - } + @Getter(onMethod_ = {@Override}) + private final String value; - public static Builder builder() { - return new Builder(); + SetupFutureUsage(String value) { + this.value = value; } + } + } - 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; - } + @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( - PaymentIntentConfirmParams.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( - PaymentIntentConfirmParams.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 PaymentIntentConfirmParams.PaymentMethodOptions.Giropay build() { + return new PaymentIntentConfirmParams.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 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; } - 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 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"), - - @SerializedName("off_session") - OFF_SESSION("off_session"), - - @SerializedName("on_session") - ON_SESSION("on_session"); + NONE("none"); @Getter(onMethod_ = {@Override}) private final String value; @@ -15814,21 +27862,137 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam { this.value = value; } } + } - public enum VerificationMethod implements ApiRequestParams.EnumParam { - @SerializedName("automatic") - AUTOMATIC("automatic"), + @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; - @SerializedName("instant") - INSTANT("instant"), + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + *

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

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

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

If you've already set {@code setup_future_usage} 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("microdeposits") - MICRODEPOSITS("microdeposits"); + 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; - VerificationMethod(String value) { + SetupFutureUsage(String value) { this.value = value; } } @@ -15836,20 +28000,7 @@ public enum VerificationMethod implements ApiRequestParams.EnumParam { @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 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. @@ -15859,10 +28010,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") - String preferredLocale; - /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * @@ -15889,14 +28036,8 @@ public static class Affirm { @SerializedName("setup_future_usage") SetupFutureUsage setupFutureUsage; - private Affirm( - ApiRequestParams.EnumParam captureMethod, - Map extraParams, - String preferredLocale, - SetupFutureUsage setupFutureUsage) { - this.captureMethod = captureMethod; + private Grabpay(Map extraParams, SetupFutureUsage setupFutureUsage) { this.extraParams = extraParams; - this.preferredLocale = preferredLocale; this.setupFutureUsage = setupFutureUsage; } @@ -15905,55 +28046,20 @@ public static Builder 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; + 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.Affirm#extraParams} for + * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.Grabpay#extraParams} for * the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -15967,7 +28073,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.Affirm#extraParams} for + * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.Grabpay#extraParams} for * the field documentation. */ public Builder putAllExtraParam(Map map) { @@ -15978,14 +28084,6 @@ 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; - return this; - } - /** * Indicates that you intend to make future payments with this PaymentIntent's payment * method. @@ -16011,25 +28109,13 @@ public Builder setPreferredLocale(String preferredLocale) { * off_session}. */ public Builder setSetupFutureUsage( - PaymentIntentConfirmParams.PaymentMethodOptions.Affirm.SetupFutureUsage + PaymentIntentConfirmParams.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"); @@ -16045,19 +28131,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 @@ -16068,14 +28155,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") - String reference; - /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * @@ -16102,14 +28181,14 @@ public static class AfterpayClearpay { @SerializedName("setup_future_usage") SetupFutureUsage setupFutureUsage; - private AfterpayClearpay( - ApiRequestParams.EnumParam captureMethod, + private IdBankTransfer( + Long expiresAfter, + Long expiresAt, Map extraParams, - String reference, SetupFutureUsage setupFutureUsage) { - this.captureMethod = captureMethod; + this.expiresAfter = expiresAfter; + this.expiresAt = expiresAt; this.extraParams = extraParams; - this.reference = reference; this.setupFutureUsage = setupFutureUsage; } @@ -16118,49 +28197,35 @@ public static Builder builder() { } public static class Builder { - private ApiRequestParams.EnumParam captureMethod; + private Long expiresAfter; - private Map extraParams; + private Long expiresAt; - private String reference; + private Map extraParams; 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); + public PaymentIntentConfirmParams.PaymentMethodOptions.IdBankTransfer build() { + return new PaymentIntentConfirmParams.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( - PaymentIntentConfirmParams.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; } @@ -16168,8 +28233,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 - * PaymentIntentConfirmParams.PaymentMethodOptions.AfterpayClearpay#extraParams} for the - * field documentation. + * PaymentIntentConfirmParams.PaymentMethodOptions.IdBankTransfer#extraParams} for the field + * documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -16183,8 +28248,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.AfterpayClearpay#extraParams} for the - * field documentation. + * PaymentIntentConfirmParams.PaymentMethodOptions.IdBankTransfer#extraParams} for the field + * documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -16194,16 +28259,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; - } - /** * Indicates that you intend to make future payments with this PaymentIntent's payment * method. @@ -16229,25 +28284,13 @@ public Builder setReference(String reference) { * off_session}. */ public Builder setSetupFutureUsage( - PaymentIntentConfirmParams.PaymentMethodOptions.AfterpayClearpay.SetupFutureUsage + PaymentIntentConfirmParams.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"); @@ -16263,7 +28306,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. @@ -16299,7 +28342,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; } @@ -16314,15 +28357,15 @@ public static class Builder { private ApiRequestParams.EnumParam setupFutureUsage; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodOptions.Alipay build() { - return new PaymentIntentConfirmParams.PaymentMethodOptions.Alipay( + 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.Alipay#extraParams} for + * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.Ideal#extraParams} for * the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -16336,7 +28379,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.Alipay#extraParams} for + * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.Ideal#extraParams} for * the field documentation. */ public Builder putAllExtraParam(Map map) { @@ -16372,7 +28415,7 @@ public Builder putAllExtraParam(Map map) { * off_session}. */ public Builder setSetupFutureUsage( - PaymentIntentConfirmParams.PaymentMethodOptions.Alipay.SetupFutureUsage + PaymentIntentConfirmParams.PaymentMethodOptions.Ideal.SetupFutureUsage setupFutureUsage) { this.setupFutureUsage = setupFutureUsage; return this; @@ -16426,20 +28469,7 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @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 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. @@ -16449,8 +28479,7 @@ public static class Alma { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Alma(ApiRequestParams.EnumParam captureMethod, Map extraParams) { - this.captureMethod = captureMethod; + private InteracPresent(Map extraParams) { this.extraParams = extraParams; } @@ -16459,52 +28488,20 @@ 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); - } - - /** - * 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; + 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.Alma#extraParams} for the - * field documentation. + * map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.InteracPresent#extraParams} for the field + * documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -16517,8 +28514,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.PaymentMethodOptions.Alma#extraParams} for the - * field documentation. + * map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.InteracPresent#extraParams} for the field + * documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -16528,23 +28526,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 { + public static class KakaoPay { /** * Controls when the funds are captured from the customer's account. * @@ -16589,7 +28575,7 @@ public static class AmazonPay { @SerializedName("setup_future_usage") ApiRequestParams.EnumParam setupFutureUsage; - private AmazonPay( + private KakaoPay( ApiRequestParams.EnumParam captureMethod, Map extraParams, ApiRequestParams.EnumParam setupFutureUsage) { @@ -16610,8 +28596,8 @@ public static class Builder { private ApiRequestParams.EnumParam setupFutureUsage; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodOptions.AmazonPay build() { - return new PaymentIntentConfirmParams.PaymentMethodOptions.AmazonPay( + public PaymentIntentConfirmParams.PaymentMethodOptions.KakaoPay build() { + return new PaymentIntentConfirmParams.PaymentMethodOptions.KakaoPay( this.captureMethod, this.extraParams, this.setupFutureUsage); } @@ -16626,7 +28612,7 @@ public PaymentIntentConfirmParams.PaymentMethodOptions.AmazonPay build() { * value for this parameter unsets the stored value for this payment method type. */ public Builder setCaptureMethod( - PaymentIntentConfirmParams.PaymentMethodOptions.AmazonPay.CaptureMethod captureMethod) { + PaymentIntentConfirmParams.PaymentMethodOptions.KakaoPay.CaptureMethod captureMethod) { this.captureMethod = captureMethod; return this; } @@ -16649,8 +28635,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 PaymentIntentConfirmParams.PaymentMethodOptions.AmazonPay#extraParams} - * for the field documentation. + * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.KakaoPay#extraParams} for + * the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -16663,8 +28649,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.PaymentMethodOptions.KakaoPay#extraParams} for + * the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -16695,7 +28681,7 @@ public Builder putAllExtraParam(Map map) { * href="https://stripe.com/strong-customer-authentication">SCA. */ public Builder setSetupFutureUsage( - PaymentIntentConfirmParams.PaymentMethodOptions.AmazonPay.SetupFutureUsage + PaymentIntentConfirmParams.PaymentMethodOptions.KakaoPay.SetupFutureUsage setupFutureUsage) { this.setupFutureUsage = setupFutureUsage; return this; @@ -16757,7 +28743,20 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) - public static class AuBecsDebit { + 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. @@ -16767,6 +28766,14 @@ public static class AuBecsDebit { @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. * @@ -16791,23 +28798,31 @@ public static class AuBecsDebit { * off_session}. */ @SerializedName("setup_future_usage") - ApiRequestParams.EnumParam setupFutureUsage; + SetupFutureUsage 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; + /** Subscription details if setting up or charging a subscription. */ + @SerializedName("subscriptions") + Object subscriptions; - private AuBecsDebit( + /** Supplementary Purchase Data for the corresponding Klarna payment. */ + @SerializedName("supplementary_purchase_data") + Object supplementaryPurchaseData; + + private Klarna( + ApiRequestParams.EnumParam captureMethod, Map extraParams, - ApiRequestParams.EnumParam setupFutureUsage, - String targetDate) { + 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.targetDate = targetDate; + this.subscriptions = subscriptions; + this.supplementaryPurchaseData = supplementaryPurchaseData; } public static Builder builder() { @@ -16815,23 +28830,68 @@ public static Builder builder() { } public static class Builder { + private ApiRequestParams.EnumParam captureMethod; + private Map extraParams; - private ApiRequestParams.EnumParam setupFutureUsage; + private OnDemand onDemand; - private String targetDate; + private PreferredLocale preferredLocale; + + private SetupFutureUsage setupFutureUsage; + + private Object subscriptions; + + private Object supplementaryPurchaseData; /** 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.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.AuBecsDebit#extraParams} - * for the field documentation. + * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.Klarna#extraParams} for + * the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -16844,8 +28904,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.PaymentMethodOptions.Klarna#extraParams} for + * the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -16855,286 +28915,305 @@ public Builder putAllExtraParam(Map 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 { /** - * Indicates that you intend to make future payments with this PaymentIntent's payment - * method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using - * a publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. + * Your average amount value. You can use a value across your customer base, or segment + * based on customer type, country, etc. */ - public Builder setSetupFutureUsage( - PaymentIntentConfirmParams.PaymentMethodOptions.AuBecsDebit.SetupFutureUsage - setupFutureUsage) { - this.setupFutureUsage = setupFutureUsage; - return this; - } + @SerializedName("average_amount") + Long averageAmount; /** - * Indicates that you intend to make future payments with this PaymentIntent's payment - * method. - * - *

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

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

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

If you've already set {@code setup_future_usage} 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; /** - * 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. + * 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 setTargetDate(String targetDate) { - this.targetDate = targetDate; - return this; - } - } + @SerializedName("maximum_amount") + Long maximumAmount; - public enum SetupFutureUsage implements ApiRequestParams.EnumParam { - @SerializedName("none") - NONE("none"), + /** + * 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; - @SerializedName("off_session") - OFF_SESSION("off_session"), + /** Interval at which the customer is making purchases. */ + @SerializedName("purchase_interval") + PurchaseInterval purchaseInterval; - @SerializedName("on_session") - ON_SESSION("on_session"); + /** The number of {@code purchase_interval} between charges. */ + @SerializedName("purchase_interval_count") + Long purchaseIntervalCount; - @Getter(onMethod_ = {@Override}) - private final String 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; + } - SetupFutureUsage(String value) { - this.value = value; + public static Builder builder() { + return new Builder(); } - } - } - @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; + public static class Builder { + private Long averageAmount; - /** Additional fields for Mandate creation. */ - @SerializedName("mandate_options") - MandateOptions mandateOptions; + 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}. - */ - @SerializedName("setup_future_usage") - ApiRequestParams.EnumParam setupFutureUsage; + private Long maximumAmount; - /** - * 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 Long minimumAmount; - private BacsDebit( - Map extraParams, - MandateOptions mandateOptions, - ApiRequestParams.EnumParam setupFutureUsage, - String targetDate) { - this.extraParams = extraParams; - this.mandateOptions = mandateOptions; - this.setupFutureUsage = setupFutureUsage; - this.targetDate = targetDate; - } + private PurchaseInterval purchaseInterval; - public static Builder builder() { - return new Builder(); - } + private Long purchaseIntervalCount; - public static class Builder { - private Map extraParams; + /** 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); + } - private MandateOptions mandateOptions; + /** + * 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; + } - 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.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 String targetDate; + /** + * Add all map key/value pairs to `extraParams` map. A 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; + } - /** 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); - } + /** + * 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; + } - /** - * Add a key/value pair to `extraParams` map. A 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<>(); + /** Interval at which the customer is making purchases. */ + public Builder setPurchaseInterval( + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.OnDemand.PurchaseInterval + purchaseInterval) { + this.purchaseInterval = purchaseInterval; + 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.BacsDebit#extraParams} - * for the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** The number of {@code purchase_interval} between charges. */ + public Builder setPurchaseIntervalCount(Long purchaseIntervalCount) { + this.purchaseIntervalCount = purchaseIntervalCount; + return this; } - this.extraParams.putAll(map); - return this; } - /** Additional fields for Mandate creation. */ - public Builder setMandateOptions( - PaymentIntentConfirmParams.PaymentMethodOptions.BacsDebit.MandateOptions - mandateOptions) { - this.mandateOptions = mandateOptions; - return this; - } + public enum PurchaseInterval implements ApiRequestParams.EnumParam { + @SerializedName("day") + DAY("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}. - */ - public Builder setSetupFutureUsage( - PaymentIntentConfirmParams.PaymentMethodOptions.BacsDebit.SetupFutureUsage - setupFutureUsage) { - this.setupFutureUsage = setupFutureUsage; - 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(EmptyParam setupFutureUsage) { - this.setupFutureUsage = setupFutureUsage; - return this; - } + @SerializedName("week") + WEEK("week"), - /** - * 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("year") + YEAR("year"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + PurchaseInterval(String value) { + this.value = value; + } } } @Getter @EqualsAndHashCode(callSuper = false) - public static class MandateOptions { + 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. @@ -17145,17 +29224,46 @@ public static class MandateOptions { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** Required. Unit of time between subscription charges. */ + @SerializedName("interval") + Interval interval; + /** - * 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'. + * 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("reference_prefix") - Object referencePrefix; + @SerializedName("interval_count") + Long intervalCount; - private MandateOptions(Map extraParams, Object referencePrefix) { + /** 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.referencePrefix = referencePrefix; + this.interval = interval; + this.intervalCount = intervalCount; + this.name = name; + this.nextBilling = nextBilling; + this.reference = reference; } public static Builder builder() { @@ -17165,20 +29273,33 @@ public static Builder builder() { public static class Builder { private Map extraParams; - private Object referencePrefix; + 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.BacsDebit.MandateOptions build() { - return new PaymentIntentConfirmParams.PaymentMethodOptions.BacsDebit.MandateOptions( - this.extraParams, this.referencePrefix); + 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.BacsDebit.MandateOptions#extraParams} - * for the field documentation. + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.Subscription#extraParams} for + * the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -17192,8 +29313,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.MandateOptions#extraParams} - * for the field documentation. + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.Subscription#extraParams} for + * the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -17203,1533 +29324,2013 @@ public Builder putAllExtraParam(Map map) { return this; } + /** Required. Unit of time between subscription charges. */ + public Builder setInterval( + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.Subscription.Interval + interval) { + this.interval = interval; + 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'. + * 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 setReferencePrefix(String referencePrefix) { - this.referencePrefix = referencePrefix; + 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; /** - * 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'. + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized 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 setReferencePrefix(EmptyParam referencePrefix) { - this.referencePrefix = referencePrefix; - return this; - } - } - } + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - public enum SetupFutureUsage implements ApiRequestParams.EnumParam { - @SerializedName("none") - NONE("none"), + private NextBilling(Long amount, String date, Map extraParams) { + this.amount = amount; + this.date = date; + this.extraParams = extraParams; + } - @SerializedName("off_session") - OFF_SESSION("off_session"), + public static Builder builder() { + return new Builder(); + } - @SerializedName("on_session") - ON_SESSION("on_session"); + public static class Builder { + private Long amount; - @Getter(onMethod_ = {@Override}) - private final String value; + private String date; - SetupFutureUsage(String value) { - this.value = value; - } - } - } + private Map extraParams; - @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; + /** 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); + } - /** - * Preferred language of the Bancontact authorization page that the customer is redirected to. - */ - @SerializedName("preferred_language") - PreferredLanguage preferredLanguage; + /** Required. The amount of the next charge for the subscription. */ + public Builder setAmount(Long amount) { + this.amount = amount; + 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; + /** + * 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 Bancontact( - Map extraParams, - PreferredLanguage preferredLanguage, - ApiRequestParams.EnumParam setupFutureUsage) { - this.extraParams = extraParams; - this.preferredLanguage = preferredLanguage; - 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 + * 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; + } - 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.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; + } + } + } - public static class Builder { - private Map extraParams; + public enum Interval implements ApiRequestParams.EnumParam { + @SerializedName("day") + DAY("day"), - private PreferredLanguage preferredLanguage; + @SerializedName("month") + MONTH("month"), - private ApiRequestParams.EnumParam setupFutureUsage; + @SerializedName("week") + WEEK("week"), - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodOptions.Bancontact build() { - return new PaymentIntentConfirmParams.PaymentMethodOptions.Bancontact( - this.extraParams, this.preferredLanguage, this.setupFutureUsage); - } + @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.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; - } + @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.Bancontact#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; } + } - /** - * 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; - } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class SupplementaryPurchaseData { + /** Supplementary bus reservation details. */ + @SerializedName("bus_reservation_details") + Object busReservationDetails; - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment - * method. - * - *

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

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

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

If you've already set {@code setup_future_usage} 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; - } + /** Supplementary event reservation details. */ + @SerializedName("event_reservation_details") + Object eventReservationDetails; /** - * Indicates that you intend to make future payments with this PaymentIntent's payment - * method. - * - *

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

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

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

If you've already set {@code setup_future_usage} 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; - public enum PreferredLanguage implements ApiRequestParams.EnumParam { - @SerializedName("de") - DE("de"), + /** Supplementary ferry reservation details. */ + @SerializedName("ferry_reservation_details") + Object ferryReservationDetails; - @SerializedName("en") - EN("en"), + /** Supplementary insurance details. */ + @SerializedName("insurances") + Object insurances; - @SerializedName("fr") - FR("fr"), + /** Supplementary marketplace seller details. */ + @SerializedName("marketplace_sellers") + Object marketplaceSellers; - @SerializedName("nl") - NL("nl"); + /** Supplementary round trip reservation details. */ + @SerializedName("round_trip_reservation_details") + Object roundTripReservationDetails; - @Getter(onMethod_ = {@Override}) - private final String value; + /** Supplementary train reservation details. */ + @SerializedName("train_reservation_details") + Object trainReservationDetails; - PreferredLanguage(String value) { - this.value = value; + /** 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 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 Object busReservationDetails; - @Getter(onMethod_ = {@Override}) - private final String value; + private Object eventReservationDetails; - SetupFutureUsage(String value) { - this.value = value; - } - } - } + private Map extraParams; - @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 ferryReservationDetails; - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level 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 insurances; - private Billie(ApiRequestParams.EnumParam captureMethod, Map extraParams) { - this.captureMethod = captureMethod; - this.extraParams = extraParams; - } + private Object marketplaceSellers; - public static Builder builder() { - return new Builder(); - } + private Object roundTripReservationDetails; - public static class Builder { - private ApiRequestParams.EnumParam captureMethod; + private Object trainReservationDetails; - private Map extraParams; + private Object vouchers; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodOptions.Billie build() { - return new PaymentIntentConfirmParams.PaymentMethodOptions.Billie( - this.captureMethod, this.extraParams); - } + /** Finalize and obtain parameter instance from this builder. */ + 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); + } - /** - * 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; - } + /** + * 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; + } - /** - * 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 `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; + } - /** - * Add a key/value pair to `extraParams` map. A 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<>(); + /** Supplementary bus reservation details. */ + public Builder setBusReservationDetails(EmptyParam busReservationDetails) { + this.busReservationDetails = busReservationDetails; + 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.Billie#extraParams} for - * the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** 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; } - this.extraParams.putAll(map); - return this; - } - } - public enum CaptureMethod implements ApiRequestParams.EnumParam { - @SerializedName("manual") - MANUAL("manual"); + /** + * 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; + } - @Getter(onMethod_ = {@Override}) - private final String value; + /** Supplementary insurance details. */ + public Builder setInsurances(EmptyParam insurances) { + this.insurances = insurances; + return this; + } - CaptureMethod(String value) { - this.value = value; - } - } - } + /** Supplementary insurance details. */ + public Builder setInsurances( + List< + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.Insurance> + insurances) { + this.insurances = insurances; + 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") - String code; + /** + * 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; + } - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-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 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; + } - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment method. - * - *

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

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

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

If you've already set {@code setup_future_usage} 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; + /** Supplementary marketplace seller details. */ + public Builder setMarketplaceSellers(EmptyParam marketplaceSellers) { + this.marketplaceSellers = marketplaceSellers; + return this; + } - private Blik( - String code, - Map extraParams, - ApiRequestParams.EnumParam setupFutureUsage) { - this.code = code; - this.extraParams = extraParams; - this.setupFutureUsage = setupFutureUsage; - } + /** Supplementary marketplace seller details. */ + public Builder setMarketplaceSellers( + List< + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.MarketplaceSeller> + marketplaceSellers) { + this.marketplaceSellers = marketplaceSellers; + return this; + } - public static Builder builder() { - return new Builder(); - } + /** + * 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; + } - public static class Builder { - private String code; + /** + * 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; + } - private Map extraParams; + /** Supplementary round trip reservation details. */ + public Builder setRoundTripReservationDetails(EmptyParam roundTripReservationDetails) { + this.roundTripReservationDetails = roundTripReservationDetails; + return this; + } - private ApiRequestParams.EnumParam setupFutureUsage; + /** Supplementary round trip reservation details. */ + public Builder setRoundTripReservationDetails( + List< + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail> + roundTripReservationDetails) { + this.roundTripReservationDetails = roundTripReservationDetails; + return this; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodOptions.Blik build() { - return new PaymentIntentConfirmParams.PaymentMethodOptions.Blik( - this.code, this.extraParams, this.setupFutureUsage); - } + /** + * 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. + */ + @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; + } - /** - * 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 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. + */ + @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>(); + } + ((List< + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail>) + this.trainReservationDetails) + .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.Blik#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** Supplementary train reservation details. */ + public Builder setTrainReservationDetails(EmptyParam trainReservationDetails) { + this.trainReservationDetails = trainReservationDetails; + 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.Blik#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** Supplementary train reservation details. */ + public Builder setTrainReservationDetails( + List< + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail> + trainReservationDetails) { + this.trainReservationDetails = trainReservationDetails; + 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.Blik.SetupFutureUsage - setupFutureUsage) { - this.setupFutureUsage = setupFutureUsage; - 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 + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData#vouchers} + * for the field documentation. + */ + @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>(); + } + ((List< + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.Voucher>) + this.vouchers) + .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}. - */ - public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { - this.setupFutureUsage = setupFutureUsage; - 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 + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData#vouchers} + * for the field documentation. + */ + @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; + } + + /** 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; + } } - } - public enum SetupFutureUsage implements ApiRequestParams.EnumParam { - @SerializedName("none") - NONE("none"); + @Getter + @EqualsAndHashCode(callSuper = false) + public static class BusReservationDetail { + /** Name of associated or partner company for the service. */ + @SerializedName("affiliate_name") + String affiliateName; - @Getter(onMethod_ = {@Override}) - private final String value; + /** Arrival details. */ + @SerializedName("arrival") + Arrival arrival; - SetupFutureUsage(String value) { - this.value = value; - } - } - } + /** Name of transportation company. */ + @SerializedName("carrier_name") + String carrierName; - @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; + /** 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; + /** Departure details. */ + @SerializedName("departure") + Departure departure; - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment method. - * - *

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

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

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

If you've already set {@code setup_future_usage} 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; + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - private Boleto( - Long expiresAfterDays, - Map extraParams, - ApiRequestParams.EnumParam setupFutureUsage) { - this.expiresAfterDays = expiresAfterDays; - this.extraParams = extraParams; - this.setupFutureUsage = setupFutureUsage; - } + /** List of insurances for this reservation. */ + @SerializedName("insurances") + List< + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .BusReservationDetail.Insurance> + insurances; - public static Builder builder() { - return new Builder(); - } + /** 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.insurances = insurances; + this.passengers = passengers; + this.price = price; + this.ticketClass = ticketClass; + } - public static class Builder { - private Long expiresAfterDays; + public static Builder builder() { + return new Builder(); + } - private Map extraParams; + public static class Builder { + private String affiliateName; - private ApiRequestParams.EnumParam setupFutureUsage; + private Arrival arrival; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodOptions.Boleto build() { - return new PaymentIntentConfirmParams.PaymentMethodOptions.Boleto( - this.expiresAfterDays, this.extraParams, this.setupFutureUsage); - } + private String carrierName; - /** - * 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 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.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; - } + private Departure departure; - /** - * Add all map key/value pairs to `extraParams` map. A 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<>(); + private Map extraParams; + + private List< + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .BusReservationDetail.Insurance> + insurances; + + 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.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); + } + + /** 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; + } + + /** + * Add a key/value pair to `extraParams` map. A 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#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A 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#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.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; + } } - 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 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(); + } - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment - * method. - * - *

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

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

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

If you've already set {@code setup_future_usage} 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 Address address; - public enum SetupFutureUsage implements ApiRequestParams.EnumParam { - @SerializedName("none") - NONE("none"), + private String arrivalLocation; - @SerializedName("off_session") - OFF_SESSION("off_session"), + private Map extraParams; - @SerializedName("on_session") - ON_SESSION("on_session"); + /** 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); + } - @Getter(onMethod_ = {@Override}) - private final String value; + /** Address of the arrival location. */ + public Builder setAddress( + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .BusReservationDetail.Arrival.Address + address) { + this.address = address; + return this; + } - SetupFutureUsage(String value) { - this.value = value; - } - } - } + /** Identifier name or reference for the arrival location. */ + public Builder setArrivalLocation(String arrivalLocation) { + this.arrivalLocation = arrivalLocation; + 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; + /** + * Add a key/value pair to `extraParams` map. A 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; + } - /** - * 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; + /** + * Add all map key/value pairs to `extraParams` map. A 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; + } + } - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-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 { + /** The city or town. */ + @SerializedName("city") + String city; - /** - * Installment configuration for payments attempted on this PaymentIntent. - * - *

For more information, see the installments integration guide. - */ - @SerializedName("installments") - Installments installments; + /** The country in ISO 3166-1 alpha-2 format. */ + @SerializedName("country") + String country; - /** Configuration options for setting up an eMandate for cards issued in India. */ - @SerializedName("mandate_options") - MandateOptions 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; + + /** 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; + } - /** - * 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 Builder builder() { + return new Builder(); + } - /** - * 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; + public static class Builder { + private String city; - /** - * Request ability to decrement the - * authorization for this PaymentIntent. - */ - @SerializedName("request_decremental_authorization") - RequestDecrementalAuthorization requestDecrementalAuthorization; + private String country; - /** - * Request ability to capture beyond the standard - * authorization validity window for this PaymentIntent. - */ - @SerializedName("request_extended_authorization") - RequestExtendedAuthorization requestExtendedAuthorization; + private Map extraParams; - /** - * Request ability to increment the - * authorization for this PaymentIntent. - */ - @SerializedName("request_incremental_authorization") - RequestIncrementalAuthorization requestIncrementalAuthorization; + private String postalCode; - /** - * Request ability to make multiple - * captures for this PaymentIntent. - */ - @SerializedName("request_multicapture") - RequestMulticapture requestMulticapture; + private String region; - /** - * Request ability to overcapture - * for this PaymentIntent. - */ - @SerializedName("request_overcapture") - RequestOvercapture requestOvercapture; + private String streetAddress; - /** Request partial authorization on this PaymentIntent. */ - @SerializedName("request_partial_authorization") - RequestPartialAuthorization requestPartialAuthorization; + private String streetAddress2; - /** - * 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; + /** 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); + } - /** - * 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; + /** 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}. - */ - @SerializedName("setup_future_usage") - ApiRequestParams.EnumParam 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 + * 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; + } - /** - * 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; + /** + * Add all map key/value pairs to `extraParams` map. A 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; + } - /** - * 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; + /** The postal code formatted according to country. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } - /** - * 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 state, county, province, or region formatted according to country. */ + public Builder setRegion(String region) { + this.region = region; + return this; + } - /** - * 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; + /** Line 1 of the street address. */ + public Builder setStreetAddress(String streetAddress) { + this.streetAddress = streetAddress; + return this; + } - 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; - } + /** 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 Departure { + /** Address of the departure location. */ + @SerializedName("address") + Address address; - public static class Builder { - private ApiRequestParams.EnumParam captureMethod; + /** Timestamp of departure. */ + @SerializedName("departs_at") + Long departsAt; - private String cvcToken; + /** Identifier name or reference for the origin location. */ + @SerializedName("departure_location") + String departureLocation; - 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 Installments installments; + private Departure( + Address address, + Long departsAt, + String departureLocation, + Map extraParams) { + this.address = address; + this.departsAt = departsAt; + this.departureLocation = departureLocation; + this.extraParams = extraParams; + } - private MandateOptions mandateOptions; + public static Builder builder() { + return new Builder(); + } - private Boolean moto; + public static class Builder { + private Address address; - private Network network; + private Long departsAt; - private RequestDecrementalAuthorization requestDecrementalAuthorization; + private String departureLocation; - private RequestExtendedAuthorization requestExtendedAuthorization; + private Map extraParams; - private RequestIncrementalAuthorization requestIncrementalAuthorization; + /** 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); + } - private RequestMulticapture requestMulticapture; + /** Address of the departure location. */ + public Builder setAddress( + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .BusReservationDetail.Departure.Address + address) { + this.address = address; + return this; + } - private RequestOvercapture requestOvercapture; + /** Timestamp of departure. */ + public Builder setDepartsAt(Long departsAt) { + this.departsAt = departsAt; + return this; + } - private RequestPartialAuthorization requestPartialAuthorization; + /** Identifier name or reference for the origin location. */ + public Builder setDepartureLocation(String departureLocation) { + this.departureLocation = departureLocation; + return this; + } - private RequestThreeDSecure requestThreeDSecure; + /** + * Add a key/value pair to `extraParams` map. A 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 Boolean requireCvcRecollection; + /** + * Add all map key/value pairs to `extraParams` map. A 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 ApiRequestParams.EnumParam setupFutureUsage; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Address { + /** The city or town. */ + @SerializedName("city") + String city; - private Object statementDescriptorSuffixKana; + /** The country in ISO 3166-1 alpha-2 format. */ + @SerializedName("country") + String country; - private Object statementDescriptorSuffixKanji; + /** + * Map of extra parameters for custom features not available in this client library. + * The content in this map is not serialized under this field's + * {@code @SerializedName} value. Instead, each key/value pair is serialized as if the + * key is a root-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 Object statementDetails; + public static Builder builder() { + return new Builder(); + } - private ThreeDSecure threeDSecure; + public static class Builder { + private String city; - /** 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); - } + private String 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( - PaymentIntentConfirmParams.PaymentMethodOptions.Card.CaptureMethod captureMethod) { - this.captureMethod = captureMethod; - return this; - } + private Map 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; - } + private String postalCode; - /** - * 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; - } + private String region; - /** - * Add a key/value pair to `extraParams` map. A 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; - } + private String streetAddress; - /** - * Add all map key/value pairs to `extraParams` map. A 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<>(); + private String streetAddress2; + + /** 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); + } + + /** 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.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 + * 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 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; - } - /** - * 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; - } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Insurance { + /** Insurance currency. */ + @SerializedName("currency") + String currency; - /** 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; - } + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-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; - } + /** 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; + } - /** - * 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; - } + public static Builder builder() { + return new Builder(); + } - /** - * Request ability to decrement the - * authorization for this PaymentIntent. - */ - public Builder setRequestDecrementalAuthorization( - PaymentIntentConfirmParams.PaymentMethodOptions.Card.RequestDecrementalAuthorization - requestDecrementalAuthorization) { - this.requestDecrementalAuthorization = requestDecrementalAuthorization; - return this; - } + public static class Builder { + private String currency; - /** - * 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; - } + private Map extraParams; - /** - * Request ability to increment the - * authorization for this PaymentIntent. - */ - public Builder setRequestIncrementalAuthorization( - PaymentIntentConfirmParams.PaymentMethodOptions.Card.RequestIncrementalAuthorization - requestIncrementalAuthorization) { - this.requestIncrementalAuthorization = requestIncrementalAuthorization; - return this; - } + private String insuranceCompanyName; - /** - * Request ability to make multiple - * captures for this PaymentIntent. - */ - public Builder setRequestMulticapture( - PaymentIntentConfirmParams.PaymentMethodOptions.Card.RequestMulticapture - requestMulticapture) { - this.requestMulticapture = requestMulticapture; - return this; - } + private InsuranceType insuranceType; - /** - * Request ability to overcapture - * for this PaymentIntent. - */ - public Builder setRequestOvercapture( - PaymentIntentConfirmParams.PaymentMethodOptions.Card.RequestOvercapture - requestOvercapture) { - this.requestOvercapture = requestOvercapture; - return this; - } + private Long price; - /** Request partial authorization on this PaymentIntent. */ - public Builder setRequestPartialAuthorization( - PaymentIntentConfirmParams.PaymentMethodOptions.Card.RequestPartialAuthorization - requestPartialAuthorization) { - this.requestPartialAuthorization = requestPartialAuthorization; - return this; - } + /** 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); + } - /** - * 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; - } + /** Insurance currency. */ + public Builder setCurrency(String currency) { + this.currency = currency; + 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; - } + /** + * Add a key/value pair to `extraParams` map. A 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; + } - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment - * method. - * - *

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

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

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

If you've already set {@code setup_future_usage} 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; - } + /** + * Add all map key/value pairs to `extraParams` map. A 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; + } - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment - * method. - * - *

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

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

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

If you've already set {@code setup_future_usage} 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 the company providing the insurance. */ + public Builder setInsuranceCompanyName(String insuranceCompanyName) { + this.insuranceCompanyName = insuranceCompanyName; + 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; - } + /** Type of insurance. */ + public Builder setInsuranceType( + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .BusReservationDetail.Insurance.InsuranceType + insuranceType) { + this.insuranceType = insuranceType; + 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; - } + /** Price of insurance in cents. */ + public Builder setPrice(Long price) { + this.price = price; + 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; - } + public enum InsuranceType implements ApiRequestParams.EnumParam { + @SerializedName("baggage") + BAGGAGE("baggage"), - /** - * 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; - } + @SerializedName("bankruptcy") + BANKRUPTCY("bankruptcy"), - /** - * 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; - } + @SerializedName("cancelation") + CANCELATION("cancelation"), - /** - * 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; - } + @SerializedName("emergency") + EMERGENCY("emergency"), - /** - * 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; - } - } + @SerializedName("medical") + MEDICAL("medical"); - @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; + @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; + InsuranceType(String value) { + this.value = value; + } + } + } - /** - * The selected installment plan to use for this payment attempt. This parameter can only be - * provided during confirmation. - */ - @SerializedName("plan") - Object plan; + @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 Installments(Boolean enabled, Map extraParams, Object plan) { - this.enabled = enabled; - this.extraParams = extraParams; - this.plan = plan; - } + /** The family name of the person. */ + @SerializedName("family_name") + String familyName; - public static Builder builder() { - return new Builder(); - } + /** The given name of the person. */ + @SerializedName("given_name") + String givenName; - public static class Builder { - private Boolean enabled; + private Passenger( + Map extraParams, String familyName, String givenName) { + this.extraParams = extraParams; + this.familyName = familyName; + this.givenName = givenName; + } - private Map extraParams; + public static Builder builder() { + return new Builder(); + } - private Object plan; + public static class Builder { + private Map extraParams; - /** 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); - } + private String familyName; - /** - * 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; - } + private String 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.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; - } + /** 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); + } - /** - * Add all map key/value pairs to `extraParams` map. A 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<>(); + /** + * Add a key/value pair to `extraParams` map. A 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; + } + + /** + * Add all map key/value pairs to `extraParams` map. A 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; + } + + /** 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; } - /** - * 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; - } + 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") + 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; - - /** - * 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}. + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. */ - @SerializedName("type") - Type type; + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - private Plan(Long count, Map extraParams, Interval interval, Type type) { - this.count = count; + /** 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, + 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.interval = interval; - this.type = type; + this.insurances = insurances; + this.startsAt = startsAt; + this.venueName = venueName; } public static Builder builder() { @@ -18737,26 +31338,95 @@ public static Builder builder() { } public static class Builder { - private Long count; + 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 Interval interval; + private List< + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .EventReservationDetail.Insurance> + insurances; - private Type type; + private Long startsAt; + + private String venueName; /** 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 + .EventReservationDetail + build() { + return new PaymentIntentConfirmParams.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( + 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; } @@ -18764,7 +31434,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.EventReservationDetail#extraParams} * for the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -18779,7 +31449,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.Installments.Plan#extraParams} + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.EventReservationDetail#extraParams} * for the field documentation. */ public Builder putAllExtraParam(Map map) { @@ -18791,493 +31461,416 @@ 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 + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.EventReservationDetail#insurances} + * for the field documentation. */ - public Builder setInterval( - PaymentIntentConfirmParams.PaymentMethodOptions.Card.Installments.Plan.Interval - interval) { - this.interval = interval; + public Builder addInsurance( + PaymentIntentConfirmParams.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 + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.EventReservationDetail#insurances} + * for the field documentation. */ - public Builder setType( - PaymentIntentConfirmParams.PaymentMethodOptions.Card.Installments.Plan.Type type) { - this.type = type; + 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; } - } - - 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; - - Type(String value) { - this.value = value; + /** 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 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; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Address { + /** The city or town. */ + @SerializedName("city") + String city; - private String description; + /** The country in ISO 3166-1 alpha-2 format. */ + @SerializedName("country") + String country; - private 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; - 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 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 Interval interval; + public static Builder builder() { + return new Builder(); + } - private Long intervalCount; + public static class Builder { + private String city; - private String reference; + private String country; - private Long startDate; + private Map extraParams; - private List< - PaymentIntentConfirmParams.PaymentMethodOptions.Card.MandateOptions.SupportedType> - supportedTypes; + private String postalCode; - /** 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 String region; - /** Required. Amount to be charged for future payments. */ - public Builder setAmount(Long amount) { - this.amount = amount; - return this; - } + private String streetAddress; - /** - * 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 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.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); + } - /** - * 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.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; + } - /** - * 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.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 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.EventReservationDetail.Insurance + build() { + return new PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.EventReservationDetail.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.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 + * 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; + } - 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 + .EventReservationDetail.Insurance.InsuranceType + insuranceType) { + this.insuranceType = insuranceType; + return this; + } + + /** Price of insurance in cents. */ + public Builder setPrice(Long price) { + this.price = price; + return this; + } + } - @Getter(onMethod_ = {@Override}) - private final String value; + public enum InsuranceType implements ApiRequestParams.EnumParam { + @SerializedName("bankruptcy") + BANKRUPTCY("bankruptcy"), - SupportedType(String value) { - this.value = value; - } - } - } + @SerializedName("cancelation") + CANCELATION("cancelation"), - @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("emergency") + EMERGENCY("emergency"), - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-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("medical") + MEDICAL("medical"); - /** Phone number (e.g., a toll-free number that customers can call). */ - @SerializedName("phone") - String phone; + @Getter(onMethod_ = {@Override}) + private final String value; - private StatementDetails(Address address, Map extraParams, String phone) { - this.address = address; - this.extraParams = extraParams; - this.phone = phone; - } + 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 String phone; + @SerializedName("expo") + EXPO("expo"), - /** 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); - } + @SerializedName("festival") + FESTIVAL("festival"), - /** 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; - } + @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 - * 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; - } + @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 - * 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; - } + @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; + + EventType(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 FerryReservationDetail { + /** Name of associated or partner company for the service. */ + @SerializedName("affiliate_name") + String affiliateName; - /** - * Two-letter country code (ISO - * 3166-1 alpha-2). - */ - @SerializedName("country") - String country; + /** 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 @@ -19289,37 +31882,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") - 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; + /** List of insurances for this reservation. */ + @SerializedName("insurances") + List< + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .FerryReservationDetail.Insurance> + insurances; - private Address( - String city, - String country, + /** 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, - String line1, - String line2, - String postalCode, - String state) { - this.city = city; - this.country = country; + 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.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() { @@ -19327,46 +31938,83 @@ public static Builder builder() { } public static class Builder { - private String city; + private String affiliateName; - private String country; + private Arrival arrival; + + private String carrierName; + + private String currency; + + private Departure departure; private Map extraParams; - private String line1; + private List< + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .FerryReservationDetail.Insurance> + insurances; - private String line2; + private List< + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .FerryReservationDetail.Passenger> + passengers; - private String postalCode; + private Long price; - private String state; + private TicketClass ticketClass; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodOptions.Card.StatementDetails.Address + public PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .FerryReservationDetail build() { - return new PaymentIntentConfirmParams.PaymentMethodOptions.Card.StatementDetails - .Address( - this.city, - this.country, + return new PaymentIntentConfirmParams.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; } - /** - * Two-letter country code (ISO 3166-1 alpha-2). - */ - public Builder setCountry(String country) { - this.country = country; + /** 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; } @@ -19374,7 +32022,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.FerryReservationDetail#extraParams} * for the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -19389,7 +32037,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.FerryReservationDetail#extraParams} * for the field documentation. */ public Builder putAllExtraParam(Map map) { @@ -19400,364 +32048,359 @@ 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; + /** + * 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; } - } - } - } - - @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; + /** + * 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; + } - /** - * 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; + /** + * 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; + } - /** - * Required. For 3D Secure 1, the XID. For 3D Secure 2, the Directory - * Server Transaction ID (dsTransID). - */ - @SerializedName("transaction_id") - String transactionId; + /** + * 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; + } - /** Required. The version of 3D Secure that was performed. */ - @SerializedName("version") - Version version; + /** Price in cents. */ + public Builder setPrice(Long price) { + this.price = price; + 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; - } + /** Ticket class. */ + public Builder setTicketClass( + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .FerryReservationDetail.TicketClass + ticketClass) { + this.ticketClass = ticketClass; + return this; + } + } - public static Builder builder() { - return new Builder(); - } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Arrival { + /** Address of the arrival location. */ + @SerializedName("address") + Address address; - public static class Builder { - private AresTransStatus aresTransStatus; + /** Identifier name or reference for the arrival location. */ + @SerializedName("arrival_location") + String arrivalLocation; - private String cryptogram; + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - private ElectronicCommerceIndicator electronicCommerceIndicator; + private Arrival( + Address address, String arrivalLocation, Map extraParams) { + this.address = address; + this.arrivalLocation = arrivalLocation; + this.extraParams = extraParams; + } - private ExemptionIndicator exemptionIndicator; + public static Builder builder() { + return new Builder(); + } - private Map extraParams; + public static class Builder { + private Address address; - private NetworkOptions networkOptions; + private String arrivalLocation; - private String requestorChallengeIndicator; + private Map extraParams; - private String transactionId; + /** 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); + } - private Version version; + /** Address of the arrival location. */ + public Builder setAddress( + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .FerryReservationDetail.Arrival.Address + address) { + this.address = address; + return this; + } - /** 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); - } + /** Identifier name or reference for the arrival location. */ + public Builder setArrivalLocation(String arrivalLocation) { + this.arrivalLocation = arrivalLocation; + return this; + } - /** 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; - } + /** + * Add a key/value pair to `extraParams` map. A 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; + } - /** - * 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 + * 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; + } + } - /** - * 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; - } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Address { + /** The city or town. */ + @SerializedName("city") + String city; - /** 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; - } + /** 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.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; - } + /** + * Map of extra parameters for custom features not available in this client library. + * The content in this map is not serialized under this field's + * {@code @SerializedName} value. Instead, each key/value pair is serialized as if the + * key is a root-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 all map key/value pairs to `extraParams` map. A 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; - } + public static Builder builder() { + return new Builder(); + } - /** - * 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 static class Builder { + private String city; - /** - * 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 String country; - /** - * 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 Map extraParams; - /** Required. The version of 3D Secure that was performed. */ - public Builder setVersion( - PaymentIntentConfirmParams.PaymentMethodOptions.Card.ThreeDSecure.Version version) { - this.version = version; - return this; - } - } + private String postalCode; - @Getter - @EqualsAndHashCode(callSuper = false) - public static class NetworkOptions { - /** Cartes Bancaires-specific 3DS fields. */ - @SerializedName("cartes_bancaires") - CartesBancaires cartesBancaires; + private String region; - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level 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; - private NetworkOptions(CartesBancaires cartesBancaires, Map extraParams) { - this.cartesBancaires = cartesBancaires; - this.extraParams = extraParams; - } + private String streetAddress2; - public static Builder builder() { - return new Builder(); - } + /** 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); + } - public static class Builder { - private CartesBancaires cartesBancaires; + /** The city or town. */ + public Builder setCity(String city) { + this.city = city; + return this; + } - private Map extraParams; + /** The country in ISO 3166-1 alpha-2 format. */ + public Builder setCountry(String country) { + this.country = country; + return this; + } - /** 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); - } + /** + * Add a key/value pair to `extraParams` map. A 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; + } - /** Cartes Bancaires-specific 3DS fields. */ - public Builder setCartesBancaires( - PaymentIntentConfirmParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions - .CartesBancaires - cartesBancaires) { - this.cartesBancaires = cartesBancaires; - return this; - } + /** + * Add all map key/value pairs to `extraParams` map. A 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; + } - /** - * Add a key/value pair to `extraParams` map. A 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; - } + /** 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.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; + } + + /** 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 +32412,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 +32428,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 +32470,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 +32485,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,1238 +32497,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 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"), + @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 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); + } - @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 + * 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; + } - 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 + * 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; + } - 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( + PaymentIntentConfirmParams.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 PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail.Passenger + build() { + return new PaymentIntentConfirmParams.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 + * 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; + } - 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 + * 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; + } - @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"), + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Insurance { + /** Insurance currency. */ + @SerializedName("currency") + String 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") + String 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 { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level 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( - Map extraParams, - Boolean requestExtendedAuthorization, - Boolean requestIncrementalAuthorizationSupport, - Routing routing) { - 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 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.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; + } - /** - * Add a key/value pair to `extraParams` map. A 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<>(); + /** 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 + .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; + + 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; } - /** Routing requested priority. */ - public Builder setRequestedPriority( - PaymentIntentConfirmParams.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 String marketplaceSellerName; - @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 String marketplaceSellerReference; - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level 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 numberOfTransactions; - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment method. - * - *

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

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

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

If you've already set {@code setup_future_usage} 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 ProductCategory productCategory; - private Cashapp( - ApiRequestParams.EnumParam captureMethod, - Map extraParams, - ApiRequestParams.EnumParam setupFutureUsage) { - this.captureMethod = captureMethod; - this.extraParams = extraParams; - this.setupFutureUsage = setupFutureUsage; - } + private Long sellerLastLoginAt; - public static Builder builder() { - return new Builder(); - } + private SellerRating sellerRating; - public static class Builder { - private ApiRequestParams.EnumParam captureMethod; + private Long sellerRegisteredAt; - private Map extraParams; + private Long sellerUpdatedAt; - private ApiRequestParams.EnumParam setupFutureUsage; + private List shippingReferences; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodOptions.Cashapp build() { - return new PaymentIntentConfirmParams.PaymentMethodOptions.Cashapp( - this.captureMethod, this.extraParams, this.setupFutureUsage); - } + private Long volumeOfTransactions; - /** - * 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; - } + /** 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); + } - /** - * 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.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 a key/value pair to `extraParams` map. A 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.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 all map key/value pairs to `extraParams` map. A 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; - } + /** + * 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; + } - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment - * method. - * - *

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

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

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

If you've already set {@code setup_future_usage} 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; - } + /** + * 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; + } - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment - * method. - * - *

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

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

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

If you've already set {@code setup_future_usage} 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 address of the selling or delivering merchant. */ + public Builder setMarketplaceSellerAddress( + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .MarketplaceSeller.MarketplaceSellerAddress + marketplaceSellerAddress) { + this.marketplaceSellerAddress = marketplaceSellerAddress; + return this; + } - public enum CaptureMethod implements ApiRequestParams.EnumParam { - @SerializedName("manual") - MANUAL("manual"); + /** The name of the marketplace seller. */ + public Builder setMarketplaceSellerName(String marketplaceSellerName) { + this.marketplaceSellerName = marketplaceSellerName; + return this; + } - @Getter(onMethod_ = {@Override}) - private final String value; + /** The unique identifier for the marketplace seller. */ + public Builder setMarketplaceSellerReference(String marketplaceSellerReference) { + this.marketplaceSellerReference = marketplaceSellerReference; + return this; + } - CaptureMethod(String value) { - this.value = value; - } - } + /** 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( + PaymentIntentConfirmParams.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( + 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 @@ -21108,9 +33715,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() { @@ -21118,25 +33771,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; } @@ -21144,7 +33855,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) { @@ -21159,7 +33870,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) { @@ -21169,1972 +33880,1962 @@ public Builder putAllExtraParam(Map map) { this.extraParams.putAll(map); return this; } - } - } - public enum RequestedAddressType implements ApiRequestParams.EnumParam { - @SerializedName("aba") - ABA("aba"), + /** + * 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; + } - @SerializedName("iban") - IBAN("iban"), + /** + * 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; + } - @SerializedName("sepa") - SEPA("sepa"), + /** + * 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; + } - @SerializedName("sort_code") - SORT_CODE("sort_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 + * 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; + } - @SerializedName("spei") - SPEI("spei"), + /** Price in cents. */ + public Builder setPrice(Long price) { + this.price = price; + return this; + } - @SerializedName("swift") - SWIFT("swift"), + /** Ticket class. */ + public Builder setTicketClass( + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .RoundTripReservationDetail.TicketClass + ticketClass) { + this.ticketClass = ticketClass; + return this; + } + } - @SerializedName("zengin") - ZENGIN("zengin"); + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Arrival { + /** Address of the arrival location. */ + @SerializedName("address") + Address address; - @Getter(onMethod_ = {@Override}) - private final String value; + /** Identifier name or reference for the arrival location. */ + @SerializedName("arrival_location") + String arrivalLocation; - RequestedAddressType(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 Type implements ApiRequestParams.EnumParam { - @SerializedName("eu_bank_transfer") - EU_BANK_TRANSFER("eu_bank_transfer"), + private Arrival( + Address address, String arrivalLocation, Map extraParams) { + this.address = address; + this.arrivalLocation = arrivalLocation; + this.extraParams = extraParams; + } - @SerializedName("gb_bank_transfer") - GB_BANK_TRANSFER("gb_bank_transfer"), + public static Builder builder() { + return new Builder(); + } - @SerializedName("jp_bank_transfer") - JP_BANK_TRANSFER("jp_bank_transfer"), + public static class Builder { + private Address address; - @SerializedName("mx_bank_transfer") - MX_BANK_TRANSFER("mx_bank_transfer"), + private String arrivalLocation; - @SerializedName("us_bank_transfer") - US_BANK_TRANSFER("us_bank_transfer"); + private Map extraParams; - @Getter(onMethod_ = {@Override}) - private final String 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); + } - Type(String value) { - this.value = value; - } - } - } + /** Address of the arrival location. */ + public Builder setAddress( + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .RoundTripReservationDetail.Arrival.Address + address) { + this.address = address; + return this; + } - public enum FundingType implements ApiRequestParams.EnumParam { - @SerializedName("bank_transfer") - BANK_TRANSFER("bank_transfer"); + /** Identifier name or reference for the arrival location. */ + public Builder setArrivalLocation(String arrivalLocation) { + this.arrivalLocation = arrivalLocation; + 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.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; + } - FundingType(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.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; + } + } - public enum SetupFutureUsage implements ApiRequestParams.EnumParam { - @SerializedName("none") - NONE("none"); + @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; - SetupFutureUsage(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; + } - @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; + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String city; + + private String country; + + 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}. - */ - @SerializedName("setup_future_usage") - SetupFutureUsage setupFutureUsage; + private String postalCode; - private Eps(Map extraParams, SetupFutureUsage setupFutureUsage) { - this.extraParams = extraParams; - this.setupFutureUsage = setupFutureUsage; - } + private String region; - public static Builder builder() { - return new Builder(); - } + private String streetAddress; - public static class Builder { - private Map extraParams; + private String streetAddress2; - private SetupFutureUsage setupFutureUsage; + /** 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); + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodOptions.Eps build() { - return new PaymentIntentConfirmParams.PaymentMethodOptions.Eps( - this.extraParams, this.setupFutureUsage); - } + /** 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.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; - } + /** 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.Eps#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.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; + } + + /** 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; - } - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment - * method. - * - *

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

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

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

If you've already set {@code setup_future_usage} 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; - } - } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Departure { + /** Address of the departure location. */ + @SerializedName("address") + Address address; - public enum SetupFutureUsage implements ApiRequestParams.EnumParam { - @SerializedName("none") - NONE("none"); + /** Timestamp of departure. */ + @SerializedName("departs_at") + Long departsAt; - @Getter(onMethod_ = {@Override}) - private final String value; + /** Identifier name or reference for the origin location. */ + @SerializedName("departure_location") + String departureLocation; - SetupFutureUsage(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; - @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; + private Departure( + Address address, + Long departsAt, + String departureLocation, + Map extraParams) { + this.address = address; + this.departsAt = departsAt; + this.departureLocation = departureLocation; + 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") - SetupFutureUsage setupFutureUsage; + public static Builder builder() { + return new Builder(); + } - private Fpx(Map extraParams, SetupFutureUsage setupFutureUsage) { - this.extraParams = extraParams; - this.setupFutureUsage = setupFutureUsage; - } + public static class Builder { + private Address address; - public static Builder builder() { - return new Builder(); - } + private Long departsAt; - public static class Builder { - private Map extraParams; + private String departureLocation; - private SetupFutureUsage setupFutureUsage; + private Map extraParams; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodOptions.Fpx build() { - return new PaymentIntentConfirmParams.PaymentMethodOptions.Fpx( - this.extraParams, this.setupFutureUsage); - } + /** 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); + } - /** - * Add a key/value pair to `extraParams` map. A 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; - } + /** Address of the departure location. */ + public Builder setAddress( + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .RoundTripReservationDetail.Departure.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.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; - } + /** 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 + * 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; + } + + /** + * Add all map key/value pairs to `extraParams` map. A 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; + } + } - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment - * method. - * - *

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

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

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

If you've already set {@code setup_future_usage} 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; - } - } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Address { + /** The city or town. */ + @SerializedName("city") + String city; - public enum SetupFutureUsage implements ApiRequestParams.EnumParam { - @SerializedName("none") - NONE("none"); + /** The country in ISO 3166-1 alpha-2 format. */ + @SerializedName("country") + String country; - @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; + + /** 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; + } - SetupFutureUsage(String value) { - this.value = value; - } - } - } + public static Builder builder() { + return new Builder(); + } - @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; + 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}. - */ - @SerializedName("setup_future_usage") - SetupFutureUsage setupFutureUsage; + private String country; - private Giropay(Map extraParams, SetupFutureUsage setupFutureUsage) { - this.extraParams = extraParams; - this.setupFutureUsage = setupFutureUsage; - } + private Map extraParams; - public static Builder builder() { - return new Builder(); - } + private String postalCode; - public static class Builder { - private Map extraParams; + private String region; - private SetupFutureUsage setupFutureUsage; + private String streetAddress; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodOptions.Giropay build() { - return new PaymentIntentConfirmParams.PaymentMethodOptions.Giropay( - this.extraParams, this.setupFutureUsage); - } + private String 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 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; - } + /** 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); + } - /** - * Add all map key/value pairs to `extraParams` map. A 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 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.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 + * 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; + } + + /** 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; - } - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment - * method. - * - *

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

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

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

If you've already set {@code setup_future_usage} 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; + } - /** 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; + } + + /** + * Add a key/value pair to `extraParams` map. A 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<>(); + /** 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 - * PaymentIntentConfirmParams.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") + 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; - } - /** - * 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 String currency; - /** Interval at which the customer is making purchases. */ - public Builder setPurchaseInterval( - PaymentIntentConfirmParams.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 String 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 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); + } - @SerializedName("year") - YEAR("year"); + /** 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 + * 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; + } - PurchaseInterval(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.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 - @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; + /** 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 + .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"), - /** Required. Unit of time between subscription charges. */ - @SerializedName("interval") - Interval interval; + @SerializedName("bankruptcy") + BANKRUPTCY("bankruptcy"), - /** - * 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; + @SerializedName("cancelation") + CANCELATION("cancelation"), - /** Name for subscription. */ - @SerializedName("name") - String name; + @SerializedName("emergency") + EMERGENCY("emergency"), - /** Describes the upcoming charge for this subscription. */ - @SerializedName("next_billing") - NextBilling nextBilling; + @SerializedName("medical") + MEDICAL("medical"); - /** - * 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; + @Getter(onMethod_ = {@Override}) + private final String value; - 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; - } + InsuranceType(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; + /** The family name of the person. */ + @SerializedName("family_name") + String familyName; - private Interval interval; + /** The given name of the person. */ + @SerializedName("given_name") + String givenName; - private Long intervalCount; + private Passenger( + Map extraParams, String familyName, String givenName) { + this.extraParams = extraParams; + this.familyName = familyName; + this.givenName = givenName; + } - private String name; + public static Builder builder() { + return new Builder(); + } - private NextBilling nextBilling; + public static class Builder { + private Map extraParams; - private String reference; + private String familyName; - /** 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 String 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<>(); - } - this.extraParams.put(key, value); - return this; - } + /** 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 all map key/value pairs to `extraParams` map. A 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<>(); + /** + * Add a key/value pair to `extraParams` map. A 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 @@ -23146,10 +35847,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() { @@ -23157,31 +35885,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; } @@ -23189,7 +35930,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) { @@ -23204,7 +35945,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) { @@ -23214,27 +35955,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; + } } } } @@ -26663,6 +39434,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 +39456,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 +39468,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 +39535,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 +39583,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 +39601,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..dddedc7d9e7 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,1010 @@ 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.InnerTax 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 InnerTax { + /** 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 InnerTax(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.InnerTax + build() { + return new PaymentIntentCreateParams.PaymentDetails.CarRentalData.Total.Tax + .InnerTax(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.InnerTax#extraParams} + * for the 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.InnerTax#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"), + + @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 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; - - /** The delivery method for the payment. */ - @SerializedName("mode") - Mode mode; - - /** Details of the recipient. */ - @SerializedName("recipient") - Recipient recipient; + @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; - private Delivery(Map extraParams, Mode mode, Recipient recipient) { - this.extraParams = extraParams; - this.mode = mode; - this.recipient = recipient; - } + /** The event location's address. */ + @SerializedName("address") + Address address; - public static Builder builder() { - return new Builder(); - } + /** Affiliate details for this purchase. */ + @SerializedName("affiliate") + Affiliate affiliate; - public static class Builder { - private Map extraParams; + /** The name of the company. */ + @SerializedName("company") + String company; - private Mode mode; + /** Delivery details for this purchase. */ + @SerializedName("delivery") + Delivery delivery; - private Recipient recipient; + /** Event end time. Measured in seconds since the Unix epoch. */ + @SerializedName("ends_at") + Long endsAt; - /** 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); - } + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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.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; - } + /** Type of the event entertainment (concert, sports event etc). */ + @SerializedName("genre") + String 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 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; - } + /** Required. The name of the event. */ + @SerializedName("name") + String name; - /** The delivery method for the payment. */ - public Builder setMode( - PaymentIntentCreateParams.PaymentDetails.Lodging.Delivery.Mode mode) { - this.mode = mode; - return this; - } + /** Event start time. Measured in seconds since the Unix epoch. */ + @SerializedName("starts_at") + Long startsAt; - /** Details of the recipient. */ - public Builder setRecipient( - PaymentIntentCreateParams.PaymentDetails.Lodging.Delivery.Recipient recipient) { - this.recipient = recipient; - 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; + } - @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 Boolean accessControlledVenue; - /** The name of the recipient the ticket is delivered to. */ - @SerializedName("name") - String name; + private Address address; - /** The phone number of the recipient the ticket is delivered to. */ - @SerializedName("phone") - String phone; + private Affiliate affiliate; - private Recipient( - String email, Map extraParams, String name, String phone) { - this.email = email; - this.extraParams = extraParams; - this.name = name; - this.phone = phone; - } + private String company; - public static Builder builder() { - return new Builder(); - } + private Delivery delivery; - public static class Builder { - private String email; + private Long endsAt; - private Map extraParams; + private Map extraParams; - private String name; + private String genre; - private String phone; + private String name; - /** 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); - } + private Long startsAt; - /** The email of the recipient the ticket is delivered to. */ - public Builder setEmail(String email) { - this.email = email; - return this; - } + /** 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); + } - /** - * Add a key/value pair to `extraParams` map. A 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; - } + /** Indicates if the tickets are digitally checked when entering the venue. */ + public Builder setAccessControlledVenue(Boolean accessControlledVenue) { + this.accessControlledVenue = accessControlledVenue; + return this; + } - /** - * Add all map key/value pairs to `extraParams` map. A 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 event location's address. */ + public Builder setAddress( + PaymentIntentCreateParams.PaymentDetails.EventDetails.Address address) { + this.address = address; + return this; + } - /** The name of the recipient the ticket is delivered to. */ - public Builder setName(String name) { - this.name = name; - return this; - } + /** Affiliate details for this purchase. */ + public Builder setAffiliate( + PaymentIntentCreateParams.PaymentDetails.EventDetails.Affiliate affiliate) { + this.affiliate = affiliate; + return this; + } - /** The phone number of the recipient the ticket is delivered to. */ - public Builder setPhone(String phone) { - this.phone = phone; - return this; - } - } + /** The name of the company. */ + public Builder setCompany(String company) { + this.company = company; + return this; } - public enum Mode implements ApiRequestParams.EnumParam { - @SerializedName("email") - EMAIL("email"), + /** Delivery details for this purchase. */ + public Builder setDelivery( + PaymentIntentCreateParams.PaymentDetails.EventDetails.Delivery delivery) { + this.delivery = delivery; + return this; + } - @SerializedName("phone") - PHONE("phone"), + /** Event end time. Measured in seconds since the Unix epoch. */ + public Builder setEndsAt(Long endsAt) { + this.endsAt = endsAt; + return this; + } - @SerializedName("pickup") - PICKUP("pickup"), + /** + * Add a key/value pair to `extraParams` map. A 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("post") - POST("post"); + /** + * Add all map key/value pairs to `extraParams` map. A 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; + } - @Getter(onMethod_ = {@Override}) - private final String value; + /** Type of the event entertainment (concert, sports event etc). */ + public Builder setGenre(String genre) { + this.genre = genre; + return this; + } - Mode(String value) { - this.value = value; - } + /** 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 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 +7526,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 +7564,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 +7623,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 +7635,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 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<>(); + /** 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 PaymentIntentCreateParams.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; + } } } @@ -7403,8 +7693,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 +7702,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 +7717,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 +7738,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 +7749,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 +7768,24 @@ public static Builder builder() { } public static class Builder { - private Long count; - private Map extraParams; - private Interval interval; + private Mode mode; + + private Recipient recipient; /** 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); - } - - /** - * 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; + 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 +7799,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,459 +7810,6341 @@ 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; - - /** - * If this is a {@code paynow} PaymentMethod, this hash contains details about the PayNow - * payment method. - */ - @SerializedName("paynow") - Paynow paynow; + /** Delivery details for this purchase. */ + public Builder setDelivery( + PaymentIntentCreateParams.PaymentDetails.Flight.Delivery delivery) { + this.delivery = delivery; + return this; + } - /** - * If this is a {@code paypal} PaymentMethod, this hash contains details about the PayPal - * payment method. - */ - @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 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 paypay} PaymentMethod, this hash contains details about the PayPay - * payment method. - */ - @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 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 payto} PaymentMethod, this hash contains details about the PayTo payment - * method. - */ - @SerializedName("payto") - Payto payto; + /** 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 pix} PaymentMethod, this hash contains details about the Pix payment - * method. - */ - @SerializedName("pix") - Pix pix; + /** + * 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 promptpay} PaymentMethod, this hash contains details about the PromptPay - * payment method. - */ - @SerializedName("promptpay") - Promptpay promptpay; + /** + * 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 qris} PaymentMethod, this hash contains details about the QRIS payment - * method. - */ - @SerializedName("qris") - Qris qris; + /** + * 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; + } - /** - * Options to configure Radar. See Radar - * Session for more information. - */ - @SerializedName("radar_options") - RadarOptions radarOptions; + /** + * 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; + } - /** - * If this is a {@code rechnung} PaymentMethod, this hash contains details about the Rechnung - * payment method. - */ - @SerializedName("rechnung") - Rechnung rechnung; + /** The ticket number associated with the travel reservation. */ + public Builder setTicketNumber(String ticketNumber) { + this.ticketNumber = ticketNumber; + 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 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 samsung_pay} PaymentMethod, this hash contains details about the - * SamsungPay payment method. - */ - @SerializedName("samsung_pay") - SamsungPay samsungPay; + /** Required. The name of the affiliate that originated the purchase. */ + @SerializedName("name") + String name; - /** - * If this is a {@code satispay} PaymentMethod, this hash contains details about the Satispay - * payment method. - */ - @SerializedName("satispay") - Satispay satispay; + private Affiliate(Map extraParams, String name) { + this.extraParams = extraParams; + this.name = name; + } - /** - * 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 Builder builder() { + return new Builder(); + } - /** - * If this is a Shopeepay PaymentMethod, this hash contains details about the Shopeepay payment - * method. - */ - @SerializedName("shopeepay") - Shopeepay shopeepay; + public static class Builder { + private Map extraParams; - /** - * If this is a {@code sofort} PaymentMethod, this hash contains details about the SOFORT - * payment method. - */ - @SerializedName("sofort") - Sofort sofort; + private String name; - /** This hash contains details about the Stripe balance payment method. */ - @SerializedName("stripe_balance") - StripeBalance stripeBalance; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentDetails.Flight.Affiliate build() { + return new PaymentIntentCreateParams.PaymentDetails.Flight.Affiliate( + this.extraParams, this.name); + } - /** - * If this is a {@code swish} PaymentMethod, this hash contains details about the Swish payment - * method. - */ - @SerializedName("swish") - Swish swish; + /** + * Add a key/value pair to `extraParams` map. A 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 TWINT PaymentMethod, this hash contains details about the TWINT payment method. - */ - @SerializedName("twint") - Twint twint; + /** + * Add all map key/value pairs to `extraParams` map. A 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; + } - /** + /** 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 PaymentIntentCreateParams.PaymentDetails.Flight.Delivery build() { + return new PaymentIntentCreateParams.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 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; + } + + /** + * Add all map key/value pairs to `extraParams` map. A 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; + } + + /** The delivery method for the payment. */ + public Builder setMode( + PaymentIntentCreateParams.PaymentDetails.Flight.Delivery.Mode mode) { + this.mode = mode; + return this; + } + + /** Details of the recipient. */ + public Builder setRecipient( + PaymentIntentCreateParams.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 PaymentIntentCreateParams.PaymentDetails.Flight.Delivery.Recipient build() { + return new PaymentIntentCreateParams.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 + * 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; + } + + /** + * Add all map key/value pairs to `extraParams` map. A 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; + } + + /** 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 PaymentIntentCreateParams.PaymentDetails.Flight.Passenger build() { + return new PaymentIntentCreateParams.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 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; + } + + /** + * Add all map key/value pairs to `extraParams` map. A 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; + } + + /** + * 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 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); + } + + /** 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 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; + } + + /** + * Add all map key/value pairs to `extraParams` map. A 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; + } + + /** 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( + PaymentIntentCreateParams.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 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); + } + + /** Affiliate details if applicable. */ + public Builder setAffiliate( + PaymentIntentCreateParams.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 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; + } + + /** + * Add all map key/value pairs to `extraParams` map. A 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; + } + + /** + * 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; + } + + /** + * 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; + } + + /** + * 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; + } + + /** + * 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 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 addSegment( + PaymentIntentCreateParams.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 + * PaymentIntentCreateParams.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(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 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 PaymentIntentCreateParams.PaymentDetails.FlightData.Affiliate build() { + return new PaymentIntentCreateParams.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 + * 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; + } + + /** + * Add all map key/value pairs to `extraParams` map. A 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; + } + + /** 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 PaymentIntentCreateParams.PaymentDetails.FlightData.Insurance build() { + return new PaymentIntentCreateParams.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 + * 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; + } + + /** + * Add all map key/value pairs to `extraParams` map. A 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; + } + + /** Insurance company name. */ + public Builder setInsuranceCompanyName(String insuranceCompanyName) { + this.insuranceCompanyName = insuranceCompanyName; + return this; + } + + /** Required. Type of insurance. */ + public Builder setInsuranceType( + PaymentIntentCreateParams.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 PaymentIntentCreateParams.PaymentDetails.FlightData.Passenger build() { + return new PaymentIntentCreateParams.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 + * 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; + } + } + } + + @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 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); + } + + /** Segment fare amount. */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } + + /** Required. Arrival details. */ + public Builder setArrival( + PaymentIntentCreateParams.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( + PaymentIntentCreateParams.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 + * PaymentIntentCreateParams.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 + * PaymentIntentCreateParams.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( + PaymentIntentCreateParams.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 PaymentIntentCreateParams.PaymentDetails.FlightData.Segment.Arrival build() { + return new PaymentIntentCreateParams.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 + * 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; + } + } + } + + @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 PaymentIntentCreateParams.PaymentDetails.FlightData.Segment.Departure build() { + return new PaymentIntentCreateParams.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 + * 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; + } + + /** + * Add all map key/value pairs to `extraParams` map. A 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; + } + } + } + + 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 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); + } + + /** Required. Total flight amount. */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } + + /** Reason for credit. */ + public Builder setCreditReason( + PaymentIntentCreateParams.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( + PaymentIntentCreateParams.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 + * 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; + } + + /** + * 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; + } + + /** + * Add a key/value pair to `extraParams` map. A 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; + } + + /** + * Add all map key/value pairs to `extraParams` map. A 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; + } + + /** Tax breakdown. */ + public Builder setTax(PaymentIntentCreateParams.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 PaymentIntentCreateParams.PaymentDetails.FlightData.Total.Discounts build() { + return new PaymentIntentCreateParams.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 + * 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 all map key/value pairs to `extraParams` map. A 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; + } + } + } + + @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 PaymentIntentCreateParams.PaymentDetails.FlightData.Total.ExtraCharge build() { + return new PaymentIntentCreateParams.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 + * 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; + } + + /** + * Add all map key/value pairs to `extraParams` map. A 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; + } + + /** Type of additional charges. */ + public Builder setType( + PaymentIntentCreateParams.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 PaymentIntentCreateParams.PaymentDetails.FlightData.Total.Tax build() { + return new PaymentIntentCreateParams.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 + * 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; + } + + /** + * Add all map key/value pairs to `extraParams` map. A 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; + } + + /** + * 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.InnerTax 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.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 InnerTax { + /** 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 InnerTax(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.FlightData.Total.Tax.InnerTax + build() { + return new PaymentIntentCreateParams.PaymentDetails.FlightData.Total.Tax.InnerTax( + 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.InnerTax#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A 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.InnerTax#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 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; + } + + /** + * 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( + 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.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 PaymentIntentCreateParams.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 + * 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; + } + + /** + * 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; + } + + /** 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 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); + } + + /** 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.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.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 PaymentIntentCreateParams.PaymentDetails.Lodging.Affiliate build() { + return new PaymentIntentCreateParams.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 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 all map key/value pairs to `extraParams` map. A 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; + } + + /** 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 PaymentIntentCreateParams.PaymentDetails.Lodging.Delivery build() { + return new PaymentIntentCreateParams.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 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; + } + + /** + * Add all map key/value pairs to `extraParams` map. A 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; + } + + /** The delivery method for the payment. */ + public Builder setMode( + PaymentIntentCreateParams.PaymentDetails.Lodging.Delivery.Mode mode) { + this.mode = mode; + return this; + } + + /** Details of the recipient. */ + public Builder setRecipient( + PaymentIntentCreateParams.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 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; + } + + /** + * Add a key/value pair to `extraParams` map. A 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; + } + } + } + + 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 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 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 PaymentIntentCreateParams.PaymentDetails.LodgingData build() { + return new PaymentIntentCreateParams.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( + PaymentIntentCreateParams.PaymentDetails.LodgingData.Accommodation accommodation) { + this.accommodation = accommodation; + return this; + } + + /** Affiliate details if applicable. */ + public Builder setAffiliate( + PaymentIntentCreateParams.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 PaymentIntentCreateParams.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 PaymentIntentCreateParams.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 + * 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; + } + + /** + * 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; + } + + /** Host details for the lodging. */ + public Builder setHost(PaymentIntentCreateParams.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 + * PaymentIntentCreateParams.PaymentDetails.LodgingData#insurances} for the field + * documentation. + */ + public Builder addInsurance( + PaymentIntentCreateParams.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 + * PaymentIntentCreateParams.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(PaymentIntentCreateParams.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 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); + } + + /** Type of accommodation. */ + public Builder setAccommodationType( + PaymentIntentCreateParams.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 + * 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; + } + + /** + * Add all map key/value pairs to `extraParams` map. A 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; + } + + /** 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 PaymentIntentCreateParams.PaymentDetails.LodgingData.Affiliate build() { + return new PaymentIntentCreateParams.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 + * 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; + } + } + } + + @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 PaymentIntentCreateParams.PaymentDetails.LodgingData.Guest build() { + return new PaymentIntentCreateParams.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 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 all map key/value pairs to `extraParams` map. A 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; + } + + /** 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 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); + } + + /** Address of the host. */ + public Builder setAddress( + PaymentIntentCreateParams.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 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; + } + + /** + * Add all map key/value pairs to `extraParams` map. A 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; + } + + /** Reference number for the host. */ + public Builder setHostReference(String hostReference) { + this.hostReference = hostReference; + return this; + } + + /** Type of host. */ + public Builder setHostType( + PaymentIntentCreateParams.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 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); + } + + /** 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 + * 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; + } + + /** + * Add all map key/value pairs to `extraParams` map. A 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; + } + + /** + * 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 Insurance { + /** Required. Price 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. + * Instead, each key/value pair is serialized as if the key is a root-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") + String insuranceCompanyName; + + /** 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.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 PaymentIntentCreateParams.PaymentDetails.LodgingData.Insurance build() { + return new PaymentIntentCreateParams.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; + } + + /** + * Add a key/value pair to `extraParams` map. A 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; + } + + /** + * Add all map key/value pairs to `extraParams` map. A 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; + } + + /** 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; + } + } + + 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") + 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. + * Instead, each key/value pair is serialized as if the key is a root-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, + 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.prepaidAmount = prepaidAmount; + this.tax = tax; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long amount; + + private Long cashAdvances; + + private String 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 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. 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.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 PaymentIntentCreateParams.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( + PaymentIntentCreateParams.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") + String corporateClientCode; + + /** Coupon code. */ + @SerializedName("coupon") + String 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( + String corporateClientCode, String coupon, Map extraParams) { + this.corporateClientCode = corporateClientCode; + this.coupon = coupon; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String corporateClientCode; + + private String coupon; + + private Map extraParams; + + /** 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); + } + + /** 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; + } + + /** + * Add a key/value pair to `extraParams` map. A 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; + } + } + } + + @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 PaymentIntentCreateParams.PaymentDetails.LodgingData.Total.ExtraCharge build() { + return new PaymentIntentCreateParams.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 + * 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; + } + } + + 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 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.InnerTax 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 InnerTax { + /** 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 InnerTax(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.InnerTax + build() { + return new PaymentIntentCreateParams.PaymentDetails.LodgingData.Total.Tax.InnerTax( + 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.InnerTax#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A 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.InnerTax#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 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<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A 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<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. Name of the product on subscription. e.g. Apple Music + * Subscription + */ + public Builder setName(String name) { + this.name = name; + return this; + } + + /** Subscription start time. Measured in seconds since the Unix epoch. */ + public Builder setStartsAt(Long startsAt) { + this.startsAt = startsAt; + return this; + } + } + + @Getter + @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 PaymentIntentCreateParams.PaymentDetails.Subscription.Affiliate build() { + return new PaymentIntentCreateParams.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 + * 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; + } + + /** + * Add all map key/value pairs to `extraParams` map. A 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; + } + + /** 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 { + /** + * 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 PaymentIntentCreateParams.PaymentDetails.Subscription.BillingInterval build() { + return new PaymentIntentCreateParams.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 + * 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; + } + + /** + * Add all map key/value pairs to `extraParams` map. A 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; + } + + /** + * 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; + } + } + + 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 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. @@ -7995,980 +14152,5005 @@ public static class PaymentMethodData { @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 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 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); + } + + /** + * 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; + } + + /** + * 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; + } + + /** + * 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; + } + + /** + * 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; + } + + /** + * 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; + } + + /** + * 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; + } + + /** + * 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; + } + + /** + * 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; + } + + /** + * 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; + } + + /** + * 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; + } + + /** + * 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; + } + + /** + * 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; + } + + /** + * 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; + } + + /** + * 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; + } + + /** + * 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; + } + + /** + * 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; + } + + /** + * 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; + } + + /** + * 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; + } + + /** + * Add a key/value pair to `extraParams` map. A 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; + } + + /** + * Add all map key/value pairs to `extraParams` map. A 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<>(); + } + 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; + } + + /** + * 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; + } + + /** + * 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; + } + + /** + * 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; + } + + /** + * 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; + } + + /** + * 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 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; + } + + /** + * 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; + } + + /** + * 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; + } + + /** + * 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; + } + + /** + * 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; + } + + /** + * 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; + } + + /** + * 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; + } + + /** + * 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; + } + + /** + * 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; + } + + /** + * 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; + } + + /** + * 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; + } + + /** + * 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; + } + + /** + * 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; + } + + /** + * 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; + } + + /** + * 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; + } + + /** + * 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; + } + + /** + * 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; + } + + /** + * 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; + } + + /** + * 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; + } + + /** + * 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; + } + + /** + * 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; + } + + /** + * 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; + } + + /** + * 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; + } + + /** + * 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; + } + + /** + * Options to configure Radar. See Radar + * Session for more information. + */ + public Builder setRadarOptions( + PaymentIntentCreateParams.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(PaymentIntentCreateParams.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( + PaymentIntentCreateParams.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( + 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; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A 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 { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level 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 PaymentIntentCreateParams.PaymentMethodData.Affirm build() { + return new PaymentIntentCreateParams.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 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; + } + } + } + + @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 PaymentIntentCreateParams.PaymentMethodData.AfterpayClearpay build() { + return new PaymentIntentCreateParams.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 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; + } + + /** + * Add all map key/value pairs to `extraParams` map. A 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 { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level 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 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 { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level 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 PaymentIntentCreateParams.PaymentMethodData.Alma build() { + return new PaymentIntentCreateParams.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 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; + } + + /** + * Add all map key/value pairs to `extraParams` map. A 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 { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level 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 PaymentIntentCreateParams.PaymentMethodData.AmazonPay build() { + return new PaymentIntentCreateParams.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 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; + } + + /** + * Add all map key/value pairs to `extraParams` map. A 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; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class AuBecsDebit { + /** Required. The account number for the bank account. */ + @SerializedName("account_number") + String accountNumber; + + /** Required. Bank-State-Branch number of the bank account. */ + @SerializedName("bsb_number") + String bsbNumber; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private AuBecsDebit(String accountNumber, String bsbNumber, Map extraParams) { + this.accountNumber = accountNumber; + this.bsbNumber = bsbNumber; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String accountNumber; + + private String bsbNumber; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodData.AuBecsDebit build() { + return new PaymentIntentCreateParams.PaymentMethodData.AuBecsDebit( + this.accountNumber, this.bsbNumber, this.extraParams); + } + + /** Required. The account number for the bank account. */ + public Builder setAccountNumber(String accountNumber) { + this.accountNumber = accountNumber; + return this; + } + + /** Required. Bank-State-Branch number of the bank account. */ + public Builder setBsbNumber(String bsbNumber) { + this.bsbNumber = bsbNumber; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link 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; + } + + /** + * Add all map key/value pairs to `extraParams` map. A 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 BacsDebit { + /** Account number of the bank account that the funds will be debited from. */ + @SerializedName("account_number") + String accountNumber; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Sort code of the bank account. (e.g., {@code 10-20-30}) */ + @SerializedName("sort_code") + String sortCode; + + private BacsDebit(String accountNumber, Map extraParams, String sortCode) { + this.accountNumber = accountNumber; + this.extraParams = extraParams; + this.sortCode = sortCode; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String accountNumber; + + private Map extraParams; + + private String sortCode; + + /** Finalize and obtain parameter instance from this builder. */ + public 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.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; + } + } + } + + @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); + } + + /** + * Add a key/value pair to `extraParams` map. A 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; + } + + /** + * Add all map key/value pairs to `extraParams` map. A 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; + } + } + } + + @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 PaymentIntentCreateParams.PaymentMethodData.Billie build() { + return new PaymentIntentCreateParams.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 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; + } + + /** + * Add all map key/value pairs to `extraParams` map. A 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; + } + } + } + + @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") + String taxId; + + 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; + } + + 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 String taxId; + + /** 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); + } + + /** Billing address. */ + public Builder setAddress( + PaymentIntentCreateParams.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 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; + } + + /** + * Add a key/value pair to `extraParams` map. A 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 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 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.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 PaymentIntentCreateParams.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") + String taxId; + + private Boleto(Map extraParams, String taxId) { + this.extraParams = extraParams; + this.taxId = taxId; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String taxId; + + /** Finalize and obtain parameter instance from this builder. */ + public 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.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 PaymentIntentCreateParams.PaymentMethodData.Boleto#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. The tax ID of the customer (CPF for individual consumers or + * CNPJ for businesses consumers) + */ + public Builder setTaxId(String taxId) { + this.taxId = taxId; + return this; + } + } + } + + @Getter + @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 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.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 PaymentIntentCreateParams.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 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.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 PaymentIntentCreateParams.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 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.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 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; + } + } + } + + @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 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.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 PaymentIntentCreateParams.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 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.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 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; + } + } + + 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 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.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 PaymentIntentCreateParams.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 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.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 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; + } + } + } + + @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); + } + + /** + * Add a key/value pair to `extraParams` map. A 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; + } + + /** + * Add all map key/value pairs to `extraParams` map. A 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; + } + } + } + + @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 PaymentIntentCreateParams.PaymentMethodData.IdBankTransfer build() { + return new PaymentIntentCreateParams.PaymentMethodData.IdBankTransfer( + this.bank, this.extraParams); + } + + /** 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.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 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; + } + } + + 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 PaymentIntentCreateParams.PaymentMethodData.Ideal build() { + return new PaymentIntentCreateParams.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(PaymentIntentCreateParams.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 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; + } + + /** + * Add all map key/value pairs to `extraParams` map. A 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; + } + } + + 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("finom") + FINOM("finom"), + + @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 PaymentIntentCreateParams.PaymentMethodData.InteracPresent build() { + return new PaymentIntentCreateParams.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 PaymentIntentCreateParams.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 PaymentIntentCreateParams.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 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); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A 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); + 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; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A 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); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A 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); + 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.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; + } + } + } + } + + @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); + } + + /** + * Add a key/value pair to `extraParams` map. A 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<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A 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 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); + } + + /** + * Add a key/value pair to `extraParams` map. A 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<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A 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<>(); + } + 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); + } + + /** + * Add a key/value pair to `extraParams` map. A 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; + } + + /** + * Add all map key/value pairs to `extraParams` map. A 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; + } + } + } + + @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); + } + + /** + * Add a key/value pair to `extraParams` map. A 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<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A 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<>(); + } + 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; + } - /** - * If this is an {@code wechat_pay} PaymentMethod, this hash contains details about the - * wechat_pay payment method. - */ - @SerializedName("wechat_pay") - WechatPay wechatPay; + public static Builder builder() { + return new Builder(); + } - /** - * If this is a {@code zip} PaymentMethod, this hash contains details about the Zip payment - * method. - */ - @SerializedName("zip") - Zip zip; + public static class Builder { + private String accountHolderName; - 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 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; + } + } } - public static Builder builder() { - return new Builder(); + @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; + } + } } - public static class Builder { - private AcssDebit acssDebit; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class P24 { + /** The customer's bank. */ + @SerializedName("bank") + Bank bank; - private Affirm 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 AfterpayClearpay afterpayClearpay; + private P24(Bank bank, Map extraParams) { + this.bank = bank; + this.extraParams = extraParams; + } - private Alipay alipay; + public static Builder builder() { + return new Builder(); + } - private AllowRedisplay allowRedisplay; + public static class Builder { + private Bank bank; - private Alma alma; + private Map extraParams; - private AmazonPay amazonPay; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodData.P24 build() { + return new PaymentIntentCreateParams.PaymentMethodData.P24(this.bank, this.extraParams); + } - private AuBecsDebit auBecsDebit; + /** The customer's bank. */ + public Builder setBank(PaymentIntentCreateParams.PaymentMethodData.P24.Bank bank) { + this.bank = bank; + return this; + } - private BacsDebit bacsDebit; + /** + * Add a key/value pair to `extraParams` map. A 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; + } - private Bancontact bancontact; + /** + * Add all map key/value pairs to `extraParams` map. A 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; + } + } - private Billie billie; + public enum Bank implements ApiRequestParams.EnumParam { + @SerializedName("alior_bank") + ALIOR_BANK("alior_bank"), - private BillingDetails billingDetails; + @SerializedName("bank_millennium") + BANK_MILLENNIUM("bank_millennium"), - private Blik blik; + @SerializedName("bank_nowy_bfg_sa") + BANK_NOWY_BFG_SA("bank_nowy_bfg_sa"), - private Boleto boleto; + @SerializedName("bank_pekao_sa") + BANK_PEKAO_SA("bank_pekao_sa"), - private Cashapp cashapp; + @SerializedName("banki_spbdzielcze") + BANKI_SPBDZIELCZE("banki_spbdzielcze"), - private Crypto crypto; + @SerializedName("blik") + BLIK("blik"), - private CustomerBalance customerBalance; + @SerializedName("bnp_paribas") + BNP_PARIBAS("bnp_paribas"), - private Eps eps; + @SerializedName("boz") + BOZ("boz"), - private Map extraParams; + @SerializedName("citi_handlowy") + CITI_HANDLOWY("citi_handlowy"), - private Fpx fpx; + @SerializedName("credit_agricole") + CREDIT_AGRICOLE("credit_agricole"), - private Giropay giropay; + @SerializedName("envelobank") + ENVELOBANK("envelobank"), - private Gopay gopay; + @SerializedName("etransfer_pocztowy24") + ETRANSFER_POCZTOWY24("etransfer_pocztowy24"), - private Grabpay grabpay; + @SerializedName("getin_bank") + GETIN_BANK("getin_bank"), - private IdBankTransfer idBankTransfer; + @SerializedName("ideabank") + IDEABANK("ideabank"), - private Ideal ideal; + @SerializedName("ing") + ING("ing"), - private InteracPresent interacPresent; + @SerializedName("inteligo") + INTELIGO("inteligo"), - private KakaoPay kakaoPay; + @SerializedName("mbank_mtransfer") + MBANK_MTRANSFER("mbank_mtransfer"), - private Klarna klarna; + @SerializedName("nest_przelew") + NEST_PRZELEW("nest_przelew"), - private Konbini konbini; + @SerializedName("noble_pay") + NOBLE_PAY("noble_pay"), - private KrCard krCard; + @SerializedName("pbac_z_ipko") + PBAC_Z_IPKO("pbac_z_ipko"), - private Link link; + @SerializedName("plus_bank") + PLUS_BANK("plus_bank"), - private MbWay mbWay; + @SerializedName("santander_przelew24") + SANTANDER_PRZELEW24("santander_przelew24"), - private Map metadata; + @SerializedName("tmobile_usbugi_bankowe") + TMOBILE_USBUGI_BANKOWE("tmobile_usbugi_bankowe"), - private Mobilepay mobilepay; + @SerializedName("toyota_bank") + TOYOTA_BANK("toyota_bank"), - private Multibanco multibanco; + @SerializedName("velobank") + VELOBANK("velobank"), - private NaverPay naverPay; + @SerializedName("volkswagen_bank") + VOLKSWAGEN_BANK("volkswagen_bank"); - private NzBankAccount nzBankAccount; + @Getter(onMethod_ = {@Override}) + private final String value; - private Oxxo oxxo; + Bank(String value) { + this.value = value; + } + } + } - private P24 p24; + @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 payByBank; + private PayByBank(Map extraParams) { + this.extraParams = extraParams; + } - private Payco payco; + public static Builder builder() { + return new Builder(); + } - private Paynow paynow; + 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; + } - private 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.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 Paypay paypay; + @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 Payto payto; + private Payco(Map extraParams) { + this.extraParams = extraParams; + } - private Pix pix; + public static Builder builder() { + return new Builder(); + } - private Promptpay promptpay; + public static class Builder { + private Map extraParams; - private Qris qris; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodData.Payco build() { + return new PaymentIntentCreateParams.PaymentMethodData.Payco(this.extraParams); + } - private RadarOptions radarOptions; + /** + * Add a key/value pair to `extraParams` map. A 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; + } - private Rechnung rechnung; + /** + * Add all map key/value pairs to `extraParams` map. A 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; + } + } + } - private RevolutPay revolutPay; + @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 SamsungPay samsungPay; + private Paynow(Map extraParams) { + this.extraParams = extraParams; + } - private Satispay satispay; + public static Builder builder() { + return new Builder(); + } - private SepaDebit sepaDebit; + public static class Builder { + private Map extraParams; - private Shopeepay shopeepay; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodData.Paynow build() { + return new PaymentIntentCreateParams.PaymentMethodData.Paynow(this.extraParams); + } - private Sofort sofort; + /** + * Add a key/value pair to `extraParams` map. A 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; + } - private StripeBalance stripeBalance; + /** + * Add all map key/value pairs to `extraParams` map. A 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; + } + } + } - private Swish swish; + @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 Twint twint; + private Paypal(Map extraParams) { + this.extraParams = extraParams; + } - private Type type; + public static Builder builder() { + return new Builder(); + } - private UsBankAccount usBankAccount; + public static class Builder { + private Map extraParams; - private WechatPay wechatPay; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodData.Paypal build() { + return new PaymentIntentCreateParams.PaymentMethodData.Paypal(this.extraParams); + } - private 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 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; + } - /** 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); + /** + * Add all map key/value pairs to `extraParams` map. A 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 { /** - * If this is an {@code acss_debit} PaymentMethod, this hash contains details about the ACSS - * Debit 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 setAcssDebit(PaymentIntentCreateParams.PaymentMethodData.AcssDebit acssDebit) { - this.acssDebit = acssDebit; - return this; - } + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - /** - * 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 Paypay(Map extraParams) { + this.extraParams = 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; + public static Builder builder() { + return new Builder(); } - /** - * 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; - } + public static class Builder { + 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}. - */ - public Builder setAllowRedisplay( - PaymentIntentCreateParams.PaymentMethodData.AllowRedisplay allowRedisplay) { - this.allowRedisplay = allowRedisplay; - return this; - } + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodData.Paypay build() { + return new PaymentIntentCreateParams.PaymentMethodData.Paypay(this.extraParams); + } - /** - * 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; - } + /** + * Add a key/value pair to `extraParams` map. A 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; + } - /** - * 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; + /** + * Add all map key/value pairs to `extraParams` map. A 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; + } } + } - /** - * 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; - } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Payto { + /** The account number for the bank account. */ + @SerializedName("account_number") + String accountNumber; - /** - * 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; - } + /** Bank-State-Branch number of the bank account. */ + @SerializedName("bsb_number") + String 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( - PaymentIntentCreateParams.PaymentMethodData.Bancontact bancontact) { - this.bancontact = bancontact; - return this; - } + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - /** - * 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 PayID alias for the bank account. */ + @SerializedName("pay_id") + String payId; - /** - * 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; + private Payto( + String accountNumber, String bsbNumber, Map extraParams, String payId) { + this.accountNumber = accountNumber; + this.bsbNumber = bsbNumber; + this.extraParams = extraParams; + this.payId = payId; } - /** - * 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; + public static Builder builder() { + return new Builder(); } - /** - * 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; - } + public static class Builder { + private String accountNumber; - /** - * 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; - } + private String bsbNumber; - /** - * 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; + 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 { /** - * If this is a {@code customer_balance} PaymentMethod, this hash contains details about the - * CustomerBalance 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 setCustomerBalance( - PaymentIntentCreateParams.PaymentMethodData.CustomerBalance customerBalance) { - this.customerBalance = customerBalance; - return this; + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Pix(Map extraParams) { + this.extraParams = extraParams; } - /** - * 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; + 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#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; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodData.Pix build() { + return new PaymentIntentCreateParams.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 PaymentIntentCreateParams.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 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; } - 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; + /** + * Add all map key/value pairs to `extraParams` map. A 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 { /** - * If this is a {@code giropay} PaymentMethod, this hash contains details about the Giropay - * 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 setGiropay(PaymentIntentCreateParams.PaymentMethodData.Giropay giropay) { - this.giropay = giropay; - return this; - } + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - /** - * 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; + private Promptpay(Map extraParams) { + this.extraParams = extraParams; } - /** - * 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; + public static Builder builder() { + return new Builder(); } - /** - * 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; - } + public static class Builder { + private 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; - } + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodData.Promptpay build() { + return new PaymentIntentCreateParams.PaymentMethodData.Promptpay(this.extraParams); + } - /** - * 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; - } + /** + * Add a key/value pair to `extraParams` map. A 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; + } - /** - * 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; + /** + * Add all map key/value pairs to `extraParams` map. A 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 { /** - * If this is a {@code klarna} PaymentMethod, this hash contains details about the Klarna - * 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 setKlarna(PaymentIntentCreateParams.PaymentMethodData.Klarna klarna) { - this.klarna = klarna; - return this; + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Qris(Map extraParams) { + this.extraParams = extraParams; } - /** - * 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; + public static Builder builder() { + return new Builder(); } - /** - * 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; + 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 { /** - * If this is an {@code Link} PaymentMethod, this hash contains details about the Link 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 setLink(PaymentIntentCreateParams.PaymentMethodData.Link link) { - this.link = link; - return this; - } + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; /** - * If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY 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 setMbWay(PaymentIntentCreateParams.PaymentMethodData.MbWay mbWay) { - this.mbWay = mbWay; - return this; + @SerializedName("session") + String session; + + private RadarOptions(Map extraParams, String session) { + this.extraParams = extraParams; + this.session = session; } - /** - * 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; + public static Builder builder() { + return new Builder(); } - /** - * 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<>(); + 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); } - 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(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.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 multibanco} PaymentMethod, this hash contains details about the - * Multibanco payment method. - */ - 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.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 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; + /** + * 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 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; - } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Rechnung { + /** Required. Customer's date of birth */ + @SerializedName("dob") + Dob dob; /** - * If this is an {@code oxxo} PaymentMethod, this hash contains details about the OXXO 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 setOxxo(PaymentIntentCreateParams.PaymentMethodData.Oxxo oxxo) { - this.oxxo = oxxo; - return this; - } + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - /** - * 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 Rechnung(Dob dob, Map extraParams) { + this.dob = dob; + this.extraParams = extraParams; } - /** - * 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; + public static Builder builder() { + return new Builder(); } - /** - * 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; - } + public static class Builder { + private Dob dob; - /** - * 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; - } + private Map extraParams; - /** - * 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; - } + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodData.Rechnung build() { + return new PaymentIntentCreateParams.PaymentMethodData.Rechnung( + this.dob, this.extraParams); + } - /** - * 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; + /** 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; + } } - /** - * 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; - } + @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; - /** - * 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; - } + /** Required. The four-digit year of birth. */ + @SerializedName("year") + Long year; - /** - * 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; - } + 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 qris} PaymentMethod, this hash contains details about the QRIS payment - * method. - */ - public Builder setQris(PaymentIntentCreateParams.PaymentMethodData.Qris qris) { - this.qris = qris; - return this; - } + public static Builder builder() { + return new Builder(); + } - /** - * Options to configure Radar. See Radar - * Session for more information. - */ - public Builder setRadarOptions( - PaymentIntentCreateParams.PaymentMethodData.RadarOptions radarOptions) { - this.radarOptions = radarOptions; - return this; - } + public static class Builder { + private Long day; - /** - * 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; - } + private Map extraParams; - /** - * 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; - } + private Long month; - /** - * 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; - } + private Long year; - /** - * 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; - } + /** 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); + } - /** - * 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; - } + /** Required. The day of birth, between 1 and 31. */ + public Builder setDay(Long day) { + this.day = day; + 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; - } + /** + * Add a key/value pair to `extraParams` map. A 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; + } - /** - * 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; - } + /** + * Add all map key/value pairs to `extraParams` map. A 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; + } - /** This hash contains details about the Stripe balance payment method. */ - public Builder setStripeBalance( - PaymentIntentCreateParams.PaymentMethodData.StripeBalance stripeBalance) { - this.stripeBalance = stripeBalance; - 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 swish} PaymentMethod, this hash contains details about the Swish - * payment method. - */ - public Builder setSwish(PaymentIntentCreateParams.PaymentMethodData.Swish swish) { - this.swish = swish; - 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(PaymentIntentCreateParams.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(PaymentIntentCreateParams.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( - PaymentIntentCreateParams.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(PaymentIntentCreateParams.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(PaymentIntentCreateParams.PaymentMethodData.Zip zip) { - this.zip = zip; - return this; + /** 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 AcssDebit { - /** Required. Customer's bank account number. */ - @SerializedName("account_number") - String 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. @@ -8978,23 +19160,8 @@ public static class AcssDebit { @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; + private SamsungPay(Map extraParams) { this.extraParams = extraParams; - this.institutionNumber = institutionNumber; - this.transitNumber = transitNumber; } public static Builder builder() { @@ -9002,30 +19169,17 @@ public static Builder 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; - return this; + 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.AcssDebit#extraParams} for + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.SamsungPay#extraParams} for * the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -9039,7 +19193,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.AcssDebit#extraParams} for + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.SamsungPay#extraParams} for * the field documentation. */ public Builder putAllExtraParam(Map map) { @@ -9049,24 +19203,12 @@ 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; - } - - /** 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 { + 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. @@ -9076,7 +19218,7 @@ public static class Affirm { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Affirm(Map extraParams) { + private Satispay(Map extraParams) { this.extraParams = extraParams; } @@ -9088,14 +19230,14 @@ public static class Builder { private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodData.Affirm build() { - return new PaymentIntentCreateParams.PaymentMethodData.Affirm(this.extraParams); + 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.Affirm#extraParams} for the + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Satispay#extraParams} for the * field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -9109,7 +19251,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.Affirm#extraParams} for the + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Satispay#extraParams} for the * field documentation. */ public Builder putAllExtraParam(Map map) { @@ -9124,7 +19266,7 @@ public Builder putAllExtraParam(Map map) { @Getter @EqualsAndHashCode(callSuper = false) - public static class AfterpayClearpay { + 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. @@ -9134,8 +19276,13 @@ public static class AfterpayClearpay { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private AfterpayClearpay(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() { @@ -9145,16 +19292,19 @@ public static Builder builder() { public static class Builder { private Map extraParams; + private String iban; + /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodData.AfterpayClearpay build() { - return new PaymentIntentCreateParams.PaymentMethodData.AfterpayClearpay(this.extraParams); + 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.AfterpayClearpay#extraParams} - * for the field documentation. + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.SepaDebit#extraParams} for + * the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -9167,8 +19317,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.AfterpayClearpay#extraParams} - * for the field documentation. + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.SepaDebit#extraParams} for + * the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -9177,12 +19327,18 @@ 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; + } } } @Getter @EqualsAndHashCode(callSuper = false) - public static class Alipay { + 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. @@ -9192,7 +19348,7 @@ public static class Alipay { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Alipay(Map extraParams) { + private Shopeepay(Map extraParams) { this.extraParams = extraParams; } @@ -9204,15 +19360,15 @@ 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); + 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.Alipay#extraParams} for the - * field documentation. + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Shopeepay#extraParams} for + * the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -9225,8 +19381,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.Alipay#extraParams} for the - * field documentation. + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Shopeepay#extraParams} for + * the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -9240,7 +19396,14 @@ public Builder putAllExtraParam(Map map) { @Getter @EqualsAndHashCode(callSuper = false) - public static class Alma { + 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. @@ -9250,7 +19413,8 @@ public static class Alma { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Alma(Map extraParams) { + private Sofort(Country country, Map extraParams) { + this.country = country; this.extraParams = extraParams; } @@ -9259,17 +19423,30 @@ public static Builder builder() { } public static class Builder { + private Country country; + private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodData.Alma build() { - return new PaymentIntentCreateParams.PaymentMethodData.Alma(this.extraParams); + 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.Alma#extraParams} for the + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Sofort#extraParams} for the * field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -9283,7 +19460,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.Alma#extraParams} for the + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Sofort#extraParams} for the * field documentation. */ public Builder putAllExtraParam(Map map) { @@ -9294,11 +19471,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 AmazonPay { + 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. @@ -9308,8 +19516,19 @@ public static class AmazonPay { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private AmazonPay(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() { @@ -9317,18 +19536,29 @@ public static Builder 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.AmazonPay build() { - return new PaymentIntentCreateParams.PaymentMethodData.AmazonPay(this.extraParams); + 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.AmazonPay#extraParams} for - * the field documentation. + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.StripeBalance#extraParams} + * for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -9341,8 +19571,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.AmazonPay#extraParams} for - * the field documentation. + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.StripeBalance#extraParams} + * for the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -9351,20 +19581,41 @@ public Builder putAllExtraParam(Map map) { 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 AuBecsDebit { - /** Required. The account number for the bank account. */ - @SerializedName("account_number") - String accountNumber; - - /** Required. Bank-State-Branch number of the bank account. */ - @SerializedName("bsb_number") - String bsbNumber; - + 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. @@ -9374,9 +19625,7 @@ public static class AuBecsDebit { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private AuBecsDebit(String accountNumber, String bsbNumber, Map extraParams) { - this.accountNumber = accountNumber; - this.bsbNumber = bsbNumber; + private Swish(Map extraParams) { this.extraParams = extraParams; } @@ -9385,35 +19634,18 @@ public static Builder builder() { } public static class Builder { - private String accountNumber; - - private String bsbNumber; - private 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. The account number for the bank account. */ - public Builder setAccountNumber(String accountNumber) { - this.accountNumber = accountNumber; - return this; - } - - /** Required. Bank-State-Branch number of the bank account. */ - public Builder setBsbNumber(String bsbNumber) { - this.bsbNumber = bsbNumber; - return this; + 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.AuBecsDebit#extraParams} for - * the field documentation. + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Swish#extraParams} for the + * field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -9426,8 +19658,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.AuBecsDebit#extraParams} for - * the field documentation. + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Swish#extraParams} for the + * field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -9441,11 +19673,7 @@ 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. */ - @SerializedName("account_number") - String accountNumber; - + 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. @@ -9455,14 +19683,8 @@ 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") - String sortCode; - - private BacsDebit(String accountNumber, Map extraParams, String sortCode) { - this.accountNumber = accountNumber; + private Twint(Map extraParams) { this.extraParams = extraParams; - this.sortCode = sortCode; } public static Builder builder() { @@ -9470,29 +19692,18 @@ public static Builder builder() { } public static class Builder { - private String accountNumber; - private Map extraParams; - private String sortCode; - /** Finalize and obtain parameter instance from this builder. */ - 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; + 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.BacsDebit#extraParams} for - * the field documentation. + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Twint#extraParams} for the + * field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -9505,8 +19716,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.BacsDebit#extraParams} for - * the field documentation. + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Twint#extraParams} for the + * field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -9515,18 +19726,24 @@ public Builder putAllExtraParam(Map map) { this.extraParams.putAll(map); return this; } - - /** Sort code of the bank account. (e.g., {@code 10-20-30}) */ - public Builder setSortCode(String sortCode) { - this.sortCode = sortCode; - return this; - } } } @Getter @EqualsAndHashCode(callSuper = false) - public static class Bancontact { + 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. @@ -9536,8 +19753,27 @@ public static class Bancontact { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Bancontact(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() { @@ -9545,18 +19781,55 @@ public static Builder 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.Bancontact build() { - return new PaymentIntentCreateParams.PaymentMethodData.Bancontact(this.extraParams); + 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.Bancontact#extraParams} for - * the field documentation. + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.UsBankAccount#extraParams} + * for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -9569,8 +19842,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.Bancontact#extraParams} for - * the field documentation. + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.UsBankAccount#extraParams} + * for the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -9579,12 +19852,54 @@ public Builder putAllExtraParam(Map map) { 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 Billie { + 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. @@ -9594,7 +19909,7 @@ public static class Billie { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Billie(Map extraParams) { + private WechatPay(Map extraParams) { this.extraParams = extraParams; } @@ -9606,15 +19921,15 @@ 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); + 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.Billie#extraParams} for the - * field documentation. + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.WechatPay#extraParams} for + * the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -9627,8 +19942,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.Billie#extraParams} for the - * field documentation. + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.WechatPay#extraParams} for + * the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -9642,52 +19957,18 @@ 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; - + 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; - - /** 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") - String taxId; + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - private BillingDetails( - Object address, - Object email, - Map extraParams, - Object name, - Object phone, - String taxId) { - this.address = address; - this.email = email; + private Zip(Map extraParams) { this.extraParams = extraParams; - this.name = name; - this.phone = phone; - this.taxId = taxId; } public static Builder builder() { @@ -9695,54 +19976,18 @@ public static Builder builder() { } public static class Builder { - private Object address; - - private Object email; - private Map extraParams; - private Object name; - - private Object phone; - - private String taxId; - /** 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); - } - - /** Billing address. */ - public Builder setAddress( - PaymentIntentCreateParams.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; + 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.BillingDetails#extraParams} - * for the field documentation. + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Zip#extraParams} for the + * field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -9755,8 +20000,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#extraParams} - * for the field documentation. + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Zip#extraParams} for the + * field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -9765,1896 +20010,2049 @@ public Builder putAllExtraParam(Map map) { this.extraParams.putAll(map); return this; } + } + } - /** Full name. */ - public Builder setName(String name) { - this.name = name; - return this; - } + public enum AllowRedisplay implements ApiRequestParams.EnumParam { + @SerializedName("always") + ALWAYS("always"), - /** Full name. */ - public Builder setName(EmptyParam name) { - this.name = name; - return this; - } + @SerializedName("limited") + LIMITED("limited"), - /** Billing phone number (including extension). */ - public Builder setPhone(String phone) { - this.phone = phone; - return this; - } + @SerializedName("unspecified") + UNSPECIFIED("unspecified"); - /** Billing phone number (including extension). */ - public Builder setPhone(EmptyParam phone) { - this.phone = phone; - return this; - } + @Getter(onMethod_ = {@Override}) + private final String value; - /** - * Taxpayer identification number. Used only for transactions between LATAM buyers and - * non-LATAM sellers. - */ - public Builder setTaxId(String taxId) { - this.taxId = taxId; - return this; - } + AllowRedisplay(String value) { + this.value = value; } + } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Address { - /** City, district, suburb, town, or village. */ - @SerializedName("city") - String city; + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("acss_debit") + ACSS_DEBIT("acss_debit"), - /** - * Two-letter country code (ISO - * 3166-1 alpha-2). - */ - @SerializedName("country") - String country; + @SerializedName("affirm") + AFFIRM("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; + @SerializedName("afterpay_clearpay") + AFTERPAY_CLEARPAY("afterpay_clearpay"), - /** Address line 1, such as the street, PO Box, or company name. */ - @SerializedName("line1") - String line1; + @SerializedName("alipay") + ALIPAY("alipay"), - /** Address line 2, such as the apartment, suite, unit, or building. */ - @SerializedName("line2") - String line2; + @SerializedName("alma") + ALMA("alma"), - /** ZIP or postal code. */ - @SerializedName("postal_code") - String postalCode; + @SerializedName("amazon_pay") + AMAZON_PAY("amazon_pay"), - /** State, county, province, or region. */ - @SerializedName("state") - String state; + @SerializedName("au_becs_debit") + AU_BECS_DEBIT("au_becs_debit"), - 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("bacs_debit") + BACS_DEBIT("bacs_debit"), - public static Builder builder() { - return new Builder(); - } + @SerializedName("bancontact") + BANCONTACT("bancontact"), - public static class Builder { - private String city; + @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"), - private String country; + @SerializedName("paynow") + PAYNOW("paynow"), - private Map extraParams; + @SerializedName("paypal") + PAYPAL("paypal"), - private String line1; + @SerializedName("paypay") + PAYPAY("paypay"), - private String line2; + @SerializedName("payto") + PAYTO("payto"), - private String postalCode; + @SerializedName("pix") + PIX("pix"), - private String state; + @SerializedName("promptpay") + PROMPTPAY("promptpay"), - /** 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); - } + @SerializedName("qris") + QRIS("qris"), - /** City, district, suburb, town, or village. */ - public Builder setCity(String city) { - this.city = city; - return this; - } + @SerializedName("rechnung") + RECHNUNG("rechnung"), - /** - * Two-letter country code (ISO - * 3166-1 alpha-2). - */ - public Builder setCountry(String country) { - this.country = country; - return this; - } + @SerializedName("revolut_pay") + REVOLUT_PAY("revolut_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 - * 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; - } + @SerializedName("samsung_pay") + SAMSUNG_PAY("samsung_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.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("satispay") + SATISPAY("satispay"), - /** Address line 1, such as the street, PO Box, or company name. */ - public Builder setLine1(String line1) { - this.line1 = line1; - return this; - } + @SerializedName("sepa_debit") + SEPA_DEBIT("sepa_debit"), - /** Address line 2, such as the apartment, suite, unit, or building. */ - public Builder setLine2(String line2) { - this.line2 = line2; - return this; - } + @SerializedName("shopeepay") + SHOPEEPAY("shopeepay"), - /** ZIP or postal code. */ - public Builder setPostalCode(String postalCode) { - this.postalCode = postalCode; - return this; - } + @SerializedName("sofort") + SOFORT("sofort"), - /** State, county, province, or region. */ - public Builder setState(String 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 PaymentIntentCreateParams.PaymentMethodData.Blik build() { - return new PaymentIntentCreateParams.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 PaymentIntentCreateParams.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 PaymentIntentCreateParams.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") - String 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, String 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; + + /** + * 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; - private String taxId; + /** + * If this is a {@code bancontact} PaymentMethod, this sub-hash contains details about the + * Bancontact payment method options. + */ + @SerializedName("bancontact") + Object bancontact; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodData.Boleto build() { - return new PaymentIntentCreateParams.PaymentMethodData.Boleto( - this.extraParams, this.taxId); - } + /** + * If this is a {@code billie} PaymentMethod, this sub-hash contains details about the Billie + * payment method options. + */ + @SerializedName("billie") + Object 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 PaymentIntentCreateParams.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 blik} PaymentMethod, this sub-hash contains details about the BLIK + * payment method options. + */ + @SerializedName("blik") + Object blik; - /** - * Add all map key/value pairs to `extraParams` map. A 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<>(); - } - this.extraParams.putAll(map); - return this; - } + /** + * If this is a {@code boleto} PaymentMethod, this sub-hash contains details about the Boleto + * payment method options. + */ + @SerializedName("boleto") + Object boleto; - /** - * 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; - } - } - } + /** Configuration for any card payments attempted on this PaymentIntent. */ + @SerializedName("card") + Object card; - @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 card_present} PaymentMethod, this sub-hash contains details about the + * Card Present payment method options. + */ + @SerializedName("card_present") + Object cardPresent; - private Cashapp(Map extraParams) { - this.extraParams = 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; - 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. + */ + @SerializedName("crypto") + Object crypto; - public static class Builder { - private Map extraParams; + /** + * 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; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodData.Cashapp build() { - return new PaymentIntentCreateParams.PaymentMethodData.Cashapp(this.extraParams); - } + /** + * If this is a {@code eps} PaymentMethod, this sub-hash contains details about the EPS payment + * method options. + */ + @SerializedName("eps") + Object 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.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 PaymentIntentCreateParams.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 fpx} PaymentMethod, this sub-hash contains details about the FPX payment + * method options. + */ + @SerializedName("fpx") + Object fpx; - @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; + /** + * If this is a {@code giropay} PaymentMethod, this sub-hash contains details about the Giropay + * payment method options. + */ + @SerializedName("giropay") + Object giropay; - private Crypto(Map extraParams) { - this.extraParams = extraParams; - } + /** + * If this is a {@code gopay} PaymentMethod, this sub-hash contains details about the Gopay + * payment method options. + */ + @SerializedName("gopay") + Object gopay; - public static Builder builder() { - return new Builder(); - } + /** + * If this is a {@code grabpay} PaymentMethod, this sub-hash contains details about the Grabpay + * payment method options. + */ + @SerializedName("grabpay") + Object grabpay; - public static class Builder { - 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; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodData.Crypto build() { - return new PaymentIntentCreateParams.PaymentMethodData.Crypto(this.extraParams); - } + /** + * If this is a {@code ideal} PaymentMethod, this sub-hash contains details about the Ideal + * payment method options. + */ + @SerializedName("ideal") + 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 PaymentIntentCreateParams.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 interac_present} PaymentMethod, this sub-hash contains details about the + * Card Present payment method options. + */ + @SerializedName("interac_present") + 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 PaymentIntentCreateParams.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 kakao_pay} PaymentMethod, this sub-hash contains details about the Kakao + * Pay payment method options. + */ + @SerializedName("kakao_pay") + Object kakaoPay; - @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 klarna} PaymentMethod, this sub-hash contains details about the Klarna + * payment method options. + */ + @SerializedName("klarna") + Object klarna; - private CustomerBalance(Map extraParams) { - this.extraParams = extraParams; - } + /** + * If this is a {@code konbini} PaymentMethod, this sub-hash contains details about the Konbini + * payment method options. + */ + @SerializedName("konbini") + Object konbini; - 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. + */ + @SerializedName("kr_card") + Object krCard; - public static class Builder { - private Map extraParams; + /** + * If this is a {@code link} PaymentMethod, this sub-hash contains details about the Link + * payment method options. + */ + @SerializedName("link") + Object link; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodData.CustomerBalance build() { - return new PaymentIntentCreateParams.PaymentMethodData.CustomerBalance(this.extraParams); - } + /** + * 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; - /** - * Add a key/value pair to `extraParams` map. A 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; - } + /** + * 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 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; - } - } - } + /** + * 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 PaymentIntentCreateParams.PaymentMethodData.Eps build() { - return new PaymentIntentCreateParams.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(PaymentIntentCreateParams.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 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; - } + /** + * 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 PaymentIntentCreateParams.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; - @SerializedName("erste_bank_und_sparkassen") - ERSTE_BANK_UND_SPARKASSEN("erste_bank_und_sparkassen"), + /** + * 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; - @SerializedName("hypo_alpeadriabank_international_ag") - HYPO_ALPEADRIABANK_INTERNATIONAL_AG("hypo_alpeadriabank_international_ag"), + /** + * 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("hypo_bank_burgenland_aktiengesellschaft") - HYPO_BANK_BURGENLAND_AKTIENGESELLSCHAFT("hypo_bank_burgenland_aktiengesellschaft"), + /** + * If this is a {@code zip} PaymentMethod, this sub-hash contains details about the Zip payment + * method options. + */ + @SerializedName("zip") + Object zip; - @SerializedName("hypo_noe_lb_fur_niederosterreich_u_wien") - HYPO_NOE_LB_FUR_NIEDEROSTERREICH_U_WIEN("hypo_noe_lb_fur_niederosterreich_u_wien"), + 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_oberosterreich_salzburg_steiermark") - HYPO_OBEROSTERREICH_SALZBURG_STEIERMARK("hypo_oberosterreich_salzburg_steiermark"), + public static Builder builder() { + return new Builder(); + } - @SerializedName("hypo_tirol_bank_ag") - HYPO_TIROL_BANK_AG("hypo_tirol_bank_ag"), + public static class Builder { + private Object acssDebit; - @SerializedName("hypo_vorarlberg_bank_ag") - HYPO_VORARLBERG_BANK_AG("hypo_vorarlberg_bank_ag"), + private Object affirm; - @SerializedName("marchfelder_bank") - MARCHFELDER_BANK("marchfelder_bank"), + private Object afterpayClearpay; - @SerializedName("oberbank_ag") - OBERBANK_AG("oberbank_ag"), + private Object alipay; - @SerializedName("raiffeisen_bankengruppe_osterreich") - RAIFFEISEN_BANKENGRUPPE_OSTERREICH("raiffeisen_bankengruppe_osterreich"), + private Object alma; - @SerializedName("schoellerbank_ag") - SCHOELLERBANK_AG("schoellerbank_ag"), + private Object amazonPay; - @SerializedName("sparda_bank_wien") - SPARDA_BANK_WIEN("sparda_bank_wien"), + private Object auBecsDebit; - @SerializedName("volksbank_gruppe") - VOLKSBANK_GRUPPE("volksbank_gruppe"), + private Object bacsDebit; - @SerializedName("volkskreditbank_ag") - VOLKSKREDITBANK_AG("volkskreditbank_ag"), + private Object bancontact; - @SerializedName("vr_bank_braunau") - VR_BANK_BRAUNAU("vr_bank_braunau"); + private Object billie; - @Getter(onMethod_ = {@Override}) - private final String value; + private Object blik; - Bank(String value) { - this.value = value; - } - } - } + private Object boleto; - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Fpx { - /** Account holder type for FPX transaction. */ - @SerializedName("account_holder_type") - AccountHolderType accountHolderType; + private Object card; - /** Required. The customer's bank. */ - @SerializedName("bank") - Bank bank; + private Object cardPresent; - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + private Object cashapp; - private Fpx(AccountHolderType accountHolderType, Bank bank, Map extraParams) { - this.accountHolderType = accountHolderType; - this.bank = bank; - this.extraParams = extraParams; - } + private Object crypto; - public static Builder builder() { - return new Builder(); - } + private Object customerBalance; - public static class Builder { - private AccountHolderType accountHolderType; + private Object eps; - private Bank bank; + private Map extraParams; - private Map extraParams; + private Object fpx; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodData.Fpx build() { - return new PaymentIntentCreateParams.PaymentMethodData.Fpx( - this.accountHolderType, this.bank, this.extraParams); - } + private Object giropay; - /** Account holder type for FPX transaction. */ - public Builder setAccountHolderType( - PaymentIntentCreateParams.PaymentMethodData.Fpx.AccountHolderType accountHolderType) { - this.accountHolderType = accountHolderType; - return this; - } + private Object gopay; - /** Required. The customer's bank. */ - public Builder setBank(PaymentIntentCreateParams.PaymentMethodData.Fpx.Bank bank) { - this.bank = bank; - return this; - } + private 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 PaymentIntentCreateParams.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 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 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; - } - } + private Object ideal; - public enum AccountHolderType implements ApiRequestParams.EnumParam { - @SerializedName("company") - COMPANY("company"), + private Object interacPresent; - @SerializedName("individual") - INDIVIDUAL("individual"); + private Object kakaoPay; - @Getter(onMethod_ = {@Override}) - private final String value; + private Object klarna; - AccountHolderType(String value) { - this.value = value; - } - } + private Object konbini; - public enum Bank implements ApiRequestParams.EnumParam { - @SerializedName("affin_bank") - AFFIN_BANK("affin_bank"), + private Object krCard; - @SerializedName("agrobank") - AGROBANK("agrobank"), + private Object link; - @SerializedName("alliance_bank") - ALLIANCE_BANK("alliance_bank"), + private Object mbWay; - @SerializedName("ambank") - AMBANK("ambank"), + private Object mobilepay; - @SerializedName("bank_islam") - BANK_ISLAM("bank_islam"), + private Object multibanco; - @SerializedName("bank_muamalat") - BANK_MUAMALAT("bank_muamalat"), + private Object naverPay; - @SerializedName("bank_of_china") - BANK_OF_CHINA("bank_of_china"), + private Object nzBankAccount; - @SerializedName("bank_rakyat") - BANK_RAKYAT("bank_rakyat"), + private Object oxxo; - @SerializedName("bsn") - BSN("bsn"), + private Object p24; - @SerializedName("cimb") - CIMB("cimb"), + private Object payByBank; - @SerializedName("deutsche_bank") - DEUTSCHE_BANK("deutsche_bank"), + private Object payco; - @SerializedName("hong_leong_bank") - HONG_LEONG_BANK("hong_leong_bank"), + private Object paynow; - @SerializedName("hsbc") - HSBC("hsbc"), + private Object paypal; - @SerializedName("kfh") - KFH("kfh"), + private Object paypay; - @SerializedName("maybank2e") - MAYBANK2E("maybank2e"), + private Object payto; - @SerializedName("maybank2u") - MAYBANK2U("maybank2u"), + private Object pix; - @SerializedName("ocbc") - OCBC("ocbc"), + private Object promptpay; - @SerializedName("pb_enterprise") - PB_ENTERPRISE("pb_enterprise"), + private Object qris; - @SerializedName("public_bank") - PUBLIC_BANK("public_bank"), + private Object rechnung; - @SerializedName("rhb") - RHB("rhb"), + private Object revolutPay; - @SerializedName("standard_chartered") - STANDARD_CHARTERED("standard_chartered"), + private Object samsungPay; - @SerializedName("uob") - UOB("uob"); + private Object satispay; - @Getter(onMethod_ = {@Override}) - private final String value; + private Object sepaDebit; - Bank(String value) { - this.value = value; - } - } - } + private Object shopeepay; - @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 sofort; - private Giropay(Map extraParams) { - this.extraParams = extraParams; - } + private Object stripeBalance; - public static Builder builder() { - return new Builder(); - } + private Object swish; - public static class Builder { - private Map extraParams; + private Object twint; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodData.Giropay build() { - return new PaymentIntentCreateParams.PaymentMethodData.Giropay(this.extraParams); - } + private Object usBankAccount; - /** - * Add a key/value pair to `extraParams` map. A 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<>(); - } - this.extraParams.put(key, value); - return this; - } + private Object wechatPay; - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.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; - } + 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); } - } - @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 acss_debit} PaymentMethod, this sub-hash contains details about the + * ACSS Debit payment method options. */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - - private Gopay(Map extraParams) { - this.extraParams = extraParams; - } - - public static Builder builder() { - return new Builder(); + public Builder setAcssDebit( + PaymentIntentCreateParams.PaymentMethodOptions.AcssDebit acssDebit) { + this.acssDebit = acssDebit; + return this; } - public static class Builder { - private Map extraParams; - - /** Finalize and obtain parameter instance from this builder. */ - 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.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 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; - } + /** + * 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; } - } - @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 an {@code affirm} PaymentMethod, this sub-hash contains details about the Affirm + * payment method options. */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - - private Grabpay(Map extraParams) { - this.extraParams = extraParams; + public Builder setAffirm(PaymentIntentCreateParams.PaymentMethodOptions.Affirm affirm) { + this.affirm = affirm; + return this; } - public static Builder builder() { - return new Builder(); + /** + * 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; } - 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); - } - - /** - * Add a key/value pair to `extraParams` map. A 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; - } - - /** - * Add all map key/value pairs to `extraParams` map. A 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; - } + /** + * 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; } - } - - @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. + * 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 IdBankTransfer(Bank bank, Map extraParams) { - this.bank = bank; - this.extraParams = extraParams; + public Builder setAfterpayClearpay(EmptyParam afterpayClearpay) { + this.afterpayClearpay = afterpayClearpay; + return this; } - 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. + */ + public Builder setAlipay(PaymentIntentCreateParams.PaymentMethodOptions.Alipay alipay) { + this.alipay = alipay; + return this; } - public static class Builder { - private Bank bank; - - private Map extraParams; - - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodData.IdBankTransfer build() { - return new PaymentIntentCreateParams.PaymentMethodData.IdBankTransfer( - this.bank, this.extraParams); - } - - /** 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.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 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; - } + /** + * 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; } - public enum Bank implements ApiRequestParams.EnumParam { - @SerializedName("bca") - BCA("bca"), + /** + * 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; + } - @SerializedName("bni") - BNI("bni"), + /** + * 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; + } - @SerializedName("bri") - BRI("bri"), + /** + * 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; + } - @SerializedName("cimb") - CIMB("cimb"), + /** + * 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("permata") - PERMATA("permata"); + /** + * 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; + } - @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; + } - Bank(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( + PaymentIntentCreateParams.PaymentMethodOptions.BacsDebit bacsDebit) { + this.bacsDebit = bacsDebit; + 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 bacs_debit} PaymentMethod, this sub-hash contains details about the + * BACS Debit payment method options. */ - @SerializedName("bank") - Bank bank; + public Builder setBacsDebit(EmptyParam bacsDebit) { + this.bacsDebit = bacsDebit; + 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 bancontact} PaymentMethod, this sub-hash contains details about the + * Bancontact payment method options. */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + public Builder setBancontact( + PaymentIntentCreateParams.PaymentMethodOptions.Bancontact bancontact) { + this.bancontact = bancontact; + return this; + } - private Ideal(Bank bank, Map extraParams) { - this.bank = bank; - this.extraParams = extraParams; + /** + * 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; } - public static Builder builder() { - return new Builder(); + /** + * 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; } - public static class Builder { - private Bank bank; + /** + * 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; + } - private Map extraParams; + /** + * 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; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodData.Ideal build() { - return new PaymentIntentCreateParams.PaymentMethodData.Ideal(this.bank, this.extraParams); - } + /** + * 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; + } - /** - * 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; - } + /** + * 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; + } - /** - * Add a key/value pair to `extraParams` map. A 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; - } + /** + * 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; + } - /** - * Add all map key/value pairs to `extraParams` map. A 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; - } + /** Configuration for any card payments attempted on this PaymentIntent. */ + public Builder setCard(PaymentIntentCreateParams.PaymentMethodOptions.Card card) { + this.card = card; + return this; } - public enum Bank implements ApiRequestParams.EnumParam { - @SerializedName("abn_amro") - ABN_AMRO("abn_amro"), + /** Configuration for any card payments attempted on this PaymentIntent. */ + public Builder setCard(EmptyParam card) { + this.card = card; + return this; + } - @SerializedName("asn_bank") - ASN_BANK("asn_bank"), + /** + * 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; + } - @SerializedName("bunq") - BUNQ("bunq"), + /** + * 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; + } - @SerializedName("buut") - BUUT("buut"), + /** + * 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; + } - @SerializedName("handelsbanken") - HANDELSBANKEN("handelsbanken"), + /** + * 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; + } - @SerializedName("ing") - ING("ing"), + /** + * 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; + } - @SerializedName("knab") - KNAB("knab"), + /** + * 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; + } - @SerializedName("moneyou") - MONEYOU("moneyou"), + /** + * 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; + } - @SerializedName("n26") - N26("n26"), + /** + * 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; + } - @SerializedName("nn") - NN("nn"), + /** + * 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; + } - @SerializedName("rabobank") - RABOBANK("rabobank"), + /** + * Add a key/value pair to `extraParams` map. A 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; + } - @SerializedName("regiobank") - REGIOBANK("regiobank"), + /** + * Add all map key/value pairs to `extraParams` map. A 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; + } - @SerializedName("revolut") - REVOLUT("revolut"), + /** + * 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; + } - @SerializedName("sns_bank") - SNS_BANK("sns_bank"), + /** + * 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("triodos_bank") - TRIODOS_BANK("triodos_bank"), + /** + * 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; + } - @SerializedName("van_lanschot") - VAN_LANSCHOT("van_lanschot"), + /** + * 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("yoursafe") - YOURSAFE("yoursafe"); + /** + * 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; + } - @Getter(onMethod_ = {@Override}) - private final String value; + /** + * 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; + } - Bank(String value) { - this.value = value; - } + /** + * 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; } - } - @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 grabpay} PaymentMethod, this sub-hash contains details about the + * Grabpay payment method options. */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + public Builder setGrabpay(EmptyParam grabpay) { + this.grabpay = grabpay; + return this; + } - private InteracPresent(Map extraParams) { - this.extraParams = extraParams; + /** + * 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; } - public static Builder builder() { - return new Builder(); + /** + * 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; } - public static class Builder { - private Map extraParams; + /** + * 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; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodData.InteracPresent build() { - return new PaymentIntentCreateParams.PaymentMethodData.InteracPresent(this.extraParams); - } + /** + * 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; + } - /** - * Add a key/value pair to `extraParams` map. A 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 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 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; + } - /** - * Add all map key/value pairs to `extraParams` map. A 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 putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - 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; } - } - @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 kakao_pay} PaymentMethod, this sub-hash contains details about the + * Kakao Pay payment method options. */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - - private KakaoPay(Map extraParams) { - this.extraParams = extraParams; + public Builder setKakaoPay(PaymentIntentCreateParams.PaymentMethodOptions.KakaoPay kakaoPay) { + this.kakaoPay = kakaoPay; + return this; } - public static Builder builder() { - return new Builder(); + /** + * 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 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); - return this; - } - - /** - * Add all map key/value pairs to `extraParams` map. A 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); - 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; } - } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Klarna { - /** Customer's date of birth. */ - @SerializedName("dob") - Dob dob; + /** + * 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; + } /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized 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(PaymentIntentCreateParams.PaymentMethodOptions.Konbini konbini) { + this.konbini = konbini; + return this; + } - private Klarna(Dob dob, Map extraParams) { - this.dob = dob; - 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(PaymentIntentCreateParams.PaymentMethodOptions.KrCard krCard) { + this.krCard = krCard; + return this; } - public static class Builder { - private Dob dob; + /** + * 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; + } - private Map extraParams; + /** + * 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; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodData.Klarna build() { - return new PaymentIntentCreateParams.PaymentMethodData.Klarna(this.dob, this.extraParams); - } + /** + * 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; + } - /** Customer's date of birth. */ - public Builder setDob(PaymentIntentCreateParams.PaymentMethodData.Klarna.Dob dob) { - this.dob = dob; - 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; + } - /** - * Add a key/value pair to `extraParams` map. A 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); - 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; + } - /** - * Add all map key/value pairs to `extraParams` map. A 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); - 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; } - @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 MobilePay} PaymentMethod, this sub-hash contains details about the + * MobilePay payment method options. + */ + public Builder setMobilepay(EmptyParam mobilepay) { + this.mobilepay = mobilepay; + 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 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; + } - /** Required. The month of birth, between 1 and 12. */ - @SerializedName("month") - Long month; + /** + * 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. The four-digit year of birth. */ - @SerializedName("year") - Long year; + /** + * 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; + } - 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 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 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( + PaymentIntentCreateParams.PaymentMethodOptions.NzBankAccount nzBankAccount) { + this.nzBankAccount = nzBankAccount; + return this; + } - public static class Builder { - private Long day; + /** + * 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; + } - private Map extraParams; + /** + * 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 Long month; + /** + * 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 Long year; + /** + * 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; + } - /** 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); - } + /** + * 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; + } - /** Required. The day of birth, between 1 and 31. */ - public Builder setDay(Long day) { - this.day = day; - 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; + } - /** - * Add a key/value pair to `extraParams` map. A 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; - } + /** + * 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 all map key/value pairs to `extraParams` map. A 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; - } + /** + * 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; + } - /** Required. The month of birth, between 1 and 12. */ - public Builder setMonth(Long month) { - this.month = month; - 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; + } - /** Required. The four-digit year of birth. */ - public Builder setYear(Long year) { - this.year = year; - 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; } - } - @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 paynow} PaymentMethod, this sub-hash contains details about the PayNow + * payment method options. */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + public Builder setPaynow(EmptyParam paynow) { + this.paynow = paynow; + return this; + } - private Konbini(Map extraParams) { - this.extraParams = 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; } - public static Builder builder() { - return new Builder(); + /** + * 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; } - public static class Builder { - private Map extraParams; + /** + * 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; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodData.Konbini build() { - return new PaymentIntentCreateParams.PaymentMethodData.Konbini(this.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; + } - /** - * Add a key/value pair to `extraParams` map. A 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<>(); - } - this.extraParams.put(key, value); - 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; + } - /** - * Add all map key/value pairs to `extraParams` map. A 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 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. + */ + public Builder setPayto(EmptyParam payto) { + this.payto = payto; + 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 pix} PaymentMethod, this sub-hash contains details about the Pix + * payment method options. */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - - private KrCard(Map extraParams) { - this.extraParams = extraParams; + public Builder setPix(PaymentIntentCreateParams.PaymentMethodOptions.Pix pix) { + this.pix = pix; + 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(EmptyParam pix) { + this.pix = pix; + return this; } - 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); - } - - /** - * Add a key/value pair to `extraParams` map. A 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<>(); - } - 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.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 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 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 qris} PaymentMethod, this sub-hash contains details about the QRIS + * payment method options. */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + public Builder setQris(PaymentIntentCreateParams.PaymentMethodOptions.Qris qris) { + this.qris = qris; + return this; + } - private Link(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(PaymentIntentCreateParams.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 PaymentIntentCreateParams.PaymentMethodData.Link build() { - return new PaymentIntentCreateParams.PaymentMethodData.Link(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( + PaymentIntentCreateParams.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 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; - } + /** + * 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 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; - } + /** + * 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; } - } - @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 samsung_pay} PaymentMethod, this sub-hash contains details about the + * Samsung Pay payment method options. */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + public Builder setSamsungPay(EmptyParam samsungPay) { + this.samsungPay = samsungPay; + return this; + } - private MbWay(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(PaymentIntentCreateParams.PaymentMethodOptions.Satispay satispay) { + this.satispay = satispay; + 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(EmptyParam satispay) { + this.satispay = satispay; + 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( + PaymentIntentCreateParams.PaymentMethodOptions.SepaDebit sepaDebit) { + this.sepaDebit = sepaDebit; + return this; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodData.MbWay build() { - return new PaymentIntentCreateParams.PaymentMethodData.MbWay(this.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; + } - /** - * Add a key/value pair to `extraParams` map. A 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<>(); - } - 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( + PaymentIntentCreateParams.PaymentMethodOptions.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 PaymentIntentCreateParams.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 shopeepay} PaymentMethod, this sub-hash contains details about the + * ShopeePay payment method options. + */ + public Builder setShopeepay(EmptyParam shopeepay) { + this.shopeepay = shopeepay; + 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 sofort} PaymentMethod, this sub-hash contains details about the SOFORT + * payment method options. */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + public Builder setSofort(PaymentIntentCreateParams.PaymentMethodOptions.Sofort sofort) { + this.sofort = sofort; + return this; + } - private Mobilepay(Map extraParams) { - this.extraParams = extraParams; + /** + * 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 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( + PaymentIntentCreateParams.PaymentMethodOptions.StripeBalance stripeBalance) { + this.stripeBalance = stripeBalance; + return this; } - public static class Builder { - private 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; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodData.Mobilepay build() { - return new PaymentIntentCreateParams.PaymentMethodData.Mobilepay(this.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; + } - /** - * Add a key/value pair to `extraParams` map. A 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; - } + /** + * 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 all map key/value pairs to `extraParams` map. A 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; - } + /** + * 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; } - } - @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. + * If this is a {@code twint} PaymentMethod, this sub-hash contains details about the TWINT + * payment method options. */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + public Builder setTwint(EmptyParam twint) { + this.twint = twint; + return this; + } - private Multibanco(Map extraParams) { - this.extraParams = 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( + PaymentIntentCreateParams.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( + PaymentIntentCreateParams.PaymentMethodOptions.WechatPay wechatPay) { + this.wechatPay = wechatPay; + return this; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodData.Multibanco build() { - return new PaymentIntentCreateParams.PaymentMethodData.Multibanco(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 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; - } + /** + * 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 all map key/value pairs to `extraParams` map. A 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; - } + /** + * 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 NaverPay { + 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. @@ -11664,16 +22062,59 @@ public static class NaverPay { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** Additional fields for Mandate creation. */ + @SerializedName("mandate_options") + MandateOptions mandateOptions; + /** - * Whether to use Naver Pay points or a card to fund this transaction. If not provided, this - * defaults to {@code card}. + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + *

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

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

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

If you've already set {@code setup_future_usage} 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("funding") - Funding funding; + @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 NaverPay(Map extraParams, Funding funding) { + /** 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.funding = funding; + this.mandateOptions = mandateOptions; + this.setupFutureUsage = setupFutureUsage; + this.targetDate = targetDate; + this.verificationMethod = verificationMethod; } public static Builder builder() { @@ -11683,19 +22124,29 @@ public static Builder builder() { public static class Builder { private Map extraParams; - private Funding funding; + private MandateOptions mandateOptions; + + private ApiRequestParams.EnumParam setupFutureUsage; + + private String targetDate; + + private VerificationMethod verificationMethod; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodData.NaverPay build() { - return new PaymentIntentCreateParams.PaymentMethodData.NaverPay( - this.extraParams, this.funding); + 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.PaymentMethodData.NaverPay#extraParams} for the - * field documentation. + * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.AcssDebit#extraParams} for + * the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -11708,8 +22159,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.NaverPay#extraParams} for the - * field documentation. + * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.AcssDebit#extraParams} for + * the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -11719,251 +22170,334 @@ public Builder putAllExtraParam(Map map) { return this; } + /** Additional fields for Mandate creation. */ + public Builder setMandateOptions( + PaymentIntentCreateParams.PaymentMethodOptions.AcssDebit.MandateOptions + mandateOptions) { + this.mandateOptions = mandateOptions; + return this; + } + /** - * Whether to use Naver Pay points or a card to fund this transaction. If not provided, this - * defaults to {@code card}. + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

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

If you've already set {@code setup_future_usage} 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 setFunding( - PaymentIntentCreateParams.PaymentMethodData.NaverPay.Funding funding) { - this.funding = funding; + public Builder setSetupFutureUsage( + PaymentIntentCreateParams.PaymentMethodOptions.AcssDebit.SetupFutureUsage + setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; return this; } - } - - public enum Funding implements ApiRequestParams.EnumParam { - @SerializedName("card") - CARD("card"), - @SerializedName("points") - POINTS("points"); + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

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

If you've already set {@code setup_future_usage} 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(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(String targetDate) { + this.targetDate = targetDate; + return this; + } - Funding(String value) { - this.value = value; + /** Bank account verification method. */ + public Builder setVerificationMethod( + PaymentIntentCreateParams.PaymentMethodOptions.AcssDebit.VerificationMethod + verificationMethod) { + this.verificationMethod = verificationMethod; + 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; + @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; - /** Required. The account number for the bank account. */ - @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. The numeric code for the bank account's bank. */ - @SerializedName("bank_code") - String bankCode; + /** + * Description of the mandate interval. Only required if 'payment_schedule' parameter is + * 'interval' or 'combined'. + */ + @SerializedName("interval_description") + String intervalDescription; - /** Required. The numeric code for the bank account's bank branch. */ - @SerializedName("branch_code") - String branchCode; + /** Payment schedule for the mandate. */ + @SerializedName("payment_schedule") + PaymentSchedule paymentSchedule; - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + /** Transaction type of the mandate. */ + @SerializedName("transaction_type") + TransactionType transactionType; - @SerializedName("reference") - String reference; + 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; + } - /** Required. The suffix of the bank account number. */ - @SerializedName("suffix") - String suffix; + public static Builder builder() { + return new Builder(); + } - 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 class Builder { + private Object customMandateUrl; - public static Builder builder() { - return new Builder(); - } + private Map extraParams; - public static class Builder { - private String accountHolderName; + 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); + } - private String 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(String customMandateUrl) { + this.customMandateUrl = customMandateUrl; + return this; + } - private String bankCode; + /** + * 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 String branchCode; + /** + * Add a key/value pair to `extraParams` map. A 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 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.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 reference; + /** + * 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 String suffix; + /** Payment schedule for the mandate. */ + public Builder setPaymentSchedule( + PaymentIntentCreateParams.PaymentMethodOptions.AcssDebit.MandateOptions + .PaymentSchedule + paymentSchedule) { + this.paymentSchedule = paymentSchedule; + return this; + } - /** 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); + /** Transaction type of the mandate. */ + public Builder setTransactionType( + PaymentIntentCreateParams.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"), - /** Required. The account number for the bank account. */ - public Builder setAccountNumber(String accountNumber) { - this.accountNumber = accountNumber; - return this; - } + @SerializedName("interval") + INTERVAL("interval"), - /** Required. The numeric code for the bank account's bank. */ - public Builder setBankCode(String bankCode) { - this.bankCode = bankCode; - return this; - } + @SerializedName("sporadic") + SPORADIC("sporadic"); - /** Required. The numeric code for the bank account's bank branch. */ - public Builder setBranchCode(String 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 PaymentIntentCreateParams.PaymentMethodData.NzBankAccount#extraParams} - * for the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + PaymentSchedule(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.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 TransactionType implements ApiRequestParams.EnumParam { + @SerializedName("business") + BUSINESS("business"), - public Builder setReference(String reference) { - this.reference = reference; - return this; - } + @SerializedName("personal") + PERSONAL("personal"); - /** 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; + + TransactionType(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; + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"), - private Oxxo(Map extraParams) { - this.extraParams = extraParams; - } + @SerializedName("off_session") + OFF_SESSION("off_session"), - public static Builder builder() { - return new Builder(); - } + @SerializedName("on_session") + ON_SESSION("on_session"); - 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.Oxxo build() { - return new PaymentIntentCreateParams.PaymentMethodData.Oxxo(this.extraParams); + 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.PaymentMethodData.Oxxo#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + public enum VerificationMethod implements ApiRequestParams.EnumParam { + @SerializedName("automatic") + AUTOMATIC("automatic"), - /** - * Add all map key/value pairs to `extraParams` map. A 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; + @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 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 @@ -11974,9 +22508,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") + 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() { @@ -11984,26 +22554,56 @@ public static Builder builder() { } public static class Builder { - private Bank bank; + private ApiRequestParams.EnumParam captureMethod; private Map extraParams; + private String preferredLocale; + + private SetupFutureUsage setupFutureUsage; + /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodData.P24 build() { - return new PaymentIntentCreateParams.PaymentMethodData.P24(this.bank, this.extraParams); + public PaymentIntentCreateParams.PaymentMethodOptions.Affirm build() { + return new PaymentIntentCreateParams.PaymentMethodOptions.Affirm( + this.captureMethod, this.extraParams, this.preferredLocale, this.setupFutureUsage); } - /** The customer's bank. */ - public Builder setBank(PaymentIntentCreateParams.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( + 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.PaymentMethodData.P24#extraParams} for the - * field documentation. + * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.Affirm#extraParams} for + * the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -12016,8 +22616,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.P24#extraParams} for the - * field documentation. + * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.Affirm#extraParams} for + * the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -12026,91 +22626,67 @@ 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"), - - @SerializedName("plus_bank") - PLUS_BANK("plus_bank"), + /** + * Preferred language of the Affirm authorization page that the customer is redirected to. + */ + public Builder setPreferredLocale(String 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( + PaymentIntentCreateParams.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; } } @@ -12118,18 +22694,72 @@ 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. * Instead, each key/value pair is serialized as if the key is a root-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; + + /** + * 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 PayByBank(Map extraParams) { + 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() { @@ -12137,18 +22767,58 @@ 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.PaymentMethodData.PayByBank build() { - return new PaymentIntentCreateParams.PaymentMethodData.PayByBank(this.extraParams); + 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.PaymentMethodData.PayByBank#extraParams} for - * the field documentation. + * map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.AfterpayClearpay#extraParams} for the + * field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -12161,8 +22831,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.PaymentMethodData.PayByBank#extraParams} for - * the field documentation. + * map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.AfterpayClearpay#extraParams} for the + * field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -12171,12 +22842,77 @@ 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 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. @@ -12186,8 +22922,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() { @@ -12197,16 +22960,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 PaymentIntentCreateParams.PaymentMethodData.Payco build() { - return new PaymentIntentCreateParams.PaymentMethodData.Payco(this.extraParams); + 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.PaymentMethodData.Payco#extraParams} for the - * field documentation. + * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.Alipay#extraParams} for + * the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -12219,8 +22985,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.Payco#extraParams} for the - * field documentation. + * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.Alipay#extraParams} for + * the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -12229,12 +22995,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( + 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 Paynow { + 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. @@ -12244,7 +23098,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; } @@ -12253,17 +23108,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 PaymentIntentCreateParams.PaymentMethodData.Paynow build() { - return new PaymentIntentCreateParams.PaymentMethodData.Paynow(this.extraParams); + 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.PaymentMethodData.Paynow#extraParams} for the + * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.Alma#extraParams} for the * field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -12277,7 +23166,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.Paynow#extraParams} for the + * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.Alma#extraParams} for the * field documentation. */ public Builder putAllExtraParam(Map map) { @@ -12288,11 +23177,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. @@ -12302,8 +23216,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() { @@ -12311,18 +23252,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 PaymentIntentCreateParams.PaymentMethodData.Paypal build() { - return new PaymentIntentCreateParams.PaymentMethodData.Paypal(this.extraParams); + 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.PaymentMethodData.Paypal#extraParams} for the - * field documentation. + * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.AmazonPay#extraParams} for + * the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -12335,8 +23312,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.Paypal#extraParams} for the - * field documentation. + * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.AmazonPay#extraParams} for + * the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -12345,78 +23322,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; - - 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); + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

If the payment method is {@code card_present} and isn't a digital wallet, Stripe + * creates and attaches a generated_card + * payment method representing the card to the Customer 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; } /** - * Add a key/value pair to `extraParams` map. A 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. + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

If the payment method is {@code card_present} and isn't a digital wallet, Stripe + * creates and attaches a generated_card + * payment method representing the card to the Customer 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 putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); + 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; + } + } - /** - * Add all map key/value pairs to `extraParams` map. A 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; + 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 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; - + 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. @@ -12426,16 +23416,47 @@ public static class Payto { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** The PayID alias for the bank account. */ - @SerializedName("pay_id") - String 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( - String accountNumber, String bsbNumber, Map extraParams, String 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") + String targetDate; + + private AuBecsDebit( + Map extraParams, + ApiRequestParams.EnumParam setupFutureUsage, + String targetDate) { this.extraParams = extraParams; - this.payId = payId; + this.setupFutureUsage = setupFutureUsage; + this.targetDate = targetDate; } public static Builder builder() { @@ -12443,37 +23464,23 @@ public static Builder 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); - } + private ApiRequestParams.EnumParam setupFutureUsage; - /** The account number for the bank account. */ - public Builder setAccountNumber(String accountNumber) { - this.accountNumber = accountNumber; - return this; - } + private String targetDate; - /** Bank-State-Branch number of the bank account. */ - public Builder setBsbNumber(String bsbNumber) { - this.bsbNumber = bsbNumber; - return this; + /** 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.PaymentMethodData.Payto#extraParams} for the - * field documentation. + * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.AuBecsDebit#extraParams} + * for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -12486,8 +23493,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.Payto#extraParams} for the - * field documentation. + * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.AuBecsDebit#extraParams} + * for the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -12497,17 +23504,99 @@ 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( + 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 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. @@ -12517,8 +23606,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") + 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() { @@ -12528,16 +23662,23 @@ 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 PaymentIntentCreateParams.PaymentMethodData.Pix build() { - return new PaymentIntentCreateParams.PaymentMethodData.Pix(this.extraParams); + 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.PaymentMethodData.Pix#extraParams} for the - * field documentation. + * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.BacsDebit#extraParams} for + * the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -12550,8 +23691,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.Pix#extraParams} for the - * field documentation. + * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.BacsDebit#extraParams} for + * the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -12560,12 +23701,201 @@ 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; + } + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

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

If you've already set {@code setup_future_usage} 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 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. @@ -12575,8 +23905,45 @@ public static class Promptpay { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Promptpay(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() { @@ -12586,16 +23953,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 PaymentIntentCreateParams.PaymentMethodData.Promptpay build() { - return new PaymentIntentCreateParams.PaymentMethodData.Promptpay(this.extraParams); + 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.PaymentMethodData.Promptpay#extraParams} for - * the field documentation. + * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.Bancontact#extraParams} + * for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -12608,8 +23980,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.Promptpay#extraParams} for - * the field documentation. + * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.Bancontact#extraParams} + * for the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -12618,12 +23990,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( + 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 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. @@ -12633,7 +24125,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; } @@ -12642,18 +24135,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 PaymentIntentCreateParams.PaymentMethodData.Qris build() { - return new PaymentIntentCreateParams.PaymentMethodData.Qris(this.extraParams); + 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.PaymentMethodData.Qris#extraParams} for the - * field documentation. + * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.Billie#extraParams} for + * the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -12666,8 +24193,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.Qris#extraParams} for the - * field documentation. + * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.Billie#extraParams} for + * the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -12677,11 +24204,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") + 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. @@ -12692,16 +24238,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") - String session; + @SerializedName("setup_future_usage") + ApiRequestParams.EnumParam setupFutureUsage; - private RadarOptions(Map extraParams, String session) { + private Blik( + String code, + Map extraParams, + ApiRequestParams.EnumParam setupFutureUsage) { + this.code = code; this.extraParams = extraParams; - this.session = session; + this.setupFutureUsage = setupFutureUsage; } public static Builder builder() { @@ -12709,21 +24277,32 @@ public static Builder builder() { } public static class Builder { + private String code; + private Map extraParams; - private String session; + private ApiRequestParams.EnumParam setupFutureUsage; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodData.RadarOptions build() { - return new PaymentIntentCreateParams.PaymentMethodData.RadarOptions( - this.extraParams, this.session); + 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.PaymentMethodData.RadarOptions#extraParams} for - * the field documentation. + * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.Blik#extraParams} for the + * field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -12736,8 +24315,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.RadarOptions#extraParams} for - * the field documentation. + * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.Blik#extraParams} for the + * field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -12748,23 +24327,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( + 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 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 @@ -12775,9 +24419,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() { @@ -12785,27 +24459,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 PaymentIntentCreateParams.PaymentMethodData.Rechnung build() { - return new PaymentIntentCreateParams.PaymentMethodData.Rechnung( - this.dob, this.extraParams); + public PaymentIntentCreateParams.PaymentMethodOptions.Boleto build() { + return new PaymentIntentCreateParams.PaymentMethodOptions.Boleto( + this.expiresAfterDays, this.extraParams, this.setupFutureUsage); } - /** Required. Customer's date of birth */ - public Builder setDob(PaymentIntentCreateParams.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 PaymentIntentCreateParams.PaymentMethodData.Rechnung#extraParams} for the - * field documentation. + * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.Boleto#extraParams} for + * the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -12818,8 +24498,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.Rechnung#extraParams} for the - * field documentation. + * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.Boleto#extraParams} for + * the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -12828,111 +24508,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 static Builder builder() { - return new Builder(); + public Builder setSetupFutureUsage( + PaymentIntentCreateParams.PaymentMethodOptions.Boleto.SetupFutureUsage + 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 PaymentIntentCreateParams.PaymentMethodData.Rechnung.Dob build() { - return new PaymentIntentCreateParams.PaymentMethodData.Rechnung.Dob( - this.day, this.extraParams, this.month, this.year); - } + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

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

If you've already set {@code setup_future_usage} 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; + } + } - /** 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 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; - } + @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 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; - } + @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") + 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. @@ -12942,8 +24622,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, + 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() { @@ -12951,76 +24821,117 @@ public static Builder 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.PaymentMethodData.RevolutPay build() { - return new PaymentIntentCreateParams.PaymentMethodData.RevolutPay(this.extraParams); + 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); } /** - * Add a key/value pair to `extraParams` map. A 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. + * 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 putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); + public Builder setCaptureMethod( + PaymentIntentCreateParams.PaymentMethodOptions.Card.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.PaymentMethodData.RevolutPay#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(EmptyParam captureMethod) { + this.captureMethod = captureMethod; 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); + /** + * 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.PaymentMethodData.SamsungPay#extraParams} for - * the field documentation. + * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.Card#extraParams} for the + * field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -13033,8 +24944,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.SamsungPay#extraParams} for - * the field documentation. + * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.Card#extraParams} for the + * field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -13043,2856 +24954,3392 @@ public Builder putAllExtraParam(Map map) { 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; + /** + * 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; + } - private Satispay(Map extraParams) { - this.extraParams = extraParams; - } + /** 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; + } - 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. + */ + public Builder setMoto(Boolean moto) { + this.moto = moto; + return this; + } - 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. + */ + public Builder setNetwork( + PaymentIntentCreateParams.PaymentMethodOptions.Card.Network network) { + this.network = network; + return this; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodData.Satispay build() { - return new PaymentIntentCreateParams.PaymentMethodData.Satispay(this.extraParams); + /** + * Request ability to decrement the + * authorization for this PaymentIntent. + */ + public Builder setRequestDecrementalAuthorization( + PaymentIntentCreateParams.PaymentMethodOptions.Card.RequestDecrementalAuthorization + requestDecrementalAuthorization) { + this.requestDecrementalAuthorization = requestDecrementalAuthorization; + return this; } /** - * Add a key/value pair to `extraParams` map. A 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. + * Request ability to capture beyond the + * standard authorization validity window 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 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; } /** - * Add all map key/value pairs to `extraParams` map. A 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. + * Request ability to make multiple + * captures for this PaymentIntent. */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); + public Builder setRequestMulticapture( + PaymentIntentCreateParams.PaymentMethodOptions.Card.RequestMulticapture + requestMulticapture) { + this.requestMulticapture = requestMulticapture; 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; + /** + * Request ability to overcapture + * for this PaymentIntent. + */ + public Builder setRequestOvercapture( + PaymentIntentCreateParams.PaymentMethodOptions.Card.RequestOvercapture + requestOvercapture) { + this.requestOvercapture = requestOvercapture; + return this; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodData.SepaDebit build() { - return new PaymentIntentCreateParams.PaymentMethodData.SepaDebit( - this.extraParams, this.iban); + /** Request partial authorization on this PaymentIntent. */ + public Builder setRequestPartialAuthorization( + PaymentIntentCreateParams.PaymentMethodOptions.Card.RequestPartialAuthorization + requestPartialAuthorization) { + this.requestPartialAuthorization = requestPartialAuthorization; + return this; } /** - * Add a key/value pair to `extraParams` map. A 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. + * 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 putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); + public Builder setRequestThreeDSecure( + PaymentIntentCreateParams.PaymentMethodOptions.Card.RequestThreeDSecure + requestThreeDSecure) { + this.requestThreeDSecure = requestThreeDSecure; return this; } /** - * Add all map key/value pairs to `extraParams` map. A 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. + * 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 putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); + public Builder setRequireCvcRecollection(Boolean requireCvcRecollection) { + this.requireCvcRecollection = requireCvcRecollection; return this; } - /** Required. IBAN of the bank account. */ - public Builder setIban(String iban) { - this.iban = iban; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

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

If you've already set {@code setup_future_usage} 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; } - } - } - - @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); + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

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

If you've already set {@code setup_future_usage} 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 PaymentIntentCreateParams.PaymentMethodData.Shopeepay#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 PaymentIntentCreateParams.PaymentMethodData.Shopeepay#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; } - } - } - - @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; + /** + * 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; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodData.Sofort build() { - return new PaymentIntentCreateParams.PaymentMethodData.Sofort( - this.country, 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. + */ + public Builder setStatementDescriptorSuffixKanji( + EmptyParam statementDescriptorSuffixKanji) { + this.statementDescriptorSuffixKanji = statementDescriptorSuffixKanji; + return this; } /** - * Required. Two-letter ISO code representing the country the bank account - * is located in. + * Statement details for this payment intent. You can use this to override the merchant + * details shown on your customers' statements. */ - public Builder setCountry( - PaymentIntentCreateParams.PaymentMethodData.Sofort.Country country) { - this.country = country; + public Builder setStatementDetails( + PaymentIntentCreateParams.PaymentMethodOptions.Card.StatementDetails statementDetails) { + this.statementDetails = statementDetails; return this; } /** - * Add a key/value pair to `extraParams` map. A 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. + * 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(EmptyParam 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 PaymentIntentCreateParams.PaymentMethodData.Sofort#extraParams} for the - * field documentation. + * If 3D Secure authentication was performed with a third-party provider, the authentication + * details to use for this payment. */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); + public Builder setThreeDSecure( + PaymentIntentCreateParams.PaymentMethodOptions.Card.ThreeDSecure threeDSecure) { + this.threeDSecure = threeDSecure; return this; } } - public enum Country implements ApiRequestParams.EnumParam { - @SerializedName("AT") - AT("AT"), + @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("BE") - BE("BE"), + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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("DE") - DE("DE"), + /** + * The selected installment plan to use for this payment attempt. This parameter can only be + * provided during confirmation. + */ + @SerializedName("plan") + Object plan; - @SerializedName("ES") - ES("ES"), + private Installments(Boolean enabled, Map extraParams, Object plan) { + this.enabled = enabled; + this.extraParams = extraParams; + this.plan = plan; + } - @SerializedName("IT") - IT("IT"), + public static Builder builder() { + return new Builder(); + } - @SerializedName("NL") - NL("NL"); + public static class Builder { + private Boolean enabled; - @Getter(onMethod_ = {@Override}) - private final String value; + private Map extraParams; - Country(String value) { - this.value = value; + 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 StripeBalance { - /** The connected account ID whose Stripe balance to use as the source of payment. */ - @SerializedName("account") - String account; + @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; + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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; + /** + * 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; - private StripeBalance( - String account, Map extraParams, SourceType sourceType) { - this.account = account; - this.extraParams = extraParams; - this.sourceType = sourceType; - } + /** + * 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; - public static Builder builder() { - return new Builder(); - } + private Interval interval; - public static class Builder { - private String account; + private Type type; - private Map extraParams; + /** 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); + } - private SourceType sourceType; + /** + * 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; + } - /** 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.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; + } - /** 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.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; + } - /** - * Add a key/value pair to `extraParams` map. A 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; - } + /** + * 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; + } - /** - * Add all map key/value pairs to `extraParams` map. A 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<>(); + /** + * 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; + } } - 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"), + public enum Interval implements ApiRequestParams.EnumParam { + @SerializedName("month") + MONTH("month"); - @SerializedName("card") - CARD("card"), + @Getter(onMethod_ = {@Override}) + private final String value; - @SerializedName("fpx") - FPX("fpx"); + Interval(String value) { + this.value = value; + } + } - @Getter(onMethod_ = {@Override}) - private final String value; + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("bonus") + BONUS("bonus"), - SourceType(String value) { - this.value = value; - } - } - } + @SerializedName("fixed_count") + FIXED_COUNT("fixed_count"), - @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; + @SerializedName("revolving") + REVOLVING("revolving"); - private Swish(Map extraParams) { - this.extraParams = extraParams; - } + @Getter(onMethod_ = {@Override}) + private final String value; - public static Builder builder() { - return new Builder(); + Type(String value) { + this.value = value; + } + } + } } - 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); - } + @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 PaymentIntentCreateParams.PaymentMethodData.Swish#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 PaymentIntentCreateParams.PaymentMethodData.Swish#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; - } - } - } - - @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(); - } + @SerializedName("description") + String description; - public static class Builder { - private Map extraParams; + /** + * 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; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodData.Twint build() { - return new PaymentIntentCreateParams.PaymentMethodData.Twint(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.Twint#extraParams} for the - * field documentation. + * Required. Specifies payment frequency. One of {@code day}, {@code week}, + * {@code month}, {@code year}, or {@code sporadic}. */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + @SerializedName("interval") + 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 PaymentIntentCreateParams.PaymentMethodData.Twint#extraParams} for the - * field documentation. + * 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 putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } - } - } + @SerializedName("interval_count") + Long intervalCount; - @Getter - @EqualsAndHashCode(callSuper = false) - public static class UsBankAccount { - /** Account holder type: individual or company. */ - @SerializedName("account_holder_type") - AccountHolderType accountHolderType; + /** Required. Unique identifier for the mandate or subscription. */ + @SerializedName("reference") + String reference; - /** Account number of the bank account. */ - @SerializedName("account_number") - String accountNumber; + /** + * Required. Start date of the mandate or subscription. Start date should + * not be lesser than yesterday. + */ + @SerializedName("start_date") + Long startDate; - /** Account type: checkings or savings. Defaults to checking if omitted. */ - @SerializedName("account_type") - AccountType accountType; + /** 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, + 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; + } - /** The ID of a Financial Connections Account to use as a payment method. */ - @SerializedName("financial_connections_account") - String financialConnectionsAccount; + public static Builder builder() { + return new Builder(); + } - /** Routing number of the bank account. */ - @SerializedName("routing_number") - String routingNumber; + public static class Builder { + private Long amount; - 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; - } + private AmountType amountType; - public static Builder builder() { - return new Builder(); - } + private String description; - public static class Builder { - private AccountHolderType accountHolderType; + private Long endDate; - private String accountNumber; + private Map extraParams; - private AccountType accountType; + private Interval interval; - private Map extraParams; + private Long intervalCount; - private String financialConnectionsAccount; + private String reference; - private String routingNumber; + private Long startDate; - /** 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); - } + private List< + PaymentIntentCreateParams.PaymentMethodOptions.Card.MandateOptions.SupportedType> + supportedTypes; - /** Account holder type: individual or company. */ - public Builder setAccountHolderType( - PaymentIntentCreateParams.PaymentMethodData.UsBankAccount.AccountHolderType - accountHolderType) { - this.accountHolderType = accountHolderType; - return this; - } + /** 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); + } - /** Account number of the bank account. */ - public Builder setAccountNumber(String accountNumber) { - this.accountNumber = accountNumber; - return this; - } + /** Required. Amount to be charged for future payments. */ + public Builder setAmount(Long amount) { + this.amount = amount; + 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; - } + /** + * 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.PaymentMethodData.UsBankAccount#extraParams} - * for the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - 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.put(key, value); - return this; - } - /** - * Add all map key/value pairs to `extraParams` map. A 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<>(); + /** + * 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; } - 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; - } + /** + * 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; + } - /** Routing number of the bank account. */ - public Builder setRoutingNumber(String routingNumber) { - this.routingNumber = routingNumber; - 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; + } - public enum AccountHolderType implements ApiRequestParams.EnumParam { - @SerializedName("company") - COMPANY("company"), + /** Required. Unique identifier for the mandate or subscription. */ + public Builder setReference(String reference) { + this.reference = reference; + return this; + } - @SerializedName("individual") - INDIVIDUAL("individual"); + /** + * 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(onMethod_ = {@Override}) - private final String value; + /** + * 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; + } - AccountHolderType(String value) { - this.value = value; + /** + * 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 AccountType implements ApiRequestParams.EnumParam { - @SerializedName("checking") - CHECKING("checking"), + public enum AmountType implements ApiRequestParams.EnumParam { + @SerializedName("fixed") + FIXED("fixed"), - @SerializedName("savings") - SAVINGS("savings"); + @SerializedName("maximum") + MAXIMUM("maximum"); - @Getter(onMethod_ = {@Override}) - private final String value; + @Getter(onMethod_ = {@Override}) + private final String value; - AccountType(String value) { - this.value = value; + AmountType(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; + public enum Interval implements ApiRequestParams.EnumParam { + @SerializedName("day") + DAY("day"), - private WechatPay(Map extraParams) { - this.extraParams = extraParams; - } + @SerializedName("month") + MONTH("month"), - public static Builder builder() { - return new Builder(); - } + @SerializedName("sporadic") + SPORADIC("sporadic"), - public static class Builder { - private Map extraParams; + @SerializedName("week") + WEEK("week"), - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodData.WechatPay build() { - return new PaymentIntentCreateParams.PaymentMethodData.WechatPay(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.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; - } + @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.WechatPay#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 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; + public enum SupportedType implements ApiRequestParams.EnumParam { + @SerializedName("india") + INDIA("india"); - private Zip(Map extraParams) { - this.extraParams = extraParams; - } + @Getter(onMethod_ = {@Override}) + private final String value; - public static Builder builder() { - return new Builder(); + SupportedType(String value) { + this.value = value; + } + } } - 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); - } + @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; /** - * Add a key/value pair to `extraParams` map. A 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. + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized 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; + + /** 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; } - /** - * Add all map key/value pairs to `extraParams` map. A 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 static Builder builder() { + return new Builder(); } - } - } - public enum AllowRedisplay implements ApiRequestParams.EnumParam { - @SerializedName("always") - ALWAYS("always"), + public static class Builder { + private Address address; - @SerializedName("limited") - LIMITED("limited"), + private Map extraParams; - @SerializedName("unspecified") - UNSPECIFIED("unspecified"); + private String phone; - @Getter(onMethod_ = {@Override}) - private final String value; + /** 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); + } - AllowRedisplay(String value) { - this.value = value; - } - } + /** 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; + } - public enum Type implements ApiRequestParams.EnumParam { - @SerializedName("acss_debit") - ACSS_DEBIT("acss_debit"), + /** + * Add a key/value pair to `extraParams` map. A 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; + } - @SerializedName("affirm") - AFFIRM("affirm"), + /** + * Add all map key/value pairs to `extraParams` map. A 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; + } - @SerializedName("afterpay_clearpay") - AFTERPAY_CLEARPAY("afterpay_clearpay"), + /** Phone number (e.g., a toll-free number that customers can call). */ + public Builder setPhone(String phone) { + this.phone = phone; + return this; + } + } - @SerializedName("alipay") - ALIPAY("alipay"), + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Address { + /** City, district, suburb, town, or village. */ + @SerializedName("city") + String city; - @SerializedName("alma") - ALMA("alma"), + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + @SerializedName("country") + String country; - @SerializedName("amazon_pay") - AMAZON_PAY("amazon_pay"), + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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("au_becs_debit") - AU_BECS_DEBIT("au_becs_debit"), + /** Address line 1, such as the street, PO Box, or company name. */ + @SerializedName("line1") + String line1; - @SerializedName("bacs_debit") - BACS_DEBIT("bacs_debit"), + /** Address line 2, such as the apartment, suite, unit, or building. */ + @SerializedName("line2") + String line2; - @SerializedName("bancontact") - BANCONTACT("bancontact"), + /** ZIP or postal code. */ + @SerializedName("postal_code") + String postalCode; - @SerializedName("billie") - BILLIE("billie"), + /** State, county, province, or region. */ + @SerializedName("state") + String state; - @SerializedName("blik") - BLIK("blik"), + 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("boleto") - BOLETO("boleto"), + public static Builder builder() { + return new Builder(); + } - @SerializedName("cashapp") - CASHAPP("cashapp"), + public static class Builder { + private String city; - @SerializedName("crypto") - CRYPTO("crypto"), + private String country; - @SerializedName("customer_balance") - CUSTOMER_BALANCE("customer_balance"), + private Map extraParams; - @SerializedName("eps") - EPS("eps"), + private String line1; - @SerializedName("fpx") - FPX("fpx"), + private String line2; - @SerializedName("giropay") - GIROPAY("giropay"), + private String postalCode; - @SerializedName("gopay") - GOPAY("gopay"), + private String state; - @SerializedName("grabpay") - GRABPAY("grabpay"), + /** 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); + } - @SerializedName("id_bank_transfer") - ID_BANK_TRANSFER("id_bank_transfer"), + /** City, district, suburb, town, or village. */ + public Builder setCity(String city) { + this.city = city; + return this; + } - @SerializedName("ideal") - IDEAL("ideal"), + /** + * Two-letter country code (ISO 3166-1 alpha-2). + */ + public Builder setCountry(String country) { + this.country = country; + return this; + } - @SerializedName("kakao_pay") - KAKAO_PAY("kakao_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 + * 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; + } - @SerializedName("klarna") - KLARNA("klarna"), + /** + * Add all map key/value pairs to `extraParams` map. A 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; + } - @SerializedName("konbini") - KONBINI("konbini"), + /** Address line 1, such as the street, PO Box, or company name. */ + public Builder setLine1(String line1) { + this.line1 = line1; + return this; + } - @SerializedName("kr_card") - KR_CARD("kr_card"), + /** Address line 2, such as the apartment, suite, unit, or building. */ + public Builder setLine2(String line2) { + this.line2 = line2; + return this; + } - @SerializedName("link") - LINK("link"), + /** ZIP or postal code. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } - @SerializedName("mb_way") - MB_WAY("mb_way"), + /** State, county, province, or region. */ + public Builder setState(String state) { + this.state = state; + return this; + } + } + } + } - @SerializedName("mobilepay") - MOBILEPAY("mobilepay"), + @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; - @SerializedName("multibanco") - MULTIBANCO("multibanco"), + /** + * 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; - @SerializedName("naver_pay") - NAVER_PAY("naver_pay"), + /** + * 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; - @SerializedName("nz_bank_account") - NZ_BANK_ACCOUNT("nz_bank_account"), + /** The exemption requested via 3DS and accepted by the issuer at authentication time. */ + @SerializedName("exemption_indicator") + ExemptionIndicator exemptionIndicator; - @SerializedName("oxxo") - OXXO("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; - @SerializedName("p24") - P24("p24"), + /** + * 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; - @SerializedName("pay_by_bank") - PAY_BY_BANK("pay_by_bank"), + /** + * 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; - @SerializedName("payco") - PAYCO("payco"), + /** + * Required. For 3D Secure 1, the XID. For 3D Secure 2, the Directory + * Server Transaction ID (dsTransID). + */ + @SerializedName("transaction_id") + String transactionId; - @SerializedName("paynow") - PAYNOW("paynow"), + /** Required. The version of 3D Secure that was performed. */ + @SerializedName("version") + Version version; - @SerializedName("paypal") - PAYPAL("paypal"), + 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; + } - @SerializedName("paypay") - PAYPAY("paypay"), + public static Builder builder() { + return new Builder(); + } - @SerializedName("payto") - PAYTO("payto"), + public static class Builder { + private AresTransStatus aresTransStatus; - @SerializedName("pix") - PIX("pix"), + private String cryptogram; - @SerializedName("promptpay") - PROMPTPAY("promptpay"), + private ElectronicCommerceIndicator electronicCommerceIndicator; - @SerializedName("qris") - QRIS("qris"), + private ExemptionIndicator exemptionIndicator; - @SerializedName("rechnung") - RECHNUNG("rechnung"), + private Map extraParams; - @SerializedName("revolut_pay") - REVOLUT_PAY("revolut_pay"), + private NetworkOptions networkOptions; - @SerializedName("samsung_pay") - SAMSUNG_PAY("samsung_pay"), + private String requestorChallengeIndicator; - @SerializedName("satispay") - SATISPAY("satispay"), + private String transactionId; - @SerializedName("sepa_debit") - SEPA_DEBIT("sepa_debit"), + private Version version; - @SerializedName("shopeepay") - SHOPEEPAY("shopeepay"), + /** 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); + } - @SerializedName("sofort") - SOFORT("sofort"), + /** 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; + } - @SerializedName("stripe_balance") - STRIPE_BALANCE("stripe_balance"), + /** + * 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; + } - @SerializedName("swish") - SWISH("swish"), + /** + * 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; + } - @SerializedName("twint") - TWINT("twint"), + /** 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; + } - @SerializedName("us_bank_account") - US_BANK_ACCOUNT("us_bank_account"), + /** + * Add a key/value pair to `extraParams` map. A 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; + } - @SerializedName("wechat_pay") - WECHAT_PAY("wechat_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.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; + } - @SerializedName("zip") - ZIP("zip"); + /** + * 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; + } - @Getter(onMethod_ = {@Override}) - private final String value; + /** + * 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; + } - Type(String value) { - this.value = value; - } - } - } + /** + * 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; + } - @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 version of 3D Secure that was performed. */ + public Builder setVersion( + PaymentIntentCreateParams.PaymentMethodOptions.Card.ThreeDSecure.Version version) { + this.version = version; + return this; + } + } - /** - * If this is an {@code affirm} PaymentMethod, this sub-hash contains details about the Affirm - * payment method options. - */ - @SerializedName("affirm") - Object affirm; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class NetworkOptions { + /** Cartes Bancaires-specific 3DS fields. */ + @SerializedName("cartes_bancaires") + CartesBancaires cartesBancaires; - /** - * 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; + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 alipay} PaymentMethod, this sub-hash contains details about the Alipay - * payment method options. - */ - @SerializedName("alipay") - Object alipay; + private NetworkOptions(CartesBancaires cartesBancaires, Map extraParams) { + this.cartesBancaires = cartesBancaires; + this.extraParams = extraParams; + } - /** - * If this is a {@code alma} PaymentMethod, this sub-hash contains details about the Alma - * payment method options. - */ - @SerializedName("alma") - Object alma; + public static Builder builder() { + return new Builder(); + } - /** - * 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; + public static class Builder { + private CartesBancaires cartesBancaires; - /** - * 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; + private Map extraParams; - /** - * 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; + /** 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); + } - /** - * If this is a {@code bancontact} PaymentMethod, this sub-hash contains details about the - * Bancontact payment method options. - */ - @SerializedName("bancontact") - Object bancontact; + /** Cartes Bancaires-specific 3DS fields. */ + public Builder setCartesBancaires( + PaymentIntentCreateParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions + .CartesBancaires + cartesBancaires) { + this.cartesBancaires = cartesBancaires; + return this; + } - /** - * If this is a {@code billie} PaymentMethod, this sub-hash contains details about the Billie - * payment method options. - */ - @SerializedName("billie") - Object 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 + * 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; + } - /** - * If this is a {@code blik} PaymentMethod, this sub-hash contains details about the BLIK - * payment method options. - */ - @SerializedName("blik") - Object blik; + /** + * Add all map key/value pairs to `extraParams` map. A 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; + } + } - /** - * If this is a {@code boleto} PaymentMethod, this sub-hash contains details about the Boleto - * payment method options. - */ - @SerializedName("boleto") - Object boleto; + @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; - /** Configuration for any card payments attempted on this PaymentIntent. */ - @SerializedName("card") - Object card; + /** + * 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; - /** - * 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 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 cashapp} PaymentMethod, this sub-hash contains details about the Cash App - * Pay payment method options. - */ - @SerializedName("cashapp") - Object 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 crypto} PaymentMethod, this sub-hash contains details about the Crypto - * payment method options. - */ - @SerializedName("crypto") - Object crypto; + private CartesBancaires( + CbAvalgo cbAvalgo, + String cbExemption, + Long cbScore, + Map extraParams) { + this.cbAvalgo = cbAvalgo; + this.cbExemption = cbExemption; + this.cbScore = cbScore; + this.extraParams = extraParams; + } - /** - * 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 CbAvalgo cbAvalgo; - /** - * Map of extra parameters for custom features not available in this client library. The content - * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each - * key/value pair is serialized as if the key is a root-level 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 cbExemption; - /** - * If this is a {@code fpx} PaymentMethod, this sub-hash contains details about the FPX payment - * method options. - */ - @SerializedName("fpx") - Object fpx; + private Long cbScore; - /** - * If this is a {@code giropay} PaymentMethod, this sub-hash contains details about the Giropay - * payment method options. - */ - @SerializedName("giropay") - Object giropay; + 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); + } - /** - * If this is a {@code gopay} PaymentMethod, this sub-hash contains details about the Gopay - * payment method options. - */ - @SerializedName("gopay") - Object gopay; + /** + * 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; + } - /** - * If this is a {@code grabpay} PaymentMethod, this sub-hash contains details about the Grabpay - * payment method options. - */ - @SerializedName("grabpay") - Object grabpay; + /** + * 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; + } - /** - * 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; + /** + * 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; + } - /** - * If this is a {@code ideal} PaymentMethod, this sub-hash contains details about the Ideal - * payment method options. - */ - @SerializedName("ideal") - 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 + * 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; + } - /** - * 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; + /** + * Add all map key/value pairs to `extraParams` map. A 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; + } + } - /** - * 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 enum CbAvalgo implements ApiRequestParams.EnumParam { + @SerializedName("0") + N0("0"), - /** - * If this is a {@code klarna} PaymentMethod, this sub-hash contains details about the Klarna - * payment method options. - */ - @SerializedName("klarna") - Object klarna; + @SerializedName("1") + N1("1"), - /** - * If this is a {@code konbini} PaymentMethod, this sub-hash contains details about the Konbini - * payment method options. - */ - @SerializedName("konbini") - Object konbini; + @SerializedName("2") + N2("2"), - /** - * 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; + @SerializedName("3") + N3("3"), - /** - * If this is a {@code link} PaymentMethod, this sub-hash contains details about the Link - * payment method options. - */ - @SerializedName("link") - Object link; + @SerializedName("4") + N4("4"), - /** - * 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; + @SerializedName("A") + A("A"); - /** - * If this is a {@code MobilePay} PaymentMethod, this sub-hash contains details about the - * MobilePay payment method options. - */ - @SerializedName("mobilepay") - Object mobilepay; + @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. - */ - @SerializedName("multibanco") - Object multibanco; + CbAvalgo(String value) { + this.value = value; + } + } + } + } - /** - * 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; + public enum AresTransStatus implements ApiRequestParams.EnumParam { + @SerializedName("A") + A("A"), - /** - * 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; + @SerializedName("C") + C("C"), - /** - * If this is a {@code oxxo} PaymentMethod, this sub-hash contains details about the OXXO - * payment method options. - */ - @SerializedName("oxxo") - Object oxxo; + @SerializedName("I") + I("I"), - /** - * If this is a {@code p24} PaymentMethod, this sub-hash contains details about the Przelewy24 - * payment method options. - */ - @SerializedName("p24") - Object p24; + @SerializedName("N") + N("N"), - /** - * 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; + @SerializedName("R") + R("R"), - /** - * If this is a {@code payco} PaymentMethod, this sub-hash contains details about the PAYCO - * payment method options. - */ - @SerializedName("payco") - Object payco; + @SerializedName("U") + U("U"), - /** - * If this is a {@code paynow} PaymentMethod, this sub-hash contains details about the PayNow - * payment method options. - */ - @SerializedName("paynow") - Object paynow; + @SerializedName("Y") + Y("Y"); - /** - * If this is a {@code paypal} PaymentMethod, this sub-hash contains details about the PayPal - * payment method options. - */ - @SerializedName("paypal") - Object paypal; + @Getter(onMethod_ = {@Override}) + private final String value; - /** - * If this is a {@code paypay} PaymentMethod, this sub-hash contains details about the PayPay - * payment method options. - */ - @SerializedName("paypay") - Object paypay; + AresTransStatus(String value) { + this.value = value; + } + } - /** - * If this is a {@code payto} PaymentMethod, this sub-hash contains details about the PayTo - * payment method options. - */ - @SerializedName("payto") - Object payto; + public enum ElectronicCommerceIndicator implements ApiRequestParams.EnumParam { + @SerializedName("01") + N01("01"), - /** - * If this is a {@code pix} PaymentMethod, this sub-hash contains details about the Pix payment - * method options. - */ - @SerializedName("pix") - Object pix; + @SerializedName("02") + N02("02"), - /** - * If this is a {@code promptpay} PaymentMethod, this sub-hash contains details about the - * PromptPay payment method options. - */ - @SerializedName("promptpay") - Object promptpay; + @SerializedName("05") + N05("05"), - /** - * If this is a {@code qris} PaymentMethod, this sub-hash contains details about the QRIS - * payment method options. - */ - @SerializedName("qris") - Object qris; + @SerializedName("06") + N06("06"), - /** - * If this is a {@code rechnung} PaymentMethod, this sub-hash contains details about the - * Rechnung payment method options. - */ - @SerializedName("rechnung") - Object rechnung; + @SerializedName("07") + N07("07"); - /** - * 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; + @Getter(onMethod_ = {@Override}) + private final String value; - /** - * 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; + ElectronicCommerceIndicator(String value) { + this.value = value; + } + } - /** - * If this is a {@code satispay} PaymentMethod, this sub-hash contains details about the - * Satispay payment method options. - */ - @SerializedName("satispay") - Object satispay; + public enum ExemptionIndicator implements ApiRequestParams.EnumParam { + @SerializedName("low_risk") + LOW_RISK("low_risk"), - /** - * 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("none") + NONE("none"); - /** - * If this is a {@code shopeepay} PaymentMethod, this sub-hash contains details about the - * ShopeePay payment method options. - */ - @SerializedName("shopeepay") - Object shopeepay; + @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. - */ - @SerializedName("sofort") - Object sofort; + ExemptionIndicator(String value) { + this.value = value; + } + } - /** - * 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 enum Version implements ApiRequestParams.EnumParam { + @SerializedName("1.0.2") + N1__0__2("1.0.2"), - /** - * If this is a {@code Swish} PaymentMethod, this sub-hash contains details about the Swish - * payment method options. - */ - @SerializedName("swish") - Object swish; + @SerializedName("2.1.0") + N2__1__0("2.1.0"), - /** - * If this is a {@code twint} PaymentMethod, this sub-hash contains details about the TWINT - * payment method options. - */ - @SerializedName("twint") - Object twint; + @SerializedName("2.2.0") + N2__2__0("2.2.0"); - /** - * 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; + @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. - */ - @SerializedName("wechat_pay") - Object wechatPay; + Version(String value) { + this.value = value; + } + } + } - /** - * If this is a {@code zip} PaymentMethod, this sub-hash contains details about the Zip payment - * method options. - */ - @SerializedName("zip") - Object zip; + public enum CaptureMethod implements ApiRequestParams.EnumParam { + @SerializedName("manual") + MANUAL("manual"); - 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; - } + @Getter(onMethod_ = {@Override}) + private final String value; + + CaptureMethod(String value) { + this.value = value; + } + } - public static Builder builder() { - return new Builder(); - } + public enum Network implements ApiRequestParams.EnumParam { + @SerializedName("amex") + AMEX("amex"), - public static class Builder { - private Object acssDebit; + @SerializedName("cartes_bancaires") + CARTES_BANCAIRES("cartes_bancaires"), - private Object affirm; + @SerializedName("diners") + DINERS("diners"), - private Object afterpayClearpay; + @SerializedName("discover") + DISCOVER("discover"), - private Object alipay; + @SerializedName("eftpos_au") + EFTPOS_AU("eftpos_au"), - private Object alma; + @SerializedName("girocard") + GIROCARD("girocard"), - private Object amazonPay; + @SerializedName("interac") + INTERAC("interac"), - private Object auBecsDebit; + @SerializedName("jcb") + JCB("jcb"), - private Object bacsDebit; + @SerializedName("link") + LINK("link"), - private Object bancontact; + @SerializedName("mastercard") + MASTERCARD("mastercard"), - private Object billie; + @SerializedName("unionpay") + UNIONPAY("unionpay"), - private Object blik; + @SerializedName("unknown") + UNKNOWN("unknown"), - private Object boleto; + @SerializedName("visa") + VISA("visa"); - private Object card; + @Getter(onMethod_ = {@Override}) + private final String value; - private Object cardPresent; + Network(String value) { + this.value = value; + } + } - private Object cashapp; + public enum RequestDecrementalAuthorization implements ApiRequestParams.EnumParam { + @SerializedName("if_available") + IF_AVAILABLE("if_available"), - private Object crypto; + @SerializedName("never") + NEVER("never"); - private Object customerBalance; + @Getter(onMethod_ = {@Override}) + private final String value; - private Object eps; + RequestDecrementalAuthorization(String value) { + this.value = value; + } + } - private Map extraParams; + public enum RequestExtendedAuthorization implements ApiRequestParams.EnumParam { + @SerializedName("if_available") + IF_AVAILABLE("if_available"), - private Object fpx; + @SerializedName("never") + NEVER("never"); - private Object giropay; + @Getter(onMethod_ = {@Override}) + private final String value; - private Object gopay; + RequestExtendedAuthorization(String value) { + this.value = value; + } + } - private Object grabpay; + public enum RequestIncrementalAuthorization implements ApiRequestParams.EnumParam { + @SerializedName("if_available") + IF_AVAILABLE("if_available"), - private Object idBankTransfer; + @SerializedName("never") + NEVER("never"); - private Object ideal; + @Getter(onMethod_ = {@Override}) + private final String value; - private Object interacPresent; + RequestIncrementalAuthorization(String value) { + this.value = value; + } + } - private Object kakaoPay; + public enum RequestMulticapture implements ApiRequestParams.EnumParam { + @SerializedName("if_available") + IF_AVAILABLE("if_available"), - private Object klarna; + @SerializedName("never") + NEVER("never"); - private Object konbini; + @Getter(onMethod_ = {@Override}) + private final String value; - private Object krCard; + RequestMulticapture(String value) { + this.value = value; + } + } - private Object link; + public enum RequestOvercapture implements ApiRequestParams.EnumParam { + @SerializedName("if_available") + IF_AVAILABLE("if_available"), - private Object mbWay; + @SerializedName("never") + NEVER("never"); - private Object mobilepay; + @Getter(onMethod_ = {@Override}) + private final String value; - private Object multibanco; + RequestOvercapture(String value) { + this.value = value; + } + } - private Object naverPay; + public enum RequestPartialAuthorization implements ApiRequestParams.EnumParam { + @SerializedName("if_available") + IF_AVAILABLE("if_available"), - private Object nzBankAccount; + @SerializedName("never") + NEVER("never"); - private Object oxxo; + @Getter(onMethod_ = {@Override}) + private final String value; - private Object p24; + RequestPartialAuthorization(String value) { + this.value = value; + } + } - private Object payByBank; + public enum RequestThreeDSecure implements ApiRequestParams.EnumParam { + @SerializedName("any") + ANY("any"), - private Object payco; + @SerializedName("automatic") + AUTOMATIC("automatic"), - private Object paynow; + @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 Object paypal; + private Routing routing; - private Object paypay; + /** 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); + } - private Object payto; + /** + * 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; + } - private Object 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.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; + } - private Object 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.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; + } - private Object qris; + /** + * Request ability to capture this payment beyond the standard authorization + * validity window. + */ + public Builder setRequestExtendedAuthorization(Boolean requestExtendedAuthorization) { + this.requestExtendedAuthorization = requestExtendedAuthorization; + return this; + } - private Object rechnung; + /** + * 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; + } - private Object revolutPay; + /** + * 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; + } + } - private Object samsungPay; + @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; - private Object satispay; + /** Routing requested priority. */ + @SerializedName("requested_priority") + RequestedPriority requestedPriority; - private Object sepaDebit; + private Routing(Map extraParams, RequestedPriority requestedPriority) { + this.extraParams = extraParams; + this.requestedPriority = requestedPriority; + } - private Object shopeepay; + public static Builder builder() { + return new Builder(); + } - private Object sofort; + public static class Builder { + private Map extraParams; - private Object stripeBalance; + private RequestedPriority requestedPriority; - private Object swish; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodOptions.CardPresent.Routing build() { + return new PaymentIntentCreateParams.PaymentMethodOptions.CardPresent.Routing( + this.extraParams, this.requestedPriority); + } - private Object 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 + * 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; + } - private Object usBankAccount; + /** + * Add all map key/value pairs to `extraParams` map. A 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; + } - private Object wechatPay; + /** Routing requested priority. */ + public Builder setRequestedPriority( + PaymentIntentCreateParams.PaymentMethodOptions.CardPresent.Routing.RequestedPriority + requestedPriority) { + this.requestedPriority = requestedPriority; + return this; + } + } - private Object zip; + public enum RequestedPriority implements ApiRequestParams.EnumParam { + @SerializedName("domestic") + DOMESTIC("domestic"), - /** 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); - } + @SerializedName("international") + INTERNATIONAL("international"); - /** - * 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; - } + @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(EmptyParam acssDebit) { - this.acssDebit = acssDebit; - return this; + RequestedPriority(String value) { + this.value = value; + } + } } - /** - * 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; - } + public enum CaptureMethod implements ApiRequestParams.EnumParam { + @SerializedName("manual") + MANUAL("manual"), - /** - * 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; - } + @SerializedName("manual_preferred") + MANUAL_PREFERRED("manual_preferred"); - /** - * 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; - } + @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(EmptyParam afterpayClearpay) { - this.afterpayClearpay = afterpayClearpay; - return this; + CaptureMethod(String value) { + this.value = value; + } } + } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Cashapp { /** - * If this is a {@code alipay} PaymentMethod, this sub-hash contains details about the Alipay - * 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 setAlipay(PaymentIntentCreateParams.PaymentMethodOptions.Alipay alipay) { - this.alipay = alipay; - return this; - } + @SerializedName("capture_method") + ApiRequestParams.EnumParam captureMethod; /** - * If this is a {@code alipay} PaymentMethod, this sub-hash contains details about the Alipay - * 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 setAlipay(EmptyParam alipay) { - this.alipay = alipay; - return this; - } + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; /** - * If this is a {@code alma} PaymentMethod, this sub-hash contains details about the Alma - * 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 setAlma(PaymentIntentCreateParams.PaymentMethodOptions.Alma alma) { - this.alma = alma; - return this; + @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; } - /** - * 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 static Builder builder() { + return new Builder(); } - /** - * 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; + 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; + } } - /** - * 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; - } + public enum CaptureMethod implements ApiRequestParams.EnumParam { + @SerializedName("manual") + MANUAL("manual"); - /** - * 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; - } + @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; + CaptureMethod(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( - PaymentIntentCreateParams.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( - PaymentIntentCreateParams.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(PaymentIntentCreateParams.PaymentMethodOptions.Billie billie) { - this.billie = billie; - return this; + SetupFutureUsage(String value) { + this.value = value; + } } + } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Crypto { /** - * If this is a {@code billie} PaymentMethod, this sub-hash contains details about the Billie - * 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 setBillie(EmptyParam billie) { - this.billie = billie; - 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. + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + *

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

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

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

If you've already set {@code setup_future_usage} 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 setBlik(PaymentIntentCreateParams.PaymentMethodOptions.Blik blik) { - this.blik = blik; - return this; - } + @SerializedName("setup_future_usage") + SetupFutureUsage setupFutureUsage; - /** - * 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; + private Crypto(Map extraParams, SetupFutureUsage setupFutureUsage) { + this.extraParams = extraParams; + this.setupFutureUsage = setupFutureUsage; } - /** - * 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; + public static Builder builder() { + return new Builder(); } - /** - * 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; - } + public static class Builder { + private Map extraParams; - /** Configuration for any card payments attempted on this PaymentIntent. */ - public Builder setCard(PaymentIntentCreateParams.PaymentMethodOptions.Card card) { - this.card = card; - return this; - } + private SetupFutureUsage setupFutureUsage; - /** Configuration for any card payments attempted on this PaymentIntent. */ - public Builder setCard(EmptyParam card) { - this.card = card; - return this; - } + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodOptions.Crypto build() { + return new PaymentIntentCreateParams.PaymentMethodOptions.Crypto( + this.extraParams, this.setupFutureUsage); + } - /** - * 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; - } + /** + * Add a key/value pair to `extraParams` map. A 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; + } - /** - * If this is a {@code card_present} PaymentMethod, this sub-hash contains details about the - * Card Present payment method options. - */ - public Builder setCardPresent(EmptyParam cardPresent) { - this.cardPresent = cardPresent; - return this; - } + /** + * Add all map key/value pairs to `extraParams` map. A 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; + } - /** - * 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; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

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

If you've already set {@code setup_future_usage} 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; + } } - /** - * 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 enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"); - /** - * 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; + @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 crypto} PaymentMethod, this sub-hash contains details about the Crypto - * payment method options. + * Configuration for the bank transfer funding type, if the {@code funding_type} is set to + * {@code bank_transfer}. */ - public Builder setCrypto(EmptyParam crypto) { - this.crypto = crypto; - return this; - } + @SerializedName("bank_transfer") + BankTransfer bankTransfer; /** - * If this is a {@code customer balance} PaymentMethod, this sub-hash contains details about - * the customer 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 setCustomerBalance( - PaymentIntentCreateParams.PaymentMethodOptions.CustomerBalance customerBalance) { - this.customerBalance = customerBalance; - return this; - } + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; /** - * If this is a {@code customer balance} PaymentMethod, this sub-hash contains details about - * the customer balance 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 setCustomerBalance(EmptyParam customerBalance) { - this.customerBalance = customerBalance; - return this; - } + @SerializedName("funding_type") + FundingType fundingType; /** - * If this is a {@code eps} PaymentMethod, this sub-hash contains details about the EPS - * 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 setEps(PaymentIntentCreateParams.PaymentMethodOptions.Eps eps) { - this.eps = eps; - 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 eps} PaymentMethod, this sub-hash contains details about the EPS - * payment method options. - */ - public Builder setEps(EmptyParam eps) { - this.eps = eps; - 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.PaymentMethodOptions#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 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); } - this.extraParams.put(key, value); - return this; - } - /** - * Add all map key/value pairs to `extraParams` map. A 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<>(); + /** + * 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; } - 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; - } + /** + * Add a key/value pair to `extraParams` map. A 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; + } - /** - * 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; - } + /** + * Add all map key/value pairs to `extraParams` map. A 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; + } - /** - * 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; + /** + * 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; + } } - /** - * 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; - } + @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; - /** - * 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; - } + /** + * 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; - /** - * 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; - } + 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; + } - /** - * 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; - } + public static Builder builder() { + return new Builder(); + } - /** - * 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; - } + public static class Builder { + private EuBankTransfer euBankTransfer; - /** - * 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; - } + 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. - */ - public Builder setIdBankTransfer(EmptyParam idBankTransfer) { - this.idBankTransfer = idBankTransfer; - return this; - } + private List< + PaymentIntentCreateParams.PaymentMethodOptions.CustomerBalance.BankTransfer + .RequestedAddressType> + requestedAddressTypes; - /** - * 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; - } + private Type type; - /** - * 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; - } + /** 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); + } - /** - * 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; - } + /** Configuration for the eu_bank_transfer funding type. */ + public Builder setEuBankTransfer( + PaymentIntentCreateParams.PaymentMethodOptions.CustomerBalance.BankTransfer + .EuBankTransfer + euBankTransfer) { + this.euBankTransfer = euBankTransfer; + 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; - } + /** + * Add a key/value pair to `extraParams` map. A 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; + } - /** - * 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; - } + /** + * Add all map key/value pairs to `extraParams` map. A 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; + } - /** - * 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; - } + /** + * 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; + } - /** - * 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; - } + /** + * 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; + } - /** - * 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; - } + /** + * 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; + } + } - /** - * 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; - } + @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; - /** - * 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; - } + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 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; - } + private EuBankTransfer(String country, Map extraParams) { + this.country = country; + this.extraParams = 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; - } + public static Builder builder() { + return new Builder(); + } - /** - * 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; - } + public static class Builder { + private String country; - /** - * 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; - } + private Map extraParams; - /** - * 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; - } + /** 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); + } - /** - * 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; - } + /** + * 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 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; - } + /** + * Add a key/value pair to `extraParams` map. A 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; + } - /** - * 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; - } + /** + * Add all map key/value pairs to `extraParams` map. A 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; + } + } + } - /** - * 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; - } + public enum RequestedAddressType implements ApiRequestParams.EnumParam { + @SerializedName("aba") + ABA("aba"), - /** - * 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; - } + @SerializedName("iban") + IBAN("iban"), - /** - * 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; - } + @SerializedName("sepa") + SEPA("sepa"), - /** - * 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; - } + @SerializedName("sort_code") + SORT_CODE("sort_code"), - /** - * 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; - } + @SerializedName("spei") + SPEI("spei"), - /** - * 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; - } + @SerializedName("swift") + SWIFT("swift"), - /** - * 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; - } + @SerializedName("zengin") + ZENGIN("zengin"); - /** - * 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; - } + @Getter(onMethod_ = {@Override}) + private final String value; - /** - * 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; - } + RequestedAddressType(String value) { + this.value = value; + } + } - /** - * 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 Type implements ApiRequestParams.EnumParam { + @SerializedName("eu_bank_transfer") + EU_BANK_TRANSFER("eu_bank_transfer"), - /** - * 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; - } + @SerializedName("gb_bank_transfer") + GB_BANK_TRANSFER("gb_bank_transfer"), - /** - * 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; - } + @SerializedName("jp_bank_transfer") + JP_BANK_TRANSFER("jp_bank_transfer"), - /** - * 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; - } + @SerializedName("mx_bank_transfer") + MX_BANK_TRANSFER("mx_bank_transfer"), - /** - * 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; - } + @SerializedName("us_bank_transfer") + US_BANK_TRANSFER("us_bank_transfer"); - /** - * 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; - } + @Getter(onMethod_ = {@Override}) + private final String value; - /** - * 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; + Type(String value) { + this.value = value; + } + } } - /** - * 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; - } + public enum FundingType implements ApiRequestParams.EnumParam { + @SerializedName("bank_transfer") + BANK_TRANSFER("bank_transfer"); - /** - * 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; - } + @Getter(onMethod_ = {@Override}) + private final String value; - /** - * 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; + FundingType(String value) { + this.value = value; + } } - /** - * 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; - } + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"); - /** - * 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; - } + @Getter(onMethod_ = {@Override}) + private final String value; - /** - * 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; + SetupFutureUsage(String value) { + this.value = value; + } } + } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Eps { /** - * If this is a {@code pix} PaymentMethod, this sub-hash contains details about the Pix - * 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 setPix(PaymentIntentCreateParams.PaymentMethodOptions.Pix pix) { - this.pix = pix; - return this; - } + @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. + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + *

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

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

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

If you've already set {@code setup_future_usage} 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 setPix(EmptyParam pix) { - this.pix = pix; - return this; - } + @SerializedName("setup_future_usage") + SetupFutureUsage setupFutureUsage; - /** - * 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; + private Eps(Map extraParams, SetupFutureUsage setupFutureUsage) { + this.extraParams = extraParams; + this.setupFutureUsage = setupFutureUsage; } - /** - * 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(PaymentIntentCreateParams.PaymentMethodOptions.Qris qris) { - this.qris = qris; - return this; - } + public static class Builder { + 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; - } + private SetupFutureUsage setupFutureUsage; - /** - * 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; - } + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodOptions.Eps build() { + return new PaymentIntentCreateParams.PaymentMethodOptions.Eps( + this.extraParams, this.setupFutureUsage); + } - /** - * 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; - } + /** + * Add a key/value pair to `extraParams` map. A 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; + } - /** - * 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; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

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

If you've already set {@code setup_future_usage} 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; + } } - /** - * 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; - } + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"); - /** - * 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; - } + @Getter(onMethod_ = {@Override}) + private final String value; - /** - * 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; + SetupFutureUsage(String value) { + this.value = value; + } } + } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Fpx { /** - * 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. + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + *

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

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

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

If you've already set {@code setup_future_usage} 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 setSatispay(EmptyParam satispay) { - this.satispay = satispay; - return this; - } + @SerializedName("setup_future_usage") + SetupFutureUsage setupFutureUsage; - /** - * 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; + private Fpx(Map extraParams, SetupFutureUsage setupFutureUsage) { + this.extraParams = extraParams; + this.setupFutureUsage = setupFutureUsage; } - /** - * 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 Builder builder() { + return new Builder(); } - /** - * 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; - } + 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(EmptyParam shopeepay) { - this.shopeepay = shopeepay; - return this; - } + private SetupFutureUsage setupFutureUsage; - /** - * 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; - } + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodOptions.Fpx build() { + return new PaymentIntentCreateParams.PaymentMethodOptions.Fpx( + this.extraParams, this.setupFutureUsage); + } - /** - * 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; - } + /** + * Add a key/value pair to `extraParams` map. A 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; + } - /** - * 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; - } + /** + * Add all map key/value pairs to `extraParams` map. A 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; + } - /** - * 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; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

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

If you've already set {@code setup_future_usage} 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; + } } - /** - * 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; - } + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"); - /** - * 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; - } + @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(PaymentIntentCreateParams.PaymentMethodOptions.Twint twint) { - this.twint = twint; - return this; + SetupFutureUsage(String value) { + this.value = value; + } } + } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Giropay { /** - * If this is a {@code twint} PaymentMethod, this sub-hash contains details about the TWINT - * 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 setTwint(EmptyParam twint) { - this.twint = twint; - return this; - } + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; /** - * If this is a {@code us_bank_account} PaymentMethod, this sub-hash contains details about - * the US bank account 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 setUsBankAccount( - PaymentIntentCreateParams.PaymentMethodOptions.UsBankAccount usBankAccount) { - this.usBankAccount = usBankAccount; - return this; - } + @SerializedName("setup_future_usage") + SetupFutureUsage setupFutureUsage; - /** - * 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; + private Giropay(Map extraParams, SetupFutureUsage setupFutureUsage) { + this.extraParams = extraParams; + this.setupFutureUsage = setupFutureUsage; } - /** - * 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; + public static Builder builder() { + return new Builder(); } - /** - * If this is a {@code wechat_pay} PaymentMethod, this sub-hash contains details about the - * WeChat Pay payment method options. - */ - public Builder setWechatPay(EmptyParam wechatPay) { - this.wechatPay = wechatPay; - return this; - } + public static class Builder { + private Map extraParams; - /** - * 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; + 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; + } } - /** - * 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; + 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 AcssDebit { + 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. @@ -15902,10 +28349,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. * @@ -15930,31 +28373,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") - String targetDate; - - /** Bank account verification method. */ - @SerializedName("verification_method") - VerificationMethod verificationMethod; + SetupFutureUsage setupFutureUsage; - private AcssDebit( - Map extraParams, - MandateOptions mandateOptions, - ApiRequestParams.EnumParam setupFutureUsage, - String targetDate, - VerificationMethod verificationMethod) { + private Gopay(Map extraParams, SetupFutureUsage setupFutureUsage) { this.extraParams = extraParams; - this.mandateOptions = mandateOptions; this.setupFutureUsage = setupFutureUsage; - this.targetDate = targetDate; - this.verificationMethod = verificationMethod; } public static Builder builder() { @@ -15964,29 +28387,19 @@ public static Builder builder() { public static class Builder { private Map extraParams; - private MandateOptions mandateOptions; - - private ApiRequestParams.EnumParam setupFutureUsage; - - private String targetDate; - - private VerificationMethod verificationMethod; + private SetupFutureUsage setupFutureUsage; /** 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.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.AcssDebit#extraParams} for - * the field documentation. + * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.Gopay#extraParams} for the + * field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -15999,8 +28412,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.AcssDebit#extraParams} for - * the field documentation. + * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.Gopay#extraParams} for the + * field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -16010,45 +28423,6 @@ public Builder putAllExtraParam(Map 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. @@ -16066,223 +28440,18 @@ public Builder setSetupFutureUsage( * payment method representing the card to the Customer instead. * *

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

If you've already set {@code setup_future_usage} 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; - } + * comply with regional legislation and network rules, such as SCA. + * + *

If you've already set {@code setup_future_usage} 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; } } @@ -16291,10 +28460,7 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam { NONE("none"), @SerializedName("off_session") - OFF_SESSION("off_session"), - - @SerializedName("on_session") - ON_SESSION("on_session"); + OFF_SESSION("off_session"); @Getter(onMethod_ = {@Override}) private final String value; @@ -16303,42 +28469,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 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. @@ -16348,10 +28483,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") - String preferredLocale; - /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * @@ -16378,14 +28509,8 @@ public static class Affirm { @SerializedName("setup_future_usage") SetupFutureUsage setupFutureUsage; - private Affirm( - ApiRequestParams.EnumParam captureMethod, - Map extraParams, - String preferredLocale, - SetupFutureUsage setupFutureUsage) { - this.captureMethod = captureMethod; + private Grabpay(Map extraParams, SetupFutureUsage setupFutureUsage) { this.extraParams = extraParams; - this.preferredLocale = preferredLocale; this.setupFutureUsage = setupFutureUsage; } @@ -16394,55 +28519,20 @@ public static Builder 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; + 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.Affirm#extraParams} for + * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.Grabpay#extraParams} for * the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -16456,7 +28546,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.Affirm#extraParams} for + * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.Grabpay#extraParams} for * the field documentation. */ public Builder putAllExtraParam(Map map) { @@ -16467,14 +28557,6 @@ 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; - return this; - } - /** * Indicates that you intend to make future payments with this PaymentIntent's payment * method. @@ -16500,25 +28582,13 @@ public Builder setPreferredLocale(String preferredLocale) { * off_session}. */ public Builder setSetupFutureUsage( - PaymentIntentCreateParams.PaymentMethodOptions.Affirm.SetupFutureUsage + PaymentIntentCreateParams.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"); @@ -16534,19 +28604,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 @@ -16557,14 +28628,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") - String reference; - /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * @@ -16591,14 +28654,14 @@ public static class AfterpayClearpay { @SerializedName("setup_future_usage") SetupFutureUsage setupFutureUsage; - private AfterpayClearpay( - ApiRequestParams.EnumParam captureMethod, + private IdBankTransfer( + Long expiresAfter, + Long expiresAt, Map extraParams, - String reference, SetupFutureUsage setupFutureUsage) { - this.captureMethod = captureMethod; + this.expiresAfter = expiresAfter; + this.expiresAt = expiresAt; this.extraParams = extraParams; - this.reference = reference; this.setupFutureUsage = setupFutureUsage; } @@ -16607,49 +28670,35 @@ public static Builder builder() { } public static class Builder { - private ApiRequestParams.EnumParam captureMethod; + private Long expiresAfter; - private Map extraParams; + private Long expiresAt; - private String reference; + private Map extraParams; 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); + public PaymentIntentCreateParams.PaymentMethodOptions.IdBankTransfer build() { + return new PaymentIntentCreateParams.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( - PaymentIntentCreateParams.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; } @@ -16657,8 +28706,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 - * PaymentIntentCreateParams.PaymentMethodOptions.AfterpayClearpay#extraParams} for the - * field documentation. + * PaymentIntentCreateParams.PaymentMethodOptions.IdBankTransfer#extraParams} for the field + * documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -16672,8 +28721,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.AfterpayClearpay#extraParams} for the - * field documentation. + * PaymentIntentCreateParams.PaymentMethodOptions.IdBankTransfer#extraParams} for the field + * documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -16683,16 +28732,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; - } - /** * Indicates that you intend to make future payments with this PaymentIntent's payment * method. @@ -16718,25 +28757,13 @@ public Builder setReference(String reference) { * off_session}. */ public Builder setSetupFutureUsage( - PaymentIntentCreateParams.PaymentMethodOptions.AfterpayClearpay.SetupFutureUsage + PaymentIntentCreateParams.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"); @@ -16752,7 +28779,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. @@ -16788,7 +28815,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; } @@ -16803,16 +28830,16 @@ public static class Builder { private ApiRequestParams.EnumParam setupFutureUsage; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodOptions.Alipay build() { - return new PaymentIntentCreateParams.PaymentMethodOptions.Alipay( + 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.Alipay#extraParams} for - * the field documentation. + * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.Ideal#extraParams} for the + * field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -16825,8 +28852,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.PaymentMethodOptions.Ideal#extraParams} for the + * field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -16861,7 +28888,7 @@ public Builder putAllExtraParam(Map map) { * off_session}. */ public Builder setSetupFutureUsage( - PaymentIntentCreateParams.PaymentMethodOptions.Alipay.SetupFutureUsage + PaymentIntentCreateParams.PaymentMethodOptions.Ideal.SetupFutureUsage setupFutureUsage) { this.setupFutureUsage = setupFutureUsage; return this; @@ -16915,7 +28942,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 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. * @@ -16938,9 +29026,35 @@ public static class Alma { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Alma(ApiRequestParams.EnumParam captureMethod, 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() { @@ -16952,10 +29066,12 @@ public static class Builder { private Map extraParams; + private ApiRequestParams.EnumParam setupFutureUsage; + /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodOptions.Alma build() { - return new PaymentIntentCreateParams.PaymentMethodOptions.Alma( - this.captureMethod, this.extraParams); + public PaymentIntentCreateParams.PaymentMethodOptions.KakaoPay build() { + return new PaymentIntentCreateParams.PaymentMethodOptions.KakaoPay( + this.captureMethod, this.extraParams, this.setupFutureUsage); } /** @@ -16969,7 +29085,7 @@ public PaymentIntentCreateParams.PaymentMethodOptions.Alma build() { * value for this parameter unsets the stored value for this payment method type. */ public Builder setCaptureMethod( - PaymentIntentCreateParams.PaymentMethodOptions.Alma.CaptureMethod captureMethod) { + PaymentIntentCreateParams.PaymentMethodOptions.KakaoPay.CaptureMethod captureMethod) { this.captureMethod = captureMethod; return this; } @@ -16992,8 +29108,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 PaymentIntentCreateParams.PaymentMethodOptions.Alma#extraParams} for the - * field documentation. + * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.KakaoPay#extraParams} for + * the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -17006,8 +29122,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.Alma#extraParams} for the - * field documentation. + * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.KakaoPay#extraParams} for + * the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -17016,6 +29132,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( + 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 { @@ -17029,11 +29197,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. * @@ -17056,6 +29239,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. * @@ -17074,17 +29265,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() { @@ -17096,12 +29307,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 PaymentIntentCreateParams.PaymentMethodOptions.AmazonPay build() { - return new PaymentIntentCreateParams.PaymentMethodOptions.AmazonPay( - this.captureMethod, this.extraParams, this.setupFutureUsage); + public PaymentIntentCreateParams.PaymentMethodOptions.Klarna build() { + return new PaymentIntentCreateParams.PaymentMethodOptions.Klarna( + this.captureMethod, + this.extraParams, + this.onDemand, + this.preferredLocale, + this.setupFutureUsage, + this.subscriptions, + this.supplementaryPurchaseData); } /** @@ -17115,7 +29340,7 @@ public PaymentIntentCreateParams.PaymentMethodOptions.AmazonPay build() { * value for this parameter unsets the stored value for this payment method type. */ public Builder setCaptureMethod( - PaymentIntentCreateParams.PaymentMethodOptions.AmazonPay.CaptureMethod captureMethod) { + PaymentIntentCreateParams.PaymentMethodOptions.Klarna.CaptureMethod captureMethod) { this.captureMethod = captureMethod; return this; } @@ -17138,7 +29363,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 PaymentIntentCreateParams.PaymentMethodOptions.AmazonPay#extraParams} for + * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.Klarna#extraParams} for * the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -17150,16 +29375,32 @@ 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. + * Add all map key/value pairs to `extraParams` map. A 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 putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); + public Builder setPreferredLocale( + PaymentIntentCreateParams.PaymentMethodOptions.Klarna.PreferredLocale preferredLocale) { + this.preferredLocale = preferredLocale; return this; } @@ -17182,448 +29423,547 @@ 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( - PaymentIntentCreateParams.PaymentMethodOptions.AmazonPay.SetupFutureUsage + PaymentIntentCreateParams.PaymentMethodOptions.Klarna.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. + * 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. */ - public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { - this.setupFutureUsage = setupFutureUsage; + @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; } } - public enum CaptureMethod implements ApiRequestParams.EnumParam { - @SerializedName("manual") - MANUAL("manual"); + @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"), - @Getter(onMethod_ = {@Override}) - private final String value; + @SerializedName("year") + YEAR("year"); - CaptureMethod(String value) { - this.value = value; + @Getter(onMethod_ = {@Override}) + private final String value; + + PurchaseInterval(String value) { + this.value = value; + } } } - public enum SetupFutureUsage implements ApiRequestParams.EnumParam { - @SerializedName("none") - NONE("none"), + @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; - @SerializedName("off_session") - OFF_SESSION("off_session"); + /** Required. Unit of time between subscription charges. */ + @SerializedName("interval") + Interval interval; - @Getter(onMethod_ = {@Override}) - private final String value; + /** + * 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; - SetupFutureUsage(String value) { - this.value = value; - } - } - } + /** Name for subscription. */ + @SerializedName("name") + String name; - @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; + /** Describes the upcoming charge for this subscription. */ + @SerializedName("next_billing") + NextBilling nextBilling; - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment method. - * - *

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

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

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

If you've already set {@code setup_future_usage} 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; + /** + * 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; - /** - * 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 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; + } - 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 Builder builder() { - return new Builder(); - } + public static class Builder { + private Map extraParams; - public static class Builder { - private Map extraParams; + private Interval interval; - private ApiRequestParams.EnumParam setupFutureUsage; + private Long intervalCount; - private String targetDate; + private String name; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodOptions.AuBecsDebit build() { - return new PaymentIntentCreateParams.PaymentMethodOptions.AuBecsDebit( - this.extraParams, this.setupFutureUsage, this.targetDate); - } + private NextBilling nextBilling; - /** - * Add a key/value pair to `extraParams` map. A 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; - } + private String reference; - /** - * Add all map key/value pairs to `extraParams` map. A 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<>(); + /** 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); } - 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; - } + /** + * Add a key/value pair to `extraParams` map. A 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; + } - /** - * 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; - } - } + /** + * Add all map key/value pairs to `extraParams` map. A 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; + } - public enum SetupFutureUsage implements ApiRequestParams.EnumParam { - @SerializedName("none") - NONE("none"), + /** Required. Unit of time between subscription charges. */ + public Builder setInterval( + PaymentIntentCreateParams.PaymentMethodOptions.Klarna.Subscription.Interval + interval) { + this.interval = interval; + return this; + } - @SerializedName("off_session") - OFF_SESSION("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 setIntervalCount(Long intervalCount) { + this.intervalCount = intervalCount; + return this; + } - @SerializedName("on_session") - ON_SESSION("on_session"); + /** Name for subscription. */ + public Builder setName(String name) { + this.name = name; + return this; + } - @Getter(onMethod_ = {@Override}) - private final String value; + /** Describes the upcoming charge for this subscription. */ + public Builder setNextBilling( + PaymentIntentCreateParams.PaymentMethodOptions.Klarna.Subscription.NextBilling + nextBilling) { + this.nextBilling = nextBilling; + return this; + } - SetupFutureUsage(String value) { - this.value = 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(String 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; - /** Additional fields for Mandate creation. */ - @SerializedName("mandate_options") - MandateOptions mandateOptions; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class NextBilling { + /** Required. The amount of the next charge for the subscription. */ + @SerializedName("amount") + Long amount; - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment method. - * - *

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

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

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

If you've already set {@code setup_future_usage} 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; + /** + * Required. The date of the next charge for the subscription in + * YYYY-MM-DD format. + */ + @SerializedName("date") + String date; - /** - * 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; + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - private BacsDebit( - Map extraParams, - MandateOptions mandateOptions, - ApiRequestParams.EnumParam setupFutureUsage, - String targetDate) { - this.extraParams = extraParams; - this.mandateOptions = mandateOptions; - this.setupFutureUsage = setupFutureUsage; - this.targetDate = targetDate; - } + 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 Builder builder() { + return new Builder(); + } - public static class Builder { - private Map extraParams; + public static class Builder { + private Long amount; - private MandateOptions mandateOptions; + private String date; - private ApiRequestParams.EnumParam setupFutureUsage; + private Map extraParams; - private String targetDate; + /** 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); + } - /** 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); - } + /** Required. The amount of the next charge for the subscription. */ + 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.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; - } + /** + * 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 all map key/value pairs to `extraParams` map. A 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; - } + /** + * Add a key/value pair to `extraParams` map. A 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; + } - /** Additional fields for Mandate creation. */ - public Builder setMandateOptions( - PaymentIntentCreateParams.PaymentMethodOptions.BacsDebit.MandateOptions - mandateOptions) { - this.mandateOptions = mandateOptions; - return this; + /** + * Add all map key/value pairs to `extraParams` map. A 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; + } + } } - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment - * method. - * - *

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

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

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

If you've already set {@code setup_future_usage} 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; - } + public enum Interval implements ApiRequestParams.EnumParam { + @SerializedName("day") + DAY("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}. - */ - public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { - this.setupFutureUsage = setupFutureUsage; - return this; - } + @SerializedName("month") + MONTH("month"), - /** - * 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("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 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. @@ -17634,17 +29974,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() { @@ -17652,1570 +30024,1783 @@ 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 PaymentIntentCreateParams.PaymentMethodOptions.BacsDebit.MandateOptions build() { - return new PaymentIntentCreateParams.PaymentMethodOptions.BacsDebit.MandateOptions( - this.extraParams, this.referencePrefix); + 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 a key/value pair to `extraParams` map. A 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} + * 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. */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + @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>(); } - this.extraParams.put(key, value); + ((List< + PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail>) + this.busReservationDetails) + .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.PaymentMethodOptions.BacsDebit.MandateOptions#extraParams} + * 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. */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + @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>(); } - this.extraParams.putAll(map); + ((List< + PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail>) + this.busReservationDetails) + .addAll(elements); 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; + /** 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; } /** - * 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 `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. */ - public Builder setReferencePrefix(EmptyParam referencePrefix) { - this.referencePrefix = referencePrefix; + @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; } - } - } - - 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 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; + } - /** - * Add a key/value pair to `extraParams` map. A 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<>(); + /** Supplementary event reservation details. */ + public Builder setEventReservationDetails(EmptyParam eventReservationDetails) { + this.eventReservationDetails = eventReservationDetails; + 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.Bancontact#extraParams} - * for the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** Supplementary event reservation details. */ + public Builder setEventReservationDetails( + List< + PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.EventReservationDetail> + eventReservationDetails) { + this.eventReservationDetails = eventReservationDetails; + return this; } - 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; - } + /** + * Add a key/value pair to `extraParams` map. A 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; + } - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment - * method. - * - *

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

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

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

If you've already set {@code setup_future_usage} 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; - } + /** + * Add all map key/value pairs to `extraParams` map. A 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; + } - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment - * method. - * - *

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

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

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

If you've already set {@code setup_future_usage} 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 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; + } - public enum PreferredLanguage implements ApiRequestParams.EnumParam { - @SerializedName("de") - DE("de"), + /** + * 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; + } - @SerializedName("en") - EN("en"), + /** Supplementary ferry reservation details. */ + public Builder setFerryReservationDetails(EmptyParam ferryReservationDetails) { + this.ferryReservationDetails = ferryReservationDetails; + return this; + } - @SerializedName("fr") - FR("fr"), + /** Supplementary ferry reservation details. */ + public Builder setFerryReservationDetails( + List< + PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail> + ferryReservationDetails) { + this.ferryReservationDetails = ferryReservationDetails; + return this; + } - @SerializedName("nl") - NL("nl"); + /** + * 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; + } - @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 + * 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; + } - PreferredLanguage(String value) { - this.value = value; - } - } + /** Supplementary insurance details. */ + public Builder setInsurances(EmptyParam insurances) { + this.insurances = insurances; + return this; + } - public enum SetupFutureUsage implements ApiRequestParams.EnumParam { - @SerializedName("none") - NONE("none"), + /** Supplementary insurance details. */ + public Builder setInsurances( + List< + PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.Insurance> + insurances) { + this.insurances = insurances; + return this; + } - @SerializedName("off_session") - OFF_SESSION("off_session"); + /** + * 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; + } - @Getter(onMethod_ = {@Override}) - private final String value; + /** + * 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; + } - SetupFutureUsage(String value) { - this.value = value; - } - } - } + /** Supplementary marketplace seller details. */ + public Builder setMarketplaceSellers(EmptyParam marketplaceSellers) { + this.marketplaceSellers = marketplaceSellers; + return this; + } - @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; + /** Supplementary marketplace seller details. */ + public Builder setMarketplaceSellers( + List< + PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.MarketplaceSeller> + marketplaceSellers) { + this.marketplaceSellers = marketplaceSellers; + 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 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; + } - private Billie(ApiRequestParams.EnumParam captureMethod, Map extraParams) { - this.captureMethod = captureMethod; - this.extraParams = extraParams; - } + /** 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< + PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail> + roundTripReservationDetails) { + this.roundTripReservationDetails = roundTripReservationDetails; + return this; + } - public static class Builder { - private ApiRequestParams.EnumParam captureMethod; + /** + * 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. + */ + @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; + } - private Map extraParams; + /** + * 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. + */ + @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>(); + } + ((List< + PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail>) + this.trainReservationDetails) + .addAll(elements); + return this; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodOptions.Billie build() { - return new PaymentIntentCreateParams.PaymentMethodOptions.Billie( - this.captureMethod, this.extraParams); - } + /** Supplementary train reservation details. */ + public Builder setTrainReservationDetails(EmptyParam trainReservationDetails) { + this.trainReservationDetails = trainReservationDetails; + 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.Billie.CaptureMethod captureMethod) { - this.captureMethod = captureMethod; - return this; - } + /** Supplementary train reservation details. */ + public Builder setTrainReservationDetails( + List< + PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail> + trainReservationDetails) { + this.trainReservationDetails = trainReservationDetails; + 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 `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. + */ + @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>(); + } + ((List< + PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.Voucher>) + this.vouchers) + .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.Billie#extraParams} for - * the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - 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 + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData#vouchers} + * for the field documentation. + */ + @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; } - this.extraParams.put(key, value); - return this; - } - /** - * Add all map key/value pairs to `extraParams` map. A 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<>(); + /** 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; } - this.extraParams.putAll(map); - return this; } - } - public enum CaptureMethod implements ApiRequestParams.EnumParam { - @SerializedName("manual") - MANUAL("manual"); + @Getter + @EqualsAndHashCode(callSuper = false) + public static class BusReservationDetail { + /** Name of associated or partner company for the service. */ + @SerializedName("affiliate_name") + String affiliateName; - @Getter(onMethod_ = {@Override}) - private final String value; + /** Arrival details. */ + @SerializedName("arrival") + Arrival arrival; - CaptureMethod(String value) { - this.value = value; - } - } - } + /** Name of transportation company. */ + @SerializedName("carrier_name") + String carrierName; - @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; + /** 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; + /** Departure details. */ + @SerializedName("departure") + Departure departure; - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment method. - * - *

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

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

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

If you've already set {@code setup_future_usage} 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; + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level 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( - String code, - Map extraParams, - ApiRequestParams.EnumParam setupFutureUsage) { - this.code = code; - this.extraParams = extraParams; - this.setupFutureUsage = setupFutureUsage; - } + /** List of insurances for this reservation. */ + @SerializedName("insurances") + List< + PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .BusReservationDetail.Insurance> + insurances; - public static Builder builder() { - return new Builder(); - } + /** 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.insurances = insurances; + this.passengers = passengers; + this.price = price; + this.ticketClass = ticketClass; + } - public static class Builder { - private String code; + public static Builder builder() { + return new Builder(); + } - private Map extraParams; + public static class Builder { + private String affiliateName; - private ApiRequestParams.EnumParam setupFutureUsage; + private Arrival arrival; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodOptions.Blik build() { - return new PaymentIntentCreateParams.PaymentMethodOptions.Blik( - this.code, this.extraParams, this.setupFutureUsage); - } + private String carrierName; - /** - * 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 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.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; - } + private Departure departure; - /** - * Add all map key/value pairs to `extraParams` map. A 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; - } + private Map extraParams; + + private List< + PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .BusReservationDetail.Insurance> + insurances; + + private List< + PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .BusReservationDetail.Passenger> + passengers; - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment - * method. - * - *

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

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

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

If you've already set {@code setup_future_usage} 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; - } + private Long price; - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment - * method. - * - *

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

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

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

If you've already set {@code setup_future_usage} 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; - } - } + private TicketClass ticketClass; - public enum SetupFutureUsage implements ApiRequestParams.EnumParam { - @SerializedName("none") - NONE("none"); + /** Finalize and obtain parameter instance from this builder. */ + 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); + } - @Getter(onMethod_ = {@Override}) - private final String value; + /** Name of associated or partner company for the service. */ + public Builder setAffiliateName(String affiliateName) { + this.affiliateName = affiliateName; + return this; + } - SetupFutureUsage(String value) { - this.value = value; - } - } - } + /** Arrival details. */ + public Builder setArrival( + PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .BusReservationDetail.Arrival + arrival) { + this.arrival = arrival; + return this; + } - @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; + /** Name of transportation company. */ + public Builder setCarrierName(String carrierName) { + this.carrierName = carrierName; + 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; + /** Currency. */ + public Builder setCurrency(String currency) { + this.currency = currency; + 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; + /** Departure details. */ + public Builder setDeparture( + PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .BusReservationDetail.Departure + departure) { + this.departure = departure; + return this; + } - private Boleto( - Long expiresAfterDays, - Map extraParams, - ApiRequestParams.EnumParam setupFutureUsage) { - this.expiresAfterDays = expiresAfterDays; - 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.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; + } - 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.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 static class Builder { - private Long expiresAfterDays; + /** + * 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; + } - private Map 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 + * 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; + } - private ApiRequestParams.EnumParam setupFutureUsage; + /** + * 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; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodOptions.Boleto build() { - return new PaymentIntentCreateParams.PaymentMethodOptions.Boleto( - this.expiresAfterDays, this.extraParams, this.setupFutureUsage); - } + /** + * 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; + } - /** - * 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; - } + /** 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 PaymentIntentCreateParams.PaymentMethodOptions.Boleto#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( + PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .BusReservationDetail.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 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; - } + @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; - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment - * method. - * - *

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

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

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

If you've already set {@code setup_future_usage} 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; - } + 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. - * - *

If you've already set {@code setup_future_usage} 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 Builder builder() { + return new Builder(); + } - public enum SetupFutureUsage implements ApiRequestParams.EnumParam { - @SerializedName("none") - NONE("none"), + public static class Builder { + private Address address; - @SerializedName("off_session") - OFF_SESSION("off_session"), + private String arrivalLocation; - @SerializedName("on_session") - ON_SESSION("on_session"); + private Map extraParams; - @Getter(onMethod_ = {@Override}) - private final String value; + /** 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); + } - SetupFutureUsage(String value) { - this.value = value; - } - } - } + /** Address of the arrival location. */ + public Builder setAddress( + PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .BusReservationDetail.Arrival.Address + address) { + this.address = address; + 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; + /** Identifier name or reference for the arrival location. */ + public Builder setArrivalLocation(String arrivalLocation) { + this.arrivalLocation = arrivalLocation; + 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") - String cvcToken; + /** + * Add a key/value pair to `extraParams` map. A 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; + } - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-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.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; + } + } - /** - * Installment configuration for payments attempted on this PaymentIntent. - * - *

For more information, see the installments integration guide. - */ - @SerializedName("installments") - Installments installments; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Address { + /** The city or town. */ + @SerializedName("city") + String city; - /** Configuration options for setting up an eMandate for cards issued in India. */ - @SerializedName("mandate_options") - MandateOptions mandateOptions; + /** The country in ISO 3166-1 alpha-2 format. */ + @SerializedName("country") + String country; - /** - * 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; + /** + * Map of extra parameters for custom features not available in this client library. + * The content in this map is not serialized under this field's + * {@code @SerializedName} value. Instead, each key/value pair is serialized as if the + * key is a root-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; + } - /** - * 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; + public static Builder builder() { + return new Builder(); + } - /** - * Request ability to decrement the - * authorization for this PaymentIntent. - */ - @SerializedName("request_decremental_authorization") - RequestDecrementalAuthorization requestDecrementalAuthorization; + public static class Builder { + private String city; - /** - * Request ability to capture beyond the standard - * authorization validity window for this PaymentIntent. - */ - @SerializedName("request_extended_authorization") - RequestExtendedAuthorization requestExtendedAuthorization; + private String country; - /** - * Request ability to increment the - * authorization for this PaymentIntent. - */ - @SerializedName("request_incremental_authorization") - RequestIncrementalAuthorization requestIncrementalAuthorization; + private Map extraParams; - /** - * Request ability to make multiple - * captures for this PaymentIntent. - */ - @SerializedName("request_multicapture") - RequestMulticapture requestMulticapture; + private String postalCode; - /** - * Request ability to overcapture - * for this PaymentIntent. - */ - @SerializedName("request_overcapture") - RequestOvercapture requestOvercapture; + private String region; - /** Request partial authorization on this PaymentIntent. */ - @SerializedName("request_partial_authorization") - RequestPartialAuthorization requestPartialAuthorization; + private String streetAddress; - /** - * 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 String streetAddress2; - /** - * 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 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); + } - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment method. - * - *

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

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

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

If you've already set {@code setup_future_usage} 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; + /** 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; + } - /** - * 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; + /** + * Add a key/value pair to `extraParams` map. A 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; + } - /** - * 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; + /** + * Add all map key/value pairs to `extraParams` map. A 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; + } - /** - * 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 postal code formatted according to country. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } - /** - * 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; + /** The state, county, province, or region formatted according to country. */ + public Builder setRegion(String region) { + this.region = region; + return this; + } - 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; - } + /** 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 String cvcToken; + /** Timestamp of departure. */ + @SerializedName("departs_at") + Long departsAt; - private Map extraParams; + /** Identifier name or reference for the origin location. */ + @SerializedName("departure_location") + String departureLocation; - private Installments installments; + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-level 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 mandateOptions; + private Departure( + Address address, + Long departsAt, + String departureLocation, + Map extraParams) { + this.address = address; + this.departsAt = departsAt; + this.departureLocation = departureLocation; + this.extraParams = extraParams; + } - private Boolean moto; + public static Builder builder() { + return new Builder(); + } - private Network network; + public static class Builder { + private Address address; - private RequestDecrementalAuthorization requestDecrementalAuthorization; + private Long departsAt; - private RequestExtendedAuthorization requestExtendedAuthorization; + private String departureLocation; - private RequestIncrementalAuthorization requestIncrementalAuthorization; + private Map extraParams; - private RequestMulticapture requestMulticapture; + /** 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); + } - private RequestOvercapture requestOvercapture; + /** Address of the departure location. */ + public Builder setAddress( + PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .BusReservationDetail.Departure.Address + address) { + this.address = address; + return this; + } - private RequestPartialAuthorization requestPartialAuthorization; + /** Timestamp of departure. */ + public Builder setDepartsAt(Long departsAt) { + this.departsAt = departsAt; + return this; + } - private RequestThreeDSecure requestThreeDSecure; + /** Identifier name or reference for the origin location. */ + public Builder setDepartureLocation(String departureLocation) { + this.departureLocation = departureLocation; + return this; + } - private Boolean requireCvcRecollection; + /** + * Add a key/value pair to `extraParams` map. A 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 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 + * 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; + } + } - private Object statementDescriptorSuffixKana; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Address { + /** The city or town. */ + @SerializedName("city") + String city; - private Object statementDescriptorSuffixKanji; + /** The country in ISO 3166-1 alpha-2 format. */ + @SerializedName("country") + String country; - private Object statementDetails; + /** + * Map of extra parameters for custom features not available in this client library. + * The content in this map is not serialized under this field's + * {@code @SerializedName} value. Instead, each key/value pair is serialized as if the + * key is a root-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 ThreeDSecure threeDSecure; + public static Builder builder() { + return new Builder(); + } - /** 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 static class Builder { + private String 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( - PaymentIntentCreateParams.PaymentMethodOptions.Card.CaptureMethod captureMethod) { - this.captureMethod = captureMethod; - return this; - } + private String 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(EmptyParam captureMethod) { - this.captureMethod = captureMethod; - return this; - } + private 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; - } + 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.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; - } + private String region; + + private String streetAddress; + + private String streetAddress2; + + /** 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); + } + + /** 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.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 + * 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; + } + + /** 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; + } - /** - * Add all map key/value pairs to `extraParams` map. A 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<>(); + /** 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; - } - /** - * 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; - } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Insurance { + /** Insurance currency. */ + @SerializedName("currency") + String currency; - /** 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; - } + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-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; - } + /** 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; + } - /** - * 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; - } + public static Builder builder() { + return new Builder(); + } - /** - * Request ability to decrement the - * authorization for this PaymentIntent. - */ - public Builder setRequestDecrementalAuthorization( - PaymentIntentCreateParams.PaymentMethodOptions.Card.RequestDecrementalAuthorization - requestDecrementalAuthorization) { - this.requestDecrementalAuthorization = requestDecrementalAuthorization; - return this; - } + public static class Builder { + private String currency; - /** - * 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; - } + private Map extraParams; - /** - * Request ability to increment the - * authorization for this PaymentIntent. - */ - public Builder setRequestIncrementalAuthorization( - PaymentIntentCreateParams.PaymentMethodOptions.Card.RequestIncrementalAuthorization - requestIncrementalAuthorization) { - this.requestIncrementalAuthorization = requestIncrementalAuthorization; - return this; - } + private String insuranceCompanyName; - /** - * Request ability to make multiple - * captures for this PaymentIntent. - */ - public Builder setRequestMulticapture( - PaymentIntentCreateParams.PaymentMethodOptions.Card.RequestMulticapture - requestMulticapture) { - this.requestMulticapture = requestMulticapture; - return this; - } + private InsuranceType insuranceType; - /** - * Request ability to overcapture - * for this PaymentIntent. - */ - public Builder setRequestOvercapture( - PaymentIntentCreateParams.PaymentMethodOptions.Card.RequestOvercapture - requestOvercapture) { - this.requestOvercapture = requestOvercapture; - return this; - } + private Long price; - /** Request partial authorization on this PaymentIntent. */ - public Builder setRequestPartialAuthorization( - PaymentIntentCreateParams.PaymentMethodOptions.Card.RequestPartialAuthorization - requestPartialAuthorization) { - this.requestPartialAuthorization = requestPartialAuthorization; - return this; - } + /** 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); + } - /** - * 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; - } + /** Insurance currency. */ + public Builder setCurrency(String currency) { + this.currency = currency; + 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; - } + /** + * Add a key/value pair to `extraParams` map. A 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; + } - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment - * method. - * - *

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

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

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

If you've already set {@code setup_future_usage} 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; - } + /** + * Add all map key/value pairs to `extraParams` map. A 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; + } - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment - * method. - * - *

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

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

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

If you've already set {@code setup_future_usage} 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 the company providing the insurance. */ + public Builder setInsuranceCompanyName(String insuranceCompanyName) { + this.insuranceCompanyName = insuranceCompanyName; + 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; - } + /** Type of insurance. */ + public Builder setInsuranceType( + PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .BusReservationDetail.Insurance.InsuranceType + insuranceType) { + this.insuranceType = insuranceType; + 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; - } + /** Price of insurance in cents. */ + public Builder setPrice(Long price) { + this.price = price; + 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; - } + public enum InsuranceType implements ApiRequestParams.EnumParam { + @SerializedName("baggage") + BAGGAGE("baggage"), - /** - * 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; - } + @SerializedName("bankruptcy") + BANKRUPTCY("bankruptcy"), - /** - * 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; - } + @SerializedName("cancelation") + CANCELATION("cancelation"), - /** - * 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; - } + @SerializedName("emergency") + EMERGENCY("emergency"), - /** - * 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("medical") + MEDICAL("medical"); - @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; + @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; + InsuranceType(String value) { + this.value = value; + } + } + } - /** - * The selected installment plan to use for this payment attempt. This parameter can only be - * provided during confirmation. - */ - @SerializedName("plan") - Object plan; + @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 Installments(Boolean enabled, Map extraParams, Object plan) { - this.enabled = enabled; - this.extraParams = extraParams; - this.plan = plan; - } + /** The family name of the person. */ + @SerializedName("family_name") + String familyName; - public static Builder builder() { - return new Builder(); - } + /** The given name of the person. */ + @SerializedName("given_name") + String givenName; - public static class Builder { - private Boolean enabled; + private Passenger( + Map extraParams, String familyName, String givenName) { + this.extraParams = extraParams; + this.familyName = familyName; + this.givenName = givenName; + } - private Map extraParams; + public static Builder builder() { + return new Builder(); + } - private Object plan; + public static class Builder { + private Map extraParams; - /** 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); - } + private String familyName; - /** - * 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; - } + private String 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.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; - } + /** 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); + } - /** - * Add all map key/value pairs to `extraParams` map. A 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<>(); + /** + * Add a key/value pair to `extraParams` map. A 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; + } + + /** + * Add all map key/value pairs to `extraParams` map. A 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; + } + + /** 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; } - /** - * 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; - } + 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") + 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; - - /** - * 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}. + * parent instance. */ - @SerializedName("type") - Type type; + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - private Plan(Long count, Map extraParams, Interval interval, Type type) { - this.count = count; + /** 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, + 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.interval = interval; - this.type = type; + this.insurances = insurances; + this.startsAt = startsAt; + this.venueName = venueName; } public static Builder builder() { @@ -19223,26 +31808,95 @@ public static Builder builder() { } public static class Builder { - private Long count; + 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 Interval interval; + private List< + PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .EventReservationDetail.Insurance> + insurances; - private Type type; + private Long startsAt; + + private String venueName; /** 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 + .EventReservationDetail + build() { + return new PaymentIntentCreateParams.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( + 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; } @@ -19250,7 +31904,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.EventReservationDetail#extraParams} * for the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -19265,7 +31919,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.Installments.Plan#extraParams} + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.EventReservationDetail#extraParams} * for the field documentation. */ public Builder putAllExtraParam(Map map) { @@ -19277,491 +31931,416 @@ 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 + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.EventReservationDetail#insurances} + * for the field documentation. */ - public Builder setInterval( - PaymentIntentCreateParams.PaymentMethodOptions.Card.Installments.Plan.Interval - interval) { - this.interval = interval; + public Builder addInsurance( + PaymentIntentCreateParams.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 + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.EventReservationDetail#insurances} + * for the field documentation. */ - public Builder setType( - PaymentIntentCreateParams.PaymentMethodOptions.Card.Installments.Plan.Type type) { - this.type = type; + 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; } - } - - 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; - Type(String value) { - this.value = value; + /** 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 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; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Address { + /** The city or town. */ + @SerializedName("city") + String city; - private Long endDate; + /** The country in ISO 3166-1 alpha-2 format. */ + @SerializedName("country") + String country; - 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 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 Long intervalCount; + public static Builder builder() { + return new Builder(); + } - private String reference; + public static class Builder { + private String city; - private Long startDate; + private String country; - private List< - PaymentIntentCreateParams.PaymentMethodOptions.Card.MandateOptions.SupportedType> - supportedTypes; + private Map extraParams; - /** 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); - } + private String postalCode; - /** Required. Amount to be charged for future payments. */ - public Builder setAmount(Long amount) { - this.amount = amount; - return this; - } + private String region; - /** - * 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; - } + private String streetAddress; - /** - * 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; - } + private String 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; - } + /** 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); + } - /** - * Add a key/value pair to `extraParams` map. A 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; - } + /** The city or town. */ + 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 - * 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; - } + /** The country in ISO 3166-1 alpha-2 format. */ + public Builder setCountry(String country) { + this.country = country; + 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; - } + /** + * Add a key/value pair to `extraParams` map. A 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; + } - /** - * 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; - } + /** + * Add all map key/value pairs to `extraParams` map. A 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; + } - /** Required. Unique identifier for the mandate or subscription. */ - public Builder setReference(String reference) { - this.reference = reference; - return this; - } + /** The postal code formatted according to country. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + 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; - } + /** The state, county, province, or region formatted according to country. */ + public Builder setRegion(String region) { + this.region = region; + 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<>(); + /** 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.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<>(); + @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 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); + } - @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 + * 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; + } - @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.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"); + /** Type of insurance. */ + public Builder setInsuranceType( + PaymentIntentCreateParams.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"), - @Getter(onMethod_ = {@Override}) - private final String value; + @SerializedName("cancelation") + CANCELATION("cancelation"), - SupportedType(String value) { - this.value = value; - } - } - } + @SerializedName("emergency") + EMERGENCY("emergency"), - @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("medical") + MEDICAL("medical"); - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-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; - /** Phone number (e.g., a toll-free number that customers can call). */ - @SerializedName("phone") - String phone; + InsuranceType(String value) { + this.value = value; + } + } + } - private StatementDetails(Address address, Map extraParams, String phone) { - this.address = address; - this.extraParams = extraParams; - this.phone = phone; - } + public enum EventType implements ApiRequestParams.EnumParam { + @SerializedName("concert") + CONCERT("concert"), - public static Builder builder() { - return new Builder(); - } + @SerializedName("conference") + CONFERENCE("conference"), - public static class Builder { - private Address address; + @SerializedName("digital_education") + DIGITAL_EDUCATION("digital_education"), - private Map extraParams; + @SerializedName("expo") + EXPO("expo"), - private String phone; + @SerializedName("festival") + FESTIVAL("festival"), - /** 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); - } + @SerializedName("in_person_education") + IN_PERSON_EDUCATION("in_person_education"), - /** 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; - } + @SerializedName("sport") + SPORT("sport"), - /** - * Add a key/value pair to `extraParams` map. A 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; - } + @SerializedName("tour") + TOUR("tour"); - /** - * Add all map key/value pairs to `extraParams` map. A 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; - } + @Getter(onMethod_ = {@Override}) + private final String value; - /** Phone number (e.g., a toll-free number that customers can call). */ - public Builder setPhone(String 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") - String city; + public static class FerryReservationDetail { + /** Name of associated or partner company for the service. */ + @SerializedName("affiliate_name") + String affiliateName; - /** - * Two-letter country code (ISO - * 3166-1 alpha-2). - */ - @SerializedName("country") - String country; + /** 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 @@ -19773,37 +32352,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") - 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; + /** List of insurances for this reservation. */ + @SerializedName("insurances") + List< + PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .FerryReservationDetail.Insurance> + insurances; - private Address( - String city, - String country, + /** 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, - String line1, - String line2, - String postalCode, - String state) { - this.city = city; - this.country = country; + 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.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() { @@ -19811,46 +32408,83 @@ public static Builder builder() { } public static class Builder { - private String city; + private String affiliateName; - private String country; + private Arrival arrival; + + private String carrierName; + + private String currency; + + private Departure departure; private Map extraParams; - private String line1; + private List< + PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .FerryReservationDetail.Insurance> + insurances; - private String line2; + private List< + PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .FerryReservationDetail.Passenger> + passengers; - private String postalCode; + private Long price; - private String state; + private TicketClass ticketClass; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodOptions.Card.StatementDetails.Address + public PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .FerryReservationDetail build() { - return new PaymentIntentCreateParams.PaymentMethodOptions.Card.StatementDetails - .Address( - this.city, - this.country, + return new PaymentIntentCreateParams.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; } - /** - * Two-letter country code (ISO 3166-1 alpha-2). - */ - public Builder setCountry(String country) { - this.country = country; + /** 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; } @@ -19858,7 +32492,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.FerryReservationDetail#extraParams} * for the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -19873,7 +32507,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.FerryReservationDetail#extraParams} * for the field documentation. */ public Builder putAllExtraParam(Map map) { @@ -19884,364 +32518,359 @@ 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; + /** + * 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; } - } - } - } - - @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; + /** + * 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; + } - /** - * 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; + /** + * 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; + } - /** - * Required. For 3D Secure 1, the XID. For 3D Secure 2, the Directory - * Server Transaction ID (dsTransID). - */ - @SerializedName("transaction_id") - String transactionId; + /** + * 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; + } - /** Required. The version of 3D Secure that was performed. */ - @SerializedName("version") - Version version; + /** Price in cents. */ + public Builder setPrice(Long price) { + this.price = price; + 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; - } + /** Ticket class. */ + public Builder setTicketClass( + PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .FerryReservationDetail.TicketClass + ticketClass) { + this.ticketClass = ticketClass; + return this; + } + } - public static Builder builder() { - return new Builder(); - } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Arrival { + /** Address of the arrival location. */ + @SerializedName("address") + Address address; - public static class Builder { - private AresTransStatus aresTransStatus; + /** Identifier name or reference for the arrival location. */ + @SerializedName("arrival_location") + String arrivalLocation; - private String cryptogram; + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - private ElectronicCommerceIndicator electronicCommerceIndicator; + private Arrival( + Address address, String arrivalLocation, Map extraParams) { + this.address = address; + this.arrivalLocation = arrivalLocation; + this.extraParams = extraParams; + } - private ExemptionIndicator exemptionIndicator; + public static Builder builder() { + return new Builder(); + } - private Map extraParams; + public static class Builder { + private Address address; - private NetworkOptions networkOptions; + private String arrivalLocation; - private String requestorChallengeIndicator; + private Map extraParams; - private String transactionId; + /** 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); + } - private Version version; + /** Address of the arrival location. */ + public Builder setAddress( + PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .FerryReservationDetail.Arrival.Address + address) { + this.address = address; + return this; + } - /** 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); - } + /** Identifier name or reference for the arrival location. */ + public Builder setArrivalLocation(String arrivalLocation) { + this.arrivalLocation = arrivalLocation; + 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.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 + * 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; + } + } - /** - * 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; - } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Address { + /** The city or town. */ + @SerializedName("city") + String city; - /** 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; - } + /** 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 - * 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; - } + /** + * Map of extra parameters for custom features not available in this client library. + * The content in this map is not serialized under this field's + * {@code @SerializedName} value. Instead, each key/value pair is serialized as if the + * key is a root-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 all map key/value pairs to `extraParams` map. A 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; - } + public static Builder builder() { + return new Builder(); + } - /** - * 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 static class Builder { + private String city; - /** - * 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 String country; - /** - * 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 Map extraParams; - /** Required. The version of 3D Secure that was performed. */ - public Builder setVersion( - PaymentIntentCreateParams.PaymentMethodOptions.Card.ThreeDSecure.Version version) { - this.version = version; - return this; - } - } + private String postalCode; - @Getter - @EqualsAndHashCode(callSuper = false) - public static class NetworkOptions { - /** Cartes Bancaires-specific 3DS fields. */ - @SerializedName("cartes_bancaires") - CartesBancaires cartesBancaires; + private String region; - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level 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; + + private String streetAddress2; - private NetworkOptions(CartesBancaires cartesBancaires, Map extraParams) { - this.cartesBancaires = cartesBancaires; - this.extraParams = extraParams; - } + /** 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); + } - 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 CartesBancaires cartesBancaires; + /** The country in ISO 3166-1 alpha-2 format. */ + public Builder setCountry(String 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 + * 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; + } - /** 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); - } + /** + * Add all map key/value pairs to `extraParams` map. A 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; + } - /** Cartes Bancaires-specific 3DS fields. */ - public Builder setCartesBancaires( - PaymentIntentCreateParams.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 - * 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; - } + /** 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 - * PaymentIntentCreateParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions#extraParams} - * for the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** 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 +32882,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 +32898,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 +32940,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 +32955,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,1238 +32967,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"), + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Address { + /** The city or town. */ + @SerializedName("city") + String city; - @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 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"), + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Insurance { + /** Insurance currency. */ + @SerializedName("currency") + String 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") + String 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 { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level 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( - Map extraParams, - Boolean requestExtendedAuthorization, - Boolean requestIncrementalAuthorizationSupport, - Routing routing) { - 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 Map extraParams; + private Long price; - private Boolean requestExtendedAuthorization; + /** 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 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 + * 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; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodOptions.CardPresent build() { - return new PaymentIntentCreateParams.PaymentMethodOptions.CardPresent( - 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 + * 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; + } - /** - * Add a key/value pair to `extraParams` map. A 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<>(); + /** Name of the company providing the insurance. */ + public Builder setInsuranceCompanyName(String insuranceCompanyName) { + this.insuranceCompanyName = insuranceCompanyName; + return this; + } + + /** Type of insurance. */ + public Builder setInsuranceType( + PaymentIntentCreateParams.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 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"), + 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; - @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 String marketplaceSellerName; - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level 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 marketplaceSellerReference; - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment method. - * - *

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

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

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

If you've already set {@code setup_future_usage} 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 numberOfTransactions; - private Cashapp( - ApiRequestParams.EnumParam captureMethod, - Map extraParams, - ApiRequestParams.EnumParam setupFutureUsage) { - this.captureMethod = captureMethod; - this.extraParams = extraParams; - this.setupFutureUsage = setupFutureUsage; - } + private ProductCategory productCategory; - public static Builder builder() { - return new Builder(); - } + private Long sellerLastLoginAt; - public static class Builder { - private ApiRequestParams.EnumParam captureMethod; + private SellerRating sellerRating; - private Map extraParams; + private Long sellerRegisteredAt; - private ApiRequestParams.EnumParam setupFutureUsage; + private Long sellerUpdatedAt; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodOptions.Cashapp build() { - return new PaymentIntentCreateParams.PaymentMethodOptions.Cashapp( - this.captureMethod, this.extraParams, this.setupFutureUsage); - } + private List shippingReferences; - /** - * 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; - } + private Long volumeOfTransactions; - /** - * 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 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); + } - /** - * Add a key/value pair to `extraParams` map. A 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 a key/value pair to `extraParams` map. A 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; + } - /** - * Add all map key/value pairs to `extraParams` map. A 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; - } + /** + * Add all map key/value pairs to `extraParams` map. A 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; + } - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment - * method. - * - *

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

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

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

If you've already set {@code setup_future_usage} 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; - } + /** + * 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; + } - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment - * method. - * - *

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

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

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

If you've already set {@code setup_future_usage} 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 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; + } - public enum CaptureMethod implements ApiRequestParams.EnumParam { - @SerializedName("manual") - MANUAL("manual"); + /** The address of the selling or delivering merchant. */ + public Builder setMarketplaceSellerAddress( + PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .MarketplaceSeller.MarketplaceSellerAddress + marketplaceSellerAddress) { + this.marketplaceSellerAddress = marketplaceSellerAddress; + return this; + } - @Getter(onMethod_ = {@Override}) - private final String value; + /** The name of the marketplace seller. */ + public Builder setMarketplaceSellerName(String marketplaceSellerName) { + this.marketplaceSellerName = marketplaceSellerName; + return this; + } - CaptureMethod(String value) { - this.value = value; - } - } + /** 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( + PaymentIntentCreateParams.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( + PaymentIntentCreateParams.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 + * 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; + } - @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 + * 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; + } - 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 PaymentIntentCreateParams.PaymentMethodOptions.Crypto build() { - return new PaymentIntentCreateParams.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 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 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.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( - PaymentIntentCreateParams.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 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); + } - @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 + * 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; + } - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment method. - * - *

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

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

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

If you've already set {@code setup_future_usage} 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.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 @@ -21592,9 +34185,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() { @@ -21602,25 +34241,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; } @@ -21628,7 +34325,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) { @@ -21643,7 +34340,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) { @@ -21653,1969 +34350,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; + } + + /** 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; + } - public enum SetupFutureUsage implements ApiRequestParams.EnumParam { - @SerializedName("none") - NONE("none"); + /** Line 1 of the street address. */ + public Builder setStreetAddress(String 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; - } - } - } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Departure { + /** Address of the departure location. */ + @SerializedName("address") + Address address; - @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; + /** Timestamp of departure. */ + @SerializedName("departs_at") + 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}. - */ - @SerializedName("setup_future_usage") - SetupFutureUsage setupFutureUsage; + /** Identifier name or reference for the origin location. */ + @SerializedName("departure_location") + String departureLocation; - private Eps(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(); - } + private Departure( + Address address, + Long departsAt, + String departureLocation, + Map extraParams) { + this.address = address; + this.departsAt = departsAt; + this.departureLocation = departureLocation; + this.extraParams = extraParams; + } - public static class Builder { - private Map extraParams; + public static Builder builder() { + return new Builder(); + } - private SetupFutureUsage setupFutureUsage; + public static class Builder { + private Address address; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodOptions.Eps build() { - return new PaymentIntentCreateParams.PaymentMethodOptions.Eps( - this.extraParams, this.setupFutureUsage); - } + 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.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; - } + 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.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 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.Eps.SetupFutureUsage setupFutureUsage) { - this.setupFutureUsage = setupFutureUsage; - return this; - } - } + /** 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); + } - public enum SetupFutureUsage implements ApiRequestParams.EnumParam { - @SerializedName("none") - NONE("none"); + /** Address of the departure location. */ + public Builder setAddress( + PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .RoundTripReservationDetail.Departure.Address + address) { + this.address = address; + return this; + } - @Getter(onMethod_ = {@Override}) - private final String value; + /** Timestamp of departure. */ + public Builder setDepartsAt(Long departsAt) { + this.departsAt = departsAt; + return this; + } - SetupFutureUsage(String value) { - this.value = value; - } - } - } + /** Identifier name or reference for the origin location. */ + public Builder setDepartureLocation(String departureLocation) { + this.departureLocation = departureLocation; + 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; + /** + * Add a key/value pair to `extraParams` map. A 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; + } - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment method. - * - *

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

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

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

If you've already set {@code setup_future_usage} 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.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 Fpx(Map extraParams, SetupFutureUsage setupFutureUsage) { - this.extraParams = extraParams; - this.setupFutureUsage = setupFutureUsage; - } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Address { + /** The city or town. */ + @SerializedName("city") + String city; - public static Builder builder() { - return new Builder(); - } + /** The country in ISO 3166-1 alpha-2 format. */ + @SerializedName("country") + String country; - 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; + + /** 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 SetupFutureUsage setupFutureUsage; + public static Builder builder() { + return new Builder(); + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodOptions.Fpx build() { - return new PaymentIntentCreateParams.PaymentMethodOptions.Fpx( - 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.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 String country; + + 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.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; - } + 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( - PaymentIntentCreateParams.PaymentMethodOptions.Fpx.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 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); + } - @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; + /** 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}. - */ - @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 Giropay(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.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 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.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 class Builder { - private Map extraParams; + /** The postal code formatted according to country. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } - private SetupFutureUsage setupFutureUsage; + /** The state, county, province, or region formatted according to country. */ + public Builder setRegion(String region) { + this.region = region; + return this; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodOptions.Giropay build() { - return new PaymentIntentCreateParams.PaymentMethodOptions.Giropay( - this.extraParams, this.setupFutureUsage); - } + /** Line 1 of the street address. */ + public Builder setStreetAddress(String streetAddress) { + this.streetAddress = streetAddress; + return this; + } - /** - * Add a key/value pair to `extraParams` map. A 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<>(); + /** 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.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 Insurance { + /** Insurance currency. */ + @SerializedName("currency") + 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}. - */ - public Builder setSetupFutureUsage( - PaymentIntentCreateParams.PaymentMethodOptions.Giropay.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; - public enum SetupFutureUsage implements ApiRequestParams.EnumParam { - @SerializedName("none") - NONE("none"); + /** 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; + } - @Getter(onMethod_ = {@Override}) - private final String value; + public static Builder builder() { + return new Builder(); + } - SetupFutureUsage(String value) { - this.value = value; - } - } - } + public static class Builder { + private String currency; - @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 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 String insuranceCompanyName; - private Gopay(Map extraParams, SetupFutureUsage setupFutureUsage) { - this.extraParams = extraParams; - this.setupFutureUsage = setupFutureUsage; - } + 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; + + /** 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 PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .TrainReservationDetail.Arrival + build() { + return new PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail.Arrival( + this.address, this.arrivalLocation, this.extraParams); + } - private ApiRequestParams.EnumParam setupFutureUsage; + /** Address of the arrival location. */ + public Builder setAddress( + PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .TrainReservationDetail.Arrival.Address + address) { + this.address = address; + return this; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodOptions.KakaoPay build() { - return new PaymentIntentCreateParams.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( - PaymentIntentCreateParams.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 + * 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; + } - /** - * 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 + * 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; + } + } - /** - * Add a key/value pair to `extraParams` map. A 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; - } + @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 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; - } + /** 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( - PaymentIntentCreateParams.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 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); + } - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-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; + } - /** 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<>(); + /** 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.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") + 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; - } - /** - * 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 String currency; - /** Interval at which the customer is making purchases. */ - public Builder setPurchaseInterval( - PaymentIntentCreateParams.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 String 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 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); + } - @SerializedName("year") - YEAR("year"); + /** 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.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; + } - PurchaseInterval(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.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; + } - @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; + /** Name of the company providing the insurance. */ + public Builder setInsuranceCompanyName(String insuranceCompanyName) { + this.insuranceCompanyName = insuranceCompanyName; + return this; + } + + /** Type of insurance. */ + public Builder setInsuranceType( + PaymentIntentCreateParams.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"), - /** Required. Unit of time between subscription charges. */ - @SerializedName("interval") - Interval interval; + @SerializedName("bankruptcy") + BANKRUPTCY("bankruptcy"), - /** - * 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; + @SerializedName("cancelation") + CANCELATION("cancelation"), - /** Name for subscription. */ - @SerializedName("name") - String name; + @SerializedName("emergency") + EMERGENCY("emergency"), - /** Describes the upcoming charge for this subscription. */ - @SerializedName("next_billing") - NextBilling nextBilling; + @SerializedName("medical") + MEDICAL("medical"); - /** - * 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; + @Getter(onMethod_ = {@Override}) + private final String value; - 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; - } + InsuranceType(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; + /** The family name of the person. */ + @SerializedName("family_name") + String familyName; - private Interval interval; + /** The given name of the person. */ + @SerializedName("given_name") + String givenName; - private Long intervalCount; + private Passenger( + Map extraParams, String familyName, String givenName) { + this.extraParams = extraParams; + this.familyName = familyName; + this.givenName = givenName; + } - private String name; + public static Builder builder() { + return new Builder(); + } - private NextBilling nextBilling; + public static class Builder { + private Map extraParams; - private String reference; + private String familyName; - /** 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 String 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<>(); - } - this.extraParams.put(key, value); - return this; - } + /** 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 all map key/value pairs to `extraParams` map. A 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<>(); + /** + * Add a key/value pair to `extraParams` map. A 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 @@ -23627,10 +36317,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() { @@ -23638,31 +36355,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; } @@ -23670,7 +36400,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) { @@ -23685,7 +36415,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) { @@ -23695,27 +36425,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; + } } } } @@ -27139,6 +39899,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 +39921,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 +39933,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 +40000,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 +40048,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 +40066,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..739a22aae52 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,1064 @@ 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; - } + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("extra_mileage") + EXTRA_MILEAGE("extra_mileage"), - /** The fare class for the segment. */ - public Builder setServiceClass( - PaymentIntentUpdateParams.PaymentDetails.Flight.Segment.ServiceClass serviceClass) { - this.serviceClass = serviceClass; - return this; - } - } + @SerializedName("gas") + GAS("gas"), - public enum ServiceClass implements ApiRequestParams.EnumParam { - @SerializedName("business") - BUSINESS("business"), + @SerializedName("gps") + GPS("gps"), - @SerializedName("economy") - ECONOMY("economy"), + @SerializedName("late_charge") + LATE_CHARGE("late_charge"), - @SerializedName("first") - FIRST("first"), + @SerializedName("one_way_drop_off") + ONE_WAY_DROP_OFF("one_way_drop_off"), - @SerializedName("premium_economy") - PREMIUM_ECONOMY("premium_economy"); + @SerializedName("other") + OTHER("other"), - @Getter(onMethod_ = {@Override}) - private final String value; + @SerializedName("parking") + PARKING("parking"), - ServiceClass(String value) { - this.value = value; - } - } - } - } + @SerializedName("phone") + PHONE("phone"), - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Lodging { - /** The lodging location's address. */ - @SerializedName("address") - Address address; + @SerializedName("regular_mileage") + REGULAR_MILEAGE("regular_mileage"), - /** The number of adults on the booking. */ - @SerializedName("adults") - Long adults; + @SerializedName("towing") + TOWING("towing"); - /** Affiliate details for this purchase. */ - @SerializedName("affiliate") - Affiliate affiliate; + @Getter(onMethod_ = {@Override}) + private final String value; - /** The booking number associated with the lodging reservation. */ - @SerializedName("booking_number") - Object bookingNumber; + Type(String value) { + this.value = value; + } + } + } - /** The lodging category. */ - @SerializedName("category") - Category category; + @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-in time. Measured in seconds since the Unix epoch. - */ - @SerializedName("checkin_at") - Long checkinAt; + /** Indicates if the transaction is tax exempt. */ + @SerializedName("tax_exempt_indicator") + Boolean taxExemptIndicator; - /** - * Required. Lodging check-out time. Measured in seconds since the Unix - * epoch. - */ - @SerializedName("checkout_at") - Long checkoutAt; + /** Array of tax details. */ + @SerializedName("taxes") + List taxes; - /** The customer service phone number of the lodging company. */ - @SerializedName("customer_service_phone_number") - Object customerServicePhoneNumber; + private Tax( + Map extraParams, + Boolean taxExemptIndicator, + List + taxes) { + this.extraParams = extraParams; + this.taxExemptIndicator = taxExemptIndicator; + this.taxes = taxes; + } - /** The daily lodging room rate. */ - @SerializedName("daily_room_rate_amount") - Long dailyRoomRateAmount; + public static Builder builder() { + return new Builder(); + } - /** Delivery details for this purchase. */ - @SerializedName("delivery") - Delivery delivery; + public static class Builder { + private Map extraParams; - /** List of additional charges being billed. */ - @SerializedName("extra_charges") - List extraCharges; + private 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; + private List + taxes; - /** Indicates whether the lodging location is compliant with the Fire Safety Act. */ - @SerializedName("fire_safety_act_compliance") - Boolean fireSafetyActCompliance; + /** 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); + } - /** The name of the lodging location. */ - @SerializedName("name") - 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.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; + } - /** - * Indicates if the customer did not keep their booking while failing to cancel the - * reservation. - */ - @SerializedName("no_show") - Boolean noShow; + /** + * Add all map key/value pairs to `extraParams` map. A 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 number of rooms on the booking. */ - @SerializedName("number_of_rooms") - Long numberOfRooms; + /** Indicates if the transaction is tax exempt. */ + public Builder setTaxExemptIndicator(Boolean taxExemptIndicator) { + this.taxExemptIndicator = taxExemptIndicator; + return this; + } - /** The details of the passengers in the travel reservation. */ - @SerializedName("passengers") - List passengers; + /** + * 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.InnerTax element) { + if (this.taxes == null) { + this.taxes = new ArrayList<>(); + } + this.taxes.add(element); + return this; + } - /** The phone number of the lodging location. */ - @SerializedName("property_phone_number") - Object propertyPhoneNumber; + /** + * 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 room class for this purchase. */ - @SerializedName("room_class") - Object roomClass; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class InnerTax { + /** Tax amount. */ + @SerializedName("amount") + Long amount; - /** 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; + /** Tax rate applied. */ + @SerializedName("rate") + Long rate; - /** The total tax amount. */ - @SerializedName("total_tax_amount") - Long totalTaxAmount; + /** Type of tax applied. */ + @SerializedName("type") + Object type; - 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; - } + private InnerTax(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 Builder builder() { + return new Builder(); + } - public static class Builder { - private Address address; + public static class Builder { + private Long amount; - private Long adults; + private Map extraParams; - private Affiliate affiliate; + private Long rate; - private Object bookingNumber; + private Object type; - private Category category; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentDetails.CarRentalData.Total.Tax.InnerTax + build() { + return new PaymentIntentUpdateParams.PaymentDetails.CarRentalData.Total.Tax + .InnerTax(this.amount, this.extraParams, this.rate, this.type); + } - private Long checkinAt; - - 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.InnerTax#extraParams} + * for the 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.InnerTax#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 +7676,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 +7788,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 +7800,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 +7944,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 +7965,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 +7994,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,508 +8005,6823 @@ 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; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Flight { + /** Affiliate details for this purchase. */ + @SerializedName("affiliate") + Affiliate affiliate; - /** - * If this is an {@code AfterpayClearpay} PaymentMethod, this hash contains details about the - * AfterpayClearpay payment method. - */ - @SerializedName("afterpay_clearpay") - AfterpayClearpay afterpayClearpay; + /** + * 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; - /** - * If this is an {@code Alipay} PaymentMethod, this hash contains details about the Alipay - * payment method. - */ - @SerializedName("alipay") - Alipay alipay; + /** + * The International Air Transport Association (IATA) carrier code of the carrier that issued + * the ticket. + */ + @SerializedName("carrier") + Object carrier; - /** - * 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; + /** Delivery details for this purchase. */ + @SerializedName("delivery") + Delivery delivery; - /** - * If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. - */ - @SerializedName("alma") - Alma 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; - /** - * If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment - * method. - */ - @SerializedName("amazon_pay") - AmazonPay amazonPay; + /** The name of the person or entity on the reservation. */ + @SerializedName("passenger_name") + Object passengerName; - /** - * If this is an {@code au_becs_debit} PaymentMethod, this hash contains details about the bank - * account. - */ - @SerializedName("au_becs_debit") - AuBecsDebit auBecsDebit; + /** The details of the passengers in the travel reservation. */ + @SerializedName("passengers") + List passengers; - /** - * If this is a {@code bacs_debit} PaymentMethod, this hash contains details about the Bacs - * Direct Debit bank account. - */ - @SerializedName("bacs_debit") - BacsDebit bacsDebit; + /** Required. The individual flight segments associated with the trip. */ + @SerializedName("segments") + List segments; - /** - * If this is a {@code bancontact} PaymentMethod, this hash contains details about the - * Bancontact payment method. - */ - @SerializedName("bancontact") - Bancontact bancontact; + /** The ticket number associated with the travel reservation. */ + @SerializedName("ticket_number") + Object ticketNumber; - /** - * If this is a {@code billie} PaymentMethod, this hash contains details about the Billie - * payment method. - */ - @SerializedName("billie") - Billie billie; + 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; + } - /** - * Billing information associated with the PaymentMethod that may be used or required by - * particular types of payment methods. - */ - @SerializedName("billing_details") - BillingDetails billingDetails; + public static Builder builder() { + return new Builder(); + } - /** - * If this is a {@code blik} PaymentMethod, this hash contains details about the BLIK payment - * method. - */ - @SerializedName("blik") - Blik blik; + public static class Builder { + private Affiliate affiliate; - /** - * If this is a {@code boleto} PaymentMethod, this hash contains details about the Boleto - * payment method. - */ - @SerializedName("boleto") - Boleto boleto; + private Object agencyNumber; - /** - * If this is a {@code cashapp} PaymentMethod, this hash contains details about the Cash App Pay - * payment method. - */ - @SerializedName("cashapp") - Cashapp cashapp; + private Object carrier; - /** - * If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment - * method. - */ - @SerializedName("crypto") - Crypto crypto; + private Delivery delivery; - /** - * If this is a {@code customer_balance} PaymentMethod, this hash contains details about the - * CustomerBalance payment method. - */ - @SerializedName("customer_balance") - CustomerBalance customerBalance; + private Map extraParams; - /** - * If this is an {@code eps} PaymentMethod, this hash contains details about the EPS payment - * method. - */ - @SerializedName("eps") - Eps eps; + private Object passengerName; - /** - * Map of extra parameters for custom features not available in this client library. The content - * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each - * key/value pair is serialized as if the key is a root-level 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; - /** - * If this is an {@code fpx} PaymentMethod, this hash contains details about the FPX payment - * method. - */ - @SerializedName("fpx") - Fpx fpx; + private List segments; - /** - * If this is a {@code giropay} PaymentMethod, this hash contains details about the Giropay - * payment method. - */ - @SerializedName("giropay") - Giropay giropay; + private Object ticketNumber; - /** - * If this is a Gopay PaymentMethod, this hash contains details about the Gopay payment method. - */ - @SerializedName("gopay") - Gopay gopay; + /** 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 a {@code grabpay} PaymentMethod, this hash contains details about the GrabPay - * payment method. - */ - @SerializedName("grabpay") - Grabpay grabpay; + /** Affiliate details for this purchase. */ + public Builder setAffiliate( + PaymentIntentUpdateParams.PaymentDetails.Flight.Affiliate affiliate) { + this.affiliate = affiliate; + return this; + } - /** - * If this is an {@code IdBankTransfer} PaymentMethod, this hash contains details about the - * IdBankTransfer payment method. - */ - @SerializedName("id_bank_transfer") - IdBankTransfer idBankTransfer; + /** + * 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 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(EmptyParam 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 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 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(EmptyParam 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; + /** Delivery details for this purchase. */ + public Builder setDelivery( + PaymentIntentUpdateParams.PaymentDetails.Flight.Delivery delivery) { + this.delivery = delivery; + return this; + } - /** - * If this is a {@code konbini} PaymentMethod, this hash contains details about the Konbini - * payment method. - */ - @SerializedName("konbini") - 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 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 a {@code kr_card} PaymentMethod, this hash contains details about the Korean Card - * payment method. - */ - @SerializedName("kr_card") - 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 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 an {@code Link} PaymentMethod, this hash contains details about the Link payment - * method. - */ - @SerializedName("link") - Link link; + /** The name of the person or entity on the reservation. */ + public Builder setPassengerName(String passengerName) { + this.passengerName = passengerName; + 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(EmptyParam 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; - - /** - * 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.InnerTax 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 InnerTax { + /** 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 InnerTax(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.InnerTax + build() { + return new PaymentIntentUpdateParams.PaymentDetails.FlightData.Total.Tax.InnerTax( + 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.InnerTax#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A 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.InnerTax#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.InnerTax 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 InnerTax { + /** 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 InnerTax(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.InnerTax + build() { + return new PaymentIntentUpdateParams.PaymentDetails.LodgingData.Total.Tax.InnerTax( + 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.InnerTax#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A 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.InnerTax#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 @@ -8163,1033 +14830,5828 @@ public static class PaymentMethodData { @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("finom") + FINOM("finom"), + + @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; + + private Object accountNumber; + + private Object bankCode; + + private Object branchCode; + + private Map extraParams; + + private Object reference; + + private Object suffix; + + /** 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); + } + + /** + * 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; + } + + /** + * 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; + } + + /** 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. 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; + } + + /** + * Add a key/value pair to `extraParams` map. A map 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; + } + } + } + + @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 PaymentIntentUpdateParams.PaymentMethodData.Oxxo build() { + return new PaymentIntentUpdateParams.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 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; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map 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; + } + } + } + + @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 PaymentIntentUpdateParams.PaymentMethodData.P24 build() { + return new PaymentIntentUpdateParams.PaymentMethodData.P24(this.bank, this.extraParams); + } + + /** The customer's bank. */ + public Builder setBank(PaymentIntentUpdateParams.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 PaymentIntentUpdateParams.PaymentMethodData.P24#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.P24#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + + public enum Bank implements ApiRequestParams.EnumParam { + @SerializedName("alior_bank") + ALIOR_BANK("alior_bank"), + + @SerializedName("bank_millennium") + BANK_MILLENNIUM("bank_millennium"), + + @SerializedName("bank_nowy_bfg_sa") + BANK_NOWY_BFG_SA("bank_nowy_bfg_sa"), + + @SerializedName("bank_pekao_sa") + BANK_PEKAO_SA("bank_pekao_sa"), + + @SerializedName("banki_spbdzielcze") + BANKI_SPBDZIELCZE("banki_spbdzielcze"), + + @SerializedName("blik") + BLIK("blik"), + + @SerializedName("bnp_paribas") + BNP_PARIBAS("bnp_paribas"), + + @SerializedName("boz") + BOZ("boz"), + + @SerializedName("citi_handlowy") + CITI_HANDLOWY("citi_handlowy"), + + @SerializedName("credit_agricole") + CREDIT_AGRICOLE("credit_agricole"), + + @SerializedName("envelobank") + ENVELOBANK("envelobank"), + + @SerializedName("etransfer_pocztowy24") + ETRANSFER_POCZTOWY24("etransfer_pocztowy24"), + + @SerializedName("getin_bank") + GETIN_BANK("getin_bank"), + + @SerializedName("ideabank") + IDEABANK("ideabank"), + + @SerializedName("ing") + ING("ing"), + + @SerializedName("inteligo") + INTELIGO("inteligo"), + + @SerializedName("mbank_mtransfer") + MBANK_MTRANSFER("mbank_mtransfer"), + + @SerializedName("nest_przelew") + NEST_PRZELEW("nest_przelew"), + + @SerializedName("noble_pay") + NOBLE_PAY("noble_pay"), + + @SerializedName("pbac_z_ipko") + PBAC_Z_IPKO("pbac_z_ipko"), + + @SerializedName("plus_bank") + PLUS_BANK("plus_bank"), + + @SerializedName("santander_przelew24") + SANTANDER_PRZELEW24("santander_przelew24"), + + @SerializedName("tmobile_usbugi_bankowe") + TMOBILE_USBUGI_BANKOWE("tmobile_usbugi_bankowe"), + + @SerializedName("toyota_bank") + TOYOTA_BANK("toyota_bank"), + + @SerializedName("velobank") + VELOBANK("velobank"), + + @SerializedName("volkswagen_bank") + VOLKSWAGEN_BANK("volkswagen_bank"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Bank(String value) { + this.value = value; + } + } + } - /** - * If this is a {@code sepa_debit} PaymentMethod, this hash contains details about the SEPA - * debit bank account. - */ - @SerializedName("sepa_debit") - SepaDebit sepaDebit; + @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; - /** - * If this is a Shopeepay PaymentMethod, this hash contains details about the Shopeepay payment - * method. - */ - @SerializedName("shopeepay") - Shopeepay shopeepay; + private PayByBank(Map extraParams) { + this.extraParams = extraParams; + } - /** - * If this is a {@code sofort} PaymentMethod, this hash contains details about the SOFORT - * payment method. - */ - @SerializedName("sofort") - Sofort sofort; + public static Builder builder() { + return new Builder(); + } - /** This hash contains details about the Stripe balance payment method. */ - @SerializedName("stripe_balance") - StripeBalance stripeBalance; + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodData.PayByBank build() { + return new PaymentIntentUpdateParams.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 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; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map 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; + } + } + } + + @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 PaymentIntentUpdateParams.PaymentMethodData.Payco build() { + return new PaymentIntentUpdateParams.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 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; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map 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; + } + } + } + + @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 PaymentIntentUpdateParams.PaymentMethodData.Paynow build() { + return new PaymentIntentUpdateParams.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 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; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map 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 { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level 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 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; + } + } + } - /** - * If this is a {@code swish} PaymentMethod, this hash contains details about the Swish payment - * method. - */ - @SerializedName("swish") - Swish swish; + @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; - /** - * If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method. - */ - @SerializedName("twint") - Twint twint; + private Paypay(Map extraParams) { + this.extraParams = 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. - */ - @SerializedName("type") - Type type; + public static Builder builder() { + return new Builder(); + } - /** - * 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; + public static class Builder { + private 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; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodData.Paypay build() { + return new PaymentIntentUpdateParams.PaymentMethodData.Paypay(this.extraParams); + } - /** - * If this is a {@code zip} PaymentMethod, this hash contains details about the Zip payment - * method. - */ - @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.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; + } - 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; + /** + * Add all map key/value pairs to `extraParams` map. A map 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; + } + } } - public static Builder builder() { - return new Builder(); - } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Payto { + /** The account number for the bank account. */ + @SerializedName("account_number") + Object accountNumber; - public static class Builder { - private AcssDebit acssDebit; + /** Bank-State-Branch number of the bank account. */ + @SerializedName("bsb_number") + Object bsbNumber; - private Affirm 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 AfterpayClearpay afterpayClearpay; + /** The PayID alias for the bank account. */ + @SerializedName("pay_id") + Object payId; - private Alipay alipay; + private Payto( + Object accountNumber, Object bsbNumber, Map extraParams, Object payId) { + this.accountNumber = accountNumber; + this.bsbNumber = bsbNumber; + this.extraParams = extraParams; + this.payId = payId; + } + + public static Builder builder() { + return new Builder(); + } - private AllowRedisplay allowRedisplay; + public static class Builder { + private Object accountNumber; - private Alma alma; + private Object bsbNumber; - private AmazonPay amazonPay; + private Map extraParams; - private AuBecsDebit auBecsDebit; + private Object payId; - private BacsDebit bacsDebit; + /** 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); + } - private Bancontact bancontact; + /** The account number for the bank account. */ + public Builder setAccountNumber(String accountNumber) { + this.accountNumber = accountNumber; + return this; + } - private Billie billie; + /** The account number for the bank account. */ + public Builder setAccountNumber(EmptyParam accountNumber) { + this.accountNumber = accountNumber; + return this; + } - private BillingDetails billingDetails; + /** Bank-State-Branch number of the bank account. */ + public Builder setBsbNumber(String bsbNumber) { + this.bsbNumber = bsbNumber; + return this; + } - private Blik blik; + /** Bank-State-Branch number of the bank account. */ + public Builder setBsbNumber(EmptyParam bsbNumber) { + this.bsbNumber = bsbNumber; + return this; + } - private Boleto boleto; + /** + * Add a key/value pair to `extraParams` map. A map 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; + } - private Cashapp cashapp; + /** + * Add all map key/value pairs to `extraParams` map. A map 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; + } - private Crypto crypto; + /** The PayID alias for the bank account. */ + public Builder setPayId(String payId) { + this.payId = payId; + return this; + } - private CustomerBalance customerBalance; + /** The PayID alias for the bank account. */ + public Builder setPayId(EmptyParam payId) { + this.payId = payId; + return this; + } + } + } - private Eps eps; + @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 Map extraParams; + private Pix(Map extraParams) { + this.extraParams = extraParams; + } - private Fpx fpx; + public static Builder builder() { + return new Builder(); + } - private Giropay giropay; + public static class Builder { + private Map extraParams; - private Gopay gopay; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodData.Pix build() { + return new PaymentIntentUpdateParams.PaymentMethodData.Pix(this.extraParams); + } - private Grabpay 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.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; + } - private IdBankTransfer 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.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; + } + } + } - private Ideal ideal; + @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 InteracPresent interacPresent; + private Promptpay(Map extraParams) { + this.extraParams = extraParams; + } - private KakaoPay kakaoPay; + public static Builder builder() { + return new Builder(); + } - private Klarna klarna; + public static class Builder { + private Map extraParams; - private Konbini konbini; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodData.Promptpay build() { + return new PaymentIntentUpdateParams.PaymentMethodData.Promptpay(this.extraParams); + } - private 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.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 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.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 MbWay mbWay; + @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 Map metadata; + private Qris(Map extraParams) { + this.extraParams = extraParams; + } - private Mobilepay mobilepay; + public static Builder builder() { + return new Builder(); + } - private Multibanco multibanco; + public static class Builder { + private Map extraParams; - private NaverPay naverPay; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodData.Qris build() { + return new PaymentIntentUpdateParams.PaymentMethodData.Qris(this.extraParams); + } - private NzBankAccount nzBankAccount; + /** + * Add a key/value pair to `extraParams` map. A map 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; + } - private Oxxo oxxo; + /** + * Add all map key/value pairs to `extraParams` map. A map 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; + } + } + } - private P24 p24; + @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; - private PayByBank payByBank; + /** + * 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") + Object session; - private Payco payco; + private RadarOptions(Map extraParams, Object session) { + this.extraParams = extraParams; + this.session = session; + } - private Paynow paynow; + public static Builder builder() { + return new Builder(); + } - private Paypal paypal; + public static class Builder { + private Map extraParams; - private Paypay paypay; + private Object session; - private Payto payto; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodData.RadarOptions build() { + return new PaymentIntentUpdateParams.PaymentMethodData.RadarOptions( + this.extraParams, this.session); + } - 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 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; + } - 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 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; + } - private Qris qris; + /** + * 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 RadarOptions radarOptions; + /** + * 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; + } + } + } - private Rechnung rechnung; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Rechnung { + /** Required. Customer's date of birth */ + @SerializedName("dob") + Dob dob; - private RevolutPay 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 SamsungPay samsungPay; + private Rechnung(Dob dob, Map extraParams) { + this.dob = dob; + this.extraParams = extraParams; + } - private Satispay satispay; + public static Builder builder() { + return new Builder(); + } - private SepaDebit sepaDebit; + public static class Builder { + private Dob dob; - private Shopeepay shopeepay; + private Map extraParams; - private Sofort sofort; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodData.Rechnung build() { + return new PaymentIntentUpdateParams.PaymentMethodData.Rechnung( + this.dob, this.extraParams); + } - private StripeBalance stripeBalance; + /** Required. Customer's date of birth */ + public Builder setDob(PaymentIntentUpdateParams.PaymentMethodData.Rechnung.Dob dob) { + this.dob = dob; + return this; + } - private Swish swish; + /** + * Add a key/value pair to `extraParams` map. A map 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; + } - private Twint twint; + /** + * Add all map key/value pairs to `extraParams` map. A map 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; + } + } - private Type type; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Dob { + /** Required. The day of birth, between 1 and 31. */ + @SerializedName("day") + Long day; - private UsBankAccount usBankAccount; + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - private WechatPay wechatPay; + /** Required. The month of birth, between 1 and 12. */ + @SerializedName("month") + Long month; - private Zip zip; + /** Required. The four-digit year of birth. */ + @SerializedName("year") + Long year; - /** 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); - } + 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 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; - } + public static Builder builder() { + return new Builder(); + } - /** - * 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; - } + public static class Builder { + private Long day; - /** - * 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 Map 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; - } + private Long month; - /** - * 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; - } + private Long year; - /** - * 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.Rechnung.Dob build() { + return new PaymentIntentUpdateParams.PaymentMethodData.Rechnung.Dob( + this.day, this.extraParams, this.month, this.year); + } - /** - * 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; + /** 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 an {@code au_becs_debit} PaymentMethod, this hash contains details about the - * bank 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. */ - public Builder setAuBecsDebit( - PaymentIntentUpdateParams.PaymentMethodData.AuBecsDebit auBecsDebit) { - this.auBecsDebit = auBecsDebit; - return this; + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private RevolutPay(Map extraParams) { + this.extraParams = extraParams; } - /** - * 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 Builder builder() { + return new Builder(); } - /** - * 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; + public static class Builder { + private Map extraParams; + + /** 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 SamsungPay { /** - * If this is a {@code billie} PaymentMethod, this hash contains details about the Billie - * 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 setBillie(PaymentIntentUpdateParams.PaymentMethodData.Billie billie) { - this.billie = billie; - return this; + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private SamsungPay(Map extraParams) { + this.extraParams = extraParams; } - /** - * 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 Builder builder() { + return new Builder(); } - /** - * 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; + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + 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.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 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; + } } + } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Satispay { /** - * If this is a {@code boleto} PaymentMethod, this hash contains details about the Boleto - * 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 setBoleto(PaymentIntentUpdateParams.PaymentMethodData.Boleto boleto) { - this.boleto = boleto; - return this; - } + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - /** - * 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; + private Satispay(Map extraParams) { + this.extraParams = 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; + public static Builder builder() { + return new Builder(); } - /** - * 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 class Builder { + private Map extraParams; - /** - * 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; - } + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodData.Satispay build() { + return new PaymentIntentUpdateParams.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 - * PaymentIntentUpdateParams.PaymentMethodData#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 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; } - this.extraParams.put(key, value); - return this; - } - /** - * Add all map key/value pairs to `extraParams` map. A map 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 all map key/value pairs to `extraParams` map. A map 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; } - this.extraParams.putAll(map); - return this; } + } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class SepaDebit { /** - * If this is an {@code fpx} PaymentMethod, this hash contains details about the FPX 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 setFpx(PaymentIntentUpdateParams.PaymentMethodData.Fpx fpx) { - this.fpx = fpx; - return this; - } + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - /** - * 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; - } + /** Required. IBAN of the bank account. */ + @SerializedName("iban") + Object iban; - /** - * 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; + private SepaDebit(Map extraParams, Object iban) { + this.extraParams = extraParams; + this.iban = iban; } - /** - * 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; + public static Builder builder() { + return new Builder(); } - /** - * 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 class Builder { + private Map extraParams; - /** - * 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; - } + private Object iban; - /** - * 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.SepaDebit build() { + return new PaymentIntentUpdateParams.PaymentMethodData.SepaDebit( + this.extraParams, this.iban); + } - /** - * 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.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; + } - /** - * 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.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; + } - /** - * 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; - } + /** Required. IBAN of the bank account. */ + public Builder setIban(String iban) { + this.iban = iban; + 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; + /** Required. IBAN of the bank account. */ + public Builder setIban(EmptyParam iban) { + this.iban = iban; + return this; + } } + } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Shopeepay { /** - * If this is an {@code Link} PaymentMethod, this hash contains details about the Link 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 setLink(PaymentIntentUpdateParams.PaymentMethodData.Link link) { - this.link = link; - return this; + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Shopeepay(Map extraParams) { + this.extraParams = extraParams; } - /** - * 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 Builder builder() { + return new Builder(); } - /** - * 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<>(); + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodData.Shopeepay build() { + return new PaymentIntentUpdateParams.PaymentMethodData.Shopeepay(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.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; } - 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.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 { /** - * If this is a {@code multibanco} PaymentMethod, this hash contains details about the - * Multibanco payment method. + * Required. Two-letter ISO code representing the country the bank account is + * located in. */ - public Builder setMultibanco( - PaymentIntentUpdateParams.PaymentMethodData.Multibanco multibanco) { - this.multibanco = multibanco; - return this; - } + @SerializedName("country") + Country country; /** - * If this is a {@code naver_pay} PaymentMethod, this hash contains details about the Naver - * 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 setNaverPay(PaymentIntentUpdateParams.PaymentMethodData.NaverPay naverPay) { - this.naverPay = naverPay; - return this; - } + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - /** - * 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 Sofort(Country country, Map extraParams) { + this.country = country; + this.extraParams = extraParams; } - /** - * 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 Country country; - /** - * 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 Map extraParams; - /** - * 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.Sofort build() { + return new PaymentIntentUpdateParams.PaymentMethodData.Sofort( + this.country, this.extraParams); + } - /** - * 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; - } + /** + * 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; + } - /** - * 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 a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Sofort#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } - /** - * 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; + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Sofort#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } } - /** - * 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; + 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; + } } + } - /** - * 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 StripeBalance { + /** The connected account ID whose Stripe balance to use as the source of payment. */ + @SerializedName("account") + Object account; /** - * 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. + * The source_type + * of the balance */ - public Builder setQris(PaymentIntentUpdateParams.PaymentMethodData.Qris qris) { - this.qris = qris; - return this; - } + @SerializedName("source_type") + SourceType sourceType; - /** - * Options to configure Radar. See Radar - * Session for more information. - */ - public Builder setRadarOptions( - PaymentIntentUpdateParams.PaymentMethodData.RadarOptions radarOptions) { - this.radarOptions = radarOptions; - return this; + private StripeBalance( + Object account, Map extraParams, SourceType sourceType) { + this.account = account; + this.extraParams = extraParams; + this.sourceType = sourceType; } - /** - * 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 Builder builder() { + return new Builder(); } - /** - * 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; - } + public static class Builder { + private Object account; - /** - * 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; - } + private Map 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; - } + private SourceType sourceType; - /** - * 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; - } + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodData.StripeBalance build() { + return new PaymentIntentUpdateParams.PaymentMethodData.StripeBalance( + this.account, this.extraParams, this.sourceType); + } - /** - * 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; - } + /** The connected account ID whose Stripe balance to use as the source of payment. */ + public Builder setAccount(String account) { + this.account = account; + 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; + /** 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.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 PaymentIntentUpdateParams.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( + PaymentIntentUpdateParams.PaymentMethodData.StripeBalance.SourceType sourceType) { + this.sourceType = sourceType; + return this; + } } - /** This hash contains details about the Stripe balance payment method. */ - public Builder setStripeBalance( - PaymentIntentUpdateParams.PaymentMethodData.StripeBalance stripeBalance) { - this.stripeBalance = stripeBalance; - 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 { /** - * If this is a {@code swish} PaymentMethod, this hash contains details about the Swish - * 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 setSwish(PaymentIntentUpdateParams.PaymentMethodData.Swish swish) { - this.swish = swish; - return this; + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Swish(Map extraParams) { + this.extraParams = extraParams; } - /** - * 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; + 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(PaymentIntentUpdateParams.PaymentMethodData.Type type) { - this.type = type; - return this; + public static class Builder { + private Map extraParams; + + /** 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.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 PaymentIntentUpdateParams.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 { /** - * If this is an {@code us_bank_account} PaymentMethod, this hash contains details about the - * US bank account 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 setUsBankAccount( - PaymentIntentUpdateParams.PaymentMethodData.UsBankAccount usBankAccount) { - this.usBankAccount = usBankAccount; - return this; + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Twint(Map extraParams) { + this.extraParams = extraParams; } - /** - * 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 Builder builder() { + return new Builder(); } - /** - * 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; + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + 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.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 PaymentIntentUpdateParams.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 AcssDebit { - /** Required. Customer's bank account number. */ + 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. @@ -9199,23 +20661,27 @@ public static class AcssDebit { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Required. Institution number of the customer's bank. */ - @SerializedName("institution_number") - Object institutionNumber; + /** The ID of a Financial Connections Account to use as a payment method. */ + @SerializedName("financial_connections_account") + Object financialConnectionsAccount; - /** Required. Transit number of the customer's bank. */ - @SerializedName("transit_number") - Object transitNumber; + /** Routing number of the bank account. */ + @SerializedName("routing_number") + Object routingNumber; - private AcssDebit( + private UsBankAccount( + AccountHolderType accountHolderType, Object accountNumber, + AccountType accountType, Map extraParams, - Object institutionNumber, - Object transitNumber) { + Object financialConnectionsAccount, + Object routingNumber) { + this.accountHolderType = accountHolderType; this.accountNumber = accountNumber; + this.accountType = accountType; this.extraParams = extraParams; - this.institutionNumber = institutionNumber; - this.transitNumber = transitNumber; + this.financialConnectionsAccount = financialConnectionsAccount; + this.routingNumber = routingNumber; } public static Builder builder() { @@ -9223,36 +20689,172 @@ public static Builder builder() { } public static class Builder { + private AccountHolderType accountHolderType; + private Object accountNumber; + private AccountType accountType; + private Map extraParams; - private Object institutionNumber; + private Object financialConnectionsAccount; - private Object transitNumber; + private Object routingNumber; /** 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); + public PaymentIntentUpdateParams.PaymentMethodData.UsBankAccount build() { + return new PaymentIntentUpdateParams.PaymentMethodData.UsBankAccount( + this.accountHolderType, + this.accountNumber, + this.accountType, + this.extraParams, + this.financialConnectionsAccount, + this.routingNumber); } - /** Required. Customer's bank account number. */ + /** 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. */ public Builder setAccountNumber(String accountNumber) { this.accountNumber = accountNumber; return this; } - /** Required. Customer's bank account number. */ + /** 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.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 PaymentIntentUpdateParams.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; + } + + /** 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 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 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.AcssDebit#extraParams} for + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.WechatPay#extraParams} for * the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -9266,7 +20868,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.WechatPay#extraParams} for * the field documentation. */ public Builder putAllExtraParam(Map map) { @@ -9276,36 +20878,12 @@ 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; - } - - /** 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 { + 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. @@ -9315,7 +20893,7 @@ public static class Affirm { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Affirm(Map extraParams) { + private Zip(Map extraParams) { this.extraParams = extraParams; } @@ -9327,14 +20905,14 @@ 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); + 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.Affirm#extraParams} for the + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Zip#extraParams} for the * field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -9348,7 +20926,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.Affirm#extraParams} for the + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Zip#extraParams} for the * field documentation. */ public Builder putAllExtraParam(Map map) { @@ -9361,1694 +20939,2046 @@ public Builder putAllExtraParam(Map map) { } } - @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 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; - private AfterpayClearpay(Map extraParams) { - this.extraParams = extraParams; - } + /** + * If this is a {@code alipay} PaymentMethod, this sub-hash contains details about the Alipay + * payment method options. + */ + @SerializedName("alipay") + Object alipay; - 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. + */ + @SerializedName("alma") + Object alma; - public static class Builder { - private Map extraParams; + /** + * 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.AfterpayClearpay build() { - return new PaymentIntentUpdateParams.PaymentMethodData.AfterpayClearpay(this.extraParams); - } + /** + * 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.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 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.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; - } - } - } + /** + * If this is a {@code bancontact} PaymentMethod, this sub-hash contains details about the + * Bancontact payment method options. + */ + @SerializedName("bancontact") + Object bancontact; - @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; + /** + * If this is a {@code billie} PaymentMethod, this sub-hash contains details about the Billie + * payment method options. + */ + @SerializedName("billie") + Object billie; - private Alipay(Map extraParams) { - this.extraParams = extraParams; - } + /** + * If this is a {@code blik} PaymentMethod, this sub-hash contains details about the BLIK + * payment method options. + */ + @SerializedName("blik") + Object blik; - public static Builder builder() { - return new Builder(); - } + /** + * If this is a {@code boleto} PaymentMethod, this sub-hash contains details about the Boleto + * payment method options. + */ + @SerializedName("boleto") + Object boleto; - public static class Builder { - private Map extraParams; + /** Configuration for any card payments attempted on this PaymentIntent. */ + @SerializedName("card") + Object card; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodData.Alipay build() { - return new PaymentIntentUpdateParams.PaymentMethodData.Alipay(this.extraParams); - } + /** + * 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; - /** - * Add a key/value pair to `extraParams` map. A map 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; - } + /** + * If this is a {@code cashapp} PaymentMethod, this sub-hash contains details about the Cash App + * Pay payment method options. + */ + @SerializedName("cashapp") + Object cashapp; - /** - * Add all map key/value pairs to `extraParams` map. A map 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; - } - } - } + /** + * If this is a {@code crypto} PaymentMethod, this sub-hash contains details about the Crypto + * payment method options. + */ + @SerializedName("crypto") + Object crypto; - @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; + /** + * 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 Alma(Map extraParams) { - this.extraParams = extraParams; - } + /** + * 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 Map extraParams; + /** + * If this is a {@code fpx} PaymentMethod, this sub-hash contains details about the FPX payment + * method options. + */ + @SerializedName("fpx") + Object fpx; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodData.Alma build() { - return new PaymentIntentUpdateParams.PaymentMethodData.Alma(this.extraParams); - } + /** + * If this is a {@code giropay} PaymentMethod, this sub-hash contains details about the Giropay + * payment method options. + */ + @SerializedName("giropay") + Object giropay; - /** - * Add a key/value pair to `extraParams` map. A map 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; - } + /** + * If this is a {@code gopay} PaymentMethod, this sub-hash contains details about the Gopay + * payment method options. + */ + @SerializedName("gopay") + Object gopay; - /** - * Add all map key/value pairs to `extraParams` map. A map 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; - } - } - } + /** + * If this is a {@code grabpay} PaymentMethod, this sub-hash contains details about the Grabpay + * payment method options. + */ + @SerializedName("grabpay") + Object grabpay; - @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; + /** + * 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(Map extraParams) { - this.extraParams = extraParams; - } + /** + * If this is a {@code ideal} PaymentMethod, this sub-hash contains details about the Ideal + * payment method options. + */ + @SerializedName("ideal") + Object ideal; - public static Builder builder() { - return new Builder(); - } + /** + * 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; - public static class Builder { - private Map 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; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodData.AmazonPay build() { - return new PaymentIntentUpdateParams.PaymentMethodData.AmazonPay(this.extraParams); - } + /** + * If this is a {@code klarna} PaymentMethod, this sub-hash contains details about the Klarna + * payment method options. + */ + @SerializedName("klarna") + Object 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 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; - } + /** + * If this is a {@code konbini} PaymentMethod, this sub-hash contains details about the Konbini + * payment method options. + */ + @SerializedName("konbini") + Object 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 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; - } - } - } + /** + * 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; - @Getter - @EqualsAndHashCode(callSuper = false) - public static class AuBecsDebit { - /** Required. The account number for the bank account. */ - @SerializedName("account_number") - Object accountNumber; + /** + * If this is a {@code link} PaymentMethod, this sub-hash contains details about the Link + * payment method options. + */ + @SerializedName("link") + Object link; - /** Required. Bank-State-Branch number of the bank account. */ - @SerializedName("bsb_number") - Object bsbNumber; + /** + * 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; - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-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 MobilePay} PaymentMethod, this sub-hash contains details about the + * MobilePay payment method options. + */ + @SerializedName("mobilepay") + Object mobilepay; - private AuBecsDebit(Object accountNumber, Object bsbNumber, Map extraParams) { - this.accountNumber = accountNumber; - this.bsbNumber = bsbNumber; - this.extraParams = extraParams; - } + /** + * If this is a {@code multibanco} PaymentMethod, this sub-hash contains details about the + * Multibanco payment method options. + */ + @SerializedName("multibanco") + Object multibanco; - 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. + */ + @SerializedName("naver_pay") + Object naverPay; - public static class Builder { - private Object accountNumber; + /** + * 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 Object bsbNumber; + /** + * If this is a {@code oxxo} PaymentMethod, this sub-hash contains details about the OXXO + * payment method options. + */ + @SerializedName("oxxo") + Object oxxo; - private Map extraParams; + /** + * If this is a {@code p24} PaymentMethod, this sub-hash contains details about the Przelewy24 + * payment method options. + */ + @SerializedName("p24") + Object p24; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodData.AuBecsDebit build() { - return new PaymentIntentUpdateParams.PaymentMethodData.AuBecsDebit( - this.accountNumber, this.bsbNumber, this.extraParams); - } + /** + * 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. The account number for the bank account. */ - public Builder setAccountNumber(String accountNumber) { - this.accountNumber = accountNumber; - 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 account number for the bank account. */ - public Builder setAccountNumber(EmptyParam accountNumber) { - this.accountNumber = accountNumber; - return this; - } + /** + * If this is a {@code paynow} PaymentMethod, this sub-hash contains details about the PayNow + * payment method options. + */ + @SerializedName("paynow") + Object paynow; - /** Required. Bank-State-Branch number of the bank account. */ - public Builder setBsbNumber(String bsbNumber) { - this.bsbNumber = bsbNumber; - return this; - } + /** + * If this is a {@code paypal} PaymentMethod, this sub-hash contains details about the PayPal + * payment method options. + */ + @SerializedName("paypal") + Object paypal; - /** Required. Bank-State-Branch number of the bank account. */ - public Builder setBsbNumber(EmptyParam bsbNumber) { - this.bsbNumber = bsbNumber; - return this; - } + /** + * 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; - /** - * Add a key/value pair to `extraParams` map. A map 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; - } + /** + * If this is a {@code pix} PaymentMethod, this sub-hash contains details about the Pix payment + * method options. + */ + @SerializedName("pix") + Object pix; - /** - * Add all map key/value pairs to `extraParams` map. A map 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; - } - } - } + /** + * If this is a {@code promptpay} PaymentMethod, this sub-hash contains details about the + * PromptPay payment method options. + */ + @SerializedName("promptpay") + Object promptpay; - @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; + /** + * If this is a {@code qris} PaymentMethod, this sub-hash contains details about the QRIS + * payment method options. + */ + @SerializedName("qris") + Object 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; + /** + * If this is a {@code rechnung} PaymentMethod, this sub-hash contains details about the + * Rechnung payment method options. + */ + @SerializedName("rechnung") + Object rechnung; - /** Sort code of the bank account. (e.g., {@code 10-20-30}) */ - @SerializedName("sort_code") - Object sortCode; + /** + * 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 BacsDebit(Object accountNumber, Map extraParams, Object sortCode) { - this.accountNumber = accountNumber; - this.extraParams = extraParams; - this.sortCode = sortCode; - } + /** + * 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; - 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. + */ + @SerializedName("satispay") + Object satispay; - public static class Builder { - private Object accountNumber; + /** + * 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 Map extraParams; + /** + * If this is a {@code shopeepay} PaymentMethod, this sub-hash contains details about the + * ShopeePay payment method options. + */ + @SerializedName("shopeepay") + Object shopeepay; - private Object sortCode; + /** + * If this is a {@code sofort} PaymentMethod, this sub-hash contains details about the SOFORT + * payment method options. + */ + @SerializedName("sofort") + Object sofort; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodData.BacsDebit build() { - return new PaymentIntentUpdateParams.PaymentMethodData.BacsDebit( - this.accountNumber, this.extraParams, this.sortCode); - } + /** + * 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; - /** Account number of the bank account that the funds will be debited from. */ - public Builder setAccountNumber(String accountNumber) { - this.accountNumber = accountNumber; - return this; - } + /** + * If this is a {@code Swish} PaymentMethod, this sub-hash contains details about the Swish + * payment method options. + */ + @SerializedName("swish") + Object swish; - /** Account number of the bank account that the funds will be debited from. */ - public Builder setAccountNumber(EmptyParam accountNumber) { - this.accountNumber = accountNumber; - return this; - } + /** + * If this is a {@code twint} PaymentMethod, this sub-hash contains details about the TWINT + * payment method options. + */ + @SerializedName("twint") + Object 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 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; - } + /** + * 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; - /** - * Add all map key/value pairs to `extraParams` map. A map 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; - } + /** + * 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; - /** Sort code of the bank account. (e.g., {@code 10-20-30}) */ - public Builder setSortCode(String sortCode) { - this.sortCode = sortCode; - return this; - } + /** + * If this is a {@code zip} PaymentMethod, this sub-hash contains details about the Zip payment + * method options. + */ + @SerializedName("zip") + Object zip; - /** Sort code of the bank account. (e.g., {@code 10-20-30}) */ - public Builder setSortCode(EmptyParam sortCode) { - this.sortCode = sortCode; - return this; - } - } + 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; } - @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; - } - } + 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; + public static class Builder { + private Object acssDebit; - private Billie(Map extraParams) { - this.extraParams = extraParams; - } + private Object affirm; - public static Builder builder() { - return new Builder(); - } + private Object afterpayClearpay; - public static class Builder { - private Map extraParams; + private Object alipay; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodData.Billie build() { - return new PaymentIntentUpdateParams.PaymentMethodData.Billie(this.extraParams); - } + private Object 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.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 Object 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.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 Object auBecsDebit; - @Getter - @EqualsAndHashCode(callSuper = false) - public static class BillingDetails { - /** Billing address. */ - @SerializedName("address") - Object address; + private Object bacsDebit; - /** Email address. */ - @SerializedName("email") - Object email; + private Object 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 Object billie; - /** Full name. */ - @SerializedName("name") - Object name; + private Object blik; - /** Billing phone number (including extension). */ - @SerializedName("phone") - Object phone; + private Object boleto; - /** - * Taxpayer identification number. Used only for transactions between LATAM buyers and - * non-LATAM sellers. - */ - @SerializedName("tax_id") - Object taxId; + private Object card; - 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; - } + private Object cardPresent; - public static Builder builder() { - return new Builder(); - } + private Object cashapp; - public static class Builder { - private Object address; + private Object crypto; - private Object email; + private Object customerBalance; - private Map extraParams; + private Object eps; - private Object name; + private Map extraParams; - private Object phone; + private Object fpx; - private Object taxId; + private Object giropay; + + private Object gopay; - /** 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); - } + private Object grabpay; - /** Billing address. */ - public Builder setAddress( - PaymentIntentUpdateParams.PaymentMethodData.BillingDetails.Address address) { - this.address = address; - return this; - } + private Object idBankTransfer; - /** Billing address. */ - public Builder setAddress(EmptyParam address) { - this.address = address; - return this; - } + private Object ideal; - /** Email address. */ - public Builder setEmail(String email) { - this.email = email; - return this; - } + private Object interacPresent; - /** Email address. */ - public Builder setEmail(EmptyParam email) { - this.email = email; - return this; - } + private Object kakaoPay; - /** - * Add a key/value pair to `extraParams` map. A map 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; - } + private Object klarna; - /** - * Add all map key/value pairs to `extraParams` map. A map 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; - } + private Object konbini; - /** Full name. */ - public Builder setName(String name) { - this.name = name; - return this; - } + private Object krCard; - /** Full name. */ - public Builder setName(EmptyParam name) { - this.name = name; - return this; - } + private Object link; - /** Billing phone number (including extension). */ - public Builder setPhone(String phone) { - this.phone = phone; - return this; - } + private Object mbWay; - /** Billing phone number (including extension). */ - public Builder setPhone(EmptyParam phone) { - this.phone = phone; - return this; - } + private Object mobilepay; - /** - * 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 Object multibanco; - /** - * Taxpayer identification number. Used only for transactions between LATAM buyers and - * non-LATAM sellers. - */ - public Builder setTaxId(EmptyParam taxId) { - this.taxId = taxId; - return this; - } - } + private Object naverPay; - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Address { - /** City, district, suburb, town, or village. */ - @SerializedName("city") - Object city; + private Object nzBankAccount; - /** - * Two-letter country code (ISO - * 3166-1 alpha-2). - */ - @SerializedName("country") - Object country; + private Object 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 Object p24; - /** Address line 1, such as the street, PO Box, or company name. */ - @SerializedName("line1") - Object line1; + private Object payByBank; - /** Address line 2, such as the apartment, suite, unit, or building. */ - @SerializedName("line2") - Object line2; + private Object payco; - /** ZIP or postal code. */ - @SerializedName("postal_code") - Object postalCode; + private Object paynow; - /** State, county, province, or region. */ - @SerializedName("state") - Object state; + private Object paypal; - 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 Object paypay; - public static Builder builder() { - return new Builder(); - } + private Object payto; - public static class Builder { - private Object city; + private Object pix; - private Object country; + private Object promptpay; - private Map extraParams; + private Object qris; - private Object line1; + private Object rechnung; - private Object line2; + private Object revolutPay; - private Object postalCode; + private Object samsungPay; - private Object state; + private Object satispay; - /** 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); - } + private Object sepaDebit; - /** City, district, suburb, town, or village. */ - public Builder setCity(String city) { - this.city = city; - return this; - } + private Object shopeepay; - /** City, district, suburb, town, or village. */ - public Builder setCity(EmptyParam city) { - this.city = city; - return this; - } + private Object sofort; - /** - * Two-letter country code (ISO - * 3166-1 alpha-2). - */ - public Builder setCountry(String country) { - this.country = country; - return this; - } + private Object stripeBalance; - /** - * Two-letter country code (ISO - * 3166-1 alpha-2). - */ - public Builder setCountry(EmptyParam country) { - this.country = country; - return this; - } + private Object swish; - /** - * Add a key/value pair to `extraParams` map. A map 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; - } + private Object twint; - /** - * Add all map key/value pairs to `extraParams` map. A map 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; - } + private Object usBankAccount; - /** Address line 1, such as the street, PO Box, or company name. */ - public Builder setLine1(String line1) { - this.line1 = line1; - return this; - } + private Object wechatPay; - /** Address line 1, such as the street, PO Box, or company name. */ - public Builder setLine1(EmptyParam line1) { - this.line1 = line1; - return this; - } + private Object zip; - /** Address line 2, such as the apartment, suite, unit, or building. */ - public Builder setLine2(String line2) { - this.line2 = line2; - return this; - } + /** 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); + } - /** 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 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; + } - /** ZIP or postal code. */ - public Builder setPostalCode(String postalCode) { - this.postalCode = postalCode; - 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; + } - /** ZIP or postal code. */ - public Builder setPostalCode(EmptyParam postalCode) { - this.postalCode = postalCode; - 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; + } - /** State, county, province, or region. */ - public Builder setState(String state) { - this.state = state; - 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; + } - /** State, county, province, or region. */ - public Builder setState(EmptyParam state) { - this.state = state; - 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( + PaymentIntentUpdateParams.PaymentMethodOptions.AfterpayClearpay afterpayClearpay) { + this.afterpayClearpay = afterpayClearpay; + 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. + * 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; + public Builder setAfterpayClearpay(EmptyParam afterpayClearpay) { + this.afterpayClearpay = afterpayClearpay; + return this; + } - private Blik(Map extraParams) { - this.extraParams = extraParams; + /** + * 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; } - 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. + */ + public Builder setAlipay(EmptyParam alipay) { + this.alipay = alipay; + return this; } - 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. + */ + public Builder setAlma(PaymentIntentUpdateParams.PaymentMethodOptions.Alma alma) { + this.alma = alma; + return this; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodData.Blik build() { - return new PaymentIntentUpdateParams.PaymentMethodData.Blik(this.extraParams); - } + /** + * 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; + } - /** - * Add a key/value pair to `extraParams` map. A map 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; - } + /** + * 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; + } - /** - * Add all map key/value pairs to `extraParams` map. A map 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; - } + /** + * 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( + PaymentIntentUpdateParams.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; } - } - @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. + * If this is a {@code bacs_debit} PaymentMethod, this sub-hash contains details about the + * BACS Debit payment method options. */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + public Builder setBacsDebit( + PaymentIntentUpdateParams.PaymentMethodOptions.BacsDebit bacsDebit) { + this.bacsDebit = bacsDebit; + return this; + } /** - * Required. The tax ID of the customer (CPF for individual consumers or CNPJ - * for businesses consumers) + * If this is a {@code bacs_debit} PaymentMethod, this sub-hash contains details about the + * BACS Debit payment method options. */ - @SerializedName("tax_id") - Object taxId; - - private Boleto(Map extraParams, Object taxId) { - this.extraParams = extraParams; - this.taxId = taxId; + public Builder setBacsDebit(EmptyParam bacsDebit) { + this.bacsDebit = bacsDebit; + return this; } - public static Builder builder() { - return new Builder(); + /** + * 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; } - 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; - } + /** + * 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 - @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. + * If this is a {@code billie} PaymentMethod, this sub-hash contains details about the Billie + * payment method options. */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - - private Cashapp(Map extraParams) { - this.extraParams = extraParams; + public Builder setBillie(PaymentIntentUpdateParams.PaymentMethodOptions.Billie billie) { + this.billie = billie; + return this; } - public static Builder builder() { - return new Builder(); + /** + * 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 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; - } + /** + * 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; } - } - @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. + * If this is a {@code blik} PaymentMethod, this sub-hash contains details about the BLIK + * payment method options. */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - - private Crypto(Map extraParams) { - this.extraParams = extraParams; + public Builder setBlik(EmptyParam blik) { + this.blik = blik; + return this; } - public static Builder builder() { - return new Builder(); + /** + * 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; } - public static class Builder { - private Map extraParams; + /** + * 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; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodData.Crypto build() { - return new PaymentIntentUpdateParams.PaymentMethodData.Crypto(this.extraParams); - } + /** Configuration for any card payments attempted on this PaymentIntent. */ + public Builder setCard(PaymentIntentUpdateParams.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 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; - } + /** Configuration for any card payments attempted on this PaymentIntent. */ + public Builder setCard(EmptyParam card) { + this.card = card; + return this; + } - /** - * Add all map key/value pairs to `extraParams` map. A map 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 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 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. + * If this is a {@code card_present} PaymentMethod, this sub-hash contains details about the + * Card Present payment method options. */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - - private CustomerBalance(Map extraParams) { - this.extraParams = extraParams; + public Builder setCardPresent(EmptyParam cardPresent) { + this.cardPresent = cardPresent; + return this; } - public static Builder builder() { - return new Builder(); + /** + * 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; } - 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; - } + /** + * 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; } - } - - @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. + * If this is a {@code crypto} PaymentMethod, this sub-hash contains details about the Crypto + * payment method options. */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - - private Eps(Bank bank, Map extraParams) { - this.bank = bank; - this.extraParams = extraParams; + public Builder setCrypto(PaymentIntentUpdateParams.PaymentMethodOptions.Crypto crypto) { + this.crypto = crypto; + 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(EmptyParam crypto) { + this.crypto = crypto; + return this; } - public static class Builder { - private Bank bank; + /** + * 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; + } - 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(EmptyParam customerBalance) { + this.customerBalance = customerBalance; + return this; + } - /** 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 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; + } - /** The customer's bank. */ - public Builder setBank(PaymentIntentUpdateParams.PaymentMethodData.Eps.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(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 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 a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); } + this.extraParams.put(key, value); + return this; + } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.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; + /** + * Add all map key/value pairs to `extraParams` map. A 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; } - 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"), + /** + * 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("bankhaus_schelhammer_und_schattera_ag") - BANKHAUS_SCHELHAMMER_UND_SCHATTERA_AG("bankhaus_schelhammer_und_schattera_ag"), + /** + * 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("bawag_psk_ag") - BAWAG_PSK_AG("bawag_psk_ag"), + /** + * 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("bks_bank_ag") - BKS_BANK_AG("bks_bank_ag"), + /** + * 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("brull_kallmus_bank_ag") - BRULL_KALLMUS_BANK_AG("brull_kallmus_bank_ag"), + /** + * 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("btv_vier_lander_bank") - BTV_VIER_LANDER_BANK("btv_vier_lander_bank"), + /** + * 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("capital_bank_grawe_gruppe_ag") - CAPITAL_BANK_GRAWE_GRUPPE_AG("capital_bank_grawe_gruppe_ag"), + /** + * 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("deutsche_bank_ag") - DEUTSCHE_BANK_AG("deutsche_bank_ag"), + /** + * 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("dolomitenbank") - DOLOMITENBANK("dolomitenbank"), + /** + * 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("easybank_ag") - EASYBANK_AG("easybank_ag"), + /** + * 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("erste_bank_und_sparkassen") - ERSTE_BANK_UND_SPARKASSEN("erste_bank_und_sparkassen"), + /** + * 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("hypo_alpeadriabank_international_ag") - HYPO_ALPEADRIABANK_INTERNATIONAL_AG("hypo_alpeadriabank_international_ag"), + /** + * 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("hypo_bank_burgenland_aktiengesellschaft") - HYPO_BANK_BURGENLAND_AKTIENGESELLSCHAFT("hypo_bank_burgenland_aktiengesellschaft"), + /** + * 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("hypo_noe_lb_fur_niederosterreich_u_wien") - HYPO_NOE_LB_FUR_NIEDEROSTERREICH_U_WIEN("hypo_noe_lb_fur_niederosterreich_u_wien"), + /** + * 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("hypo_oberosterreich_salzburg_steiermark") - HYPO_OBEROSTERREICH_SALZBURG_STEIERMARK("hypo_oberosterreich_salzburg_steiermark"), + /** + * 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("hypo_tirol_bank_ag") - HYPO_TIROL_BANK_AG("hypo_tirol_bank_ag"), + /** + * 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; + } - @SerializedName("hypo_vorarlberg_bank_ag") - HYPO_VORARLBERG_BANK_AG("hypo_vorarlberg_bank_ag"), + /** + * 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; + } - @SerializedName("marchfelder_bank") - MARCHFELDER_BANK("marchfelder_bank"), + /** + * 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; + } - @SerializedName("oberbank_ag") - OBERBANK_AG("oberbank_ag"), + /** + * 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; + } - @SerializedName("raiffeisen_bankengruppe_osterreich") - RAIFFEISEN_BANKENGRUPPE_OSTERREICH("raiffeisen_bankengruppe_osterreich"), + /** + * 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; + } - @SerializedName("schoellerbank_ag") - SCHOELLERBANK_AG("schoellerbank_ag"), + /** + * 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; + } - @SerializedName("sparda_bank_wien") - SPARDA_BANK_WIEN("sparda_bank_wien"), + /** + * 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; + } - @SerializedName("volksbank_gruppe") - VOLKSBANK_GRUPPE("volksbank_gruppe"), + /** + * 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; + } - @SerializedName("volkskreditbank_ag") - VOLKSKREDITBANK_AG("volkskreditbank_ag"), + /** + * 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; + } - @SerializedName("vr_bank_braunau") - VR_BANK_BRAUNAU("vr_bank_braunau"); + /** + * 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(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(EmptyParam mbWay) { + this.mbWay = mbWay; + return this; + } - Bank(String value) { - this.value = value; - } + /** + * 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; } - } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Fpx { - /** Account holder type for FPX transaction. */ - @SerializedName("account_holder_type") - AccountHolderType accountHolderType; + /** + * 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; + } - /** Required. The customer's bank. */ - @SerializedName("bank") - Bank bank; + /** + * 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; + } + + /** + * 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; + } /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized 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 naver_pay} PaymentMethod, this sub-hash contains details about the + * Naver Pay payment method options. */ - @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 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 AccountHolderType accountHolderType; - - private Bank bank; + /** + * 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.Fpx build() { - return new PaymentIntentUpdateParams.PaymentMethodData.Fpx( - this.accountHolderType, this.bank, 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; + } - /** Account holder type for FPX transaction. */ - public Builder setAccountHolderType( - PaymentIntentUpdateParams.PaymentMethodData.Fpx.AccountHolderType accountHolderType) { - this.accountHolderType = accountHolderType; - 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; + } - /** Required. The customer's bank. */ - public Builder setBank(PaymentIntentUpdateParams.PaymentMethodData.Fpx.Bank bank) { - this.bank = bank; - 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 a key/value pair to `extraParams` map. A map 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; - } + /** + * 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; + } - /** - * Add all map key/value pairs to `extraParams` map. A map 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; - } + /** + * 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; } - public enum AccountHolderType implements ApiRequestParams.EnumParam { - @SerializedName("company") - COMPANY("company"), + /** + * 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; + } - @SerializedName("individual") - INDIVIDUAL("individual"); + /** + * 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; + } - @Getter(onMethod_ = {@Override}) - private final String value; + /** + * 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; + } - AccountHolderType(String value) { - this.value = value; - } + /** + * 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 enum Bank implements ApiRequestParams.EnumParam { - @SerializedName("affin_bank") - AFFIN_BANK("affin_bank"), + /** + * 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; + } - @SerializedName("agrobank") - AGROBANK("agrobank"), + /** + * 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; + } - @SerializedName("alliance_bank") - ALLIANCE_BANK("alliance_bank"), + /** + * 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; + } - @SerializedName("ambank") - AMBANK("ambank"), + /** + * 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; + } - @SerializedName("bank_islam") - BANK_ISLAM("bank_islam"), + /** + * 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; + } - @SerializedName("bank_muamalat") - BANK_MUAMALAT("bank_muamalat"), + /** + * 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; + } - @SerializedName("bank_of_china") - BANK_OF_CHINA("bank_of_china"), + /** + * 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; + } - @SerializedName("bank_rakyat") - BANK_RAKYAT("bank_rakyat"), + /** + * 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; + } - @SerializedName("bsn") - BSN("bsn"), + /** + * 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; + } - @SerializedName("cimb") - CIMB("cimb"), + /** + * 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; + } - @SerializedName("deutsche_bank") - DEUTSCHE_BANK("deutsche_bank"), + /** + * 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; + } - @SerializedName("hong_leong_bank") - HONG_LEONG_BANK("hong_leong_bank"), + /** + * 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; + } - @SerializedName("hsbc") - HSBC("hsbc"), + /** + * 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; + } - @SerializedName("kfh") - KFH("kfh"), + /** + * 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; + } - @SerializedName("maybank2e") - MAYBANK2E("maybank2e"), + /** + * 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; + } - @SerializedName("maybank2u") - MAYBANK2U("maybank2u"), + /** + * 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; + } - @SerializedName("ocbc") - OCBC("ocbc"), + /** + * 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; + } - @SerializedName("pb_enterprise") - PB_ENTERPRISE("pb_enterprise"), + /** + * 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; + } - @SerializedName("public_bank") - PUBLIC_BANK("public_bank"), + /** + * 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("rhb") - RHB("rhb"), + /** + * 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("standard_chartered") - STANDARD_CHARTERED("standard_chartered"), + /** + * 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("uob") - UOB("uob"); + /** + * 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; + } - @Getter(onMethod_ = {@Override}) - private final String value; + /** + * 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; + } - Bank(String value) { - this.value = value; - } + /** + * 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; } - } - @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 shopeepay} PaymentMethod, this sub-hash contains details about the + * ShopeePay payment method options. */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + public Builder setShopeepay(EmptyParam shopeepay) { + this.shopeepay = shopeepay; + return this; + } - private Giropay(Map extraParams) { - this.extraParams = extraParams; + /** + * 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; } - public static Builder builder() { - return new Builder(); + /** + * 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 static class Builder { - private 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( + PaymentIntentUpdateParams.PaymentMethodOptions.StripeBalance stripeBalance) { + this.stripeBalance = stripeBalance; + return this; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodData.Giropay build() { - return new PaymentIntentUpdateParams.PaymentMethodData.Giropay(this.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; + } - /** - * Add a key/value pair to `extraParams` map. A map 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 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; + } - /** - * Add all map key/value pairs to `extraParams` map. A map 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 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; } - } - @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 twint} PaymentMethod, this sub-hash contains details about the TWINT + * payment method options. */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + public Builder setTwint(PaymentIntentUpdateParams.PaymentMethodOptions.Twint twint) { + this.twint = twint; + return this; + } - private Gopay(Map extraParams) { - this.extraParams = extraParams; + /** + * 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; } - 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( + PaymentIntentUpdateParams.PaymentMethodOptions.UsBankAccount usBankAccount) { + this.usBankAccount = usBankAccount; + return this; } - public static class Builder { - 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 PaymentIntentUpdateParams.PaymentMethodData.Gopay build() { - return new PaymentIntentUpdateParams.PaymentMethodData.Gopay(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( + PaymentIntentUpdateParams.PaymentMethodOptions.WechatPay 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.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; - } + /** + * 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 all map key/value pairs to `extraParams` map. A map 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 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; + } + + /** + * 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 Grabpay { + 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. @@ -11058,8 +22988,59 @@ public static class Grabpay { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Grabpay(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() { @@ -11069,16 +23050,29 @@ 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.Grabpay build() { - return new PaymentIntentUpdateParams.PaymentMethodData.Grabpay(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.Grabpay#extraParams} for the - * field documentation. + * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.AcssDebit#extraParams} for + * the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -11091,8 +23085,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.Grabpay#extraParams} for the - * field documentation. + * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.AcssDebit#extraParams} for + * the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -11101,238 +23095,334 @@ public Builder putAllExtraParam(Map map) { 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; + /** Additional fields for Mandate creation. */ + public Builder setMandateOptions( + PaymentIntentUpdateParams.PaymentMethodOptions.AcssDebit.MandateOptions + mandateOptions) { + this.mandateOptions = mandateOptions; + return this; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodData.IdBankTransfer build() { - return new PaymentIntentUpdateParams.PaymentMethodData.IdBankTransfer( - this.bank, 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.AcssDebit.SetupFutureUsage + setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; } - /** Bank where the account is held. */ - public Builder setBank( - PaymentIntentUpdateParams.PaymentMethodData.IdBankTransfer.Bank bank) { - this.bank = 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(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.IdBankTransfer#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.IdBankTransfer#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; + } + + /** Bank account verification method. */ + public Builder setVerificationMethod( + PaymentIntentUpdateParams.PaymentMethodOptions.AcssDebit.VerificationMethod + verificationMethod) { + this.verificationMethod = verificationMethod; return this; } } - public enum Bank implements ApiRequestParams.EnumParam { - @SerializedName("bca") - BCA("bca"), + @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("bni") - BNI("bni"), + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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("bri") - BRI("bri"), + /** + * Description of the mandate interval. Only required if 'payment_schedule' parameter is + * 'interval' or 'combined'. + */ + @SerializedName("interval_description") + Object intervalDescription; - @SerializedName("cimb") - CIMB("cimb"), + /** Payment schedule for the mandate. */ + @SerializedName("payment_schedule") + PaymentSchedule paymentSchedule; - @SerializedName("permata") - PERMATA("permata"); + /** Transaction type of the mandate. */ + @SerializedName("transaction_type") + TransactionType transactionType; - @Getter(onMethod_ = {@Override}) - private final String value; + 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; + } - Bank(String value) { - this.value = value; + public static Builder builder() { + return new Builder(); } - } - } - @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 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; - private Ideal(Bank bank, Map extraParams) { - this.bank = bank; - this.extraParams = extraParams; - } + private Object intervalDescription; - public static Builder builder() { - return new Builder(); - } + private PaymentSchedule paymentSchedule; - public static class Builder { - private Bank bank; + private TransactionType transactionType; - private Map extraParams; + /** 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); + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodData.Ideal build() { - return new PaymentIntentUpdateParams.PaymentMethodData.Ideal(this.bank, this.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(String customMandateUrl) { + this.customMandateUrl = customMandateUrl; + 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; - } + /** + * A URL for custom mandate text to render during confirmation step. The URL will be + * rendered with additional GET parameters {@code payment_intent} and {@code + * payment_intent_client_secret} when confirming a Payment Intent, or {@code setup_intent} + * and {@code setup_intent_client_secret} when confirming a Setup Intent. + */ + public Builder setCustomMandateUrl(EmptyParam customMandateUrl) { + this.customMandateUrl = customMandateUrl; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.AcssDebit.MandateOptions#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.AcssDebit.MandateOptions#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Description of the mandate interval. Only required if 'payment_schedule' parameter is + * 'interval' or 'combined'. + */ + public Builder setIntervalDescription(String intervalDescription) { + this.intervalDescription = intervalDescription; + return this; + } + + /** + * Description of the mandate interval. Only required if 'payment_schedule' parameter is + * 'interval' or 'combined'. + */ + public Builder setIntervalDescription(EmptyParam intervalDescription) { + this.intervalDescription = intervalDescription; + return this; + } - /** - * Add a key/value pair to `extraParams` map. A map 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<>(); + /** Payment schedule for the mandate. */ + public Builder setPaymentSchedule( + PaymentIntentUpdateParams.PaymentMethodOptions.AcssDebit.MandateOptions + .PaymentSchedule + paymentSchedule) { + this.paymentSchedule = paymentSchedule; + 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.Ideal#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** Transaction type of the mandate. */ + public Builder setTransactionType( + PaymentIntentUpdateParams.PaymentMethodOptions.AcssDebit.MandateOptions + .TransactionType + transactionType) { + this.transactionType = transactionType; + return this; } - this.extraParams.putAll(map); - return this; } - } - public enum Bank implements ApiRequestParams.EnumParam { - @SerializedName("abn_amro") - ABN_AMRO("abn_amro"), + public enum PaymentSchedule implements ApiRequestParams.EnumParam { + @SerializedName("combined") + COMBINED("combined"), - @SerializedName("asn_bank") - ASN_BANK("asn_bank"), + @SerializedName("interval") + INTERVAL("interval"), - @SerializedName("bunq") - BUNQ("bunq"), + @SerializedName("sporadic") + SPORADIC("sporadic"); - @SerializedName("buut") - BUUT("buut"), + @Getter(onMethod_ = {@Override}) + private final String value; - @SerializedName("handelsbanken") - HANDELSBANKEN("handelsbanken"), + PaymentSchedule(String value) { + this.value = value; + } + } - @SerializedName("ing") - ING("ing"), + public enum TransactionType implements ApiRequestParams.EnumParam { + @SerializedName("business") + BUSINESS("business"), - @SerializedName("knab") - KNAB("knab"), + @SerializedName("personal") + PERSONAL("personal"); - @SerializedName("moneyou") - MONEYOU("moneyou"), + @Getter(onMethod_ = {@Override}) + private final String value; - @SerializedName("n26") - N26("n26"), + TransactionType(String value) { + this.value = value; + } + } + } - @SerializedName("nn") - NN("nn"), + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"), - @SerializedName("rabobank") - RABOBANK("rabobank"), + @SerializedName("off_session") + OFF_SESSION("off_session"), - @SerializedName("regiobank") - REGIOBANK("regiobank"), + @SerializedName("on_session") + ON_SESSION("on_session"); - @SerializedName("revolut") - REVOLUT("revolut"), + @Getter(onMethod_ = {@Override}) + private final String value; - @SerializedName("sns_bank") - SNS_BANK("sns_bank"), + SetupFutureUsage(String value) { + this.value = value; + } + } - @SerializedName("triodos_bank") - TRIODOS_BANK("triodos_bank"), + public enum VerificationMethod implements ApiRequestParams.EnumParam { + @SerializedName("automatic") + AUTOMATIC("automatic"), - @SerializedName("van_lanschot") - VAN_LANSCHOT("van_lanschot"), + @SerializedName("instant") + INSTANT("instant"), - @SerializedName("yoursafe") - YOURSAFE("yoursafe"); + @SerializedName("microdeposits") + MICRODEPOSITS("microdeposits"); @Getter(onMethod_ = {@Override}) private final String value; - Bank(String value) { + VerificationMethod(String value) { this.value = value; } } @@ -11340,65 +23430,20 @@ public enum Bank implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) - public static class InteracPresent { + 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. + * 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(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; - } - } - } + @SerializedName("capture_method") + ApiRequestParams.EnumParam captureMethod; - @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. @@ -11408,71 +23453,45 @@ public static class KakaoPay { @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; + /** Preferred language of the Affirm authorization page that the customer is redirected to. */ + @SerializedName("preferred_locale") + Object 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. + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + *

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

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

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

If you've already set {@code setup_future_usage} 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; + @SerializedName("setup_future_usage") + SetupFutureUsage setupFutureUsage; - private Klarna(Dob dob, Map extraParams) { - this.dob = dob; + 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() { @@ -11480,26 +23499,56 @@ public static Builder builder() { } public static class Builder { - private Dob dob; + private ApiRequestParams.EnumParam captureMethod; private Map extraParams; + private Object preferredLocale; + + private SetupFutureUsage setupFutureUsage; + /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodData.Klarna build() { - return new PaymentIntentUpdateParams.PaymentMethodData.Klarna(this.dob, this.extraParams); + public PaymentIntentUpdateParams.PaymentMethodOptions.Affirm build() { + return new PaymentIntentUpdateParams.PaymentMethodOptions.Affirm( + this.captureMethod, this.extraParams, this.preferredLocale, this.setupFutureUsage); } - /** Customer's date of birth. */ - public Builder setDob(PaymentIntentUpdateParams.PaymentMethodData.Klarna.Dob dob) { - this.dob = dob; + /** + * 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.Klarna#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) { @@ -11512,8 +23561,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.Klarna#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) { @@ -11522,169 +23571,96 @@ 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. + * Preferred language of the Affirm authorization page that the customer is redirected to. */ - @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 setPreferredLocale(String preferredLocale) { + this.preferredLocale = preferredLocale; + return this; } - public static Builder builder() { - return new Builder(); + /** + * Preferred language of the Affirm authorization page that the customer is redirected to. + */ + public Builder setPreferredLocale(EmptyParam preferredLocale) { + this.preferredLocale = preferredLocale; + 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.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; - } + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

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

If you've already set {@code setup_future_usage} 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; } } - } - - @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 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.Konbini build() { - return new PaymentIntentUpdateParams.PaymentMethodData.Konbini(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.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; - } + 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.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(onMethod_ = {@Override}) + private final String value; + + SetupFutureUsage(String value) { + this.value = value; } } } @Getter @EqualsAndHashCode(callSuper = false) - public static class KrCard { + 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. @@ -11694,8 +23670,49 @@ public static class KrCard { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private KrCard(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() { @@ -11703,75 +23720,57 @@ public static Builder builder() { } 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.PaymentMethodData.KrCard build() { - return new PaymentIntentUpdateParams.PaymentMethodData.KrCard(this.extraParams); + public PaymentIntentUpdateParams.PaymentMethodOptions.AfterpayClearpay build() { + return new PaymentIntentUpdateParams.PaymentMethodOptions.AfterpayClearpay( + this.captureMethod, this.extraParams, this.reference, 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.KrCard#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 putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); + public Builder setCaptureMethod( + PaymentIntentUpdateParams.PaymentMethodOptions.AfterpayClearpay.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 PaymentIntentUpdateParams.PaymentMethodData.KrCard#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(EmptyParam captureMethod) { + this.captureMethod = captureMethod; 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 + * map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.AfterpayClearpay#extraParams} for the * field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -11785,7 +23784,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.Link#extraParams} for the + * map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.AfterpayClearpay#extraParams} for the * field documentation. */ public Builder putAllExtraParam(Map map) { @@ -11795,70 +23795,87 @@ public Builder putAllExtraParam(Map map) { 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; + /** + * 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; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodData.MbWay build() { - return new PaymentIntentUpdateParams.PaymentMethodData.MbWay(this.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. + */ + public Builder setReference(EmptyParam 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 PaymentIntentUpdateParams.PaymentMethodData.MbWay#extraParams} for the - * field documentation. + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

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

If you've already set {@code setup_future_usage} 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 putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); + 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"); - /** - * Add all map key/value pairs to `extraParams` map. A map 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(onMethod_ = {@Override}) + private final String value; + + SetupFutureUsage(String value) { + this.value = value; } } } @Getter @EqualsAndHashCode(callSuper = false) - public static class Mobilepay { + 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. @@ -11868,8 +23885,35 @@ public static class Mobilepay { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Mobilepay(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() { @@ -11879,15 +23923,18 @@ 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.Mobilepay build() { - return new PaymentIntentUpdateParams.PaymentMethodData.Mobilepay(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.Mobilepay#extraParams} for + * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.Alipay#extraParams} for * the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -11901,7 +23948,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.Mobilepay#extraParams} for + * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.Alipay#extraParams} for * the field documentation. */ public Builder putAllExtraParam(Map map) { @@ -11911,70 +23958,100 @@ public Builder putAllExtraParam(Map map) { 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. + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

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

If you've already set {@code setup_future_usage} 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 putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); + public Builder setSetupFutureUsage( + PaymentIntentUpdateParams.PaymentMethodOptions.Alipay.SetupFutureUsage + setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; return this; } /** - * Add all map key/value pairs to `extraParams` map. A map 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. + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

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

If you've already set {@code setup_future_usage} 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 putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); + 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 NaverPay { + 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. @@ -11984,16 +24061,9 @@ public static class NaverPay { @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) { + private Alma(ApiRequestParams.EnumParam captureMethod, Map extraParams) { + this.captureMethod = captureMethod; this.extraParams = extraParams; - this.funding = funding; } public static Builder builder() { @@ -12001,20 +24071,51 @@ public static Builder builder() { } public static class Builder { - private Map extraParams; + private ApiRequestParams.EnumParam captureMethod; - private Funding funding; + private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodData.NaverPay build() { - return new PaymentIntentUpdateParams.PaymentMethodData.NaverPay( - this.extraParams, this.funding); + 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.NaverPay#extraParams} for the + * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.Alma#extraParams} for the * field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -12028,7 +24129,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.NaverPay#extraParams} for the + * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.Alma#extraParams} for the * field documentation. */ public Builder putAllExtraParam(Map map) { @@ -12038,29 +24139,16 @@ public Builder putAllExtraParam(Map map) { 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"); + public enum CaptureMethod implements ApiRequestParams.EnumParam { + @SerializedName("manual") + MANUAL("manual"); @Getter(onMethod_ = {@Override}) private final String value; - Funding(String value) { + CaptureMethod(String value) { this.value = value; } } @@ -12068,25 +24156,19 @@ public enum Funding implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) - public static class NzBankAccount { + public static class AmazonPay { /** - * 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. + * 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("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; + @SerializedName("capture_method") + ApiRequestParams.EnumParam captureMethod; /** * Map of extra parameters for custom features not available in this client library. The @@ -12097,28 +24179,35 @@ public static class NzBankAccount { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - @SerializedName("reference") - Object reference; - - /** Required. The suffix of the bank account number. */ - @SerializedName("suffix") - Object suffix; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + *

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

If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates + * and attaches a generated_card + * payment method representing the card to the Customer 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 NzBankAccount( - Object accountHolderName, - Object accountNumber, - Object bankCode, - Object branchCode, + private AmazonPay( + ApiRequestParams.EnumParam captureMethod, Map extraParams, - Object reference, - Object suffix) { - this.accountHolderName = accountHolderName; - this.accountNumber = accountNumber; - this.bankCode = bankCode; - this.branchCode = branchCode; + ApiRequestParams.EnumParam setupFutureUsage) { + this.captureMethod = captureMethod; this.extraParams = extraParams; - this.reference = reference; - this.suffix = suffix; + this.setupFutureUsage = setupFutureUsage; } public static Builder builder() { @@ -12126,91 +24215,54 @@ public static Builder builder() { } public static class Builder { - private Object accountHolderName; - - private Object accountNumber; - - private Object bankCode; - - private Object branchCode; + private ApiRequestParams.EnumParam captureMethod; private Map extraParams; - private Object reference; - - private Object suffix; + private ApiRequestParams.EnumParam setupFutureUsage; /** 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); + public PaymentIntentUpdateParams.PaymentMethodOptions.AmazonPay build() { + return new PaymentIntentUpdateParams.PaymentMethodOptions.AmazonPay( + this.captureMethod, this.extraParams, this.setupFutureUsage); } /** - * 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. + * 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 setAccountHolderName(String accountHolderName) { - this.accountHolderName = accountHolderName; + public Builder setCaptureMethod( + PaymentIntentUpdateParams.PaymentMethodOptions.AmazonPay.CaptureMethod captureMethod) { + this.captureMethod = captureMethod; 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. + * 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 setAccountHolderName(EmptyParam 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 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; + 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.NzBankAccount#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) { @@ -12223,8 +24275,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.NzBankAccount#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) { @@ -12234,33 +24286,90 @@ public Builder putAllExtraParam(Map map) { return this; } - public Builder setReference(String reference) { - this.reference = 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. + */ + public Builder setSetupFutureUsage( + PaymentIntentUpdateParams.PaymentMethodOptions.AmazonPay.SetupFutureUsage + setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; return this; } - public Builder setReference(EmptyParam reference) { - this.reference = 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. + */ + public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; return this; } + } - /** Required. The suffix of the bank account number. */ - public Builder setSuffix(String suffix) { - this.suffix = suffix; - 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; - /** 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 { + 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. @@ -12270,8 +24379,47 @@ public static class Oxxo { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Oxxo(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") + Object targetDate; + + private AuBecsDebit( + Map extraParams, + ApiRequestParams.EnumParam setupFutureUsage, + Object targetDate) { this.extraParams = extraParams; + this.setupFutureUsage = setupFutureUsage; + this.targetDate = targetDate; } public static Builder builder() { @@ -12281,16 +24429,21 @@ public static Builder builder() { public static class Builder { private Map extraParams; + private ApiRequestParams.EnumParam setupFutureUsage; + + private Object targetDate; + /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodData.Oxxo build() { - return new PaymentIntentUpdateParams.PaymentMethodData.Oxxo(this.extraParams); + 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.Oxxo#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) { @@ -12303,8 +24456,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.Oxxo#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) { @@ -12313,162 +24466,102 @@ public Builder putAllExtraParam(Map map) { 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 PaymentIntentUpdateParams.PaymentMethodData.P24 build() { - return new PaymentIntentUpdateParams.PaymentMethodData.P24(this.bank, this.extraParams); - } - /** The customer's bank. */ - public Builder setBank(PaymentIntentUpdateParams.PaymentMethodData.P24.Bank bank) { - this.bank = 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( + PaymentIntentUpdateParams.PaymentMethodOptions.AuBecsDebit.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.PaymentMethodData.P24#extraParams} for the - * field documentation. + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

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

If you've already set {@code setup_future_usage} 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 putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); + public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; return this; } /** - * Add all map key/value pairs to `extraParams` map. A map 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. + * 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(String targetDate) { + this.targetDate = targetDate; 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"), + /** + * 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; + } + } - @SerializedName("toyota_bank") - TOYOTA_BANK("toyota_bank"), + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"), - @SerializedName("velobank") - VELOBANK("velobank"), + @SerializedName("off_session") + OFF_SESSION("off_session"), - @SerializedName("volkswagen_bank") - VOLKSWAGEN_BANK("volkswagen_bank"); + @SerializedName("on_session") + ON_SESSION("on_session"); @Getter(onMethod_ = {@Override}) private final String value; - Bank(String value) { + SetupFutureUsage(String value) { this.value = value; } } @@ -12476,7 +24569,7 @@ public enum Bank implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) - public static class PayByBank { + 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. @@ -12486,8 +24579,53 @@ public static class PayByBank { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private PayByBank(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() { @@ -12497,102 +24635,250 @@ 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.PayByBank build() { - return new PaymentIntentUpdateParams.PaymentMethodData.PayByBank(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.PayByBank#extraParams} for + * 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<>(); } - 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 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; + } + + /** 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; + } - /** - * Add all map key/value pairs to `extraParams` map. A map 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<>(); + /** + * 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; } - 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; + /** + * 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 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"), - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodData.Payco build() { - return new PaymentIntentUpdateParams.PaymentMethodData.Payco(this.extraParams); - } + @SerializedName("on_session") + ON_SESSION("on_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 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; - } + @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.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; + SetupFutureUsage(String value) { + this.value = value; } } } @Getter @EqualsAndHashCode(callSuper = false) - public static class Paynow { + 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. @@ -12602,8 +24888,45 @@ public static class Paynow { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Paynow(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() { @@ -12613,16 +24936,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.Paynow build() { - return new PaymentIntentUpdateParams.PaymentMethodData.Paynow(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.Paynow#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) { @@ -12635,8 +24963,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.Paynow#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) { @@ -12645,135 +24973,131 @@ public Builder putAllExtraParam(Map map) { 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 PaymentIntentUpdateParams.PaymentMethodData.Paypal build() { - return new PaymentIntentUpdateParams.PaymentMethodData.Paypal(this.extraParams); + /** + * 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; } /** - * Add a key/value pair to `extraParams` map. A map 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. + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

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

If you've already set {@code setup_future_usage} 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 putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); + public Builder setSetupFutureUsage( + PaymentIntentUpdateParams.PaymentMethodOptions.Bancontact.SetupFutureUsage + setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; return this; } /** - * Add all map key/value pairs to `extraParams` map. A map 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); + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

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

If you've already set {@code setup_future_usage} 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 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 enum PreferredLanguage implements ApiRequestParams.EnumParam { + @SerializedName("de") + DE("de"), - private Paypay(Map extraParams) { - this.extraParams = extraParams; - } + @SerializedName("en") + EN("en"), - public static Builder builder() { - return new Builder(); - } + @SerializedName("fr") + FR("fr"), - public static class Builder { - private Map extraParams; + @SerializedName("nl") + NL("nl"); - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodData.Paypay build() { - return new PaymentIntentUpdateParams.PaymentMethodData.Paypay(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 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; + PreferredLanguage(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.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; + 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 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 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 @@ -12784,16 +25108,9 @@ public static class Payto { @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; + private Billie(ApiRequestParams.EnumParam captureMethod, Map extraParams) { + this.captureMethod = captureMethod; this.extraParams = extraParams; - this.payId = payId; } public static Builder builder() { @@ -12801,49 +25118,52 @@ public static Builder builder() { } public static class Builder { - private Object accountNumber; - - private Object bsbNumber; + private ApiRequestParams.EnumParam captureMethod; 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; + public PaymentIntentUpdateParams.PaymentMethodOptions.Billie build() { + return new PaymentIntentUpdateParams.PaymentMethodOptions.Billie( + this.captureMethod, this.extraParams); } - /** Bank-State-Branch number of the bank account. */ - public Builder setBsbNumber(String bsbNumber) { - this.bsbNumber = bsbNumber; + /** + * 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; } - /** Bank-State-Branch number of the bank account. */ - public Builder setBsbNumber(EmptyParam bsbNumber) { - this.bsbNumber = bsbNumber; + /** + * 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.Payto#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) { @@ -12856,8 +25176,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.Billie#extraParams} for + * the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -12866,24 +25186,31 @@ public Builder putAllExtraParam(Map map) { this.extraParams.putAll(map); return this; } + } - /** The PayID alias for the bank account. */ - public Builder setPayId(String payId) { - this.payId = payId; - return this; - } + public enum CaptureMethod implements ApiRequestParams.EnumParam { + @SerializedName("manual") + MANUAL("manual"); - /** The PayID alias for the bank account. */ - public Builder setPayId(EmptyParam payId) { - this.payId = payId; - return this; + @Getter(onMethod_ = {@Override}) + private final String value; + + CaptureMethod(String value) { + this.value = value; } } } @Getter @EqualsAndHashCode(callSuper = false) - public static class Pix { + 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. @@ -12893,8 +25220,39 @@ public static class Pix { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Pix(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( + Object code, + Map extraParams, + ApiRequestParams.EnumParam setupFutureUsage) { + this.code = code; this.extraParams = extraParams; + this.setupFutureUsage = setupFutureUsage; } public static Builder builder() { @@ -12902,17 +25260,40 @@ public static Builder builder() { } public static class Builder { + private Object code; + private Map extraParams; + private ApiRequestParams.EnumParam setupFutureUsage; + /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodData.Pix build() { - return new PaymentIntentUpdateParams.PaymentMethodData.Pix(this.extraParams); + 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.Pix#extraParams} for the + * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.Blik#extraParams} for the * field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -12926,7 +25307,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.Pix#extraParams} for the + * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.Blik#extraParams} for the * field documentation. */ public Builder putAllExtraParam(Map map) { @@ -12936,12 +25317,91 @@ 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.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 Promptpay { + 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. @@ -12951,8 +25411,39 @@ public static class Promptpay { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Promptpay(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() { @@ -12960,17 +25451,32 @@ public static Builder builder() { } public static class Builder { + private Long expiresAfterDays; + private Map extraParams; + 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.Boleto build() { + return new PaymentIntentUpdateParams.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 PaymentIntentUpdateParams.PaymentMethodData.Promptpay#extraParams} for + * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.Boleto#extraParams} for * the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -12984,7 +25490,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.Promptpay#extraParams} for + * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.Boleto#extraParams} for * the field documentation. */ public Builder putAllExtraParam(Map map) { @@ -12994,70 +25500,111 @@ public Builder putAllExtraParam(Map map) { 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 PaymentIntentUpdateParams.PaymentMethodData.Qris build() { - return new PaymentIntentUpdateParams.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 PaymentIntentUpdateParams.PaymentMethodData.Qris#extraParams} for the - * field documentation. + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

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

If you've already set {@code setup_future_usage} 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 putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); + public Builder setSetupFutureUsage( + PaymentIntentUpdateParams.PaymentMethodOptions.Boleto.SetupFutureUsage + setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; return this; } /** - * Add all map key/value pairs to `extraParams` map. A map 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. + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

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

If you've already set {@code setup_future_usage} 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 putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); + 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 RadarOptions { + 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. @@ -13068,102 +25615,197 @@ 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. + * Installment configuration for payments attempted on this PaymentIntent. + * + *

For more information, see the installments integration guide. */ - @SerializedName("session") - Object session; + @SerializedName("installments") + Installments installments; - private RadarOptions(Map extraParams, Object session) { - this.extraParams = extraParams; - this.session = session; - } + /** 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; - private Object session; + /** + * Request ability to decrement the + * authorization for this PaymentIntent. + */ + @SerializedName("request_decremental_authorization") + RequestDecrementalAuthorization requestDecrementalAuthorization; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodData.RadarOptions build() { - return new PaymentIntentUpdateParams.PaymentMethodData.RadarOptions( - this.extraParams, this.session); - } + /** + * Request ability to capture beyond the standard + * authorization validity window for this PaymentIntent. + */ + @SerializedName("request_extended_authorization") + RequestExtendedAuthorization requestExtendedAuthorization; - /** - * Add a key/value pair to `extraParams` map. A map 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; - } + /** + * Request ability to increment the + * authorization for this PaymentIntent. + */ + @SerializedName("request_incremental_authorization") + RequestIncrementalAuthorization requestIncrementalAuthorization; - /** - * Add all map key/value pairs to `extraParams` map. A map 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; - } + /** + * Request ability to make multiple + * captures for this PaymentIntent. + */ + @SerializedName("request_multicapture") + RequestMulticapture requestMulticapture; - /** - * 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; - } + /** + * Request ability to overcapture + * for this PaymentIntent. + */ + @SerializedName("request_overcapture") + RequestOvercapture requestOvercapture; - /** - * 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; - } - } - } + /** Request partial authorization on this PaymentIntent. */ + @SerializedName("request_partial_authorization") + RequestPartialAuthorization requestPartialAuthorization; - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Rechnung { - /** Required. Customer's date of birth */ - @SerializedName("dob") - Dob dob; + /** + * 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; /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. + * 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(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + @SerializedName("require_cvc_recollection") + Boolean requireCvcRecollection; - 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; + + /** + * 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() { @@ -13171,184 +25813,127 @@ public static Builder builder() { } public static class Builder { - private Dob dob; - - private Map extraParams; + private ApiRequestParams.EnumParam captureMethod; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodData.Rechnung build() { - return new PaymentIntentUpdateParams.PaymentMethodData.Rechnung( - this.dob, this.extraParams); - } + private Object cvcToken; - /** Required. Customer's date of birth */ - public Builder setDob(PaymentIntentUpdateParams.PaymentMethodData.Rechnung.Dob dob) { - this.dob = dob; - 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.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; - } + private Installments installments; - /** - * Add all map key/value pairs to `extraParams` map. A map 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; - } - } + private MandateOptions mandateOptions; - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Dob { - /** Required. The day of birth, between 1 and 31. */ - @SerializedName("day") - Long day; + private Boolean moto; - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level 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; - /** Required. The month of birth, between 1 and 12. */ - @SerializedName("month") - Long month; + private RequestDecrementalAuthorization requestDecrementalAuthorization; - /** Required. The four-digit year of birth. */ - @SerializedName("year") - Long year; + private RequestExtendedAuthorization requestExtendedAuthorization; - private Dob(Long day, Map extraParams, Long month, Long year) { - this.day = day; - this.extraParams = extraParams; - this.month = month; - this.year = year; - } + private RequestIncrementalAuthorization requestIncrementalAuthorization; - public static Builder builder() { - return new Builder(); - } + private RequestMulticapture requestMulticapture; - public static class Builder { - private Long day; + private RequestOvercapture requestOvercapture; - private Map extraParams; + private RequestPartialAuthorization requestPartialAuthorization; - private Long month; + private RequestThreeDSecure requestThreeDSecure; - private Long year; + private Boolean requireCvcRecollection; - /** 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); - } + private ApiRequestParams.EnumParam setupFutureUsage; - /** Required. The day of birth, between 1 and 31. */ - public Builder setDay(Long day) { - this.day = day; - return this; - } + private Object statementDescriptorSuffixKana; - /** - * Add a key/value pair to `extraParams` map. A map 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; - } + private Object statementDescriptorSuffixKanji; - /** - * Add all map key/value pairs to `extraParams` map. A map 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; - } + private Object statementDetails; - /** Required. The month of birth, between 1 and 12. */ - public Builder setMonth(Long month) { - this.month = month; - return this; - } + private ThreeDSecure threeDSecure; - /** Required. The four-digit year of birth. */ - public Builder setYear(Long year) { - this.year = year; - 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); } - } - } - - @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(); - } + /** + * 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; + } - public static class Builder { - private Map 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; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodData.RevolutPay build() { - return new PaymentIntentUpdateParams.PaymentMethodData.RevolutPay(this.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; + } + + /** + * 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.RevolutPay#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) { @@ -13361,8 +25946,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.RevolutPay#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) { @@ -13371,2944 +25956,3370 @@ public Builder putAllExtraParam(Map map) { 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; + /** + * 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 SamsungPay(Map extraParams) { - this.extraParams = extraParams; - } + /** 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; + } - 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. + */ + public Builder setMoto(Boolean moto) { + this.moto = moto; + return this; + } - 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. + */ + public Builder setNetwork( + PaymentIntentUpdateParams.PaymentMethodOptions.Card.Network network) { + this.network = network; + return this; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodData.SamsungPay build() { - return new PaymentIntentUpdateParams.PaymentMethodData.SamsungPay(this.extraParams); + /** + * Request ability to decrement the + * authorization for this PaymentIntent. + */ + public Builder setRequestDecrementalAuthorization( + PaymentIntentUpdateParams.PaymentMethodOptions.Card.RequestDecrementalAuthorization + requestDecrementalAuthorization) { + this.requestDecrementalAuthorization = requestDecrementalAuthorization; + return this; } /** - * Add a key/value pair to `extraParams` map. A map 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. + * Request ability to capture beyond the + * standard authorization validity window 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 setRequestExtendedAuthorization( + PaymentIntentUpdateParams.PaymentMethodOptions.Card.RequestExtendedAuthorization + requestExtendedAuthorization) { + this.requestExtendedAuthorization = requestExtendedAuthorization; return this; } /** - * Add all map key/value pairs to `extraParams` map. A map 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. + * Request ability to increment the + * authorization for this PaymentIntent. */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); + public Builder setRequestIncrementalAuthorization( + PaymentIntentUpdateParams.PaymentMethodOptions.Card.RequestIncrementalAuthorization + requestIncrementalAuthorization) { + this.requestIncrementalAuthorization = requestIncrementalAuthorization; 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; + /** + * Request ability to make multiple + * captures for this PaymentIntent. + */ + public Builder setRequestMulticapture( + PaymentIntentUpdateParams.PaymentMethodOptions.Card.RequestMulticapture + requestMulticapture) { + this.requestMulticapture = requestMulticapture; + return this; + } - private Satispay(Map extraParams) { - 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 Map 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. + */ + public Builder setRequestThreeDSecure( + PaymentIntentUpdateParams.PaymentMethodOptions.Card.RequestThreeDSecure + requestThreeDSecure) { + this.requestThreeDSecure = requestThreeDSecure; + return this; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodData.Satispay build() { - return new PaymentIntentUpdateParams.PaymentMethodData.Satispay(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). + */ + public Builder setRequireCvcRecollection(Boolean requireCvcRecollection) { + this.requireCvcRecollection = requireCvcRecollection; + return this; } /** - * Add a key/value pair to `extraParams` map. A map 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. + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

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

If you've already set {@code setup_future_usage} 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 putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); + public Builder setSetupFutureUsage( + PaymentIntentUpdateParams.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; } /** - * Add all map key/value pairs to `extraParams` map. A map 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. + * 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(String statementDescriptorSuffixKana) { + this.statementDescriptorSuffixKana = statementDescriptorSuffixKana; 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; - - /** Finalize and obtain parameter instance from this builder. */ - 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.SepaDebit#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(EmptyParam 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.SepaDebit#extraParams} for - * the field documentation. + * 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 putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); + public Builder setStatementDescriptorSuffixKanji(String statementDescriptorSuffixKanji) { + this.statementDescriptorSuffixKanji = statementDescriptorSuffixKanji; return this; } - /** Required. IBAN of the bank account. */ - public Builder setIban(String iban) { - this.iban = iban; + /** + * 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; } - /** Required. IBAN of the bank account. */ - public Builder setIban(EmptyParam iban) { - this.iban = iban; + /** + * 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 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 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.Shopeepay#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(EmptyParam 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.Shopeepay#extraParams} for - * the field documentation. + * If 3D Secure authentication was performed with a third-party provider, the authentication + * details to use for this payment. */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); + public Builder setThreeDSecure( + PaymentIntentUpdateParams.PaymentMethodOptions.Card.ThreeDSecure threeDSecure) { + this.threeDSecure = threeDSecure; 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 PaymentIntentUpdateParams.PaymentMethodData.Sofort build() { - return new PaymentIntentUpdateParams.PaymentMethodData.Sofort( - this.country, this.extraParams); - } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Installments { /** - * Required. Two-letter ISO code representing the country the bank account - * is located in. + * 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 setCountry( - PaymentIntentUpdateParams.PaymentMethodData.Sofort.Country country) { - this.country = country; - return this; - } + @SerializedName("enabled") + Boolean enabled; /** - * Add a key/value pair to `extraParams` map. A map 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. + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized 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 PaymentIntentUpdateParams.PaymentMethodData.Sofort#extraParams} for the - * field documentation. + * The selected installment plan to use for this payment attempt. This parameter can only be + * provided during confirmation. */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; + @SerializedName("plan") + Object plan; + + private Installments(Boolean enabled, Map extraParams, Object plan) { + this.enabled = enabled; + this.extraParams = extraParams; + this.plan = plan; } - } - public enum Country implements ApiRequestParams.EnumParam { - @SerializedName("AT") - AT("AT"), + public static Builder builder() { + return new Builder(); + } - @SerializedName("BE") - BE("BE"), + public static class Builder { + private Boolean enabled; - @SerializedName("DE") - DE("DE"), + private Map extraParams; - @SerializedName("ES") - ES("ES"), + private Object plan; - @SerializedName("IT") - IT("IT"), + /** 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); + } - @SerializedName("NL") - NL("NL"); + /** + * 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; + } - @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.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; + } - Country(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.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( + PaymentIntentUpdateParams.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 StripeBalance { - /** The connected account ID whose Stripe balance to use as the source of payment. */ - @SerializedName("account") - Object account; + @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; + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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; + /** + * 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; - private StripeBalance( - Object account, Map extraParams, SourceType sourceType) { - this.account = account; - this.extraParams = extraParams; - this.sourceType = sourceType; - } + /** + * Required. Type of installment plan, one of {@code fixed_count}, {@code + * bonus}, or {@code revolving}. + */ + @SerializedName("type") + Type type; - public static Builder builder() { - return new Builder(); - } + private Plan(Long count, Map extraParams, Interval interval, Type type) { + this.count = count; + this.extraParams = extraParams; + this.interval = interval; + this.type = type; + } - public static class Builder { - private Object account; + public static Builder builder() { + return new Builder(); + } - private Map extraParams; + public static class Builder { + private Long count; - private SourceType sourceType; + private Map extraParams; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodData.StripeBalance build() { - return new PaymentIntentUpdateParams.PaymentMethodData.StripeBalance( - this.account, this.extraParams, this.sourceType); - } + private Interval interval; - /** The connected account ID whose Stripe balance to use as the source of payment. */ - public Builder setAccount(String account) { - this.account = account; - return this; - } + private Type type; - /** The connected account ID whose Stripe balance to use as the source of payment. */ - public Builder setAccount(EmptyParam account) { - this.account = account; - return this; - } + /** 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); + } - /** - * Add a key/value pair to `extraParams` map. A map 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. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + /** + * 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 all map key/value pairs to `extraParams` map. A map 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. - */ - 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.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; + } - /** - * The source_type - * of the balance - */ - public Builder setSourceType( - PaymentIntentUpdateParams.PaymentMethodData.StripeBalance.SourceType sourceType) { - this.sourceType = sourceType; - return this; - } - } + /** + * Add all map key/value pairs to `extraParams` map. A 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; + } - public enum SourceType implements ApiRequestParams.EnumParam { - @SerializedName("bank_account") - BANK_ACCOUNT("bank_account"), + /** + * 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; + } - @SerializedName("card") - CARD("card"), + /** + * 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; + } + } - @SerializedName("fpx") - FPX("fpx"); + public enum Interval implements ApiRequestParams.EnumParam { + @SerializedName("month") + MONTH("month"); - @Getter(onMethod_ = {@Override}) - private final String value; + @Getter(onMethod_ = {@Override}) + private final String value; - SourceType(String value) { - this.value = value; - } - } - } + Interval(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; + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("bonus") + BONUS("bonus"), - private Swish(Map extraParams) { - this.extraParams = extraParams; - } + @SerializedName("fixed_count") + FIXED_COUNT("fixed_count"), - public static Builder builder() { - return new Builder(); - } + @SerializedName("revolving") + REVOLVING("revolving"); - 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.Swish build() { - return new PaymentIntentUpdateParams.PaymentMethodData.Swish(this.extraParams); + 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.Swish#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.Swish#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; - } - } - } - - @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 PaymentIntentUpdateParams.PaymentMethodData.Twint build() { - return new PaymentIntentUpdateParams.PaymentMethodData.Twint(this.extraParams); - } + @SerializedName("description") + Object 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 PaymentIntentUpdateParams.PaymentMethodData.Twint#extraParams} for the - * field documentation. + * 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 putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + @SerializedName("end_date") + 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 PaymentIntentUpdateParams.PaymentMethodData.Twint#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; - } - } - } - - @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; + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - /** Account type: checkings or savings. Defaults to checking if omitted. */ - @SerializedName("account_type") - AccountType accountType; + /** + * Required. Specifies payment frequency. One of {@code day}, {@code week}, + * {@code month}, {@code year}, or {@code sporadic}. + */ + @SerializedName("interval") + Interval interval; - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-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 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; - /** The ID of a Financial Connections Account to use as a payment method. */ - @SerializedName("financial_connections_account") - Object financialConnectionsAccount; + /** Required. Unique identifier for the mandate or subscription. */ + @SerializedName("reference") + Object reference; - /** Routing number of the bank account. */ - @SerializedName("routing_number") - Object routingNumber; + /** + * Required. Start date of the mandate or subscription. Start date should + * not be lesser than yesterday. + */ + @SerializedName("start_date") + Long startDate; - 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; - } + /** Specifies the type of mandates supported. Possible values are {@code india}. */ + @SerializedName("supported_types") + List + supportedTypes; - public static Builder builder() { - return new Builder(); - } + 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; + } - public static class Builder { - private AccountHolderType accountHolderType; + public static Builder builder() { + return new Builder(); + } - private Object accountNumber; + public static class Builder { + private Long amount; - private AccountType accountType; + private AmountType amountType; - private Map extraParams; + private Object description; - private Object financialConnectionsAccount; + private Long endDate; - private Object routingNumber; + private Map extraParams; - /** 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); - } + private Interval interval; - /** Account holder type: individual or company. */ - public Builder setAccountHolderType( - PaymentIntentUpdateParams.PaymentMethodData.UsBankAccount.AccountHolderType - accountHolderType) { - this.accountHolderType = accountHolderType; - return this; - } + private Long intervalCount; - /** Account number of the bank account. */ - public Builder setAccountNumber(String accountNumber) { - this.accountNumber = accountNumber; - return this; - } + private Object reference; - /** Account number of the bank account. */ - public Builder setAccountNumber(EmptyParam accountNumber) { - this.accountNumber = accountNumber; - return this; - } + private Long startDate; - /** Account type: checkings or savings. Defaults to checking if omitted. */ - public Builder setAccountType( - PaymentIntentUpdateParams.PaymentMethodData.UsBankAccount.AccountType accountType) { - this.accountType = accountType; - return this; - } + private List< + PaymentIntentUpdateParams.PaymentMethodOptions.Card.MandateOptions.SupportedType> + 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 PaymentIntentUpdateParams.PaymentMethodData.UsBankAccount#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.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); } - this.extraParams.put(key, value); - return this; - } - /** - * Add all map key/value pairs to `extraParams` map. A map 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. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** Required. Amount to be charged for future payments. */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; } - 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; - } + /** + * 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; + } - /** The ID of a Financial Connections Account to use as a payment method. */ - public Builder setFinancialConnectionsAccount(EmptyParam financialConnectionsAccount) { - this.financialConnectionsAccount = financialConnectionsAccount; - 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; + } - /** Routing number of the bank account. */ - public Builder setRoutingNumber(String routingNumber) { - this.routingNumber = routingNumber; - 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; + } - /** 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. + */ + public Builder setEndDate(Long endDate) { + this.endDate = endDate; + return this; + } - public enum AccountHolderType implements ApiRequestParams.EnumParam { - @SerializedName("company") - COMPANY("company"), + /** + * Add a key/value pair to `extraParams` map. A 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; + } - @SerializedName("individual") - INDIVIDUAL("individual"); + /** + * Add all map key/value pairs to `extraParams` map. A 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; + } - @Getter(onMethod_ = {@Override}) - private final String 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; + } - AccountHolderType(String value) { - this.value = 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}. + */ + public Builder setIntervalCount(Long intervalCount) { + this.intervalCount = intervalCount; + return this; + } - public enum AccountType implements ApiRequestParams.EnumParam { - @SerializedName("checking") - CHECKING("checking"), + /** Required. Unique identifier for the mandate or subscription. */ + public Builder setReference(String reference) { + this.reference = reference; + return this; + } + + /** Required. Unique identifier for the mandate or subscription. */ + public Builder setReference(EmptyParam reference) { + this.reference = reference; + return this; + } - @SerializedName("savings") - SAVINGS("savings"); + /** + * 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(onMethod_ = {@Override}) - private final String value; + /** + * 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; + } - AccountType(String value) { - this.value = value; + /** + * 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; + } } - } - } - - @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 enum AmountType implements ApiRequestParams.EnumParam { + @SerializedName("fixed") + FIXED("fixed"), - public static class Builder { - private Map extraParams; + @SerializedName("maximum") + MAXIMUM("maximum"); - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodData.WechatPay build() { - return new PaymentIntentUpdateParams.PaymentMethodData.WechatPay(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 PaymentIntentUpdateParams.PaymentMethodData.WechatPay#extraParams} for - * the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + AmountType(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.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; - } - } - } + public enum Interval implements ApiRequestParams.EnumParam { + @SerializedName("day") + DAY("day"), - @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; + @SerializedName("month") + MONTH("month"), - private Zip(Map extraParams) { - this.extraParams = extraParams; - } + @SerializedName("sporadic") + SPORADIC("sporadic"), - public static Builder builder() { - return new Builder(); - } + @SerializedName("week") + WEEK("week"), - public static class Builder { - private Map extraParams; + @SerializedName("year") + YEAR("year"); - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodData.Zip build() { - return new PaymentIntentUpdateParams.PaymentMethodData.Zip(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 PaymentIntentUpdateParams.PaymentMethodData.Zip#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + Interval(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.Zip#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + public enum SupportedType implements ApiRequestParams.EnumParam { + @SerializedName("india") + INDIA("india"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SupportedType(String value) { + this.value = value; } - this.extraParams.putAll(map); - return this; } } - } - public enum AllowRedisplay implements ApiRequestParams.EnumParam { - @SerializedName("always") - ALWAYS("always"), + @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("limited") - LIMITED("limited"), + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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("unspecified") - UNSPECIFIED("unspecified"); + /** Phone number (e.g., a toll-free number that customers can call). */ + @SerializedName("phone") + Object phone; - @Getter(onMethod_ = {@Override}) - private final String value; + private StatementDetails(Address address, Map extraParams, Object phone) { + this.address = address; + this.extraParams = extraParams; + this.phone = phone; + } - AllowRedisplay(String value) { - this.value = value; - } - } + public static Builder builder() { + return new Builder(); + } - public enum Type implements ApiRequestParams.EnumParam { - @SerializedName("acss_debit") - ACSS_DEBIT("acss_debit"), + public static class Builder { + private Address address; - @SerializedName("affirm") - AFFIRM("affirm"), + private Map extraParams; - @SerializedName("afterpay_clearpay") - AFTERPAY_CLEARPAY("afterpay_clearpay"), + private Object phone; - @SerializedName("alipay") - ALIPAY("alipay"), + /** 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("alma") - ALMA("alma"), + /** 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("amazon_pay") - AMAZON_PAY("amazon_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("au_becs_debit") - AU_BECS_DEBIT("au_becs_debit"), + /** + * Add all map key/value pairs to `extraParams` map. A 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("bacs_debit") - BACS_DEBIT("bacs_debit"), + /** Phone number (e.g., a toll-free number that customers can call). */ + public Builder setPhone(String phone) { + this.phone = phone; + return this; + } - @SerializedName("bancontact") - BANCONTACT("bancontact"), + /** Phone number (e.g., a toll-free number that customers can call). */ + public Builder setPhone(EmptyParam phone) { + this.phone = phone; + return this; + } + } - @SerializedName("billie") - BILLIE("billie"), + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Address { + /** City, district, suburb, town, or village. */ + @SerializedName("city") + Object city; - @SerializedName("blik") - BLIK("blik"), + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + @SerializedName("country") + Object country; - @SerializedName("boleto") - BOLETO("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; - @SerializedName("cashapp") - CASHAPP("cashapp"), + /** Address line 1, such as the street, PO Box, or company name. */ + @SerializedName("line1") + Object line1; - @SerializedName("crypto") - CRYPTO("crypto"), + /** Address line 2, such as the apartment, suite, unit, or building. */ + @SerializedName("line2") + Object line2; - @SerializedName("customer_balance") - CUSTOMER_BALANCE("customer_balance"), + /** ZIP or postal code. */ + @SerializedName("postal_code") + Object postalCode; - @SerializedName("eps") - EPS("eps"), + /** State, county, province, or region. */ + @SerializedName("state") + Object state; - @SerializedName("fpx") - FPX("fpx"), + 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("giropay") - GIROPAY("giropay"), + public static Builder builder() { + return new Builder(); + } - @SerializedName("gopay") - GOPAY("gopay"), + public static class Builder { + private Object city; - @SerializedName("grabpay") - GRABPAY("grabpay"), + private Object country; - @SerializedName("id_bank_transfer") - ID_BANK_TRANSFER("id_bank_transfer"), + private Map extraParams; - @SerializedName("ideal") - IDEAL("ideal"), + private Object line1; - @SerializedName("kakao_pay") - KAKAO_PAY("kakao_pay"), + private Object line2; - @SerializedName("klarna") - KLARNA("klarna"), + private Object postalCode; - @SerializedName("konbini") - KONBINI("konbini"), + private Object state; - @SerializedName("kr_card") - KR_CARD("kr_card"), + /** 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("link") - LINK("link"), + /** City, district, suburb, town, or village. */ + public Builder setCity(String city) { + this.city = city; + return this; + } - @SerializedName("mb_way") - MB_WAY("mb_way"), + /** City, district, suburb, town, or village. */ + public Builder setCity(EmptyParam city) { + this.city = city; + return this; + } - @SerializedName("mobilepay") - MOBILEPAY("mobilepay"), + /** + * Two-letter country code (ISO 3166-1 alpha-2). + */ + public Builder setCountry(String country) { + this.country = country; + return this; + } - @SerializedName("multibanco") - MULTIBANCO("multibanco"), + /** + * Two-letter country code (ISO 3166-1 alpha-2). + */ + public Builder setCountry(EmptyParam country) { + this.country = country; + 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.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("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.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("oxxo") - OXXO("oxxo"), + /** Address line 1, such as the street, PO Box, or company name. */ + public Builder setLine1(String line1) { + this.line1 = line1; + return this; + } - @SerializedName("p24") - P24("p24"), + /** Address line 1, such as the street, PO Box, or company name. */ + public Builder setLine1(EmptyParam line1) { + this.line1 = line1; + return this; + } - @SerializedName("pay_by_bank") - PAY_BY_BANK("pay_by_bank"), + /** Address line 2, such as the apartment, suite, unit, or building. */ + public Builder setLine2(String line2) { + this.line2 = line2; + return this; + } - @SerializedName("payco") - PAYCO("payco"), + /** Address line 2, such as the apartment, suite, unit, or building. */ + public Builder setLine2(EmptyParam line2) { + this.line2 = line2; + return this; + } - @SerializedName("paynow") - PAYNOW("paynow"), + /** ZIP or postal code. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } - @SerializedName("paypal") - PAYPAL("paypal"), + /** ZIP or postal code. */ + public Builder setPostalCode(EmptyParam postalCode) { + this.postalCode = postalCode; + return this; + } - @SerializedName("paypay") - PAYPAY("paypay"), + /** State, county, province, or region. */ + public Builder setState(String state) { + this.state = state; + return this; + } - @SerializedName("payto") - PAYTO("payto"), + /** State, county, province, or region. */ + public Builder setState(EmptyParam state) { + this.state = state; + return this; + } + } + } + } - @SerializedName("pix") - PIX("pix"), + @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; - @SerializedName("promptpay") - PROMPTPAY("promptpay"), + /** + * 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; - @SerializedName("qris") - QRIS("qris"), + /** + * 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; - @SerializedName("rechnung") - RECHNUNG("rechnung"), + /** The exemption requested via 3DS and accepted by the issuer at authentication time. */ + @SerializedName("exemption_indicator") + ExemptionIndicator exemptionIndicator; - @SerializedName("revolut_pay") - REVOLUT_PAY("revolut_pay"), + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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("samsung_pay") - SAMSUNG_PAY("samsung_pay"), + /** + * 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; - @SerializedName("satispay") - SATISPAY("satispay"), + /** + * 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; - @SerializedName("sepa_debit") - SEPA_DEBIT("sepa_debit"), + /** + * Required. For 3D Secure 1, the XID. For 3D Secure 2, the Directory + * Server Transaction ID (dsTransID). + */ + @SerializedName("transaction_id") + Object transactionId; - @SerializedName("shopeepay") - SHOPEEPAY("shopeepay"), + /** Required. The version of 3D Secure that was performed. */ + @SerializedName("version") + Version version; - @SerializedName("sofort") - SOFORT("sofort"), + 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; + } - @SerializedName("stripe_balance") - STRIPE_BALANCE("stripe_balance"), + public static Builder builder() { + return new Builder(); + } - @SerializedName("swish") - SWISH("swish"), + public static class Builder { + private AresTransStatus aresTransStatus; - @SerializedName("twint") - TWINT("twint"), + private Object cryptogram; - @SerializedName("us_bank_account") - US_BANK_ACCOUNT("us_bank_account"), + private ElectronicCommerceIndicator electronicCommerceIndicator; - @SerializedName("wechat_pay") - WECHAT_PAY("wechat_pay"), + private ExemptionIndicator exemptionIndicator; - @SerializedName("zip") - ZIP("zip"); + private Map extraParams; - @Getter(onMethod_ = {@Override}) - private final String value; + private NetworkOptions networkOptions; - Type(String value) { - this.value = value; - } - } - } + private Object requestorChallengeIndicator; - @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; + private Object transactionId; - /** - * If this is an {@code affirm} PaymentMethod, this sub-hash contains details about the Affirm - * payment method options. - */ - @SerializedName("affirm") - Object affirm; + private Version version; - /** - * 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; + /** 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 alipay} PaymentMethod, this sub-hash contains details about the Alipay - * payment method options. - */ - @SerializedName("alipay") - Object alipay; + /** 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 alma} PaymentMethod, this sub-hash contains details about the Alma - * payment method options. - */ - @SerializedName("alma") - Object alma; + /** + * 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 amazon_pay} PaymentMethod, this sub-hash contains details about the - * Amazon Pay payment method options. - */ - @SerializedName("amazon_pay") - Object amazonPay; + /** + * 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; + } - /** - * 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; + /** + * 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 bacs_debit} PaymentMethod, this sub-hash contains details about the BACS - * Debit payment method options. - */ - @SerializedName("bacs_debit") - Object bacsDebit; + /** 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 bancontact} PaymentMethod, this sub-hash contains details about the - * Bancontact payment method options. - */ - @SerializedName("bancontact") - Object 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.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 billie} PaymentMethod, this sub-hash contains details about the Billie - * payment method options. - */ - @SerializedName("billie") - Object 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.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 blik} PaymentMethod, this sub-hash contains details about the BLIK - * payment method options. - */ - @SerializedName("blik") - Object blik; + /** + * 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 boleto} PaymentMethod, this sub-hash contains details about the Boleto - * payment method options. - */ - @SerializedName("boleto") - Object boleto; + /** + * 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; + } - /** Configuration for any card payments attempted on this PaymentIntent. */ - @SerializedName("card") - Object card; + /** + * 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 card_present} PaymentMethod, this sub-hash contains details about the - * Card Present payment method options. - */ - @SerializedName("card_present") - Object cardPresent; + /** + * 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 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). + */ + public Builder setTransactionId(EmptyParam transactionId) { + this.transactionId = transactionId; + return this; + } - /** - * 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. */ + public Builder setVersion( + PaymentIntentUpdateParams.PaymentMethodOptions.Card.ThreeDSecure.Version version) { + this.version = version; + 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; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class NetworkOptions { + /** Cartes Bancaires-specific 3DS fields. */ + @SerializedName("cartes_bancaires") + CartesBancaires cartesBancaires; - /** - * 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; - /** - * Map of extra parameters for custom features not available in this client library. The content - * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each - * key/value pair is serialized as if the key is a root-level 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; + } - /** - * 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 CartesBancaires cartesBancaires; - /** - * If this is a {@code gopay} PaymentMethod, this sub-hash contains details about the Gopay - * payment method options. - */ - @SerializedName("gopay") - Object gopay; + private Map extraParams; - /** - * If this is a {@code grabpay} PaymentMethod, this sub-hash contains details about the Grabpay - * payment method options. - */ - @SerializedName("grabpay") - Object grabpay; + /** 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 id_bank_transfer} PaymentMethod, this sub-hash contains details about the - * Indonesia Bank Transfer payment method options. - */ - @SerializedName("id_bank_transfer") - Object idBankTransfer; + /** 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 ideal} PaymentMethod, this sub-hash contains details about the Ideal - * payment method options. - */ - @SerializedName("ideal") - 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.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; + } - /** - * 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; + /** + * Add all map key/value pairs to `extraParams` map. A 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 kakao_pay} PaymentMethod, this sub-hash contains details about the Kakao - * Pay payment method options. - */ - @SerializedName("kakao_pay") - Object kakaoPay; + @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 klarna} PaymentMethod, this sub-hash contains details about the Klarna - * payment method options. - */ - @SerializedName("klarna") - Object klarna; + /** + * 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 konbini} PaymentMethod, this sub-hash contains details about the Konbini - * payment method options. - */ - @SerializedName("konbini") - Object konbini; + /** + * 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 kr_card} PaymentMethod, this sub-hash contains details about the KR Card - * payment method options. - */ - @SerializedName("kr_card") - Object 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; - /** - * If this is a {@code link} PaymentMethod, this sub-hash contains details about the Link - * payment method options. - */ - @SerializedName("link") - Object link; + 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 mb_way} PaymentMethod, this sub-hash contains details about the MB WAY - * payment method options. - */ - @SerializedName("mb_way") - Object mbWay; + 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. - */ - @SerializedName("mobilepay") - Object mobilepay; + public static class Builder { + private CbAvalgo cbAvalgo; - /** - * If this is a {@code multibanco} PaymentMethod, this sub-hash contains details about the - * Multibanco payment method options. - */ - @SerializedName("multibanco") - Object multibanco; + private Object cbExemption; - /** - * 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 Long cbScore; - /** - * 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; + /** 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); + } - /** - * If this is a {@code p24} PaymentMethod, this sub-hash contains details about the Przelewy24 - * payment method options. - */ - @SerializedName("p24") - Object p24; + /** + * 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; + } - /** - * 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; + /** + * 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; + } - /** - * If this is a {@code payco} PaymentMethod, this sub-hash contains details about the PAYCO - * payment method options. - */ - @SerializedName("payco") - Object payco; + /** + * 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; + } - /** - * If this is a {@code paynow} PaymentMethod, this sub-hash contains details about the PayNow - * payment method options. - */ - @SerializedName("paynow") - Object paynow; + /** + * 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; + } - /** - * 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.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; + } - /** - * 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.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; + } + } - /** - * If this is a {@code payto} PaymentMethod, this sub-hash contains details about the PayTo - * payment method options. - */ - @SerializedName("payto") - Object payto; + public enum CbAvalgo implements ApiRequestParams.EnumParam { + @SerializedName("0") + N0("0"), - /** - * If this is a {@code pix} PaymentMethod, this sub-hash contains details about the Pix payment - * method options. - */ - @SerializedName("pix") - Object pix; + @SerializedName("1") + N1("1"), - /** - * If this is a {@code promptpay} PaymentMethod, this sub-hash contains details about the - * PromptPay payment method options. - */ - @SerializedName("promptpay") - Object promptpay; + @SerializedName("2") + N2("2"), - /** - * If this is a {@code qris} PaymentMethod, this sub-hash contains details about the QRIS - * payment method options. - */ - @SerializedName("qris") - Object qris; + @SerializedName("3") + N3("3"), - /** - * If this is a {@code rechnung} PaymentMethod, this sub-hash contains details about the - * Rechnung payment method options. - */ - @SerializedName("rechnung") - Object rechnung; + @SerializedName("4") + N4("4"), - /** - * 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("A") + A("A"); - /** - * 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(onMethod_ = {@Override}) + private final String value; - /** - * If this is a {@code satispay} PaymentMethod, this sub-hash contains details about the - * Satispay payment method options. - */ - @SerializedName("satispay") - Object satispay; + CbAvalgo(String value) { + this.value = value; + } + } + } + } - /** - * 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; + public enum AresTransStatus implements ApiRequestParams.EnumParam { + @SerializedName("A") + A("A"), - /** - * If this is a {@code shopeepay} PaymentMethod, this sub-hash contains details about the - * ShopeePay payment method options. - */ - @SerializedName("shopeepay") - Object shopeepay; + @SerializedName("C") + C("C"), - /** - * If this is a {@code sofort} PaymentMethod, this sub-hash contains details about the SOFORT - * payment method options. - */ - @SerializedName("sofort") - Object sofort; + @SerializedName("I") + I("I"), - /** - * 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("N") + N("N"), - /** - * If this is a {@code Swish} PaymentMethod, this sub-hash contains details about the Swish - * payment method options. - */ - @SerializedName("swish") - Object swish; + @SerializedName("R") + R("R"), - /** - * If this is a {@code twint} PaymentMethod, this sub-hash contains details about the TWINT - * payment method options. - */ - @SerializedName("twint") - Object twint; + @SerializedName("U") + U("U"), - /** - * 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; + @SerializedName("Y") + Y("Y"); - /** - * 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; + @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. - */ - @SerializedName("zip") - Object zip; + AresTransStatus(String value) { + this.value = value; + } + } - 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 enum ElectronicCommerceIndicator implements ApiRequestParams.EnumParam { + @SerializedName("01") + N01("01"), - public static Builder builder() { - return new Builder(); - } + @SerializedName("02") + N02("02"), - public static class Builder { - private Object acssDebit; + @SerializedName("05") + N05("05"), - private Object affirm; + @SerializedName("06") + N06("06"), - private Object afterpayClearpay; + @SerializedName("07") + N07("07"); - private Object alipay; + @Getter(onMethod_ = {@Override}) + private final String value; - private Object alma; + ElectronicCommerceIndicator(String value) { + this.value = value; + } + } - private Object amazonPay; + public enum ExemptionIndicator implements ApiRequestParams.EnumParam { + @SerializedName("low_risk") + LOW_RISK("low_risk"), - private Object auBecsDebit; + @SerializedName("none") + NONE("none"); - private Object bacsDebit; + @Getter(onMethod_ = {@Override}) + private final String value; - private Object bancontact; + ExemptionIndicator(String value) { + this.value = value; + } + } - private Object billie; + public enum Version implements ApiRequestParams.EnumParam { + @SerializedName("1.0.2") + N1__0__2("1.0.2"), - private Object blik; + @SerializedName("2.1.0") + N2__1__0("2.1.0"), - private Object boleto; + @SerializedName("2.2.0") + N2__2__0("2.2.0"); - private Object card; + @Getter(onMethod_ = {@Override}) + private final String value; - private Object cardPresent; + Version(String value) { + this.value = value; + } + } + } - private Object cashapp; + public enum CaptureMethod implements ApiRequestParams.EnumParam { + @SerializedName("manual") + MANUAL("manual"); - private Object crypto; + @Getter(onMethod_ = {@Override}) + private final String value; - private Object customerBalance; + CaptureMethod(String value) { + this.value = value; + } + } - private Object eps; + public enum Network implements ApiRequestParams.EnumParam { + @SerializedName("amex") + AMEX("amex"), - private Map extraParams; + @SerializedName("cartes_bancaires") + CARTES_BANCAIRES("cartes_bancaires"), - private Object fpx; + @SerializedName("diners") + DINERS("diners"), - private Object giropay; + @SerializedName("discover") + DISCOVER("discover"), - private Object gopay; + @SerializedName("eftpos_au") + EFTPOS_AU("eftpos_au"), - private Object grabpay; + @SerializedName("girocard") + GIROCARD("girocard"), - private Object idBankTransfer; + @SerializedName("interac") + INTERAC("interac"), - private Object ideal; + @SerializedName("jcb") + JCB("jcb"), - private Object interacPresent; + @SerializedName("link") + LINK("link"), - private Object kakaoPay; + @SerializedName("mastercard") + MASTERCARD("mastercard"), - private Object klarna; + @SerializedName("unionpay") + UNIONPAY("unionpay"), - private Object konbini; + @SerializedName("unknown") + UNKNOWN("unknown"), - private Object krCard; + @SerializedName("visa") + VISA("visa"); - private Object link; + @Getter(onMethod_ = {@Override}) + private final String value; - private Object mbWay; + Network(String value) { + this.value = value; + } + } - private Object mobilepay; + public enum RequestDecrementalAuthorization implements ApiRequestParams.EnumParam { + @SerializedName("if_available") + IF_AVAILABLE("if_available"), - private Object multibanco; + @SerializedName("never") + NEVER("never"); - private Object naverPay; + @Getter(onMethod_ = {@Override}) + private final String value; - private Object nzBankAccount; + RequestDecrementalAuthorization(String value) { + this.value = value; + } + } - private Object oxxo; + public enum RequestExtendedAuthorization implements ApiRequestParams.EnumParam { + @SerializedName("if_available") + IF_AVAILABLE("if_available"), - private Object p24; + @SerializedName("never") + NEVER("never"); - private Object payByBank; + @Getter(onMethod_ = {@Override}) + private final String value; - private Object payco; + RequestExtendedAuthorization(String value) { + this.value = value; + } + } - private Object paynow; + public enum RequestIncrementalAuthorization implements ApiRequestParams.EnumParam { + @SerializedName("if_available") + IF_AVAILABLE("if_available"), - private Object paypal; + @SerializedName("never") + NEVER("never"); - private Object paypay; + @Getter(onMethod_ = {@Override}) + private final String value; - private Object payto; + RequestIncrementalAuthorization(String value) { + this.value = value; + } + } - private Object pix; + public enum RequestMulticapture implements ApiRequestParams.EnumParam { + @SerializedName("if_available") + IF_AVAILABLE("if_available"), - private Object promptpay; + @SerializedName("never") + NEVER("never"); - private Object qris; + @Getter(onMethod_ = {@Override}) + private final String value; - private Object rechnung; + RequestMulticapture(String value) { + this.value = value; + } + } - private Object revolutPay; + public enum RequestOvercapture implements ApiRequestParams.EnumParam { + @SerializedName("if_available") + IF_AVAILABLE("if_available"), - private Object samsungPay; + @SerializedName("never") + NEVER("never"); - private Object satispay; + @Getter(onMethod_ = {@Override}) + private final String value; - private Object sepaDebit; + RequestOvercapture(String value) { + this.value = value; + } + } - private Object shopeepay; + public enum RequestPartialAuthorization implements ApiRequestParams.EnumParam { + @SerializedName("if_available") + IF_AVAILABLE("if_available"), - private Object sofort; + @SerializedName("never") + NEVER("never"); - private Object stripeBalance; + @Getter(onMethod_ = {@Override}) + private final String value; - private Object swish; + RequestPartialAuthorization(String value) { + this.value = value; + } + } - private Object twint; + public enum RequestThreeDSecure implements ApiRequestParams.EnumParam { + @SerializedName("any") + ANY("any"), - private Object usBankAccount; + @SerializedName("automatic") + AUTOMATIC("automatic"), - private Object wechatPay; + @SerializedName("challenge") + CHALLENGE("challenge"); - private Object zip; + @Getter(onMethod_ = {@Override}) + private final String value; - /** 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); + RequestThreeDSecure(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( - PaymentIntentUpdateParams.PaymentMethodOptions.AcssDebit acssDebit) { - this.acssDebit = acssDebit; - return this; - } + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"), - /** - * 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; - } + @SerializedName("off_session") + OFF_SESSION("off_session"), - /** - * 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("on_session") + ON_SESSION("on_session"); - /** - * 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; + SetupFutureUsage(String value) { + this.value = value; + } } + } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class CardPresent { /** - * If this is a {@code afterpay_clearpay} PaymentMethod, this sub-hash contains details about - * the Afterpay Clearpay 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 setAfterpayClearpay(EmptyParam afterpayClearpay) { - this.afterpayClearpay = afterpayClearpay; - return this; - } + @SerializedName("capture_method") + CaptureMethod captureMethod; /** - * If this is a {@code alipay} PaymentMethod, this sub-hash contains details about the Alipay - * 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 setAlipay(PaymentIntentUpdateParams.PaymentMethodOptions.Alipay alipay) { - this.alipay = alipay; - return this; - } + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; /** - * If this is a {@code alipay} PaymentMethod, this sub-hash contains details about the Alipay - * payment method options. + * Request ability to capture this payment beyond the standard authorization + * validity window. */ - public Builder setAlipay(EmptyParam alipay) { - this.alipay = alipay; - return this; - } + @SerializedName("request_extended_authorization") + Boolean requestExtendedAuthorization; /** - * If this is a {@code alma} PaymentMethod, this sub-hash contains details about the Alma - * 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 setAlma(PaymentIntentUpdateParams.PaymentMethodOptions.Alma alma) { - this.alma = alma; - return this; - } + @SerializedName("request_incremental_authorization_support") + Boolean requestIncrementalAuthorizationSupport; /** - * If this is a {@code alma} PaymentMethod, this sub-hash contains details about the Alma - * payment method options. + * Network routing priority on co-branded EMV cards supporting domestic debit and + * international card schemes. */ - public Builder setAlma(EmptyParam alma) { - this.alma = alma; - return this; - } + @SerializedName("routing") + Routing routing; - /** - * 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; + 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; } - /** - * 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; + 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( - PaymentIntentUpdateParams.PaymentMethodOptions.AuBecsDebit auBecsDebit) { - this.auBecsDebit = auBecsDebit; - return this; - } + public static class Builder { + private CaptureMethod captureMethod; - /** - * 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; - } + 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( - PaymentIntentUpdateParams.PaymentMethodOptions.BacsDebit bacsDebit) { - this.bacsDebit = bacsDebit; - return this; - } + private Boolean requestExtendedAuthorization; - /** - * 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; - } + private Boolean requestIncrementalAuthorizationSupport; - /** - * 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; - } + private Routing routing; - /** - * 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; - } + /** 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); + } - /** - * 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; - } + /** + * 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; + } - /** - * 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; - } + /** + * Add a key/value pair to `extraParams` map. A 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; + } - /** - * 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; - } + /** + * Add all map key/value pairs to `extraParams` map. A 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; + } - /** - * 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; - } + /** + * 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 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; - } + /** + * 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 boleto} PaymentMethod, this sub-hash contains details about the Boleto - * payment method options. - */ - public Builder setBoleto(EmptyParam boleto) { - this.boleto = boleto; - 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; + } } - /** Configuration for any card payments attempted on this PaymentIntent. */ - public Builder setCard(PaymentIntentUpdateParams.PaymentMethodOptions.Card card) { - this.card = card; - 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; - /** Configuration for any card payments attempted on this PaymentIntent. */ - public Builder setCard(EmptyParam card) { - this.card = card; - return this; - } + /** Routing requested priority. */ + @SerializedName("requested_priority") + RequestedPriority requestedPriority; - /** - * 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; - } + private Routing(Map extraParams, RequestedPriority requestedPriority) { + this.extraParams = extraParams; + this.requestedPriority = requestedPriority; + } - /** - * 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; - } + public static Builder builder() { + return new Builder(); + } - /** - * 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; - } + 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. - */ - public Builder setCashapp(EmptyParam cashapp) { - this.cashapp = cashapp; - return this; - } + private RequestedPriority requestedPriority; - /** - * 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; - } + /** 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 crypto} PaymentMethod, this sub-hash contains details about the Crypto - * payment method options. - */ - public Builder setCrypto(EmptyParam crypto) { - this.crypto = crypto; - return this; - } + /** + * Add a key/value pair to `extraParams` map. A 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 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; - } + /** + * Add all map key/value pairs to `extraParams` map. A 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 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; - } + /** Routing requested priority. */ + public Builder setRequestedPriority( + PaymentIntentUpdateParams.PaymentMethodOptions.CardPresent.Routing.RequestedPriority + requestedPriority) { + this.requestedPriority = requestedPriority; + 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; - } + public enum RequestedPriority implements ApiRequestParams.EnumParam { + @SerializedName("domestic") + DOMESTIC("domestic"), - /** - * 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; - } + @SerializedName("international") + INTERNATIONAL("international"); - /** - * Add a key/value pair to `extraParams` map. A 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; + @Getter(onMethod_ = {@Override}) + private final String value; + + RequestedPriority(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#extraParams} for the field - * documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + 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; } - this.extraParams.putAll(map); - return this; } + } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Cashapp { /** - * If this is a {@code fpx} PaymentMethod, this sub-hash contains details about the FPX - * 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 setFpx(PaymentIntentUpdateParams.PaymentMethodOptions.Fpx fpx) { - this.fpx = fpx; - return this; - } + @SerializedName("capture_method") + ApiRequestParams.EnumParam captureMethod; /** - * If this is a {@code fpx} PaymentMethod, this sub-hash contains details about the FPX - * 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 setFpx(EmptyParam fpx) { - this.fpx = fpx; - return this; - } + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; /** - * If this is a {@code giropay} PaymentMethod, this sub-hash contains details about the - * Giropay 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 setGiropay(PaymentIntentUpdateParams.PaymentMethodOptions.Giropay giropay) { - this.giropay = giropay; - return this; - } + @SerializedName("setup_future_usage") + ApiRequestParams.EnumParam setupFutureUsage; - /** - * 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; + private Cashapp( + ApiRequestParams.EnumParam captureMethod, + Map extraParams, + ApiRequestParams.EnumParam setupFutureUsage) { + this.captureMethod = captureMethod; + this.extraParams = extraParams; + this.setupFutureUsage = setupFutureUsage; } - /** - * 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; + 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. - */ - public Builder setGopay(EmptyParam gopay) { - this.gopay = gopay; - return this; - } + public static class Builder { + private ApiRequestParams.EnumParam captureMethod; - /** - * 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; - } + private Map extraParams; - /** - * 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; + private ApiRequestParams.EnumParam setupFutureUsage; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodOptions.Cashapp build() { + return new PaymentIntentUpdateParams.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( + PaymentIntentUpdateParams.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 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 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; - } + public enum CaptureMethod implements ApiRequestParams.EnumParam { + @SerializedName("manual") + MANUAL("manual"); - /** - * 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; - } + @Getter(onMethod_ = {@Override}) + private final String 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; + CaptureMethod(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(EmptyParam ideal) { - this.ideal = ideal; - return this; - } + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"), - /** - * 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("off_session") + OFF_SESSION("off_session"), - /** - * 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("on_session") + ON_SESSION("on_session"); - /** - * 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; - } + @Getter(onMethod_ = {@Override}) + private final String value; - /** - * 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; + SetupFutureUsage(String value) { + this.value = value; + } } + } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Crypto { /** - * If this is a {@code klarna} PaymentMethod, this sub-hash contains details about the Klarna - * 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 setKlarna(PaymentIntentUpdateParams.PaymentMethodOptions.Klarna klarna) { - this.klarna = klarna; - return this; - } + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; /** - * If this is a {@code klarna} PaymentMethod, this sub-hash contains details about the Klarna - * 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 setKlarna(EmptyParam klarna) { - this.klarna = klarna; - return this; - } + @SerializedName("setup_future_usage") + SetupFutureUsage setupFutureUsage; - /** - * 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 Crypto(Map extraParams, SetupFutureUsage setupFutureUsage) { + this.extraParams = extraParams; + this.setupFutureUsage = 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; + 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; - } + private SetupFutureUsage setupFutureUsage; - /** - * 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; + /** 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 link} PaymentMethod, this sub-hash contains details about the Link - * payment method options. - */ - public Builder setLink(EmptyParam link) { - this.link = link; - 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 mb_way} PaymentMethod, this sub-hash contains details about the MB WAY - * payment method options. + * Configuration for the bank transfer funding type, if the {@code funding_type} is set to + * {@code bank_transfer}. */ - public Builder setMbWay(PaymentIntentUpdateParams.PaymentMethodOptions.MbWay mbWay) { - this.mbWay = mbWay; - return this; - } + @SerializedName("bank_transfer") + BankTransfer bankTransfer; /** - * If this is a {@code mb_way} PaymentMethod, this sub-hash contains details about the MB WAY - * 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 setMbWay(EmptyParam mbWay) { - this.mbWay = mbWay; - return this; - } + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; /** - * If this is a {@code MobilePay} PaymentMethod, this sub-hash contains details about the - * MobilePay 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 setMobilepay( - PaymentIntentUpdateParams.PaymentMethodOptions.Mobilepay mobilepay) { - this.mobilepay = mobilepay; - return this; - } + @SerializedName("funding_type") + FundingType fundingType; /** - * If this is a {@code MobilePay} PaymentMethod, this sub-hash contains details about the - * MobilePay 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 setMobilepay(EmptyParam mobilepay) { - this.mobilepay = mobilepay; - return this; - } + @SerializedName("setup_future_usage") + SetupFutureUsage setupFutureUsage; - /** - * 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; + 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 multibanco} PaymentMethod, this sub-hash contains details about the - * Multibanco payment method options. - */ - public Builder setMultibanco(EmptyParam multibanco) { - this.multibanco = multibanco; - 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(PaymentIntentUpdateParams.PaymentMethodOptions.NaverPay naverPay) { - this.naverPay = naverPay; - return this; + 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 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; - } + @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; - /** - * 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 List< + PaymentIntentUpdateParams.PaymentMethodOptions.CustomerBalance.BankTransfer + .RequestedAddressType> + requestedAddressTypes; - /** - * 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; - } + private Type type; - /** - * 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; - } + /** 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); + } - /** - * 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; - } + /** 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 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 a key/value pair to `extraParams` map. A 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 p24} PaymentMethod, this sub-hash contains details about the Przelewy24 - * payment method options. - */ - public Builder setP24(EmptyParam 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.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 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; - } + /** + * 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 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 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 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 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 payco} PaymentMethod, this sub-hash contains details about the PAYCO - * payment method options. - */ - public Builder setPayco(EmptyParam payco) { - this.payco = payco; - 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 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; - } + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 paynow} PaymentMethod, this sub-hash contains details about the PayNow - * payment method options. - */ - public Builder setPaynow(EmptyParam paynow) { - this.paynow = paynow; - return this; - } + private EuBankTransfer(Object country, Map extraParams) { + this.country = country; + this.extraParams = extraParams; + } - /** - * 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; - } + public static Builder builder() { + return new Builder(); + } - /** - * 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; - } + public static class Builder { + private Object country; - /** - * 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 Map extraParams; + + /** 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 paypay} PaymentMethod, this sub-hash contains details about the PayPay - * payment method options. - */ - public Builder setPaypay(EmptyParam paypay) { - this.paypay = paypay; - 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 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 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 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.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 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.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 pix} PaymentMethod, this sub-hash contains details about the Pix - * payment method options. - */ - public Builder setPix(EmptyParam pix) { - this.pix = pix; - return this; - } + public enum RequestedAddressType implements ApiRequestParams.EnumParam { + @SerializedName("aba") + ABA("aba"), - /** - * 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; - } + @SerializedName("iban") + IBAN("iban"), - /** - * 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; - } + @SerializedName("sepa") + SEPA("sepa"), - /** - * 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; - } + @SerializedName("sort_code") + SORT_CODE("sort_code"), - /** - * 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; - } + @SerializedName("spei") + SPEI("spei"), - /** - * 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; - } + @SerializedName("swift") + SWIFT("swift"), - /** - * 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; - } + @SerializedName("zengin") + ZENGIN("zengin"); - /** - * 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; - } + @Getter(onMethod_ = {@Override}) + private final String value; - /** - * 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; - } + RequestedAddressType(String value) { + this.value = value; + } + } - /** - * 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 Type implements ApiRequestParams.EnumParam { + @SerializedName("eu_bank_transfer") + EU_BANK_TRANSFER("eu_bank_transfer"), - /** - * 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("gb_bank_transfer") + GB_BANK_TRANSFER("gb_bank_transfer"), - /** - * 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("jp_bank_transfer") + JP_BANK_TRANSFER("jp_bank_transfer"), - /** - * 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("mx_bank_transfer") + MX_BANK_TRANSFER("mx_bank_transfer"), - /** - * 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("us_bank_transfer") + US_BANK_TRANSFER("us_bank_transfer"); - /** - * 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; - } + @Getter(onMethod_ = {@Override}) + private final String value; - /** - * 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; + Type(String value) { + this.value = value; + } + } } - /** - * 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; - } + public enum FundingType implements ApiRequestParams.EnumParam { + @SerializedName("bank_transfer") + BANK_TRANSFER("bank_transfer"); - /** - * 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(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(EmptyParam sofort) { - this.sofort = sofort; - return this; + FundingType(String value) { + this.value = value; + } } - /** - * 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 enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"); - /** - * 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; + @Getter(onMethod_ = {@Override}) + private final String value; + + SetupFutureUsage(String value) { + this.value = value; + } } + } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Eps { /** - * If this is a {@code Swish} PaymentMethod, this sub-hash contains details about the Swish - * 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 setSwish(PaymentIntentUpdateParams.PaymentMethodOptions.Swish swish) { - this.swish = swish; - 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. + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + *

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

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

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

If you've already set {@code setup_future_usage} 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 setSwish(EmptyParam swish) { - this.swish = swish; - return this; + @SerializedName("setup_future_usage") + SetupFutureUsage setupFutureUsage; + + private Eps(Map extraParams, SetupFutureUsage setupFutureUsage) { + this.extraParams = extraParams; + this.setupFutureUsage = setupFutureUsage; } - /** - * 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; + 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(EmptyParam twint) { - this.twint = twint; - return this; + public static class Builder { + private Map extraParams; + + private SetupFutureUsage setupFutureUsage; + + /** Finalize and obtain parameter instance from this builder. */ + 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.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.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( + PaymentIntentUpdateParams.PaymentMethodOptions.Eps.SetupFutureUsage setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + 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( - PaymentIntentUpdateParams.PaymentMethodOptions.UsBankAccount usBankAccount) { - this.usBankAccount = usBankAccount; - 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 { /** - * If this is a {@code us_bank_account} PaymentMethod, this sub-hash contains details about - * the US bank account 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 setUsBankAccount(EmptyParam usBankAccount) { - this.usBankAccount = usBankAccount; - return this; - } + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; /** - * If this is a {@code wechat_pay} PaymentMethod, this sub-hash contains details about the - * WeChat 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 setWechatPay( - PaymentIntentUpdateParams.PaymentMethodOptions.WechatPay wechatPay) { - this.wechatPay = wechatPay; - return this; + @SerializedName("setup_future_usage") + SetupFutureUsage setupFutureUsage; + + private Fpx(Map extraParams, SetupFutureUsage setupFutureUsage) { + this.extraParams = extraParams; + this.setupFutureUsage = setupFutureUsage; } - /** - * If this is a {@code wechat_pay} PaymentMethod, this sub-hash contains details about the - * WeChat Pay payment method options. - */ - public Builder setWechatPay(EmptyParam wechatPay) { - this.wechatPay = wechatPay; - return this; + public static Builder builder() { + return new Builder(); } - /** - * 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; + public static class Builder { + private Map extraParams; + + private SetupFutureUsage setupFutureUsage; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodOptions.Fpx build() { + return new PaymentIntentUpdateParams.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 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; + } + + /** + * Add all map key/value pairs to `extraParams` map. A 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; + } + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

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

If you've already set {@code setup_future_usage} 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; + } } - /** - * 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; + 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 AcssDebit { + 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. @@ -16318,10 +29329,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 +29353,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 Giropay(Map extraParams, SetupFutureUsage setupFutureUsage) { this.extraParams = extraParams; - this.mandateOptions = mandateOptions; this.setupFutureUsage = setupFutureUsage; - this.targetDate = targetDate; - this.verificationMethod = verificationMethod; } public static Builder builder() { @@ -16380,28 +29367,18 @@ 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.Giropay build() { + return new PaymentIntentUpdateParams.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 PaymentIntentUpdateParams.PaymentMethodOptions.AcssDebit#extraParams} for + * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.Giropay#extraParams} for * the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -16415,7 +29392,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.AcssDebit#extraParams} for + * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.Giropay#extraParams} for * the field documentation. */ public Builder putAllExtraParam(Map map) { @@ -16426,14 +29403,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,11 +29428,111 @@ public Builder setMandateOptions( * off_session}. */ public Builder setSetupFutureUsage( - PaymentIntentUpdateParams.PaymentMethodOptions.AcssDebit.SetupFutureUsage + PaymentIntentUpdateParams.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 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.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.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 @@ -16489,270 +29558,25 @@ public Builder setSetupFutureUsage( * 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; - } - - /** Bank account verification method. */ - public Builder setVerificationMethod( - PaymentIntentUpdateParams.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") - Object intervalDescription; - - /** Payment schedule for the mandate. */ - @SerializedName("payment_schedule") - PaymentSchedule paymentSchedule; - - /** Transaction type of the mandate. */ - @SerializedName("transaction_type") - TransactionType transactionType; - - private MandateOptions( - Object customMandateUrl, - Map extraParams, - Object intervalDescription, - PaymentSchedule paymentSchedule, - TransactionType transactionType) { - this.customMandateUrl = customMandateUrl; - this.extraParams = extraParams; - this.intervalDescription = intervalDescription; - this.paymentSchedule = paymentSchedule; - this.transactionType = transactionType; - } - - public static Builder builder() { - return new Builder(); - } - - public static class Builder { - private Object customMandateUrl; - - private Map extraParams; - - private Object intervalDescription; - - private PaymentSchedule paymentSchedule; - - private TransactionType transactionType; - - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodOptions.AcssDebit.MandateOptions build() { - return new PaymentIntentUpdateParams.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 - * PaymentIntentUpdateParams.PaymentMethodOptions.AcssDebit.MandateOptions#extraParams} - * for the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } - - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link - * PaymentIntentUpdateParams.PaymentMethodOptions.AcssDebit.MandateOptions#extraParams} - * for the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } - - /** - * Description of the mandate interval. Only required if 'payment_schedule' parameter is - * 'interval' or 'combined'. - */ - public Builder setIntervalDescription(String intervalDescription) { - this.intervalDescription = intervalDescription; - return this; - } - - /** - * Description of the mandate interval. Only required if 'payment_schedule' parameter is - * 'interval' or 'combined'. - */ - public Builder setIntervalDescription(EmptyParam intervalDescription) { - this.intervalDescription = intervalDescription; - return this; - } - - /** Payment schedule for the mandate. */ - public Builder setPaymentSchedule( - PaymentIntentUpdateParams.PaymentMethodOptions.AcssDebit.MandateOptions - .PaymentSchedule - paymentSchedule) { - this.paymentSchedule = paymentSchedule; - return this; - } - - /** Transaction type of the mandate. */ - public Builder setTransactionType( - PaymentIntentUpdateParams.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 Builder setSetupFutureUsage( + PaymentIntentUpdateParams.PaymentMethodOptions.Gopay.SetupFutureUsage + setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; } } - public enum VerificationMethod implements ApiRequestParams.EnumParam { - @SerializedName("automatic") - AUTOMATIC("automatic"), - - @SerializedName("instant") - INSTANT("instant"), + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"), - @SerializedName("microdeposits") - MICRODEPOSITS("microdeposits"); + @SerializedName("off_session") + OFF_SESSION("off_session"); @Getter(onMethod_ = {@Override}) private final String value; - VerificationMethod(String value) { + SetupFutureUsage(String value) { this.value = value; } } @@ -16760,20 +29584,7 @@ public enum VerificationMethod implements ApiRequestParams.EnumParam { @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 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. @@ -16783,10 +29594,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 +29620,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 Grabpay(Map extraParams, SetupFutureUsage setupFutureUsage) { this.extraParams = extraParams; - this.preferredLocale = preferredLocale; this.setupFutureUsage = setupFutureUsage; } @@ -16829,55 +29630,20 @@ 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.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.Affirm#extraParams} for + * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.Grabpay#extraParams} for * the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -16891,7 +29657,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.Affirm#extraParams} for + * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.Grabpay#extraParams} for * the field documentation. */ public Builder putAllExtraParam(Map map) { @@ -16902,22 +29668,6 @@ 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; - return this; - } - - /** - * Preferred language of the Affirm authorization page that the customer is redirected to. - */ - public Builder setPreferredLocale(EmptyParam preferredLocale) { - this.preferredLocale = preferredLocale; - return this; - } - /** * Indicates that you intend to make future payments with this PaymentIntent's payment * method. @@ -16943,25 +29693,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 +29715,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 +29739,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 +29765,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 +29781,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 +29817,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 +29832,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 +29843,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 +29868,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 +29890,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 +29926,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 +29941,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 +29963,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 +29999,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 +30053,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. * @@ -17391,9 +30137,35 @@ public static class Alma { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Alma(ApiRequestParams.EnumParam captureMethod, 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() { @@ -17405,10 +30177,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 +30196,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 +30219,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 +30233,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 +30243,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 +30308,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 +30350,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 +30376,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 +30418,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 +30451,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 +30474,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,14 +30488,30 @@ 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) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); + 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( + 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; } @@ -17635,468 +30534,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.AmazonPay.SetupFutureUsage + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.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. + * 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. */ - public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { - this.setupFutureUsage = setupFutureUsage; + @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; } } - public enum CaptureMethod implements ApiRequestParams.EnumParam { - @SerializedName("manual") - MANUAL("manual"); + @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 PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.OnDemand build() { + return new PaymentIntentUpdateParams.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 + * 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; + } + + /** + * Add all map key/value pairs to `extraParams` map. A 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; + } + + /** + * 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( + 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; + } + } + + public enum PurchaseInterval implements ApiRequestParams.EnumParam { + @SerializedName("day") + DAY("day"), + + @SerializedName("month") + MONTH("month"), + + @SerializedName("week") + WEEK("week"), - @Getter(onMethod_ = {@Override}) - private final String value; + @SerializedName("year") + YEAR("year"); - CaptureMethod(String value) { - this.value = value; + @Getter(onMethod_ = {@Override}) + private final String value; + + PurchaseInterval(String value) { + this.value = value; + } } } - public enum SetupFutureUsage implements ApiRequestParams.EnumParam { - @SerializedName("none") - NONE("none"), + @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; - @SerializedName("off_session") - OFF_SESSION("off_session"); + /** Required. Unit of time between subscription charges. */ + @SerializedName("interval") + Interval interval; - @Getter(onMethod_ = {@Override}) - private final String value; + /** + * 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; - SetupFutureUsage(String value) { - this.value = value; - } - } - } + /** Name for subscription. */ + @SerializedName("name") + Object name; - @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; + /** Describes the upcoming charge for this subscription. */ + @SerializedName("next_billing") + NextBilling nextBilling; - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment method. - * - *

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

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

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

If you've already set {@code setup_future_usage} 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; + /** + * 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; - /** - * 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 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; + } - private AuBecsDebit( - Map extraParams, - ApiRequestParams.EnumParam setupFutureUsage, - Object targetDate) { - this.extraParams = extraParams; - this.setupFutureUsage = setupFutureUsage; - this.targetDate = targetDate; - } + 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 Interval interval; - private ApiRequestParams.EnumParam setupFutureUsage; + private Long intervalCount; - private Object targetDate; + private Object name; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodOptions.AuBecsDebit build() { - return new PaymentIntentUpdateParams.PaymentMethodOptions.AuBecsDebit( - this.extraParams, this.setupFutureUsage, this.targetDate); - } + private NextBilling nextBilling; - /** - * Add a key/value pair to `extraParams` map. A 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<>(); - } - this.extraParams.put(key, value); - return this; - } + private Object reference; - /** - * Add all map key/value pairs to `extraParams` map. A 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<>(); + /** 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); } - 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.AuBecsDebit.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.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; + } - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment - * method. - * - *

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

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

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

If you've already set {@code setup_future_usage} 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 all map key/value pairs to `extraParams` map. A 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; + } - /** - * 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; - } + /** Required. Unit of time between subscription charges. */ + public Builder setInterval( + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.Subscription.Interval + interval) { + this.interval = interval; + 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; - } - } + /** + * 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 SetupFutureUsage implements ApiRequestParams.EnumParam { - @SerializedName("none") - NONE("none"), + /** Name for subscription. */ + public Builder setName(String name) { + this.name = name; + return this; + } - @SerializedName("off_session") - OFF_SESSION("off_session"), + /** Name for subscription. */ + public Builder setName(EmptyParam name) { + this.name = name; + return this; + } - @SerializedName("on_session") - ON_SESSION("on_session"); + /** Describes the upcoming charge for this subscription. */ + public Builder setNextBilling( + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.Subscription.NextBilling + nextBilling) { + this.nextBilling = nextBilling; + 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(String reference) { + this.reference = reference; + return this; + } - SetupFutureUsage(String value) { - this.value = 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; + } } - } - } - @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; - /** Additional fields for Mandate creation. */ - @SerializedName("mandate_options") - MandateOptions mandateOptions; + /** + * Required. The date of the next charge for the subscription in + * YYYY-MM-DD format. + */ + @SerializedName("date") + Object date; - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment method. - * - *

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

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

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

If you've already set {@code setup_future_usage} 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; + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - /** - * 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 NextBilling(Long amount, Object date, Map extraParams) { + this.amount = amount; + this.date = date; + this.extraParams = extraParams; + } - 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() { + return new Builder(); + } - public static Builder builder() { - return new Builder(); - } + public static class Builder { + private Long amount; - public static class Builder { - private Map extraParams; + private Object date; - private MandateOptions mandateOptions; + private Map extraParams; - private ApiRequestParams.EnumParam setupFutureUsage; + /** 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 Object targetDate; + /** Required. The amount of the next charge for the subscription. */ + public Builder setAmount(Long amount) { + this.amount = amount; + 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); - } + /** + * 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 PaymentIntentUpdateParams.PaymentMethodOptions.BacsDebit#extraParams} for - * the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** + * 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; + } + + /** + * Add a key/value pair to `extraParams` map. A 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 all map key/value pairs to `extraParams` map. A 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,1576 +31109,1907 @@ 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; + + /** 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 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.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 + * PaymentIntentUpdateParams.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 + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData#ferryReservationDetails} + * for the field documentation. + */ + @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; + } + + /** + * 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. + */ + @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; + } - private MandateOptions(Map extraParams, Object referencePrefix) { - this.extraParams = extraParams; - this.referencePrefix = referencePrefix; - } + /** Supplementary ferry reservation details. */ + public Builder setFerryReservationDetails(EmptyParam ferryReservationDetails) { + this.ferryReservationDetails = ferryReservationDetails; + return this; + } - public static Builder builder() { - return new Builder(); - } + /** Supplementary ferry reservation details. */ + public Builder setFerryReservationDetails( + List< + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail> + ferryReservationDetails) { + this.ferryReservationDetails = ferryReservationDetails; + 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#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; + } - private Object referencePrefix; + /** + * 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; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodOptions.BacsDebit.MandateOptions build() { - return new PaymentIntentUpdateParams.PaymentMethodOptions.BacsDebit.MandateOptions( - this.extraParams, this.referencePrefix); + /** Supplementary insurance details. */ + public Builder setInsurances(EmptyParam insurances) { + this.insurances = insurances; + return this; + } + + /** Supplementary insurance details. */ + public Builder setInsurances( + List< + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.Insurance> + insurances) { + this.insurances = insurances; + return this; } /** - * Add a key/value pair to `extraParams` map. A 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} + * 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. */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + @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>(); } - this.extraParams.put(key, value); + ((List< + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.MarketplaceSeller>) + this.marketplaceSellers) + .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.BacsDebit.MandateOptions#extraParams} + * 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. */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + @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>(); } - this.extraParams.putAll(map); + ((List< + PaymentIntentUpdateParams.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< + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.MarketplaceSeller> + marketplaceSellers) { + this.marketplaceSellers = marketplaceSellers; 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 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. */ - public Builder setReferencePrefix(String referencePrefix) { - this.referencePrefix = referencePrefix; + @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; } /** - * 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 `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. */ - public Builder setReferencePrefix(EmptyParam referencePrefix) { - this.referencePrefix = referencePrefix; + @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; } - } - } - public enum SetupFutureUsage implements ApiRequestParams.EnumParam { - @SerializedName("none") - NONE("none"), + /** Supplementary round trip reservation details. */ + public Builder setRoundTripReservationDetails(EmptyParam roundTripReservationDetails) { + this.roundTripReservationDetails = roundTripReservationDetails; + return this; + } - @SerializedName("off_session") - OFF_SESSION("off_session"), + /** Supplementary round trip reservation details. */ + public Builder setRoundTripReservationDetails( + List< + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail> + roundTripReservationDetails) { + this.roundTripReservationDetails = roundTripReservationDetails; + return this; + } - @SerializedName("on_session") - ON_SESSION("on_session"); + /** + * 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; + } - @Getter(onMethod_ = {@Override}) - private final String value; + /** + * 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; + } - SetupFutureUsage(String value) { - this.value = value; - } - } - } + /** Supplementary train reservation details. */ + public Builder setTrainReservationDetails(EmptyParam trainReservationDetails) { + this.trainReservationDetails = trainReservationDetails; + 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 train reservation details. */ + public Builder setTrainReservationDetails( + List< + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail> + trainReservationDetails) { + this.trainReservationDetails = trainReservationDetails; + return this; + } - /** - * Preferred language of the Bancontact authorization page that the customer is redirected to. - */ - @SerializedName("preferred_language") - PreferredLanguage preferredLanguage; + /** + * 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; + } - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment method. - * - *

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

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

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

If you've already set {@code setup_future_usage} 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 `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; + } - private Bancontact( - Map extraParams, - PreferredLanguage preferredLanguage, - ApiRequestParams.EnumParam setupFutureUsage) { - this.extraParams = extraParams; - this.preferredLanguage = preferredLanguage; - this.setupFutureUsage = setupFutureUsage; - } + /** Voucher details, such as a gift card or discount code. */ + public Builder setVouchers(EmptyParam vouchers) { + this.vouchers = vouchers; + return this; + } - public static Builder builder() { - return new Builder(); - } + /** 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; + } + } - public static class Builder { - private Map extraParams; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class BusReservationDetail { + /** Name of associated or partner company for the service. */ + @SerializedName("affiliate_name") + Object affiliateName; - private PreferredLanguage preferredLanguage; + /** Arrival details. */ + @SerializedName("arrival") + Arrival arrival; - private ApiRequestParams.EnumParam setupFutureUsage; + /** Name of transportation company. */ + @SerializedName("carrier_name") + Object carrierName; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodOptions.Bancontact build() { - return new PaymentIntentUpdateParams.PaymentMethodOptions.Bancontact( - this.extraParams, this.preferredLanguage, this.setupFutureUsage); - } + /** Currency. */ + @SerializedName("currency") + 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.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; - } + /** Departure details. */ + @SerializedName("departure") + Departure departure; - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.Bancontact#extraParams} - * for the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 + .BusReservationDetail.Insurance> + insurances; - /** - * 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; - } + /** 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; + } - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment - * method. - * - *

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

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

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

If you've already set {@code setup_future_usage} 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; - } + 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 affiliateName; - public enum PreferredLanguage implements ApiRequestParams.EnumParam { - @SerializedName("de") - DE("de"), + private Arrival arrival; - @SerializedName("en") - EN("en"), + private Object carrierName; - @SerializedName("fr") - FR("fr"), + private Object currency; - @SerializedName("nl") - NL("nl"); + private Departure departure; - @Getter(onMethod_ = {@Override}) - private final String value; + private Map extraParams; - PreferredLanguage(String value) { - this.value = value; - } - } + private List< + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .BusReservationDetail.Insurance> + insurances; - public enum SetupFutureUsage implements ApiRequestParams.EnumParam { - @SerializedName("none") - NONE("none"), + private List< + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .BusReservationDetail.Passenger> + passengers; - @SerializedName("off_session") - OFF_SESSION("off_session"); + private Long price; - @Getter(onMethod_ = {@Override}) - private final String value; + private TicketClass ticketClass; - SetupFutureUsage(String value) { - this.value = value; - } - } - } + /** 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); + } - @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; + /** Name of associated or partner company for the service. */ + public Builder setAffiliateName(String affiliateName) { + this.affiliateName = affiliateName; + 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; + /** Name of associated or partner company for the service. */ + public Builder setAffiliateName(EmptyParam affiliateName) { + this.affiliateName = affiliateName; + return this; + } - private Billie(ApiRequestParams.EnumParam captureMethod, Map extraParams) { - this.captureMethod = captureMethod; - this.extraParams = extraParams; - } + /** Arrival details. */ + public Builder setArrival( + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .BusReservationDetail.Arrival + arrival) { + this.arrival = arrival; + return this; + } - public static Builder builder() { - return new Builder(); - } + /** Name of transportation company. */ + public Builder setCarrierName(String carrierName) { + this.carrierName = carrierName; + return this; + } - public static class Builder { - private ApiRequestParams.EnumParam captureMethod; + /** Name of transportation company. */ + public Builder setCarrierName(EmptyParam carrierName) { + this.carrierName = carrierName; + return this; + } - private Map extraParams; + /** Currency. */ + public Builder setCurrency(String currency) { + this.currency = currency; + 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(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( - PaymentIntentUpdateParams.PaymentMethodOptions.Billie.CaptureMethod captureMethod) { - this.captureMethod = captureMethod; - return this; - } + /** Departure details. */ + public Builder setDeparture( + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .BusReservationDetail.Departure + departure) { + this.departure = departure; + 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.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 a key/value pair to `extraParams` map. A 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 all map key/value pairs to `extraParams` map. A 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; + } - /** - * Add all map key/value pairs to `extraParams` map. A 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 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; + } - public enum CaptureMethod implements ApiRequestParams.EnumParam { - @SerializedName("manual") - MANUAL("manual"); + /** + * 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; + } - @Getter(onMethod_ = {@Override}) - private final String 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; + } - CaptureMethod(String value) { - this.value = value; - } - } - } + /** + * 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; + } - @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; + /** Price in cents. */ + public Builder setPrice(Long price) { + this.price = price; + 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; + /** Ticket class. */ + public Builder setTicketClass( + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .BusReservationDetail.TicketClass + ticketClass) { + this.ticketClass = ticketClass; + 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; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Arrival { + /** Address of the arrival location. */ + @SerializedName("address") + Address address; - private Blik( - Object code, - Map extraParams, - ApiRequestParams.EnumParam setupFutureUsage) { - this.code = code; - this.extraParams = extraParams; - this.setupFutureUsage = setupFutureUsage; - } + /** Identifier name or reference for the arrival location. */ + @SerializedName("arrival_location") + Object arrivalLocation; - 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 Object code; + private Arrival( + Address address, Object arrivalLocation, Map extraParams) { + this.address = address; + this.arrivalLocation = arrivalLocation; + this.extraParams = extraParams; + } - private Map extraParams; + public static Builder builder() { + return new Builder(); + } - private ApiRequestParams.EnumParam setupFutureUsage; + public static class Builder { + private Address address; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodOptions.Blik build() { - return new PaymentIntentUpdateParams.PaymentMethodOptions.Blik( - this.code, this.extraParams, this.setupFutureUsage); - } + 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(String code) { - this.code = code; - return this; - } + private Map extraParams; - /** - * 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; - } + /** 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 a key/value pair to `extraParams` map. A 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; - } + /** Address of the arrival location. */ + public Builder setAddress( + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .BusReservationDetail.Arrival.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 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; - } + /** 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( - PaymentIntentUpdateParams.PaymentMethodOptions.Blik.SetupFutureUsage setupFutureUsage) { - this.setupFutureUsage = setupFutureUsage; - return this; - } + /** Identifier name or reference for the arrival location. */ + public Builder setArrivalLocation(EmptyParam 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; - } - } + /** + * Add a key/value pair to `extraParams` map. A 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; + } + + /** + * Add all map key/value pairs to `extraParams` map. A 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; + } + } - public enum SetupFutureUsage implements ApiRequestParams.EnumParam { - @SerializedName("none") - NONE("none"); + @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; - SetupFutureUsage(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; + } - @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 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 Object 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") - ApiRequestParams.EnumParam setupFutureUsage; + private Object country; - private Boleto( - Long expiresAfterDays, - Map extraParams, - ApiRequestParams.EnumParam setupFutureUsage) { - this.expiresAfterDays = expiresAfterDays; - this.extraParams = extraParams; - this.setupFutureUsage = setupFutureUsage; - } + private Map extraParams; - public static Builder builder() { - return new Builder(); - } + private Object postalCode; - public static class Builder { - private Long expiresAfterDays; + private Object region; - private Map extraParams; + private Object streetAddress; - private ApiRequestParams.EnumParam setupFutureUsage; + private Object streetAddress2; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodOptions.Boleto build() { - return new PaymentIntentUpdateParams.PaymentMethodOptions.Boleto( - this.expiresAfterDays, this.extraParams, this.setupFutureUsage); - } + /** 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); + } - /** - * 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; - } + /** 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 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; - } + /** The city or town. */ + public Builder setCity(EmptyParam 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 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 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}. - */ - public Builder setSetupFutureUsage( - PaymentIntentUpdateParams.PaymentMethodOptions.Boleto.SetupFutureUsage - setupFutureUsage) { - this.setupFutureUsage = setupFutureUsage; - 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; + } + + /** 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; + } - /** - * Installment configuration for payments attempted on this PaymentIntent. - * - *

For more information, see the installments integration guide. - */ - @SerializedName("installments") - Installments installments; + public static Builder builder() { + return new Builder(); + } - /** Configuration options for setting up an eMandate for cards issued in India. */ - @SerializedName("mandate_options") - MandateOptions mandateOptions; + public static class Builder { + private 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; + private 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; + private Object departureLocation; - /** - * Request ability to decrement the - * authorization for this PaymentIntent. - */ - @SerializedName("request_decremental_authorization") - RequestDecrementalAuthorization requestDecrementalAuthorization; + private Map extraParams; - /** - * Request ability to capture beyond the standard - * authorization validity window for this PaymentIntent. - */ - @SerializedName("request_extended_authorization") - RequestExtendedAuthorization requestExtendedAuthorization; + /** 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); + } - /** - * Request ability to increment the - * authorization for this PaymentIntent. - */ - @SerializedName("request_incremental_authorization") - RequestIncrementalAuthorization requestIncrementalAuthorization; + /** Address of the departure location. */ + public Builder setAddress( + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .BusReservationDetail.Departure.Address + address) { + this.address = address; + return this; + } - /** - * Request ability to make multiple - * captures for this PaymentIntent. - */ - @SerializedName("request_multicapture") - RequestMulticapture requestMulticapture; + /** Timestamp of departure. */ + public Builder setDepartsAt(Long departsAt) { + this.departsAt = departsAt; + return this; + } - /** - * Request ability to overcapture - * for this PaymentIntent. - */ - @SerializedName("request_overcapture") - RequestOvercapture requestOvercapture; + /** Identifier name or reference for the origin location. */ + public Builder setDepartureLocation(String departureLocation) { + this.departureLocation = departureLocation; + return this; + } - /** Request partial authorization on this PaymentIntent. */ - @SerializedName("request_partial_authorization") - RequestPartialAuthorization requestPartialAuthorization; + /** Identifier name or reference for the origin location. */ + public Builder setDepartureLocation(EmptyParam departureLocation) { + this.departureLocation = departureLocation; + 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. - */ - @SerializedName("request_three_d_secure") - RequestThreeDSecure requestThreeDSecure; + /** + * Add a key/value pair to `extraParams` map. A 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; + } - /** - * 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; + /** + * Add all map key/value pairs to `extraParams` map. A 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; + } + } - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment method. - * - *

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

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

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

If you've already set {@code setup_future_usage} 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; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Address { + /** The city or town. */ + @SerializedName("city") + Object city; - /** - * 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; + /** The country in ISO 3166-1 alpha-2 format. */ + @SerializedName("country") + Object country; - /** - * 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; + /** + * Map of extra parameters for custom features not available in this client library. + * The content in this map is not serialized under this field's + * {@code @SerializedName} value. Instead, each key/value pair is serialized as if the + * key is a root-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; + } - /** - * 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; + public static Builder builder() { + return new Builder(); + } - /** - * 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; + public static class Builder { + private Object city; - 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; - } + private Object country; - public static Builder builder() { - return new Builder(); - } + private Map extraParams; - public static class Builder { - private ApiRequestParams.EnumParam captureMethod; + private Object postalCode; - private Object cvcToken; + private Object region; - private Map extraParams; + private Object streetAddress; - private Installments installments; + private Object streetAddress2; - private MandateOptions mandateOptions; + /** 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 Boolean moto; + /** The city or town. */ + public Builder setCity(String city) { + this.city = city; + return this; + } - private Network network; + /** The city or town. */ + public Builder setCity(EmptyParam city) { + this.city = city; + return this; + } - private RequestDecrementalAuthorization requestDecrementalAuthorization; + /** The country in ISO 3166-1 alpha-2 format. */ + public Builder setCountry(String country) { + this.country = country; + return this; + } - private RequestExtendedAuthorization requestExtendedAuthorization; + /** The country in ISO 3166-1 alpha-2 format. */ + public Builder setCountry(EmptyParam country) { + this.country = country; + return this; + } - private 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 + * 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 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 + * 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 RequestOvercapture requestOvercapture; + /** The postal code formatted according to country. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } - private RequestPartialAuthorization requestPartialAuthorization; + /** The postal code formatted according to country. */ + public Builder setPostalCode(EmptyParam postalCode) { + this.postalCode = postalCode; + return this; + } - private RequestThreeDSecure requestThreeDSecure; + /** The state, county, province, or region formatted according to country. */ + public Builder setRegion(String region) { + this.region = region; + return this; + } - private Boolean requireCvcRecollection; + /** 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; + } - private ApiRequestParams.EnumParam setupFutureUsage; + /** Line 1 of the street address. */ + public Builder setStreetAddress(EmptyParam streetAddress) { + this.streetAddress = streetAddress; + return this; + } - private Object statementDescriptorSuffixKana; + /** Line 2 of the street address. */ + public Builder setStreetAddress2(String streetAddress2) { + this.streetAddress2 = streetAddress2; + return this; + } - private Object statementDescriptorSuffixKanji; + /** Line 2 of the street address. */ + public Builder setStreetAddress2(EmptyParam streetAddress2) { + this.streetAddress2 = streetAddress2; + return this; + } + } + } + } - private Object statementDetails; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Insurance { + /** Insurance currency. */ + @SerializedName("currency") + Object currency; - private 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; - /** 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); - } + /** 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; + } - /** - * 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; - } + 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(EmptyParam captureMethod) { - this.captureMethod = captureMethod; - return this; - } + public static class Builder { + private Object currency; - /** - * 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; - } + private 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(EmptyParam cvcToken) { - this.cvcToken = cvcToken; - return this; - } + private Object insuranceCompanyName; - /** - * Add a key/value pair to `extraParams` map. A 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; - } + private 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 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 Long price; - /** - * 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; - } + /** 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); + } - /** 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; - } + /** Insurance currency. */ + public Builder setCurrency(String currency) { + this.currency = currency; + 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; - } + /** Insurance currency. */ + public Builder setCurrency(EmptyParam currency) { + this.currency = currency; + 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( - 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.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 decrement the - * authorization for this PaymentIntent. - */ - 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.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 capture beyond the - * standard authorization validity window for this PaymentIntent. - */ - public Builder setRequestExtendedAuthorization( - PaymentIntentUpdateParams.PaymentMethodOptions.Card.RequestExtendedAuthorization - requestExtendedAuthorization) { - this.requestExtendedAuthorization = requestExtendedAuthorization; - return this; - } + /** Name of the company providing the insurance. */ + public Builder setInsuranceCompanyName(String insuranceCompanyName) { + this.insuranceCompanyName = insuranceCompanyName; + return this; + } - /** - * Request ability to increment the - * authorization for this PaymentIntent. - */ - public Builder setRequestIncrementalAuthorization( - PaymentIntentUpdateParams.PaymentMethodOptions.Card.RequestIncrementalAuthorization - requestIncrementalAuthorization) { - this.requestIncrementalAuthorization = requestIncrementalAuthorization; - return this; - } + /** Name of the company providing the insurance. */ + public Builder setInsuranceCompanyName(EmptyParam insuranceCompanyName) { + this.insuranceCompanyName = insuranceCompanyName; + return this; + } - /** - * Request ability to make multiple - * captures for this PaymentIntent. - */ - public Builder setRequestMulticapture( - PaymentIntentUpdateParams.PaymentMethodOptions.Card.RequestMulticapture - requestMulticapture) { - this.requestMulticapture = requestMulticapture; - return this; - } + /** Type of insurance. */ + public Builder setInsuranceType( + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .BusReservationDetail.Insurance.InsuranceType + insuranceType) { + this.insuranceType = insuranceType; + return this; + } - /** - * Request ability to overcapture - * for this PaymentIntent. - */ - public Builder setRequestOvercapture( - PaymentIntentUpdateParams.PaymentMethodOptions.Card.RequestOvercapture - requestOvercapture) { - this.requestOvercapture = requestOvercapture; - return this; - } + /** Price of insurance in cents. */ + public Builder setPrice(Long price) { + this.price = price; + return this; + } + } - /** Request partial authorization on this PaymentIntent. */ - public Builder setRequestPartialAuthorization( - PaymentIntentUpdateParams.PaymentMethodOptions.Card.RequestPartialAuthorization - requestPartialAuthorization) { - this.requestPartialAuthorization = requestPartialAuthorization; - return this; - } + public enum InsuranceType implements ApiRequestParams.EnumParam { + @SerializedName("baggage") + BAGGAGE("baggage"), - /** - * 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; - } + @SerializedName("bankruptcy") + BANKRUPTCY("bankruptcy"), - /** - * 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; - } + @SerializedName("cancelation") + CANCELATION("cancelation"), - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment - * method. - * - *

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

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

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

If you've already set {@code setup_future_usage} 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("emergency") + EMERGENCY("emergency"), - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment - * method. - * - *

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

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

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

If you've already set {@code setup_future_usage} 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("medical") + MEDICAL("medical"); - /** - * 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; - } + @Getter(onMethod_ = {@Override}) + private final String value; - /** - * 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; - } + InsuranceType(String value) { + this.value = 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(String statementDescriptorSuffixKanji) { - this.statementDescriptorSuffixKanji = statementDescriptorSuffixKanji; - 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; - /** - * 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; - } + /** The family name of the person. */ + @SerializedName("family_name") + Object familyName; - /** - * 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; - } + /** The given name of the person. */ + @SerializedName("given_name") + Object givenName; - /** - * 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; - } + private Passenger( + Map extraParams, Object familyName, Object givenName) { + this.extraParams = extraParams; + this.familyName = familyName; + this.givenName = givenName; + } - /** - * 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; - } - } + public static Builder builder() { + return new Builder(); + } - @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 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 Object familyName; - /** - * The selected installment plan to use for this payment attempt. This parameter can only be - * provided during confirmation. - */ - @SerializedName("plan") - Object plan; + private Object givenName; - private Installments(Boolean enabled, Map extraParams, Object plan) { - this.enabled = enabled; - this.extraParams = extraParams; - this.plan = plan; - } + /** 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); + } - 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.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; + } - public static class Builder { - private Boolean enabled; + /** + * Add all map key/value pairs to `extraParams` map. A 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; + } - private Map extraParams; + /** 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; + } - private Object plan; + /** The given name of the person. */ + public Builder setGivenName(String givenName) { + this.givenName = givenName; + 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 given name of the person. */ + public Builder setGivenName(EmptyParam givenName) { + this.givenName = givenName; + 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; - } + public enum TicketClass implements ApiRequestParams.EnumParam { + @SerializedName("business") + BUSINESS("business"), - /** - * Add a key/value pair to `extraParams` map. A 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; - } + @SerializedName("economy") + ECONOMY("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 - * 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; - } + @SerializedName("first_class") + FIRST_CLASS("first_class"), - /** - * 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; - } + @SerializedName("premium_economy") + PREMIUM_ECONOMY("premium_economy"); - /** - * 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(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 +33021,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 +33069,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 +33183,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 +33198,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,554 +33210,530 @@ 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; - } - } - - 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") - 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; + /** Start timestamp of the event. */ + public Builder setStartsAt(Long startsAt) { + this.startsAt = startsAt; + return this; + } - /** Required. Unique identifier for the mandate or subscription. */ - @SerializedName("reference") - Object reference; + /** Name of the venue where the event takes place. */ + public Builder setVenueName(String venueName) { + this.venueName = venueName; + return this; + } - /** - * Required. Start date of the mandate or subscription. Start date should - * not be lesser than yesterday. - */ - @SerializedName("start_date") - Long startDate; + /** Name of the venue where the event takes place. */ + public Builder setVenueName(EmptyParam venueName) { + this.venueName = venueName; + return this; + } + } - /** Specifies the type of mandates supported. Possible values are {@code india}. */ - @SerializedName("supported_types") - List - supportedTypes; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Address { + /** The city or town. */ + @SerializedName("city") + Object city; - 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 country in ISO 3166-1 alpha-2 format. */ + @SerializedName("country") + Object 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 Long amount; + /** 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 AmountType amountType; + public static Builder builder() { + return new Builder(); + } - private Object description; + public static class Builder { + private Object city; - private Long endDate; + private Object country; - private Map extraParams; + private Map extraParams; - private Interval interval; + private Object postalCode; - private Long intervalCount; + private Object region; - private Object reference; + private Object streetAddress; - private Long startDate; + private Object streetAddress2; - private List< - PaymentIntentUpdateParams.PaymentMethodOptions.Card.MandateOptions.SupportedType> - supportedTypes; + /** 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); + } - /** 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 city or town. */ + public Builder setCity(String city) { + this.city = city; + return this; + } - /** 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(EmptyParam city) { + this.city = city; + 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; - } + /** The country in ISO 3166-1 alpha-2 format. */ + public Builder setCountry(String country) { + this.country = country; + 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; - } + /** The country in ISO 3166-1 alpha-2 format. */ + public Builder setCountry(EmptyParam country) { + this.country = country; + 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; - } + /** + * Add a key/value pair to `extraParams` map. A 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; + } - /** - * 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 all map key/value pairs to `extraParams` map. A 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; + } - /** - * Add a key/value pair to `extraParams` map. A 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 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.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 postal code formatted according to country. */ + public Builder setPostalCode(EmptyParam postalCode) { + this.postalCode = postalCode; + 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; - } + /** The state, county, province, or region formatted according to country. */ + public Builder setRegion(String region) { + this.region = region; + 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 state, county, province, or region formatted according to country. */ + public Builder setRegion(EmptyParam region) { + this.region = region; + return this; + } - /** Required. Unique identifier for the mandate or subscription. */ - public Builder setReference(String reference) { - this.reference = reference; - return this; - } + /** Line 1 of the street address. */ + public Builder setStreetAddress(String streetAddress) { + this.streetAddress = streetAddress; + return this; + } - /** Required. Unique identifier for the mandate or subscription. */ - public Builder setReference(EmptyParam reference) { - this.reference = reference; - 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; + } + } } - /** - * 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"); - public static Builder builder() { - return new Builder(); - } + @Getter(onMethod_ = {@Override}) + private final String value; - public static class Builder { - private Address address; + InsuranceType(String value) { + this.value = value; + } + } + } - private Map extraParams; + public enum EventType implements ApiRequestParams.EnumParam { + @SerializedName("concert") + CONCERT("concert"), - private Object phone; + @SerializedName("conference") + CONFERENCE("conference"), - /** 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("digital_education") + DIGITAL_EDUCATION("digital_education"), - /** 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("expo") + EXPO("expo"), - /** - * Add a key/value pair to `extraParams` map. A 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("festival") + FESTIVAL("festival"), - /** - * Add all map key/value pairs to `extraParams` map. A 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("in_person_education") + IN_PERSON_EDUCATION("in_person_education"), - /** Phone number (e.g., a toll-free number that customers can call). */ - public Builder setPhone(String phone) { - this.phone = phone; - return this; - } + @SerializedName("sport") + SPORT("sport"), - /** Phone number (e.g., a toll-free number that customers can call). */ - public Builder setPhone(EmptyParam phone) { - this.phone = phone; - return this; + @SerializedName("tour") + TOUR("tour"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + 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 * content in this map is not serialized under this field's {@code @SerializedName} value. * Instead, each key/value pair is serialized as if the key is a root-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; + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - /** 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 +33741,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 +33843,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,429 +33858,875 @@ 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) { + 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.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; + } + + /** + * 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; + } + + /** + * 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; + } + + /** + * 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 putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } + 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; + } + + /** Price in cents. */ + public Builder setPrice(Long price) { + this.price = price; + return this; + } + + /** Ticket class. */ + public Builder setTicketClass( + PaymentIntentUpdateParams.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 PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .FerryReservationDetail.Arrival + build() { + return new PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail.Arrival( + this.address, this.arrivalLocation, this.extraParams); + } + + /** Address of the arrival location. */ + public Builder setAddress( + PaymentIntentUpdateParams.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 + * 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; + } + + /** + * Add all map key/value pairs to `extraParams` map. A 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; + } + } + + @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 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); + } + + /** 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 + * 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; + } + + /** + * Add all map key/value pairs to `extraParams` map. A 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; + } + + /** 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; - /** Address line 1, such as the street, PO Box, or company name. */ - public Builder setLine1(String line1) { - this.line1 = line1; - return this; + private Departure( + Address address, + Long departsAt, + Object departureLocation, + Map extraParams) { + this.address = address; + this.departsAt = departsAt; + this.departureLocation = departureLocation; + this.extraParams = extraParams; } - /** Address line 1, such as the street, PO Box, or company name. */ - public Builder setLine1(EmptyParam line1) { - this.line1 = line1; - return this; + public static Builder builder() { + return new Builder(); } - /** Address line 2, such as the apartment, suite, unit, or building. */ - public Builder setLine2(String line2) { - this.line2 = line2; - return this; - } + public static class Builder { + private Address address; - /** Address line 2, such as the apartment, suite, unit, or building. */ - public Builder setLine2(EmptyParam line2) { - this.line2 = line2; - return this; - } + private Long departsAt; - /** ZIP or postal code. */ - public Builder setPostalCode(String postalCode) { - this.postalCode = postalCode; - return this; - } + private Object departureLocation; - /** ZIP or postal code. */ - public Builder setPostalCode(EmptyParam postalCode) { - this.postalCode = postalCode; - return this; - } + private Map extraParams; - /** State, county, province, or region. */ - public Builder setState(String state) { - this.state = state; - return this; - } + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .FerryReservationDetail.Departure + build() { + return new PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail.Departure( + this.address, this.departsAt, this.departureLocation, this.extraParams); + } - /** State, county, province, or region. */ - public Builder setState(EmptyParam state) { - this.state = state; - return this; - } - } - } - } + /** Address of the departure location. */ + public Builder setAddress( + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .FerryReservationDetail.Departure.Address + address) { + this.address = address; + 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; + /** Timestamp of departure. */ + public Builder setDepartsAt(Long departsAt) { + this.departsAt = departsAt; + 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.) - */ - @SerializedName("cryptogram") - Object cryptogram; + /** Identifier name or reference for the origin location. */ + public Builder setDepartureLocation(String departureLocation) { + this.departureLocation = departureLocation; + return this; + } - /** - * 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; + /** Identifier name or reference for the origin location. */ + public Builder setDepartureLocation(EmptyParam departureLocation) { + this.departureLocation = departureLocation; + return this; + } - /** The exemption requested via 3DS and accepted by the issuer at authentication time. */ - @SerializedName("exemption_indicator") - ExemptionIndicator exemptionIndicator; + /** + * Add a key/value pair to `extraParams` map. A 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#extraParams} + * for the 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.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; + } + } - /** - * 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; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Address { + /** The city or town. */ + @SerializedName("city") + Object city; - /** - * 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; + /** The country in ISO 3166-1 alpha-2 format. */ + @SerializedName("country") + Object country; - /** - * Required. For 3D Secure 1, the XID. For 3D Secure 2, the Directory - * Server Transaction ID (dsTransID). - */ - @SerializedName("transaction_id") - Object transactionId; + /** + * Map of extra parameters for custom features not available in this client library. + * The content in this map is not serialized under this field's + * {@code @SerializedName} value. Instead, each key/value pair is serialized as if the + * key is a root-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; + } - /** Required. The version of 3D Secure that was performed. */ - @SerializedName("version") - Version version; + public static Builder builder() { + return new Builder(); + } - 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; - } + public static class Builder { + private Object city; - public static Builder builder() { - return new Builder(); - } + private Object country; - public static class Builder { - private AresTransStatus aresTransStatus; + private Map extraParams; - private Object cryptogram; + private Object postalCode; - private ElectronicCommerceIndicator electronicCommerceIndicator; + private Object region; - private ExemptionIndicator exemptionIndicator; + private Object streetAddress; - private Map extraParams; + private Object streetAddress2; - private NetworkOptions networkOptions; + /** 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); + } - private Object requestorChallengeIndicator; + /** The city or town. */ + public Builder setCity(String city) { + this.city = city; + return this; + } - private Object transactionId; + /** The city or town. */ + public Builder setCity(EmptyParam city) { + this.city = city; + return this; + } - private Version version; + /** The country in ISO 3166-1 alpha-2 format. */ + public Builder setCountry(String country) { + this.country = country; + 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); - } + /** The country in ISO 3166-1 alpha-2 format. */ + public Builder setCountry(EmptyParam country) { + this.country = country; + 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.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. 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.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; + } - /** - * 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 postal code formatted according to country. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + 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; - } + /** The postal code formatted according to country. */ + public Builder setPostalCode(EmptyParam postalCode) { + this.postalCode = postalCode; + return this; + } - /** 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; - } + /** 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; + } - /** - * Add a key/value pair to `extraParams` map. A 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<>(); + /** 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.Card.ThreeDSecure#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; - } - /** - * 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; - } + public static Builder builder() { + return new Builder(); + } - /** - * 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; - } + public static class Builder { + private Object currency; - /** - * 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 Map extraParams; - /** - * 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 insuranceCompanyName; - /** - * 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 InsuranceType insuranceType; - /** Required. The version of 3D Secure that was performed. */ - public Builder setVersion( - PaymentIntentUpdateParams.PaymentMethodOptions.Card.ThreeDSecure.Version version) { - this.version = version; - return this; - } - } + private Long price; - @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.Insurance + build() { + return new PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail.Insurance( + this.currency, + this.extraParams, + this.insuranceCompanyName, + this.insuranceType, + this.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; + /** Insurance currency. */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } - private NetworkOptions(CartesBancaires cartesBancaires, Map extraParams) { - this.cartesBancaires = cartesBancaires; - this.extraParams = extraParams; - } + /** Insurance currency. */ + public Builder setCurrency(EmptyParam currency) { + this.currency = currency; + 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.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; + } - public static class Builder { - private CartesBancaires cartesBancaires; + /** + * Add all map key/value pairs to `extraParams` map. A 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; + } - private Map extraParams; + /** Name of the company providing the insurance. */ + public Builder setInsuranceCompanyName(String insuranceCompanyName) { + this.insuranceCompanyName = insuranceCompanyName; + 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); - } + /** Name of the company providing the insurance. */ + public Builder setInsuranceCompanyName(EmptyParam insuranceCompanyName) { + this.insuranceCompanyName = insuranceCompanyName; + return this; + } - /** Cartes Bancaires-specific 3DS fields. */ - public Builder setCartesBancaires( - PaymentIntentUpdateParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions - .CartesBancaires - cartesBancaires) { - this.cartesBancaires = cartesBancaires; - return this; - } + /** Type of insurance. */ + public Builder setInsuranceType( + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .FerryReservationDetail.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 - * 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<>(); + /** 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 - * PaymentIntentUpdateParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions#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("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; } - 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") - Object cbExemption; - - /** - * The risk score returned from Cartes Bancaires in the ARes. message extension: - * CB-SCORE; numeric value 0-99 - */ - @SerializedName("cb_score") - Long cbScore; - + 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} @@ -20834,86 +34737,46 @@ public static class CartesBancaires { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private CartesBancaires( - CbAvalgo cbAvalgo, - Object cbExemption, - Long cbScore, - Map extraParams) { - this.cbAvalgo = cbAvalgo; - this.cbExemption = cbExemption; - this.cbScore = cbScore; + /** 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 CbAvalgo cbAvalgo; - - private Object cbExemption; - - private Long cbScore; - + public static class Builder { private Map extraParams; - /** 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); - } - - /** - * 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; - } - - /** - * 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; - } + private Object familyName; - /** - * 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 givenName; - /** - * 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; + /** 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); } /** * Add a key/value pair to `extraParams` map. A 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.Passenger#extraParams} * for the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -20928,7 +34791,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.Passenger#extraParams} * for the field documentation. */ public Builder putAllExtraParam(Map map) { @@ -20938,3300 +34801,3282 @@ public Builder putAllExtraParam(Map map) { this.extraParams.putAll(map); return this; } - } - public enum CbAvalgo implements ApiRequestParams.EnumParam { - @SerializedName("0") - N0("0"), + /** The family name of the person. */ + public Builder setFamilyName(String familyName) { + this.familyName = familyName; + return this; + } - @SerializedName("1") - N1("1"), + /** The family name of the person. */ + public Builder setFamilyName(EmptyParam familyName) { + this.familyName = familyName; + return this; + } - @SerializedName("2") - N2("2"), + /** The given name of the person. */ + public Builder setGivenName(String givenName) { + this.givenName = givenName; + return this; + } - @SerializedName("3") - N3("3"), + /** The given name of the person. */ + public Builder setGivenName(EmptyParam givenName) { + this.givenName = givenName; + return this; + } + } + } - @SerializedName("4") - N4("4"), + public enum TicketClass implements ApiRequestParams.EnumParam { + @SerializedName("business") + BUSINESS("business"), - @SerializedName("A") - A("A"); + @SerializedName("economy") + ECONOMY("economy"), - @Getter(onMethod_ = {@Override}) - private final String value; + @SerializedName("first_class") + FIRST_CLASS("first_class"), - CbAvalgo(String value) { - this.value = value; - } + @SerializedName("premium_economy") + PREMIUM_ECONOMY("premium_economy"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + TicketClass(String value) { + this.value = value; } } } - public enum AresTransStatus implements ApiRequestParams.EnumParam { - @SerializedName("A") - A("A"), + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Insurance { + /** Insurance currency. */ + @SerializedName("currency") + Object currency; - @SerializedName("C") - C("C"), + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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("I") - I("I"), + /** Name of the company providing the insurance. */ + @SerializedName("insurance_company_name") + Object insuranceCompanyName; - @SerializedName("N") - N("N"), + /** Type of insurance. */ + @SerializedName("insurance_type") + InsuranceType insuranceType; - @SerializedName("R") - R("R"), + /** Price of insurance in cents. */ + @SerializedName("price") + Long price; - @SerializedName("U") - U("U"), + 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("Y") - Y("Y"); + public static Builder builder() { + return new Builder(); + } - @Getter(onMethod_ = {@Override}) - private final String value; + public static class Builder { + private Object currency; - AresTransStatus(String value) { - this.value = value; - } - } + private Map extraParams; - public enum ElectronicCommerceIndicator implements ApiRequestParams.EnumParam { - @SerializedName("01") - N01("01"), + private Object insuranceCompanyName; - @SerializedName("02") - N02("02"), + private InsuranceType insuranceType; - @SerializedName("05") - N05("05"), + private Long price; - @SerializedName("06") - N06("06"), + /** 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); + } - @SerializedName("07") - N07("07"); + /** 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; + } - 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.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 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.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("none") - NONE("none"); + /** 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; + } - ExemptionIndicator(String value) { - this.value = value; + /** Type of insurance. */ + public Builder setInsuranceType( + PaymentIntentUpdateParams.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 Version implements ApiRequestParams.EnumParam { - @SerializedName("1.0.2") - N1__0__2("1.0.2"), + public enum InsuranceType implements ApiRequestParams.EnumParam { + @SerializedName("bankruptcy") + BANKRUPTCY("bankruptcy"), - @SerializedName("2.1.0") - N2__1__0("2.1.0"), + @SerializedName("cancelation") + CANCELATION("cancelation"), - @SerializedName("2.2.0") - N2__2__0("2.2.0"); + @SerializedName("emergency") + EMERGENCY("emergency"), - @Getter(onMethod_ = {@Override}) - private final String value; + @SerializedName("medical") + MEDICAL("medical"); - Version(String value) { - this.value = value; + @Getter(onMethod_ = {@Override}) + private final String value; + + InsuranceType(String value) { + this.value = value; + } } } - } - public enum CaptureMethod implements ApiRequestParams.EnumParam { - @SerializedName("manual") - MANUAL("manual"); + @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; - @Getter(onMethod_ = {@Override}) - private final String value; + /** The references to line items for purchases with multiple associated sub-sellers. */ + @SerializedName("line_item_references") + List lineItemReferences; - CaptureMethod(String value) { - this.value = value; - } - } + /** The address of the selling or delivering merchant. */ + @SerializedName("marketplace_seller_address") + MarketplaceSellerAddress marketplaceSellerAddress; - public enum Network implements ApiRequestParams.EnumParam { - @SerializedName("amex") - AMEX("amex"), + /** The name of the marketplace seller. */ + @SerializedName("marketplace_seller_name") + Object marketplaceSellerName; - @SerializedName("cartes_bancaires") - CARTES_BANCAIRES("cartes_bancaires"), + /** 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; + } - @SerializedName("diners") - DINERS("diners"), + public static Builder builder() { + return new Builder(); + } - @SerializedName("discover") - DISCOVER("discover"), + public static class Builder { + private Map extraParams; - @SerializedName("eftpos_au") - EFTPOS_AU("eftpos_au"), + private List lineItemReferences; - @SerializedName("girocard") - GIROCARD("girocard"), + private MarketplaceSellerAddress marketplaceSellerAddress; - @SerializedName("interac") - INTERAC("interac"), + private Object marketplaceSellerName; - @SerializedName("jcb") - JCB("jcb"), + private Object marketplaceSellerReference; - @SerializedName("link") - LINK("link"), + private Long numberOfTransactions; - @SerializedName("mastercard") - MASTERCARD("mastercard"), + private ProductCategory productCategory; - @SerializedName("unionpay") - UNIONPAY("unionpay"), + private Long sellerLastLoginAt; - @SerializedName("unknown") - UNKNOWN("unknown"), + private SellerRating sellerRating; - @SerializedName("visa") - VISA("visa"); + private Long sellerRegisteredAt; - @Getter(onMethod_ = {@Override}) - private final String value; + private Long sellerUpdatedAt; - Network(String value) { - this.value = value; - } - } + private List shippingReferences; - public enum RequestDecrementalAuthorization implements ApiRequestParams.EnumParam { - @SerializedName("if_available") - IF_AVAILABLE("if_available"), + private Long volumeOfTransactions; - @SerializedName("never") - NEVER("never"); + /** 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); + } - @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.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; + } - RequestDecrementalAuthorization(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.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; + } - public enum RequestExtendedAuthorization implements ApiRequestParams.EnumParam { - @SerializedName("if_available") - IF_AVAILABLE("if_available"), + /** + * 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; + } - @SerializedName("never") - NEVER("never"); + /** + * 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; + } - @Getter(onMethod_ = {@Override}) - private final String value; + /** The address of the selling or delivering merchant. */ + public Builder setMarketplaceSellerAddress( + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .MarketplaceSeller.MarketplaceSellerAddress + marketplaceSellerAddress) { + this.marketplaceSellerAddress = marketplaceSellerAddress; + return this; + } - RequestExtendedAuthorization(String value) { - this.value = value; - } - } + /** The name of the marketplace seller. */ + public Builder setMarketplaceSellerName(String marketplaceSellerName) { + this.marketplaceSellerName = marketplaceSellerName; + return this; + } - public enum RequestIncrementalAuthorization implements ApiRequestParams.EnumParam { - @SerializedName("if_available") - IF_AVAILABLE("if_available"), + /** The name of the marketplace seller. */ + public Builder setMarketplaceSellerName(EmptyParam marketplaceSellerName) { + this.marketplaceSellerName = marketplaceSellerName; + return this; + } - @SerializedName("never") - NEVER("never"); + /** The unique identifier for the marketplace seller. */ + public Builder setMarketplaceSellerReference(String marketplaceSellerReference) { + this.marketplaceSellerReference = marketplaceSellerReference; + return this; + } - @Getter(onMethod_ = {@Override}) - private final String value; + /** The unique identifier for the marketplace seller. */ + public Builder setMarketplaceSellerReference(EmptyParam marketplaceSellerReference) { + this.marketplaceSellerReference = marketplaceSellerReference; + return this; + } - RequestIncrementalAuthorization(String value) { - this.value = value; - } - } + /** 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 RequestMulticapture implements ApiRequestParams.EnumParam { - @SerializedName("if_available") - IF_AVAILABLE("if_available"), + /** The category of the product. */ + public Builder setProductCategory( + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .MarketplaceSeller.ProductCategory + productCategory) { + this.productCategory = productCategory; + return this; + } - @SerializedName("never") - NEVER("never"); + /** The date when the seller's account with the marketplace was last logged in. */ + public Builder setSellerLastLoginAt(Long sellerLastLoginAt) { + this.sellerLastLoginAt = sellerLastLoginAt; + return this; + } - @Getter(onMethod_ = {@Override}) - private final String value; + /** + * 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; + } - RequestMulticapture(String value) { - this.value = value; - } - } + /** The date when the seller's account with the marketplace was created. */ + public Builder setSellerRegisteredAt(Long sellerRegisteredAt) { + this.sellerRegisteredAt = sellerRegisteredAt; + return this; + } - public enum RequestOvercapture implements ApiRequestParams.EnumParam { - @SerializedName("if_available") - IF_AVAILABLE("if_available"), + /** The date when the seller's account with the marketplace was last updated. */ + public Builder setSellerUpdatedAt(Long sellerUpdatedAt) { + this.sellerUpdatedAt = sellerUpdatedAt; + return this; + } - @SerializedName("never") - NEVER("never"); + /** + * 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; + } - @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 + * 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; + } - RequestOvercapture(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; + } + } - public enum RequestPartialAuthorization implements ApiRequestParams.EnumParam { - @SerializedName("if_available") - IF_AVAILABLE("if_available"), + @Getter + @EqualsAndHashCode(callSuper = false) + public static class MarketplaceSellerAddress { + /** The city or town. */ + @SerializedName("city") + Object city; - @SerializedName("never") - NEVER("never"); + /** The country in ISO 3166-1 alpha-2 format. */ + @SerializedName("country") + Object country; - @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; - RequestPartialAuthorization(String value) { - this.value = value; - } - } + /** 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 enum RequestThreeDSecure implements ApiRequestParams.EnumParam { - @SerializedName("any") - ANY("any"), + public static Builder builder() { + return new Builder(); + } - @SerializedName("automatic") - AUTOMATIC("automatic"), + public static class Builder { + private Object city; - @SerializedName("challenge") - CHALLENGE("challenge"); + private Object country; - @Getter(onMethod_ = {@Override}) - private final String value; + private Map extraParams; - RequestThreeDSecure(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 CardPresent { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + /** The city or town. */ + public Builder setCity(EmptyParam city) { + this.city = city; + return this; + } - /** - * Request ability to capture this payment beyond the standard authorization - * validity window. - */ - @SerializedName("request_extended_authorization") - Boolean requestExtendedAuthorization; + /** The country in ISO 3166-1 alpha-2 format. */ + public Builder setCountry(String country) { + this.country = country; + 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. - */ - @SerializedName("request_incremental_authorization_support") - Boolean requestIncrementalAuthorizationSupport; + /** The country in ISO 3166-1 alpha-2 format. */ + public Builder setCountry(EmptyParam country) { + this.country = country; + return this; + } - /** - * Network routing priority on co-branded EMV cards supporting domestic debit and - * international card schemes. - */ - @SerializedName("routing") - 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 + * 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; + } - private CardPresent( - Map extraParams, - Boolean requestExtendedAuthorization, - Boolean requestIncrementalAuthorizationSupport, - Routing routing) { - this.extraParams = extraParams; - this.requestExtendedAuthorization = requestExtendedAuthorization; - this.requestIncrementalAuthorizationSupport = requestIncrementalAuthorizationSupport; - this.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.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; + } - 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 Map extraParams; + /** The postal code formatted according to country. */ + public Builder setPostalCode(EmptyParam postalCode) { + this.postalCode = postalCode; + return this; + } - private Boolean requestExtendedAuthorization; + /** The state, county, province, or region formatted according to country. */ + public Builder setRegion(String region) { + this.region = region; + return this; + } - private Boolean requestIncrementalAuthorizationSupport; + /** The state, county, province, or region formatted according to country. */ + public Builder setRegion(EmptyParam region) { + this.region = region; + return this; + } - private Routing routing; + /** Line 1 of the street address. */ + public Builder setStreetAddress(String streetAddress) { + this.streetAddress = streetAddress; + return this; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodOptions.CardPresent build() { - return new PaymentIntentUpdateParams.PaymentMethodOptions.CardPresent( - this.extraParams, - this.requestExtendedAuthorization, - this.requestIncrementalAuthorizationSupport, - this.routing); - } + /** Line 1 of the street address. */ + public Builder setStreetAddress(EmptyParam streetAddress) { + this.streetAddress = streetAddress; + return this; + } - /** - * Add a key/value pair to `extraParams` map. A 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; - } + /** Line 2 of the street address. */ + public Builder setStreetAddress2(String streetAddress2) { + this.streetAddress2 = streetAddress2; + return this; + } - /** - * Add all map key/value pairs to `extraParams` map. A 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<>(); + /** Line 2 of the street address. */ + public Builder setStreetAddress2(EmptyParam streetAddress2) { + this.streetAddress2 = streetAddress2; + 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 ProductCategory implements ApiRequestParams.EnumParam { + @SerializedName("accessories") + ACCESSORIES("accessories"), - /** - * 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("appliances") + APPLIANCES("appliances"), - /** - * 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("apps_and_games") + APPS_AND_GAMES("apps_and_games"), - @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; + @SerializedName("arts_crafts_and_sewing") + ARTS_CRAFTS_AND_SEWING("arts_crafts_and_sewing"), - /** Routing requested priority. */ - @SerializedName("requested_priority") - RequestedPriority requestedPriority; + @SerializedName("automotive") + AUTOMOTIVE("automotive"), - private Routing(Map extraParams, RequestedPriority requestedPriority) { - this.extraParams = extraParams; - this.requestedPriority = requestedPriority; - } + @SerializedName("baby") + BABY("baby"), - public static Builder builder() { - return new Builder(); - } + @SerializedName("baby_clothing") + BABY_CLOTHING("baby_clothing"), - public static class Builder { - private Map extraParams; + @SerializedName("bags_and_purses") + BAGS_AND_PURSES("bags_and_purses"), - private RequestedPriority requestedPriority; + @SerializedName("beauty") + BEAUTY("beauty"), - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodOptions.CardPresent.Routing build() { - return new PaymentIntentUpdateParams.PaymentMethodOptions.CardPresent.Routing( - this.extraParams, this.requestedPriority); - } + @SerializedName("books") + BOOKS("books"), - /** - * Add a key/value pair to `extraParams` map. A 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; - } + @SerializedName("cds_and_vinyl") + CDS_AND_VINYL("cds_and_vinyl"), - /** - * Add all map key/value pairs to `extraParams` map. A 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; - } + @SerializedName("cell_phones_and_accessories") + CELL_PHONES_AND_ACCESSORIES("cell_phones_and_accessories"), - /** Routing requested priority. */ - public Builder setRequestedPriority( - PaymentIntentUpdateParams.PaymentMethodOptions.CardPresent.Routing.RequestedPriority - requestedPriority) { - this.requestedPriority = requestedPriority; - return this; - } - } + @SerializedName("collectibles_and_fine_arts") + COLLECTIBLES_AND_FINE_ARTS("collectibles_and_fine_arts"), - public enum RequestedPriority implements ApiRequestParams.EnumParam { - @SerializedName("domestic") - DOMESTIC("domestic"), + @SerializedName("digital_music") + DIGITAL_MUSIC("digital_music"), - @SerializedName("international") - INTERNATIONAL("international"); + @SerializedName("electronics") + ELECTRONICS("electronics"), - @Getter(onMethod_ = {@Override}) - private final String value; + @SerializedName("grocery_and_gourmet_food") + GROCERY_AND_GOURMET_FOOD("grocery_and_gourmet_food"), - RequestedPriority(String value) { - this.value = value; - } - } - } - } + @SerializedName("handmade") + HANDMADE("handmade"), - @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; + @SerializedName("health_and_personal_care") + HEALTH_AND_PERSONAL_CARE("health_and_personal_care"), - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-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("home_and_kitchen") + HOME_AND_KITCHEN("home_and_kitchen"), - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment method. - * - *

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

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

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

If you've already set {@code setup_future_usage} 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("industrial_and_scientific") + INDUSTRIAL_AND_SCIENTIFIC("industrial_and_scientific"), - private Cashapp( - ApiRequestParams.EnumParam captureMethod, - Map extraParams, - ApiRequestParams.EnumParam setupFutureUsage) { - this.captureMethod = captureMethod; - this.extraParams = extraParams; - this.setupFutureUsage = setupFutureUsage; - } + @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 ApiRequestParams.EnumParam captureMethod; + @SerializedName("men_clothing") + MEN_CLOTHING("men_clothing"), - private Map extraParams; + @SerializedName("musical_instruments") + MUSICAL_INSTRUMENTS("musical_instruments"), - private ApiRequestParams.EnumParam setupFutureUsage; + @SerializedName("office_products") + OFFICE_PRODUCTS("office_products"), - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodOptions.Cashapp build() { - return new PaymentIntentUpdateParams.PaymentMethodOptions.Cashapp( - this.captureMethod, this.extraParams, this.setupFutureUsage); - } + @SerializedName("patio_lawn_and_garden") + PATIO_LAWN_AND_GARDEN("patio_lawn_and_garden"), - /** - * 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; - } + @SerializedName("pet_supplies") + PET_SUPPLIES("pet_supplies"), - /** - * 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; - } + @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.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; - } + @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.Cashapp#extraParams} for - * the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + @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.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; - } + public enum SellerRating implements ApiRequestParams.EnumParam { + @SerializedName("high") + HIGH("high"), - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment - * method. - * - *

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

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

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

If you've already set {@code setup_future_usage} 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("low") + LOW("low"), - public enum CaptureMethod implements ApiRequestParams.EnumParam { - @SerializedName("manual") - MANUAL("manual"); + @SerializedName("medium") + MEDIUM("medium"), - @Getter(onMethod_ = {@Override}) - private final String value; + @SerializedName("very_high") + VERY_HIGH("very_high"), - CaptureMethod(String value) { - this.value = value; + @SerializedName("very_low") + VERY_LOW("very_low"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SellerRating(String value) { + this.value = value; + } + } } - } - public enum SetupFutureUsage implements ApiRequestParams.EnumParam { - @SerializedName("none") - NONE("none"), + @Getter + @EqualsAndHashCode(callSuper = false) + public static class RoundTripReservationDetail { + /** Name of associated or partner company for the service. */ + @SerializedName("affiliate_name") + Object affiliateName; - @SerializedName("off_session") - OFF_SESSION("off_session"), + /** Arrival details. */ + @SerializedName("arrival") + Arrival arrival; - @SerializedName("on_session") - ON_SESSION("on_session"); + /** Name of transportation company. */ + @SerializedName("carrier_name") + Object carrierName; - @Getter(onMethod_ = {@Override}) - private final String value; + /** Currency. */ + @SerializedName("currency") + Object currency; - SetupFutureUsage(String value) { - this.value = value; - } - } - } + /** Departure details. */ + @SerializedName("departure") + Departure departure; - @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; - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment method. - * - *

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

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

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

If you've already set {@code setup_future_usage} 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; + /** 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() { + return new Builder(); + } - private Crypto(Map extraParams, SetupFutureUsage setupFutureUsage) { - this.extraParams = extraParams; - this.setupFutureUsage = setupFutureUsage; - } + public static class Builder { + private Object affiliateName; - public static Builder builder() { - return new Builder(); - } + private Arrival arrival; - public static class Builder { - private Map extraParams; + private Object carrierName; - private SetupFutureUsage setupFutureUsage; + private Object currency; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodOptions.Crypto build() { - return new PaymentIntentUpdateParams.PaymentMethodOptions.Crypto( - this.extraParams, this.setupFutureUsage); - } + private Departure departure; - /** - * Add a key/value pair to `extraParams` map. A 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; - } + 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.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 List< + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .RoundTripReservationDetail.Insurance> + insurances; - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment - * method. - * - *

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

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

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

If you've already set {@code setup_future_usage} 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; - } - } + private List< + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .RoundTripReservationDetail.Passenger> + passengers; - public enum SetupFutureUsage implements ApiRequestParams.EnumParam { - @SerializedName("none") - NONE("none"); + private Long price; - @Getter(onMethod_ = {@Override}) - private final String value; + private TicketClass ticketClass; - SetupFutureUsage(String value) { - this.value = value; - } - } - } + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .RoundTripReservationDetail + build() { + 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); + } - @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; + /** Name of associated or partner company for the service. */ + public Builder setAffiliateName(String affiliateName) { + this.affiliateName = affiliateName; + 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; + /** Name of associated or partner company for the service. */ + public Builder setAffiliateName(EmptyParam affiliateName) { + this.affiliateName = affiliateName; + 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; + /** Arrival details. */ + public Builder setArrival( + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .RoundTripReservationDetail.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}. - */ - @SerializedName("setup_future_usage") - SetupFutureUsage setupFutureUsage; + /** Name of transportation company. */ + public Builder setCarrierName(String carrierName) { + this.carrierName = carrierName; + return this; + } - private CustomerBalance( - BankTransfer bankTransfer, - Map extraParams, - FundingType fundingType, - SetupFutureUsage setupFutureUsage) { - this.bankTransfer = bankTransfer; - this.extraParams = extraParams; - this.fundingType = fundingType; - this.setupFutureUsage = setupFutureUsage; - } + /** Name of transportation company. */ + public Builder setCarrierName(EmptyParam carrierName) { + this.carrierName = carrierName; + return this; + } - public static Builder builder() { - return new Builder(); - } + /** Currency. */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } - public static class Builder { - private BankTransfer bankTransfer; + /** 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; + } + + /** + * Add a key/value pair to `extraParams` map. A 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 putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A 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 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 addPassenger( + PaymentIntentUpdateParams.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 + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.RoundTripReservationDetail#passengers} + * for the field documentation. + */ + public Builder addAllPassenger( + List< + PaymentIntentUpdateParams.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( + PaymentIntentUpdateParams.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 Map extraParams; + private Arrival( + Address address, Object arrivalLocation, Map extraParams) { + this.address = address; + this.arrivalLocation = arrivalLocation; + this.extraParams = extraParams; + } - private FundingType fundingType; + public static Builder builder() { + return new Builder(); + } - private SetupFutureUsage setupFutureUsage; + public static class Builder { + private Address address; - /** 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); - } + private Object arrivalLocation; - /** - * 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; - } + 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.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 PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .RoundTripReservationDetail.Arrival + build() { + return new PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail.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.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; - } + /** Address of the arrival location. */ + public Builder setAddress( + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .RoundTripReservationDetail.Arrival.Address + address) { + this.address = address; + 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; - } + /** 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( - PaymentIntentUpdateParams.PaymentMethodOptions.CustomerBalance.SetupFutureUsage - setupFutureUsage) { - this.setupFutureUsage = setupFutureUsage; - return this; - } - } + /** Identifier name or reference for the arrival location. */ + public Builder setArrivalLocation(EmptyParam arrivalLocation) { + this.arrivalLocation = arrivalLocation; + return this; + } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class BankTransfer { - /** Configuration for the eu_bank_transfer funding type. */ - @SerializedName("eu_bank_transfer") - EuBankTransfer euBankTransfer; + /** + * Add a key/value pair to `extraParams` map. A 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; + } - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-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.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; + } + } - /** - * 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; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Address { + /** The city or town. */ + @SerializedName("city") + Object city; - /** - * 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; + /** The country in ISO 3166-1 alpha-2 format. */ + @SerializedName("country") + Object country; - 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; - } + /** + * Map of extra parameters for custom features not available in this client library. + * The content in this map is not serialized under this field's + * {@code @SerializedName} value. Instead, each key/value pair is serialized as if the + * key is a root-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 Builder builder() { + return new Builder(); + } - public static class Builder { - private EuBankTransfer euBankTransfer; + public static class Builder { + private Object city; - private Map extraParams; + private Object country; - private List< - PaymentIntentUpdateParams.PaymentMethodOptions.CustomerBalance.BankTransfer - .RequestedAddressType> - requestedAddressTypes; + private Map extraParams; - private Type type; + private Object postalCode; - /** 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); - } + private Object region; - /** Configuration for the eu_bank_transfer funding type. */ - public Builder setEuBankTransfer( - PaymentIntentUpdateParams.PaymentMethodOptions.CustomerBalance.BankTransfer - .EuBankTransfer - euBankTransfer) { - this.euBankTransfer = euBankTransfer; - return this; - } + private Object streetAddress; - /** - * Add a key/value pair to `extraParams` map. A 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; - } + private Object 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.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; - } + /** 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); + } - /** - * 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; - } + /** The city or town. */ + public Builder setCity(String city) { + this.city = city; + 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; - } + /** The city or town. */ + public Builder setCity(EmptyParam city) { + this.city = city; + 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; - } - } + /** 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 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; + /** 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.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; + } - private EuBankTransfer(Object country, Map extraParams) { - this.country = country; - this.extraParams = 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.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 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 Object country; + /** The postal code formatted according to country. */ + public Builder setPostalCode(EmptyParam postalCode) { + this.postalCode = postalCode; + return this; + } - private Map extraParams; + /** The state, county, province, or region formatted according to country. */ + public Builder setRegion(String region) { + this.region = region; + 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); - } + /** The state, county, province, or region formatted according to country. */ + public Builder setRegion(EmptyParam region) { + this.region = region; + 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; - } + /** Line 1 of the street address. */ + public Builder setStreetAddress(String streetAddress) { + this.streetAddress = streetAddress; + 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; - } + /** Line 1 of the street address. */ + public Builder setStreetAddress(EmptyParam streetAddress) { + this.streetAddress = streetAddress; + return this; + } - /** - * Add a key/value pair to `extraParams` map. A 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; - } + /** Line 2 of the street address. */ + public Builder setStreetAddress2(String streetAddress2) { + this.streetAddress2 = streetAddress2; + return this; + } - /** - * Add all map key/value pairs to `extraParams` map. A 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<>(); + /** Line 2 of the street address. */ + public Builder setStreetAddress2(EmptyParam streetAddress2) { + this.streetAddress2 = streetAddress2; + return this; + } } - this.extraParams.putAll(map); - return this; } } - } - - public enum RequestedAddressType implements ApiRequestParams.EnumParam { - @SerializedName("aba") - ABA("aba"), - - @SerializedName("iban") - IBAN("iban"), - @SerializedName("sepa") - SEPA("sepa"), + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Departure { + /** Address of the departure location. */ + @SerializedName("address") + Address address; - @SerializedName("sort_code") - SORT_CODE("sort_code"), + /** Timestamp of departure. */ + @SerializedName("departs_at") + Long departsAt; - @SerializedName("spei") - SPEI("spei"), + /** Identifier name or reference for the origin location. */ + @SerializedName("departure_location") + Object departureLocation; - @SerializedName("swift") - SWIFT("swift"), + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-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("zengin") - ZENGIN("zengin"); + private Departure( + Address address, + Long departsAt, + Object departureLocation, + Map extraParams) { + this.address = address; + this.departsAt = departsAt; + this.departureLocation = departureLocation; + this.extraParams = extraParams; + } - @Getter(onMethod_ = {@Override}) - private final String value; + public static Builder builder() { + return new Builder(); + } - RequestedAddressType(String value) { - this.value = value; - } - } + public static class Builder { + private Address address; - public enum Type implements ApiRequestParams.EnumParam { - @SerializedName("eu_bank_transfer") - EU_BANK_TRANSFER("eu_bank_transfer"), + private Long departsAt; - @SerializedName("gb_bank_transfer") - GB_BANK_TRANSFER("gb_bank_transfer"), + private Object departureLocation; - @SerializedName("jp_bank_transfer") - JP_BANK_TRANSFER("jp_bank_transfer"), + private Map extraParams; - @SerializedName("mx_bank_transfer") - MX_BANK_TRANSFER("mx_bank_transfer"), + /** 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); + } - @SerializedName("us_bank_transfer") - US_BANK_TRANSFER("us_bank_transfer"); + /** Address of the departure location. */ + public Builder setAddress( + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .RoundTripReservationDetail.Departure.Address + address) { + this.address = address; + return this; + } - @Getter(onMethod_ = {@Override}) - private final String value; + /** Timestamp of departure. */ + public Builder setDepartsAt(Long departsAt) { + this.departsAt = departsAt; + return this; + } - Type(String value) { - this.value = value; - } - } - } + /** Identifier name or reference for the origin location. */ + public Builder setDepartureLocation(String departureLocation) { + this.departureLocation = departureLocation; + return this; + } - public enum FundingType implements ApiRequestParams.EnumParam { - @SerializedName("bank_transfer") - BANK_TRANSFER("bank_transfer"); + /** Identifier name or reference for the origin location. */ + public Builder setDepartureLocation(EmptyParam departureLocation) { + this.departureLocation = departureLocation; + 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.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; + } - FundingType(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.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 enum SetupFutureUsage implements ApiRequestParams.EnumParam { - @SerializedName("none") - NONE("none"); + @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; - SetupFutureUsage(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; + } - @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; + 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 city; - private Eps(Map extraParams, SetupFutureUsage setupFutureUsage) { - this.extraParams = extraParams; - this.setupFutureUsage = setupFutureUsage; - } + private Object country; - public static Builder builder() { - return new Builder(); - } + private Map extraParams; - public static class Builder { - private Map extraParams; + private Object postalCode; - private SetupFutureUsage setupFutureUsage; + private Object region; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodOptions.Eps build() { - return new PaymentIntentUpdateParams.PaymentMethodOptions.Eps( - this.extraParams, this.setupFutureUsage); - } + private Object streetAddress; - /** - * Add a key/value pair to `extraParams` map. A 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<>(); - } - this.extraParams.put(key, value); - return this; - } + private Object 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.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; - } + /** 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); + } - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment - * method. - * - *

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

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

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

If you've already set {@code setup_future_usage} 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; - } - } + /** The city or town. */ + public Builder setCity(String city) { + this.city = city; + return this; + } - public enum SetupFutureUsage implements ApiRequestParams.EnumParam { - @SerializedName("none") - NONE("none"); + /** The city or town. */ + public Builder setCity(EmptyParam 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; + } - SetupFutureUsage(String value) { - this.value = value; - } - } - } + /** The country in ISO 3166-1 alpha-2 format. */ + public Builder setCountry(EmptyParam country) { + this.country = country; + 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; + /** + * Add a key/value pair to `extraParams` map. A 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; + } - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment method. - * - *

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

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

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

If you've already set {@code setup_future_usage} 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 + * 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; + } - private Fpx(Map extraParams, SetupFutureUsage setupFutureUsage) { - this.extraParams = extraParams; - 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 postal code formatted according to country. */ + public Builder setPostalCode(EmptyParam postalCode) { + this.postalCode = postalCode; + return this; + } - public static class Builder { - private Map extraParams; + /** The state, county, province, or region formatted according to country. */ + public Builder setRegion(String region) { + this.region = region; + return this; + } - private SetupFutureUsage setupFutureUsage; + /** The state, county, province, or region formatted according to country. */ + public Builder setRegion(EmptyParam region) { + this.region = region; + return this; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodOptions.Fpx build() { - return new PaymentIntentUpdateParams.PaymentMethodOptions.Fpx( - this.extraParams, this.setupFutureUsage); - } + /** Line 1 of the street address. */ + public Builder setStreetAddress(String streetAddress) { + this.streetAddress = streetAddress; + return this; + } - /** - * Add a key/value pair to `extraParams` map. A 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; - } + /** Line 1 of the street address. */ + public Builder setStreetAddress(EmptyParam 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 PaymentIntentUpdateParams.PaymentMethodOptions.Fpx#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; + } + + /** Line 2 of the street address. */ + public Builder setStreetAddress2(EmptyParam 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( - PaymentIntentUpdateParams.PaymentMethodOptions.Fpx.SetupFutureUsage setupFutureUsage) { - this.setupFutureUsage = setupFutureUsage; - 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; - public enum SetupFutureUsage implements ApiRequestParams.EnumParam { - @SerializedName("none") - NONE("none"); + private Long price; - @Getter(onMethod_ = {@Override}) - private final String value; + /** 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); + } - SetupFutureUsage(String value) { - this.value = value; - } - } - } + /** Insurance currency. */ + public Builder setCurrency(String currency) { + this.currency = currency; + 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; + /** Insurance currency. */ + public Builder setCurrency(EmptyParam currency) { + this.currency = currency; + 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 + * 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; + } - private Giropay(Map extraParams, SetupFutureUsage setupFutureUsage) { - this.extraParams = extraParams; - this.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.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 Builder builder() { - return new Builder(); - } + /** Name of the company providing the insurance. */ + public Builder setInsuranceCompanyName(String insuranceCompanyName) { + this.insuranceCompanyName = insuranceCompanyName; + return this; + } - public static class Builder { - private Map extraParams; + /** Name of the company providing the insurance. */ + public Builder setInsuranceCompanyName(EmptyParam insuranceCompanyName) { + this.insuranceCompanyName = insuranceCompanyName; + return this; + } - private SetupFutureUsage setupFutureUsage; + /** Type of insurance. */ + public Builder setInsuranceType( + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .RoundTripReservationDetail.Insurance.InsuranceType + insuranceType) { + this.insuranceType = insuranceType; + return this; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodOptions.Giropay build() { - return new PaymentIntentUpdateParams.PaymentMethodOptions.Giropay( - 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 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 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 PaymentIntentUpdateParams.PaymentMethodOptions.Giropay#extraParams} for - * the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + @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; - } - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment - * method. - * - *

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

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

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

If you've already set {@code setup_future_usage} 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; - } - } + @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 enum SetupFutureUsage implements ApiRequestParams.EnumParam { - @SerializedName("none") - NONE("none"); + /** 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; - SetupFutureUsage(String value) { - this.value = value; - } - } - } + private Passenger( + Map extraParams, Object familyName, Object givenName) { + this.extraParams = extraParams; + this.familyName = familyName; + this.givenName = givenName; + } - @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 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 Map extraParams; - private Gopay(Map extraParams, SetupFutureUsage setupFutureUsage) { - this.extraParams = extraParams; - this.setupFutureUsage = setupFutureUsage; - } + private Object familyName; + + private Object givenName; + + /** 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); + } + + /** + * Add a key/value pair to `extraParams` map. A 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; + } - 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.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; + } - public static class Builder { - private Map extraParams; + /** The family name of the person. */ + public Builder setFamilyName(String familyName) { + this.familyName = familyName; + return this; + } - private SetupFutureUsage setupFutureUsage; + /** The family name of the person. */ + public Builder setFamilyName(EmptyParam familyName) { + this.familyName = familyName; + return this; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodOptions.Gopay build() { - return new PaymentIntentUpdateParams.PaymentMethodOptions.Gopay( - this.extraParams, this.setupFutureUsage); - } + /** The given name of the person. */ + public Builder setGivenName(String givenName) { + this.givenName = givenName; + return this; + } - /** - * Add a key/value pair to `extraParams` map. A 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<>(); + /** The given name of the person. */ + public Builder setGivenName(EmptyParam 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 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; - } + public enum TicketClass implements ApiRequestParams.EnumParam { + @SerializedName("business") + BUSINESS("business"), - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment - * method. - * - *

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

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

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

If you've already set {@code setup_future_usage} 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; - } - } + @SerializedName("economy") + ECONOMY("economy"), - public enum SetupFutureUsage implements ApiRequestParams.EnumParam { - @SerializedName("none") - NONE("none"), + @SerializedName("first_class") + FIRST_CLASS("first_class"), - @SerializedName("off_session") - OFF_SESSION("off_session"); + @SerializedName("premium_economy") + PREMIUM_ECONOMY("premium_economy"); - @Getter(onMethod_ = {@Override}) - private final String value; + @Getter(onMethod_ = {@Override}) + private final String value; - SetupFutureUsage(String value) { - this.value = value; + TicketClass(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; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class TrainReservationDetail { + /** Name of associated or partner company for the service. */ + @SerializedName("affiliate_name") + Object affiliateName; - private Grabpay(Map extraParams, SetupFutureUsage setupFutureUsage) { - this.extraParams = extraParams; - this.setupFutureUsage = setupFutureUsage; - } + /** Arrival details. */ + @SerializedName("arrival") + Arrival arrival; - public static Builder builder() { - return new Builder(); - } + /** Name of transportation company. */ + @SerializedName("carrier_name") + Object carrierName; - public static class Builder { - private Map extraParams; + /** Currency. */ + @SerializedName("currency") + Object currency; - private SetupFutureUsage setupFutureUsage; + /** Departure details. */ + @SerializedName("departure") + Departure departure; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodOptions.Grabpay build() { - return new PaymentIntentUpdateParams.PaymentMethodOptions.Grabpay( - 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; - /** - * Add a key/value pair to `extraParams` map. A 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; - } + /** List of insurances for this reservation. */ + @SerializedName("insurances") + List< + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .TrainReservationDetail.Insurance> + insurances; - /** - * Add all map key/value pairs to `extraParams` map. A 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<>(); + /** 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.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; + public static Builder builder() { + return new Builder(); + } - /** - * 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; + public static class Builder { + private Object affiliateName; - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level 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 arrival; - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment method. - * - *

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

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

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

If you've already set {@code setup_future_usage} 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 carrierName; - private IdBankTransfer( - Long expiresAfter, - Long expiresAt, - Map extraParams, - SetupFutureUsage setupFutureUsage) { - this.expiresAfter = expiresAfter; - this.expiresAt = expiresAt; - this.extraParams = extraParams; - this.setupFutureUsage = setupFutureUsage; - } + private Object currency; - public static Builder builder() { - return new Builder(); - } + private Departure departure; - public static class Builder { - private Long expiresAfter; + private Map extraParams; - private Long expiresAt; + private List< + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .TrainReservationDetail.Insurance> + insurances; - private Map extraParams; + private List< + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .TrainReservationDetail.Passenger> + passengers; - private SetupFutureUsage setupFutureUsage; + private Long price; - /** 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); - } + private TicketClass ticketClass; - /** - * 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; - } + /** 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); + } - /** - * 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; - } + /** Name of associated or partner company for the service. */ + public Builder setAffiliateName(String affiliateName) { + this.affiliateName = affiliateName; + return this; + } - /** - * Add a key/value pair to `extraParams` map. A 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<>(); - } - this.extraParams.put(key, value); - return this; - } + /** Name of associated or partner company for the service. */ + public Builder setAffiliateName(EmptyParam affiliateName) { + this.affiliateName = affiliateName; + return this; + } - /** - * Add all map key/value pairs to `extraParams` map. A 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<>(); - } - this.extraParams.putAll(map); - return this; - } + /** Arrival details. */ + public Builder setArrival( + PaymentIntentUpdateParams.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( - PaymentIntentUpdateParams.PaymentMethodOptions.IdBankTransfer.SetupFutureUsage - 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"); + /** 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 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; + /** Departure details. */ + public Builder setDeparture( + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .TrainReservationDetail.Departure + departure) { + this.departure = departure; + 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 a key/value pair to `extraParams` map. A 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; + } - private Ideal(Map extraParams, ApiRequestParams.EnumParam setupFutureUsage) { - this.extraParams = extraParams; - this.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.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 Builder builder() { - return new Builder(); - } + /** + * 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; + } + + /** + * 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; + } - 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 + * 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; + } - private ApiRequestParams.EnumParam setupFutureUsage; + /** + * 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; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodOptions.Ideal build() { - return new PaymentIntentUpdateParams.PaymentMethodOptions.Ideal( - this.extraParams, this.setupFutureUsage); - } + /** 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 PaymentIntentUpdateParams.PaymentMethodOptions.Ideal#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( + PaymentIntentUpdateParams.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 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; - } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Arrival { + /** Address of the arrival location. */ + @SerializedName("address") + 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.Ideal.SetupFutureUsage - setupFutureUsage) { - this.setupFutureUsage = setupFutureUsage; - return this; - } + /** 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. - * - *

If you've already set {@code setup_future_usage} 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; - } - } + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-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 SetupFutureUsage implements ApiRequestParams.EnumParam { - @SerializedName("none") - NONE("none"), + private Arrival( + Address address, Object arrivalLocation, Map extraParams) { + this.address = address; + this.arrivalLocation = arrivalLocation; + this.extraParams = extraParams; + } - @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 Address address; - SetupFutureUsage(String value) { - this.value = value; - } - } - } + private Object arrivalLocation; - @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 Map extraParams; - private InteracPresent(Map extraParams) { - this.extraParams = 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); + } - public static Builder builder() { - return new Builder(); - } + /** Address of the arrival location. */ + public Builder setAddress( + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .TrainReservationDetail.Arrival.Address + address) { + this.address = address; + return this; + } - public static class Builder { - private Map extraParams; + /** 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.InteracPresent build() { - return new PaymentIntentUpdateParams.PaymentMethodOptions.InteracPresent( - this.extraParams); - } + /** 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 - * 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 a key/value pair to `extraParams` map. A 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; + } - /** - * Add all map key/value pairs to `extraParams` map. A 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; - } - } - } + /** + * Add all map key/value pairs to `extraParams` map. A 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; + } + } - @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 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; + } - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-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. - */ - @SerializedName("setup_future_usage") - ApiRequestParams.EnumParam setupFutureUsage; + public static class Builder { + private Object city; - private KakaoPay( - ApiRequestParams.EnumParam captureMethod, - Map extraParams, - ApiRequestParams.EnumParam setupFutureUsage) { - this.captureMethod = captureMethod; - this.extraParams = extraParams; - this.setupFutureUsage = setupFutureUsage; - } + private Object country; - public static Builder builder() { - return new Builder(); - } + private Map extraParams; - public static class Builder { - private ApiRequestParams.EnumParam captureMethod; + private Object postalCode; - private Map extraParams; + private Object region; - private ApiRequestParams.EnumParam setupFutureUsage; + private Object streetAddress; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodOptions.KakaoPay build() { - return new PaymentIntentUpdateParams.PaymentMethodOptions.KakaoPay( - this.captureMethod, this.extraParams, this.setupFutureUsage); - } + private Object 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( - PaymentIntentUpdateParams.PaymentMethodOptions.KakaoPay.CaptureMethod captureMethod) { - this.captureMethod = captureMethod; - return this; - } + /** 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); + } - /** - * 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 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 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; - } + /** The city or town. */ + public Builder setCity(EmptyParam 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 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; - } + /** 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. - */ - public Builder setSetupFutureUsage( - PaymentIntentUpdateParams.PaymentMethodOptions.KakaoPay.SetupFutureUsage - setupFutureUsage) { - this.setupFutureUsage = setupFutureUsage; - 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. - */ - 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.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; + } - public enum CaptureMethod implements ApiRequestParams.EnumParam { - @SerializedName("manual") - MANUAL("manual"); + /** + * Add all map key/value pairs to `extraParams` map. A 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; + } - @Getter(onMethod_ = {@Override}) - private final String value; + /** The postal code formatted according to country. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } - CaptureMethod(String value) { - this.value = value; - } - } + /** The postal code formatted according to country. */ + public Builder setPostalCode(EmptyParam postalCode) { + this.postalCode = postalCode; + 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(String region) { + this.region = region; + return this; + } - @SerializedName("off_session") - OFF_SESSION("off_session"); + /** 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 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; + /** Line 2 of the street address. */ + public Builder setStreetAddress2(String streetAddress2) { + this.streetAddress2 = streetAddress2; + 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(EmptyParam streetAddress2) { + this.streetAddress2 = streetAddress2; + return this; + } + } + } + } - /** On-demand details if setting up or charging an on-demand payment. */ - @SerializedName("on_demand") - OnDemand onDemand; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Departure { + /** Address of the departure location. */ + @SerializedName("address") + Address address; - /** Preferred language of the Klarna authorization page that the customer is redirected to. */ - @SerializedName("preferred_locale") - PreferredLocale preferredLocale; + /** Timestamp of departure. */ + @SerializedName("departs_at") + 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}. - */ - @SerializedName("setup_future_usage") - SetupFutureUsage setupFutureUsage; + /** 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; - /** Subscription details if setting up or charging a subscription. */ - @SerializedName("subscriptions") - Object subscriptions; + private Departure( + Address address, + Long departsAt, + Object departureLocation, + Map extraParams) { + this.address = address; + this.departsAt = departsAt; + this.departureLocation = departureLocation; + this.extraParams = extraParams; + } - 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; - } + public static Builder builder() { + return new Builder(); + } - public static Builder builder() { - return new Builder(); - } + public static class Builder { + private Address address; - public static class Builder { - private ApiRequestParams.EnumParam captureMethod; + private Long departsAt; - private Map extraParams; + private Object departureLocation; - private OnDemand onDemand; + private Map extraParams; - private PreferredLocale preferredLocale; + /** 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); + } - private SetupFutureUsage setupFutureUsage; + /** Address of the departure location. */ + public Builder setAddress( + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .TrainReservationDetail.Departure.Address + address) { + this.address = address; + return this; + } - private Object subscriptions; + /** Timestamp of departure. */ + public Builder setDepartsAt(Long departsAt) { + this.departsAt = departsAt; + return this; + } - /** 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); - } + /** Identifier name or reference for the origin location. */ + public Builder setDepartureLocation(String departureLocation) { + this.departureLocation = departureLocation; + 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.Klarna.CaptureMethod captureMethod) { - this.captureMethod = captureMethod; - return this; - } + /** Identifier name or reference for the origin location. */ + public Builder setDepartureLocation(EmptyParam departureLocation) { + this.departureLocation = departureLocation; + 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.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 a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.Klarna#extraParams} for - * the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.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; + } + } - /** - * Add all map key/value pairs to `extraParams` map. A 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; - } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Address { + /** The city or town. */ + @SerializedName("city") + Object city; - /** 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; - } + /** The country in ISO 3166-1 alpha-2 format. */ + @SerializedName("country") + Object country; - /** - * 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; - } + /** + * Map of extra parameters for custom features not available in this client library. + * The content in this map is not serialized under this field's + * {@code @SerializedName} value. Instead, each key/value pair is serialized as if the + * key is a root-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.Klarna.SetupFutureUsage - setupFutureUsage) { - this.setupFutureUsage = setupFutureUsage; - return this; - } + public static Builder builder() { + return new Builder(); + } - /** - * 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; - } + public static class Builder { + private Object city; - /** - * 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; - } + private Object country; - /** Subscription details if setting up or charging a subscription. */ - public Builder setSubscriptions(EmptyParam subscriptions) { - this.subscriptions = subscriptions; - return this; - } + private Map extraParams; - /** Subscription details if setting up or charging a subscription. */ - public Builder setSubscriptions( - List - subscriptions) { - this.subscriptions = subscriptions; - return this; - } - } + private Object postalCode; - @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; + private Object region; - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level 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 streetAddress; - /** - * 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 Object streetAddress2; - /** - * 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; + /** 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); + } - /** Interval at which the customer is making purchases. */ - @SerializedName("purchase_interval") - PurchaseInterval purchaseInterval; + /** The city or town. */ + public Builder setCity(String city) { + this.city = city; + return this; + } - /** The number of {@code purchase_interval} between charges. */ - @SerializedName("purchase_interval_count") - Long purchaseIntervalCount; + /** The city or town. */ + public Builder setCity(EmptyParam city) { + this.city = city; + return this; + } - 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; - } + /** The country in ISO 3166-1 alpha-2 format. */ + public Builder setCountry(String country) { + this.country = country; + return this; + } - public static Builder builder() { - return new Builder(); - } + /** The country in ISO 3166-1 alpha-2 format. */ + public Builder setCountry(EmptyParam country) { + this.country = country; + return this; + } - public static class Builder { - private Long averageAmount; + /** + * Add a key/value pair to `extraParams` map. A 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 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.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 Long maximumAmount; + /** The postal code formatted according to country. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } - private Long minimumAmount; + /** The postal code formatted according to country. */ + public Builder setPostalCode(EmptyParam postalCode) { + this.postalCode = postalCode; + return this; + } - private PurchaseInterval purchaseInterval; + /** The state, county, province, or region formatted according to country. */ + public Builder setRegion(String region) { + this.region = region; + return this; + } - private Long purchaseIntervalCount; + /** The state, county, province, or region formatted according to country. */ + public Builder setRegion(EmptyParam region) { + this.region = region; + 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); - } + /** Line 1 of the street address. */ + public Builder setStreetAddress(String streetAddress) { + this.streetAddress = streetAddress; + 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; - } + /** Line 1 of the street address. */ + public Builder setStreetAddress(EmptyParam streetAddress) { + this.streetAddress = streetAddress; + return this; + } - /** - * Add a key/value pair to `extraParams` map. A 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<>(); + /** 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 @@ -24243,10 +38088,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() { @@ -24254,40 +38126,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; } @@ -24295,7 +38177,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) { @@ -24310,7 +38192,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) { @@ -24320,27 +38202,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; + } } } } @@ -27833,6 +41757,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 +41779,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 +41791,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 +41858,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 +41915,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 +41933,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/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/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/SetupIntentConfirmParams.java b/src/main/java/com/stripe/param/SetupIntentConfirmParams.java index fb7e37c33ca..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"), @@ -10269,6 +10272,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 +10294,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 +10306,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 +10385,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 +10433,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 +10451,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..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"), @@ -10801,6 +10804,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 +10826,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 +10838,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 +10917,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 +10965,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 +10983,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..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"), @@ -10490,6 +10493,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 +10515,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 +10527,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 +10606,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 +10663,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 +10681,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/WebhookEndpointCreateParams.java b/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java index b11e22a20e9..7fa9aa99962 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; @@ -704,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"), @@ -906,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"), @@ -934,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/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/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; 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; 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 b0d4b07e0b4..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. @@ -567,9 +582,9 @@ 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 - * Invoices and Subscriptions. + * 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. This behavior is now deprecated for new users. */ @SerializedName("location_source") LocationSource locationSource; @@ -654,9 +669,9 @@ 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 - * Invoices and Subscriptions. + * 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. 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 @@ -1639,6 +1653,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 +1664,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 +1682,9 @@ private Merchant( Capabilities capabilities, CardPayments cardPayments, Map extraParams, + KonbiniPayments konbiniPayments, String mcc, + ScriptStatementDescriptor scriptStatementDescriptor, StatementDescriptor statementDescriptor, Support support) { this.bacsDebitPayments = bacsDebitPayments; @@ -1668,7 +1692,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 +1714,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 +1732,9 @@ public AccountCreateParams.Configuration.Merchant build() { this.capabilities, this.cardPayments, this.extraParams, + this.konbiniPayments, this.mcc, + this.scriptStatementDescriptor, this.statementDescriptor, this.support); } @@ -1765,6 +1797,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 +1813,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) { @@ -6337,8 +6384,682 @@ public AccountCreateParams.Configuration.Merchant.Capabilities.ZipPayments 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 - * AccountCreateParams.Configuration.Merchant.Capabilities.ZipPayments#extraParams} for - * the field documentation. + * AccountCreateParams.Configuration.Merchant.Capabilities.ZipPayments#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. 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.Capabilities.ZipPayments#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 CardPayments { + /** + * Automatically declines certain charge types regardless of whether the card issuer + * accepted or declined the charge. + */ + @SerializedName("decline_on") + DeclineOn declineOn; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private CardPayments(DeclineOn declineOn, Map extraParams) { + this.declineOn = declineOn; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private DeclineOn declineOn; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Configuration.Merchant.CardPayments build() { + return new AccountCreateParams.Configuration.Merchant.CardPayments( + this.declineOn, this.extraParams); + } + + /** + * Automatically declines certain charge types regardless of whether the card issuer + * accepted or declined the charge. + */ + public Builder setDeclineOn( + AccountCreateParams.Configuration.Merchant.CardPayments.DeclineOn declineOn) { + this.declineOn = declineOn; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. 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.CardPayments#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. 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.CardPayments#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 DeclineOn { + /** + * Whether Stripe automatically declines charges with an incorrect ZIP or postal code. + * This setting only applies when a ZIP or postal code is provided and they fail bank + * verification. + */ + @SerializedName("avs_failure") + Boolean avsFailure; + + /** + * Whether Stripe automatically declines charges with an incorrect CVC. This setting only + * applies when a CVC is provided and it fails bank verification. + */ + @SerializedName("cvc_failure") + Boolean cvcFailure; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private DeclineOn( + Boolean avsFailure, Boolean cvcFailure, Map extraParams) { + this.avsFailure = avsFailure; + this.cvcFailure = cvcFailure; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Boolean avsFailure; + + private Boolean cvcFailure; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Configuration.Merchant.CardPayments.DeclineOn build() { + return new AccountCreateParams.Configuration.Merchant.CardPayments.DeclineOn( + this.avsFailure, this.cvcFailure, this.extraParams); + } + + /** + * Whether Stripe automatically declines charges with an incorrect ZIP or postal code. + * This setting only applies when a ZIP or postal code is provided and they fail bank + * verification. + */ + public Builder setAvsFailure(Boolean avsFailure) { + this.avsFailure = avsFailure; + return this; + } + + /** + * Whether Stripe automatically declines charges with an incorrect CVC. This setting + * only applies when a CVC is provided and it fails bank verification. + */ + public Builder setCvcFailure(Boolean cvcFailure) { + this.cvcFailure = cvcFailure; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. 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.CardPayments.DeclineOn#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. 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.CardPayments.DeclineOn#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 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. + * Instead, each key/value pair is serialized as if the key is a root-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 for Konbini payments. */ + @SerializedName("support") + Support support; + + private KonbiniPayments(Map extraParams, Support support) { + this.extraParams = extraParams; + this.support = support; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Support support; + + /** Finalize and obtain parameter instance from this builder. */ + 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.KonbiniPayments#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. 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#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 for Konbini payments. */ + public Builder setSupport( + AccountCreateParams.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") + 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; + + /** Support hours for Konbini payments. */ + @SerializedName("hours") + Hours hours; + + /** Support phone number for Konbini payments. */ + @SerializedName("phone") + String phone; + + private Support( + String email, Map extraParams, Hours hours, String phone) { + this.email = email; + this.extraParams = extraParams; + this.hours = hours; + this.phone = phone; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String email; + + private Map extraParams; + + private Hours hours; + + private String phone; + + /** 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); + } + + /** Support email address for Konbini payments. */ + 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.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) { @@ -6352,8 +7073,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.Capabilities.ZipPayments#extraParams} for - * the field documentation. + * AccountCreateParams.Configuration.Merchant.ScriptStatementDescriptor.Kana#extraParams} + * for the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -6364,113 +7085,34 @@ public Builder putAllExtraParam(Map map) { } /** - * Required. To request a new Capability for an account, pass true. - * There can be a delay before the requested Capability becomes active. + * 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 setRequested(Boolean requested) { - this.requested = requested; + public Builder setPrefix(String prefix) { + this.prefix = prefix; return this; } } } - } - - @Getter - @EqualsAndHashCode(callSuper = false) - public static class CardPayments { - /** - * Automatically declines certain charge types regardless of whether the card issuer - * accepted or declined the charge. - */ - @SerializedName("decline_on") - DeclineOn declineOn; - - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field - * (serialized) name in this param object. Effectively, this map is flattened to its parent - * instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - - private CardPayments(DeclineOn declineOn, Map extraParams) { - this.declineOn = declineOn; - this.extraParams = extraParams; - } - - public static Builder builder() { - return new Builder(); - } - - public static class Builder { - private DeclineOn declineOn; - - private Map extraParams; - - /** Finalize and obtain parameter instance from this builder. */ - public AccountCreateParams.Configuration.Merchant.CardPayments build() { - return new AccountCreateParams.Configuration.Merchant.CardPayments( - this.declineOn, this.extraParams); - } - - /** - * Automatically declines certain charge types regardless of whether the card issuer - * accepted or declined the charge. - */ - public Builder setDeclineOn( - AccountCreateParams.Configuration.Merchant.CardPayments.DeclineOn declineOn) { - this.declineOn = declineOn; - return this; - } - - /** - * Add a key/value pair to `extraParams` map. 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.CardPayments#extraParams} - * for the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } - - /** - * Add all map key/value pairs to `extraParams` map. 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.CardPayments#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 DeclineOn { - /** - * Whether Stripe automatically declines charges with an incorrect ZIP or postal code. - * This setting only applies when a ZIP or postal code is provided and they fail bank - * verification. - */ - @SerializedName("avs_failure") - Boolean avsFailure; - + public static class Kanji { /** - * Whether Stripe automatically declines charges with an incorrect CVC. This setting only - * applies when a CVC is provided and it fails bank verification. + * 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("cvc_failure") - Boolean cvcFailure; + @SerializedName("descriptor") + String descriptor; /** * Map of extra parameters for custom features not available in this client library. The @@ -6482,11 +7124,21 @@ public static class DeclineOn { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private DeclineOn( - Boolean avsFailure, Boolean cvcFailure, Map extraParams) { - this.avsFailure = avsFailure; - this.cvcFailure = cvcFailure; + /** + * 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() { @@ -6494,34 +7146,30 @@ public static Builder builder() { } public static class Builder { - private Boolean avsFailure; - - private Boolean cvcFailure; + private String descriptor; private Map extraParams; - /** Finalize and obtain parameter instance from this builder. */ - public AccountCreateParams.Configuration.Merchant.CardPayments.DeclineOn build() { - return new AccountCreateParams.Configuration.Merchant.CardPayments.DeclineOn( - this.avsFailure, this.cvcFailure, this.extraParams); - } + private String prefix; - /** - * Whether Stripe automatically declines charges with an incorrect ZIP or postal code. - * This setting only applies when a ZIP or postal code is provided and they fail bank - * verification. - */ - public Builder setAvsFailure(Boolean avsFailure) { - this.avsFailure = avsFailure; - return this; + /** 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); } /** - * Whether Stripe automatically declines charges with an incorrect CVC. This setting - * only applies when a CVC is provided and it fails bank verification. + * 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 setCvcFailure(Boolean cvcFailure) { - this.cvcFailure = cvcFailure; + public Builder setDescriptor(String descriptor) { + this.descriptor = descriptor; return this; } @@ -6529,8 +7177,8 @@ public Builder setCvcFailure(Boolean cvcFailure) { * Add a key/value pair to `extraParams` map. 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.CardPayments.DeclineOn#extraParams} for - * the field documentation. + * AccountCreateParams.Configuration.Merchant.ScriptStatementDescriptor.Kanji#extraParams} + * for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -6544,8 +7192,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.CardPayments.DeclineOn#extraParams} for - * the field documentation. + * AccountCreateParams.Configuration.Merchant.ScriptStatementDescriptor.Kanji#extraParams} + * for the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -6554,6 +7202,19 @@ public Builder putAllExtraParam(Map map) { 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; + } } } } @@ -8047,6 +8708,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 +8730,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 +8742,8 @@ public static Builder builder() { } public static class Builder { + private Eur eur; + private Map extraParams; private Gbp gbp; @@ -8085,7 +8753,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 +8808,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 { @@ -13238,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"), @@ -16469,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"), @@ -17500,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 89c16bbd4d6..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. @@ -634,9 +655,9 @@ 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 - * Invoices and Subscriptions. + * 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. This behavior is now deprecated for new users. */ @SerializedName("location_source") LocationSource locationSource; @@ -744,9 +765,9 @@ 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 - * Invoices and Subscriptions. + * 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. 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 @@ -1885,6 +1905,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 +1916,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 +1935,9 @@ private Merchant( Capabilities capabilities, CardPayments cardPayments, Map extraParams, + KonbiniPayments konbiniPayments, Object mcc, + ScriptStatementDescriptor scriptStatementDescriptor, StatementDescriptor statementDescriptor, Support support) { this.applied = applied; @@ -1916,7 +1946,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 +1970,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 +1989,9 @@ public AccountUpdateParams.Configuration.Merchant build() { this.capabilities, this.cardPayments, this.extraParams, + this.konbiniPayments, this.mcc, + this.scriptStatementDescriptor, this.statementDescriptor, this.support); } @@ -2025,6 +2063,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 +2088,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) { @@ -6658,8 +6711,720 @@ 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.Capabilities.ZipPayments#extraParams} for - * the field documentation. + * AccountUpdateParams.Configuration.Merchant.Capabilities.ZipPayments#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 CardPayments { + /** + * Automatically declines certain charge types regardless of whether the card issuer + * accepted or declined the charge. + */ + @SerializedName("decline_on") + DeclineOn declineOn; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private CardPayments(DeclineOn declineOn, Map extraParams) { + this.declineOn = declineOn; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private DeclineOn declineOn; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Configuration.Merchant.CardPayments build() { + return new AccountUpdateParams.Configuration.Merchant.CardPayments( + this.declineOn, this.extraParams); + } + + /** + * Automatically declines certain charge types regardless of whether the card issuer + * accepted or declined the charge. + */ + public Builder setDeclineOn( + AccountUpdateParams.Configuration.Merchant.CardPayments.DeclineOn declineOn) { + this.declineOn = declineOn; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. 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.CardPayments#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. 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.CardPayments#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 DeclineOn { + /** + * Whether Stripe automatically declines charges with an incorrect ZIP or postal code. + * This setting only applies when a ZIP or postal code is provided and they fail bank + * verification. + */ + @SerializedName("avs_failure") + Boolean avsFailure; + + /** + * Whether Stripe automatically declines charges with an incorrect CVC. This setting only + * applies when a CVC is provided and it fails bank verification. + */ + @SerializedName("cvc_failure") + Boolean cvcFailure; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private DeclineOn( + Boolean avsFailure, Boolean cvcFailure, Map extraParams) { + this.avsFailure = avsFailure; + this.cvcFailure = cvcFailure; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Boolean avsFailure; + + private Boolean cvcFailure; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Configuration.Merchant.CardPayments.DeclineOn build() { + return new AccountUpdateParams.Configuration.Merchant.CardPayments.DeclineOn( + this.avsFailure, this.cvcFailure, this.extraParams); + } + + /** + * Whether Stripe automatically declines charges with an incorrect ZIP or postal code. + * This setting only applies when a ZIP or postal code is provided and they fail bank + * verification. + */ + public Builder setAvsFailure(Boolean avsFailure) { + this.avsFailure = avsFailure; + return this; + } + + /** + * Whether Stripe automatically declines charges with an incorrect CVC. This setting + * only applies when a CVC is provided and it fails bank verification. + */ + public Builder setCvcFailure(Boolean cvcFailure) { + this.cvcFailure = cvcFailure; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. 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.CardPayments.DeclineOn#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. 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.CardPayments.DeclineOn#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 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. + * Instead, each key/value pair is serialized as if the key is a root-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 for Konbini payments. */ + @SerializedName("support") + Support support; + + private KonbiniPayments(Map extraParams, Support support) { + this.extraParams = extraParams; + this.support = support; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Support support; + + /** Finalize and obtain parameter instance from this builder. */ + 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.KonbiniPayments#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. 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#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 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; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 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; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object email; + + private Map extraParams; + + private Hours hours; + + private Object phone; + + /** 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); + } + + /** Support email address for Konbini payments. */ + public Builder setEmail(String email) { + this.email = email; + return this; + } + + /** Support email address for Konbini payments. */ + 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.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 + * 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; + } + + /** Support hours for Konbini payments. */ + public Builder setHours( + AccountUpdateParams.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; + } + + /** Support phone number for Konbini payments. */ + public Builder setPhone(EmptyParam 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") + Object 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") + Object startTime; + + private Hours(Object endTime, Map extraParams, Object startTime) { + this.endTime = endTime; + this.extraParams = extraParams; + this.startTime = startTime; + } + + 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) { @@ -6670,113 +7435,47 @@ public Builder putAllExtraParam(Map map) { } /** - * To request a new Capability for an account, pass true. There can be a delay before - * the requested Capability becomes active. + * 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 setRequested(Boolean requested) { - this.requested = requested; + public Builder setPrefix(String prefix) { + this.prefix = prefix; return this; } - } - } - } - - @Getter - @EqualsAndHashCode(callSuper = false) - public static class CardPayments { - /** - * Automatically declines certain charge types regardless of whether the card issuer - * accepted or declined the charge. - */ - @SerializedName("decline_on") - DeclineOn declineOn; - - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field - * (serialized) name in this param object. Effectively, this map is flattened to its parent - * instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - - private CardPayments(DeclineOn declineOn, Map extraParams) { - this.declineOn = declineOn; - this.extraParams = extraParams; - } - - public static Builder builder() { - return new Builder(); - } - - public static class Builder { - private DeclineOn declineOn; - - private Map extraParams; - - /** Finalize and obtain parameter instance from this builder. */ - public AccountUpdateParams.Configuration.Merchant.CardPayments build() { - return new AccountUpdateParams.Configuration.Merchant.CardPayments( - this.declineOn, this.extraParams); - } - - /** - * Automatically declines certain charge types regardless of whether the card issuer - * accepted or declined the charge. - */ - public Builder setDeclineOn( - AccountUpdateParams.Configuration.Merchant.CardPayments.DeclineOn declineOn) { - this.declineOn = declineOn; - return this; - } - - /** - * Add a key/value pair to `extraParams` map. 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.CardPayments#extraParams} - * for the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } - /** - * Add all map key/value pairs to `extraParams` map. 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.CardPayments#extraParams} - * for the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** + * 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; } - this.extraParams.putAll(map); - return this; } } @Getter @EqualsAndHashCode(callSuper = false) - public static class DeclineOn { - /** - * Whether Stripe automatically declines charges with an incorrect ZIP or postal code. - * This setting only applies when a ZIP or postal code is provided and they fail bank - * verification. - */ - @SerializedName("avs_failure") - Boolean avsFailure; - + public static class Kanji { /** - * Whether Stripe automatically declines charges with an incorrect CVC. This setting only - * applies when a CVC is provided and it fails bank verification. + * 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("cvc_failure") - Boolean cvcFailure; + @SerializedName("descriptor") + Object descriptor; /** * Map of extra parameters for custom features not available in this client library. The @@ -6788,11 +7487,21 @@ public static class DeclineOn { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private DeclineOn( - Boolean avsFailure, Boolean cvcFailure, Map extraParams) { - this.avsFailure = avsFailure; - this.cvcFailure = cvcFailure; + /** + * 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() { @@ -6800,34 +7509,44 @@ public static Builder builder() { } public static class Builder { - private Boolean avsFailure; - - private Boolean cvcFailure; + private Object descriptor; private Map extraParams; + private Object prefix; + /** Finalize and obtain parameter instance from this builder. */ - public AccountUpdateParams.Configuration.Merchant.CardPayments.DeclineOn build() { - return new AccountUpdateParams.Configuration.Merchant.CardPayments.DeclineOn( - this.avsFailure, this.cvcFailure, this.extraParams); + public AccountUpdateParams.Configuration.Merchant.ScriptStatementDescriptor.Kanji + build() { + return new AccountUpdateParams.Configuration.Merchant.ScriptStatementDescriptor.Kanji( + this.descriptor, this.extraParams, this.prefix); } /** - * Whether Stripe automatically declines charges with an incorrect ZIP or postal code. - * This setting only applies when a ZIP or postal code is provided and they fail bank - * verification. + * 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 setAvsFailure(Boolean avsFailure) { - this.avsFailure = avsFailure; + public Builder setDescriptor(String descriptor) { + this.descriptor = descriptor; return this; } /** - * Whether Stripe automatically declines charges with an incorrect CVC. This setting - * only applies when a CVC is provided and it fails bank verification. + * 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 setCvcFailure(Boolean cvcFailure) { - this.cvcFailure = cvcFailure; + public Builder setDescriptor(EmptyParam descriptor) { + this.descriptor = descriptor; return this; } @@ -6835,8 +7554,8 @@ public Builder setCvcFailure(Boolean cvcFailure) { * Add a key/value pair to `extraParams` map. 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.CardPayments.DeclineOn#extraParams} for - * the field documentation. + * AccountUpdateParams.Configuration.Merchant.ScriptStatementDescriptor.Kanji#extraParams} + * for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -6850,8 +7569,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.CardPayments.DeclineOn#extraParams} for - * the field documentation. + * AccountUpdateParams.Configuration.Merchant.ScriptStatementDescriptor.Kanji#extraParams} + * for the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -6860,6 +7579,32 @@ public Builder putAllExtraParam(Map map) { 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; + } } } } @@ -7385,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") @@ -7451,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) { @@ -7464,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) { @@ -8526,6 +9271,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 +9293,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 +9305,8 @@ public static Builder builder() { } public static class Builder { + private Eur eur; + private Map extraParams; private Gbp gbp; @@ -8564,7 +9316,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 +9371,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 { @@ -14087,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"), @@ -17622,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"), @@ -18779,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/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/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 b85572b0c82..00000000000 --- a/src/main/java/com/stripe/param/v2/payments/OffSessionPaymentCaptureParams.java +++ /dev/null @@ -1,302 +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 { - /** Required. 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); - } - - /** Required. 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; - - /** - * 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 OffSessionPaymentCaptureParams.TransferData build() { - return new OffSessionPaymentCaptureParams.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 - * 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 594d724bfd7..00000000000 --- a/src/main/java/com/stripe/param/v2/payments/OffSessionPaymentCreateParams.java +++ /dev/null @@ -1,1477 +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.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 OffSessionPaymentCreateParams extends ApiRequestParams { - /** Required. The “presentment amount” to be collected from the customer. */ - @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; - - /** Details about the capture configuration for the OffSessionPayment. */ - @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; - - /** - * Map of extra parameters for custom features not available in this client library. The content - * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each - * key/value pair is serialized as if the key is a root-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, - AmountDetails amountDetails, - Cadence cadence, - Capture capture, - CaptureMethod captureMethod, - 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.amountDetails = amountDetails; - this.cadence = cadence; - this.capture = capture; - this.captureMethod = captureMethod; - 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 AmountDetails amountDetails; - - private Cadence cadence; - - private Capture capture; - - private CaptureMethod captureMethod; - - 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.amountDetails, - this.cadence, - this.capture, - this.captureMethod, - 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; - } - - /** 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; - return this; - } - - /** Details about the capture configuration for the OffSessionPayment. */ - public Builder setCapture(OffSessionPaymentCreateParams.Capture capture) { - this.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; - return this; - } - - /** - * Add a key/value pair to `extraParams` map. 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 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 { - /** 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; - - /** - * Required. 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; - } - - /** - * Required. 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("heuristic") - HEURISTIC("heuristic"), - - @SerializedName("none") - NONE("none"), - - @SerializedName("scheduled") - SCHEDULED("scheduled"), - - @SerializedName("smart") - SMART("smart"); - - @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; - } - } - - 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/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 982f06c6b3e..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\",\"object\":\"v2.core.event\",\"reason\":{\"type\":\"request\",\"request\":{\"id\":\"obj_123\",\"idempotency_key\":\"idempotency_key\"}},\"type\":\"type\",\"livemode\":true}"); + "{\"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( @@ -25473,7 +25986,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 +26008,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 +26207,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"); @@ -27135,142 +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() - .setAmountToCapture(1374310455L) - .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( 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())); } }