diff --git a/CHANGELOG.md b/CHANGELOG.md index 494f01d357e..c4ba398724b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,20 @@ # Changelog +## 24.5.0 - 2023-11-21 +* [#1693](https://github.com/stripe/stripe-java/pull/1693) Update generated code + * Add support for `electronic_commerce_indicator` and `transaction_id` on `Charge.payment_method_details.card.three_d_secure` and `SetupAttempt.payment_method_details.card.three_d_secure` + * Add support for `exemption_indicator_applied` and `exemption_indicator` on `Charge.payment_method_details.card.three_d_secure` + * Add support for `three_d_secure` on `PaymentIntentConfirmParams.payment_method_options.card`, `PaymentIntentCreateParams.payment_method_options.card`, `PaymentIntentUpdateParams.payment_method_options.card`, `SetupIntentConfirmParams.payment_method_options.card`, `SetupIntentCreateParams.payment_method_options.card`, and `SetupIntentUpdateParams.payment_method_options.card` + +## 24.4.0 - 2023-11-21 +* [#1690](https://github.com/stripe/stripe-java/pull/1690) Update generated code + * Add support for `offline` on `Charge.payment_method_details.card_present` + * Add support for `system_trace_audit_number` on `Issuing.Authorization.network_data` + * Add support for `transaction_id` on `Issuing.Authorization.network_data` and `Issuing.Transaction.network_data` + * Add support for `network_risk_score` on `Issuing.Authorization.pending_request` and `Issuing.Authorization.request_history[]` + * Add support for `requested_at` on `Issuing.Authorization.request_history[]` + * Add support for `authorization_code` on `Issuing.Transaction.network_data` + ## 24.4.0-beta.1 - 2023-11-16 * [#1682](https://github.com/stripe/stripe-java/pull/1682) Update generated code for beta * Add support for `issuing_card` and `issuing_cards_list` on `AccountSessionCreateParams.components` @@ -9,12 +24,27 @@ * Add support for `passengers` on `ChargeCaptureParams.payment_details.flight`, `ChargeCaptureParams.payment_details.lodging`, `ChargeUpdateParams.payment_details.flight`, `ChargeUpdateParams.payment_details.lodging`, `PaymentIntentCaptureParams.payment_details.flight`, `PaymentIntentCaptureParams.payment_details.lodging`, `PaymentIntentConfirmParams.payment_details.flight`, `PaymentIntentConfirmParams.payment_details.lodging`, `PaymentIntentCreateParams.payment_details.flight`, `PaymentIntentCreateParams.payment_details.lodging`, `PaymentIntentUpdateParams.payment_details.flight`, and `PaymentIntentUpdateParams.payment_details.lodging` * Add support for `created` on `CustomerSession` +## 24.3.0 - 2023-11-16 +* [#1685](https://github.com/stripe/stripe-java/pull/1685) Update generated code + * Add support for `status` on `checkout.SessionListParams` +* [#1683](https://github.com/stripe/stripe-java/pull/1683) Update generated code + * Add support for `bacs_debit_payments` on `AccountCreateParams.settings` and `AccountUpdateParams.settings` + * Add support for `service_user_number` on `Account.settings.bacs_debit_payments` + * Add support for `capture_before` on `Charge.payment_method_details.card` + * Add support for `paypal` on `Checkout.Session.payment_method_options` + * Add support for `tax_amounts` on `CreditNoteCreateParams.lines[]`, `CreditNotePreviewLinesParams.lines[]`, and `CreditNotePreviewParams.lines[]` + * Add support for `network_data` on `Issuing.Transaction` + ## 24.3.0-beta.1 - 2023-11-10 * [#1681](https://github.com/stripe/stripe-java/pull/1681) Update generated code for beta * Add support for `metadata` on `QuoteCreateParams.phases[]`, `QuotePhase`, and `QuoteUpdateParams.phases[]` * Add support for `last_reestimation_details` on `Quote.computed` * Add support for new value `quote.reestimate_failed` on enums `WebhookEndpointCreateParams.enabled_events[]` and `WebhookEndpointUpdateParams.enabled_events[]` +## 24.2.0 - 2023-11-09 +* [#1679](https://github.com/stripe/stripe-java/pull/1679) Update generated code + * Add support for `metadata` on `Quote.subscription_data`, `QuoteCreateParams.subscription_data`, and `QuoteUpdateParams.subscription_data` + ## 24.2.0-beta.1 - 2023-11-02 * [#1678](https://github.com/stripe/stripe-java/pull/1678) Update generated code for beta * Add support for `attach_payment_intent` method on resource `Invoice` @@ -29,21 +59,6 @@ * Change type of `tax.RegistrationCreateParams.active_from` to `DateTime | 'now'` * Add support for new value `invoice.payment.overpaid` on enums `WebhookEndpointCreateParams.enabled_events[]` and `WebhookEndpointUpdateParams.enabled_events[]` -## 24.3.0 - 2023-11-16 -* [#1685](https://github.com/stripe/stripe-java/pull/1685) Update generated code - * Add support for `status` on `checkout.SessionListParams` -* [#1683](https://github.com/stripe/stripe-java/pull/1683) Update generated code - * Add support for `bacs_debit_payments` on `AccountCreateParams.settings` and `AccountUpdateParams.settings` - * Add support for `service_user_number` on `Account.settings.bacs_debit_payments` - * Add support for `capture_before` on `Charge.payment_method_details.card` - * Add support for `paypal` on `Checkout.Session.payment_method_options` - * Add support for `tax_amounts` on `CreditNoteCreateParams.lines[]`, `CreditNotePreviewLinesParams.lines[]`, and `CreditNotePreviewParams.lines[]` - * Add support for `network_data` on `Issuing.Transaction` - -## 24.2.0 - 2023-11-09 -* [#1679](https://github.com/stripe/stripe-java/pull/1679) Update generated code - * Add support for `metadata` on `Quote.subscription_data`, `QuoteCreateParams.subscription_data`, and `QuoteUpdateParams.subscription_data` - ## 24.1.0 - 2023-11-02 * [#1677](https://github.com/stripe/stripe-java/pull/1677) Update generated code * Add support for new resource `Tax.Registration` @@ -54,7 +69,6 @@ * Add support for `description` on `PaymentLink.payment_intent_data`, `PaymentLinkCreateParams.payment_intent_data`, and `PaymentLinkUpdateParams.payment_intent_data` * Add support for new value `unreconciled_customer_funds` on enum `reporting.ReportRunCreateParams.parameters.reporting_category` - ## 24.1.0-beta.2 - 2023-10-26 * [#1675](https://github.com/stripe/stripe-java/pull/1675) Update generated code for beta * Add support for new resource `Margin` diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index d491c28018d..5528f1cf80b 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v669 \ No newline at end of file +v681 \ No newline at end of file diff --git a/src/main/java/com/stripe/model/Charge.java b/src/main/java/com/stripe/model/Charge.java index 527d0ed9582..c48e52b252e 100644 --- a/src/main/java/com/stripe/model/Charge.java +++ b/src/main/java/com/stripe/model/Charge.java @@ -1839,6 +1839,30 @@ public static class ThreeDSecure extends StripeObject { @SerializedName("authentication_flow") String authenticationFlow; + /** + * The Electronic Commerce Indicator (ECI). A protocol-level field indicating what degree of + * authentication was performed. + * + *

One of {@code 01}, {@code 02}, {@code 05}, {@code 06}, or {@code 07}. + */ + @SerializedName("electronic_commerce_indicator") + String electronicCommerceIndicator; + + /** + * The exemption requested via 3DS and accepted by the issuer at authentication time. + * + *

One of {@code low_risk}, or {@code none}. + */ + @SerializedName("exemption_indicator") + String exemptionIndicator; + + /** + * Whether Stripe requested the value of {@code exemption_indicator} in the transaction. + * This will depend on the outcome of Stripe's internal risk assessment. + */ + @SerializedName("exemption_indicator_applied") + Boolean exemptionIndicatorApplied; + /** * Indicates the outcome of 3D Secure authentication. * @@ -1859,6 +1883,13 @@ public static class ThreeDSecure extends StripeObject { @SerializedName("result_reason") String resultReason; + /** + * The 3D Secure 1 XID or 3D Secure 2 Directory Server Transaction ID (dsTransId) for this + * payment. + */ + @SerializedName("transaction_id") + String transactionId; + /** * The version of 3D Secure that was used. * @@ -2123,6 +2154,10 @@ public static class CardPresent extends StripeObject { @SerializedName("network") String network; + /** Details about payments collected offline. */ + @SerializedName("offline") + Offline offline; + /** Defines whether the authorized amount can be over-captured or not. */ @SerializedName("overcapture_supported") Boolean overcaptureSupported; @@ -2143,6 +2178,15 @@ public static class CardPresent extends StripeObject { @SerializedName("receipt") Receipt receipt; + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Offline extends StripeObject { + /** Time at which the payment was collected while offline. */ + @SerializedName("stored_at") + Long storedAt; + } + @Getter @Setter @EqualsAndHashCode(callSuper = false) diff --git a/src/main/java/com/stripe/model/CustomerCashBalanceTransaction.java b/src/main/java/com/stripe/model/CustomerCashBalanceTransaction.java index 411a546cbab..503a5ad28d4 100644 --- a/src/main/java/com/stripe/model/CustomerCashBalanceTransaction.java +++ b/src/main/java/com/stripe/model/CustomerCashBalanceTransaction.java @@ -84,6 +84,9 @@ public class CustomerCashBalanceTransaction extends StripeObject @SerializedName("refunded_from_payment") RefundedFromPayment refundedFromPayment; + @SerializedName("transferred_to_balance") + TransferredToBalance transferredToBalance; + /** * The type of the cash balance transaction. New types may be added in future. See Customer Balance to learn @@ -352,6 +355,39 @@ public void setRefundObject(Refund expandableObject) { } } + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class TransferredToBalance extends StripeObject { + /** + * The Balance Transaction + * that corresponds to funds transferred to your Stripe balance. + */ + @SerializedName("balance_transaction") + @Getter(lombok.AccessLevel.NONE) + @Setter(lombok.AccessLevel.NONE) + ExpandableField balanceTransaction; + + /** Get ID of expandable {@code balanceTransaction} object. */ + public String getBalanceTransaction() { + return (this.balanceTransaction != null) ? this.balanceTransaction.getId() : null; + } + + public void setBalanceTransaction(String id) { + this.balanceTransaction = ApiResource.setExpandableFieldId(id, this.balanceTransaction); + } + + /** Get expanded {@code balanceTransaction}. */ + public BalanceTransaction getBalanceTransactionObject() { + return (this.balanceTransaction != null) ? this.balanceTransaction.getExpanded() : null; + } + + public void setBalanceTransactionObject(BalanceTransaction expandableObject) { + this.balanceTransaction = + new ExpandableField(expandableObject.getId(), expandableObject); + } + } + @Getter @Setter @EqualsAndHashCode(callSuper = false) diff --git a/src/main/java/com/stripe/model/CustomerSession.java b/src/main/java/com/stripe/model/CustomerSession.java index 2dc4ca16e69..b740b74d410 100644 --- a/src/main/java/com/stripe/model/CustomerSession.java +++ b/src/main/java/com/stripe/model/CustomerSession.java @@ -34,6 +34,10 @@ public class CustomerSession extends ApiResource { @SerializedName("client_secret") String clientSecret; + /** Configuration for the components supported by this customer session. */ + @SerializedName("components") + Components components; + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ @SerializedName("created") Long created; @@ -134,9 +138,78 @@ public static CustomerSession create(CustomerSessionCreateParams params, Request ApiMode.V1); } + /** Configuration for the components supported by this customer session. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Components extends StripeObject { + /** This hash contains whether the payment element is enabled and the features it supports. */ + @SerializedName("payment_element") + PaymentElement paymentElement; + + /** This hash contains whether the pricing table is enabled. */ + @SerializedName("pricing_table") + PricingTable pricingTable; + + /** This hash contains whether the payment element is enabled and the features it supports. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class PaymentElement extends StripeObject { + /** Whether the payment element is enabled. */ + @SerializedName("enabled") + Boolean enabled; + + /** This hash contains the features the Payment Element supports. */ + @SerializedName("features") + Features features; + + /** This hash contains the features the Payment Element supports. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Features extends StripeObject { + /** + * Whether the payment element supports detaching payment methods. + * + *

One of {@code auto}, or {@code never}. + */ + @SerializedName("payment_method_detach") + String paymentMethodDetach; + + /** + * Whether the payment element supports setting payment methods as the customer's default. + * + *

One of {@code auto}, or {@code never}. + */ + @SerializedName("payment_method_set_as_customer_default") + String paymentMethodSetAsCustomerDefault; + + /** + * Whether the payment element supports updating payment methods. + * + *

One of {@code auto}, or {@code never}. + */ + @SerializedName("payment_method_update") + String paymentMethodUpdate; + } + } + + /** This hash contains whether the pricing table is enabled. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class PricingTable extends StripeObject { + /** Whether the pricing table is enabled. */ + @SerializedName("enabled") + Boolean enabled; + } + } + @Override public void setResponseGetter(StripeResponseGetter responseGetter) { super.setResponseGetter(responseGetter); + trySetResponseGetter(components, responseGetter); trySetResponseGetter(customer, responseGetter); } } diff --git a/src/main/java/com/stripe/model/Event.java b/src/main/java/com/stripe/model/Event.java index a0327ae59e1..93448d9a886 100644 --- a/src/main/java/com/stripe/model/Event.java +++ b/src/main/java/com/stripe/model/Event.java @@ -35,8 +35,9 @@ * href="https://stripe.com/docs/api#list_events">list of events from the API. We also have a * separate webhooks system for sending the * {@code Event} objects directly to an endpoint on your server. You can manage webhooks in your account settings. Learn how to [listen - * for events] (/docs/webhooks) so that your integration can automatically trigger reactions. + * href="https://dashboard.stripe.com/account/webhooks">account settings. Learn how to listen for events so that your integration can + * automatically trigger reactions. * *

When using Connect, you can also receive event * notifications that occur in connected accounts. For these events, there's an additional {@code diff --git a/src/main/java/com/stripe/model/PaymentIntent.java b/src/main/java/com/stripe/model/PaymentIntent.java index 0c1b10488b0..65e9e7cabeb 100644 --- a/src/main/java/com/stripe/model/PaymentIntent.java +++ b/src/main/java/com/stripe/model/PaymentIntent.java @@ -2402,13 +2402,13 @@ public static class Delivery extends StripeObject { @SerializedName("mode") String mode; - @SerializedName("receipient") - Receipient receipient; + @SerializedName("recipient") + Recipient recipient; @Getter @Setter @EqualsAndHashCode(callSuper = false) - public static class Receipient extends StripeObject { + public static class Recipient extends StripeObject { /** The email of the recipient the ticket is delivered to. */ @SerializedName("email") String email; @@ -2491,13 +2491,13 @@ public static class Delivery extends StripeObject { @SerializedName("mode") String mode; - @SerializedName("receipient") - Receipient receipient; + @SerializedName("recipient") + Recipient recipient; @Getter @Setter @EqualsAndHashCode(callSuper = false) - public static class Receipient extends StripeObject { + public static class Recipient extends StripeObject { /** The email of the recipient the ticket is delivered to. */ @SerializedName("email") String email; diff --git a/src/main/java/com/stripe/model/Price.java b/src/main/java/com/stripe/model/Price.java index 96efdc445cf..77f1ce23a87 100644 --- a/src/main/java/com/stripe/model/Price.java +++ b/src/main/java/com/stripe/model/Price.java @@ -259,16 +259,18 @@ public static Price create(PriceCreateParams params, RequestOptions options) } /** - * Returns a list of your active prices. For the list of inactive prices, set {@code active} to - * false. + * Returns a list of your active prices, excluding inline prices. + * For the list of inactive prices, set {@code active} to false. */ public static PriceCollection list(Map params) throws StripeException { return list(params, (RequestOptions) null); } /** - * Returns a list of your active prices. For the list of inactive prices, set {@code active} to - * false. + * Returns a list of your active prices, excluding inline prices. + * For the list of inactive prices, set {@code active} to false. */ public static PriceCollection list(Map params, RequestOptions options) throws StripeException { @@ -285,16 +287,18 @@ public static PriceCollection list(Map params, RequestOptions op } /** - * Returns a list of your active prices. For the list of inactive prices, set {@code active} to - * false. + * Returns a list of your active prices, excluding inline prices. + * For the list of inactive prices, set {@code active} to false. */ public static PriceCollection list(PriceListParams params) throws StripeException { return list(params, (RequestOptions) null); } /** - * Returns a list of your active prices. For the list of inactive prices, set {@code active} to - * false. + * Returns a list of your active prices, excluding inline prices. + * For the list of inactive prices, set {@code active} to false. */ public static PriceCollection list(PriceListParams params, RequestOptions options) throws StripeException { diff --git a/src/main/java/com/stripe/model/Refund.java b/src/main/java/com/stripe/model/Refund.java index 11b28353b35..5eb9ff1af73 100644 --- a/src/main/java/com/stripe/model/Refund.java +++ b/src/main/java/com/stripe/model/Refund.java @@ -144,9 +144,8 @@ public class Refund extends ApiResource implements MetadataStore, Balanc ExpandableField sourceTransferReversal; /** - * Status of the refund. For credit card refunds, this can be {@code pending}, {@code succeeded}, - * or {@code failed}. For other types of refunds, it can be {@code pending}, {@code - * requires_action}, {@code succeeded}, {@code failed}, or {@code canceled}. Learn more about failed refunds. */ @SerializedName("status") diff --git a/src/main/java/com/stripe/model/SetupAttempt.java b/src/main/java/com/stripe/model/SetupAttempt.java index ca3345420f0..b459bfde3e9 100644 --- a/src/main/java/com/stripe/model/SetupAttempt.java +++ b/src/main/java/com/stripe/model/SetupAttempt.java @@ -565,6 +565,15 @@ public static class ThreeDSecure extends StripeObject { @SerializedName("authentication_flow") String authenticationFlow; + /** + * The Electronic Commerce Indicator (ECI). A protocol-level field indicating what degree of + * authentication was performed. + * + *

One of {@code 01}, {@code 02}, {@code 05}, {@code 06}, or {@code 07}. + */ + @SerializedName("electronic_commerce_indicator") + String electronicCommerceIndicator; + /** * Indicates the outcome of 3D Secure authentication. * @@ -585,6 +594,13 @@ public static class ThreeDSecure extends StripeObject { @SerializedName("result_reason") String resultReason; + /** + * The 3D Secure 1 XID or 3D Secure 2 Directory Server Transaction ID (dsTransId) for this + * payment. + */ + @SerializedName("transaction_id") + String transactionId; + /** * The version of 3D Secure that was used. * diff --git a/src/main/java/com/stripe/model/StripeError.java b/src/main/java/com/stripe/model/StripeError.java index cdbb44f3d26..ecc9f1f6c69 100644 --- a/src/main/java/com/stripe/model/StripeError.java +++ b/src/main/java/com/stripe/model/StripeError.java @@ -36,20 +36,21 @@ public class StripeError extends StripeObject { * {@code clearing_code_unsupported}, {@code country_code_invalid}, {@code country_unsupported}, * {@code coupon_expired}, {@code customer_max_payment_methods}, {@code * customer_max_subscriptions}, {@code debit_not_authorized}, {@code email_invalid}, {@code - * expired_card}, {@code gift_card_balance_insufficient}, {@code gift_card_code_exists}, {@code - * gift_card_inactive}, {@code idempotency_key_in_use}, {@code incorrect_address}, {@code - * incorrect_cvc}, {@code incorrect_number}, {@code incorrect_zip}, {@code - * instant_payouts_config_disabled}, {@code instant_payouts_currency_disabled}, {@code - * instant_payouts_limit_exceeded}, {@code instant_payouts_unsupported}, {@code - * insufficient_funds}, {@code intent_invalid_state}, {@code intent_verification_method_missing}, - * {@code invalid_card_type}, {@code invalid_characters}, {@code invalid_charge_amount}, {@code - * invalid_cvc}, {@code invalid_expiry_month}, {@code invalid_expiry_year}, {@code - * invalid_number}, {@code invalid_source_usage}, {@code invalid_tax_location}, {@code - * invoice_no_customer_line_items}, {@code invoice_no_payment_method_types}, {@code - * invoice_no_subscription_line_items}, {@code invoice_not_editable}, {@code - * invoice_on_behalf_of_not_editable}, {@code invoice_payment_intent_requires_action}, {@code - * invoice_upcoming_none}, {@code livemode_mismatch}, {@code lock_timeout}, {@code missing}, - * {@code no_account}, {@code not_allowed_on_standard_account}, {@code out_of_inventory}, {@code + * expired_card}, {@code financial_connections_account_inactive}, {@code + * gift_card_balance_insufficient}, {@code gift_card_code_exists}, {@code gift_card_inactive}, + * {@code idempotency_key_in_use}, {@code incorrect_address}, {@code incorrect_cvc}, {@code + * incorrect_number}, {@code incorrect_zip}, {@code instant_payouts_config_disabled}, {@code + * instant_payouts_currency_disabled}, {@code instant_payouts_limit_exceeded}, {@code + * instant_payouts_unsupported}, {@code insufficient_funds}, {@code intent_invalid_state}, {@code + * intent_verification_method_missing}, {@code invalid_card_type}, {@code invalid_characters}, + * {@code invalid_charge_amount}, {@code invalid_cvc}, {@code invalid_expiry_month}, {@code + * invalid_expiry_year}, {@code invalid_number}, {@code invalid_source_usage}, {@code + * invalid_tax_location}, {@code invoice_no_customer_line_items}, {@code + * invoice_no_payment_method_types}, {@code invoice_no_subscription_line_items}, {@code + * invoice_not_editable}, {@code invoice_on_behalf_of_not_editable}, {@code + * invoice_payment_intent_requires_action}, {@code invoice_upcoming_none}, {@code + * livemode_mismatch}, {@code lock_timeout}, {@code missing}, {@code no_account}, {@code + * not_allowed_on_standard_account}, {@code out_of_inventory}, {@code * ownership_declaration_not_allowed}, {@code parameter_invalid_empty}, {@code * parameter_invalid_integer}, {@code parameter_invalid_string_blank}, {@code * parameter_invalid_string_empty}, {@code parameter_missing}, {@code parameter_unknown}, {@code diff --git a/src/main/java/com/stripe/model/issuing/Authorization.java b/src/main/java/com/stripe/model/issuing/Authorization.java index ba38b80ea35..828b397b71f 100644 --- a/src/main/java/com/stripe/model/issuing/Authorization.java +++ b/src/main/java/com/stripe/model/issuing/Authorization.java @@ -45,8 +45,10 @@ public class Authorization extends ApiResource implements MetadataStore, BalanceTransactionSource { /** - * The total amount that was authorized or rejected. This amount is in the card's currency and in - * the smallest currency unit. + * The total amount that was authorized or rejected. This amount is in {@code currency} and in the + * smallest currency unit. {@code + * amount} should be the same as {@code merchant_amount}, unless {@code currency} and {@code + * merchant_currency} are different. */ @SerializedName("amount") Long amount; @@ -93,8 +95,10 @@ public class Authorization extends ApiResource Long created; /** - * Three-letter ISO currency code, - * in lowercase. Must be a supported currency. + * The currency of the cardholder. This currency can be different from the currency presented at + * authorization and the {@code merchant_currency} field on this authorization. Three-letter ISO currency code, in lowercase. + * Must be a supported currency. */ @SerializedName("currency") String currency; @@ -114,15 +118,19 @@ public class Authorization extends ApiResource /** * The total amount that was authorized or rejected. This amount is in the {@code * merchant_currency} and in the smallest currency unit. + * href="https://stripe.com/docs/currencies#zero-decimal">smallest currency unit. {@code + * merchant_amount} should be the same as {@code amount}, unless {@code merchant_currency} and + * {@code currency} are different. */ @SerializedName("merchant_amount") Long merchantAmount; /** - * The currency that was presented to the cardholder for the authorization. Three-letter ISO currency code, in lowercase. - * Must be a supported currency. + * The local currency that was presented to the cardholder for the authorization. This currency + * can be different from the cardholder currency and the {@code currency} field on this + * authorization. Three-letter ISO + * currency code, in lowercase. Must be a supported currency. */ @SerializedName("merchant_currency") String merchantCurrency; @@ -672,6 +680,20 @@ public static class NetworkData extends StripeObject { */ @SerializedName("acquiring_institution_id") String acquiringInstitutionId; + + /** + * The System Trace Audit Number (STAN) is a 6-digit identifier assigned by the acquirer. Prefer + * {@code network_data.transaction_id} if present, unless you have special requirements. + */ + @SerializedName("system_trace_audit_number") + String systemTraceAuditNumber; + + /** + * Unique identifier for the authorization assigned by the card network used to match subsequent + * messages, disputes, and transactions. + */ + @SerializedName("transaction_id") + String transactionId; } @Getter @@ -723,6 +745,13 @@ public static class PendingRequest extends StripeObject { @SerializedName("merchant_currency") String merchantCurrency; + /** + * The card network's estimate of the likelihood that an authorization is fraudulent. Takes on + * values between 1 and 99. + */ + @SerializedName("network_risk_score") + Long networkRiskScore; + @Getter @Setter @EqualsAndHashCode(callSuper = false) @@ -801,6 +830,13 @@ public static class RequestHistory extends StripeObject { @SerializedName("merchant_currency") String merchantCurrency; + /** + * The card network's estimate of the likelihood that an authorization is fraudulent. Takes on + * values between 1 and 99. + */ + @SerializedName("network_risk_score") + Long networkRiskScore; + /** * When an authorization is approved or declined by you or by Stripe, this field provides * additional detail on the reason for the outcome. @@ -815,12 +851,20 @@ public static class RequestHistory extends StripeObject { String reason; /** - * If approve/decline decision is directly responsed to the webhook with json payload and if the - * response is invalid (e.g., parsing errors), we surface the detailed message via this field. + * If the {@code request_history.reason} is {@code webhook_error} because the direct webhook + * response is invalid (for example, parsing errors or missing parameters), we surface a more + * detailed error message via this field. */ @SerializedName("reason_message") String reasonMessage; + /** + * Time when the card network received an authorization request from the acquirer in UTC. + * Referred to by networks as transmission time. + */ + @SerializedName("requested_at") + Long requestedAt; + @Getter @Setter @EqualsAndHashCode(callSuper = false) diff --git a/src/main/java/com/stripe/model/issuing/Transaction.java b/src/main/java/com/stripe/model/issuing/Transaction.java index 83173069467..eecaff98e7a 100644 --- a/src/main/java/com/stripe/model/issuing/Transaction.java +++ b/src/main/java/com/stripe/model/issuing/Transaction.java @@ -517,6 +517,16 @@ public static class MerchantData extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class NetworkData extends StripeObject { + /** + * A code created by Stripe which is shared with the merchant to validate the authorization. + * This field will be populated if the authorization message was approved. The code typically + * starts with the letter "S", followed by a six-digit number. For example, + * "S498162". Please note that the code is not guaranteed to be unique across + * authorizations. + */ + @SerializedName("authorization_code") + String authorizationCode; + /** * The date the transaction was processed by the card network. This can be different from the * date the seller recorded the transaction depending on when the acquirer submits the @@ -524,6 +534,13 @@ public static class NetworkData extends StripeObject { */ @SerializedName("processing_date") String processingDate; + + /** + * Unique identifier for the authorization assigned by the card network used to match subsequent + * messages, disputes, and transactions. + */ + @SerializedName("transaction_id") + String transactionId; } @Getter diff --git a/src/main/java/com/stripe/param/ChargeCaptureParams.java b/src/main/java/com/stripe/param/ChargeCaptureParams.java index 26b8f4b64bc..35a51d2ab82 100644 --- a/src/main/java/com/stripe/param/ChargeCaptureParams.java +++ b/src/main/java/com/stripe/param/ChargeCaptureParams.java @@ -922,13 +922,13 @@ public static class Delivery { Mode mode; /** Details of the recipient. */ - @SerializedName("receipient") - Receipient receipient; + @SerializedName("recipient") + Recipient recipient; - private Delivery(Map extraParams, Mode mode, Receipient receipient) { + private Delivery(Map extraParams, Mode mode, Recipient recipient) { this.extraParams = extraParams; this.mode = mode; - this.receipient = receipient; + this.recipient = recipient; } public static Builder builder() { @@ -940,12 +940,12 @@ public static class Builder { private Mode mode; - private Receipient receipient; + private Recipient recipient; /** Finalize and obtain parameter instance from this builder. */ public ChargeCaptureParams.PaymentDetails.CarRental.Delivery build() { return new ChargeCaptureParams.PaymentDetails.CarRental.Delivery( - this.extraParams, this.mode, this.receipient); + this.extraParams, this.mode, this.recipient); } /** @@ -983,15 +983,15 @@ public Builder setMode(ChargeCaptureParams.PaymentDetails.CarRental.Delivery.Mod } /** Details of the recipient. */ - public Builder setReceipient( - ChargeCaptureParams.PaymentDetails.CarRental.Delivery.Receipient receipient) { - this.receipient = receipient; + public Builder setRecipient( + ChargeCaptureParams.PaymentDetails.CarRental.Delivery.Recipient recipient) { + this.recipient = recipient; return this; } } @Getter - public static class Receipient { + public static class Recipient { /** The email of the recipient the ticket is delivered to. */ @SerializedName("email") String email; @@ -1014,7 +1014,7 @@ public static class Receipient { @SerializedName("phone") String phone; - private Receipient( + private Recipient( String email, Map extraParams, String name, String phone) { this.email = email; this.extraParams = extraParams; @@ -1036,8 +1036,8 @@ public static class Builder { private String phone; /** Finalize and obtain parameter instance from this builder. */ - public ChargeCaptureParams.PaymentDetails.CarRental.Delivery.Receipient build() { - return new ChargeCaptureParams.PaymentDetails.CarRental.Delivery.Receipient( + public ChargeCaptureParams.PaymentDetails.CarRental.Delivery.Recipient build() { + return new ChargeCaptureParams.PaymentDetails.CarRental.Delivery.Recipient( this.email, this.extraParams, this.name, this.phone); } @@ -1051,7 +1051,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.CarRental.Delivery.Receipient#extraParams} for the + * ChargeCaptureParams.PaymentDetails.CarRental.Delivery.Recipient#extraParams} for the * field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -1066,7 +1066,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.CarRental.Delivery.Receipient#extraParams} for the + * ChargeCaptureParams.PaymentDetails.CarRental.Delivery.Recipient#extraParams} for the * field documentation. */ public Builder putAllExtraParam(Map map) { @@ -1982,13 +1982,13 @@ public static class Delivery { Mode mode; /** Details of the recipient. */ - @SerializedName("receipient") - Receipient receipient; + @SerializedName("recipient") + Recipient recipient; - private Delivery(Map extraParams, Mode mode, Receipient receipient) { + private Delivery(Map extraParams, Mode mode, Recipient recipient) { this.extraParams = extraParams; this.mode = mode; - this.receipient = receipient; + this.recipient = recipient; } public static Builder builder() { @@ -2000,12 +2000,12 @@ public static class Builder { private Mode mode; - private Receipient receipient; + 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.receipient); + this.extraParams, this.mode, this.recipient); } /** @@ -2044,15 +2044,15 @@ public Builder setMode( } /** Details of the recipient. */ - public Builder setReceipient( - ChargeCaptureParams.PaymentDetails.EventDetails.Delivery.Receipient receipient) { - this.receipient = receipient; + public Builder setRecipient( + ChargeCaptureParams.PaymentDetails.EventDetails.Delivery.Recipient recipient) { + this.recipient = recipient; return this; } } @Getter - public static class Receipient { + public static class Recipient { /** The email of the recipient the ticket is delivered to. */ @SerializedName("email") String email; @@ -2075,7 +2075,7 @@ public static class Receipient { @SerializedName("phone") String phone; - private Receipient( + private Recipient( String email, Map extraParams, String name, String phone) { this.email = email; this.extraParams = extraParams; @@ -2097,8 +2097,8 @@ public static class Builder { private String phone; /** Finalize and obtain parameter instance from this builder. */ - public ChargeCaptureParams.PaymentDetails.EventDetails.Delivery.Receipient build() { - return new ChargeCaptureParams.PaymentDetails.EventDetails.Delivery.Receipient( + public ChargeCaptureParams.PaymentDetails.EventDetails.Delivery.Recipient build() { + return new ChargeCaptureParams.PaymentDetails.EventDetails.Delivery.Recipient( this.email, this.extraParams, this.name, this.phone); } @@ -2112,7 +2112,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.Receipient#extraParams} for + * ChargeCaptureParams.PaymentDetails.EventDetails.Delivery.Recipient#extraParams} for * the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -2127,7 +2127,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.Receipient#extraParams} for + * ChargeCaptureParams.PaymentDetails.EventDetails.Delivery.Recipient#extraParams} for * the field documentation. */ public Builder putAllExtraParam(Map map) { @@ -2496,13 +2496,13 @@ public static class Delivery { Mode mode; /** Details of the recipient. */ - @SerializedName("receipient") - Receipient receipient; + @SerializedName("recipient") + Recipient recipient; - private Delivery(Map extraParams, Mode mode, Receipient receipient) { + private Delivery(Map extraParams, Mode mode, Recipient recipient) { this.extraParams = extraParams; this.mode = mode; - this.receipient = receipient; + this.recipient = recipient; } public static Builder builder() { @@ -2514,12 +2514,12 @@ public static class Builder { private Mode mode; - private Receipient receipient; + 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.receipient); + this.extraParams, this.mode, this.recipient); } /** @@ -2557,15 +2557,15 @@ public Builder setMode(ChargeCaptureParams.PaymentDetails.Flight.Delivery.Mode m } /** Details of the recipient. */ - public Builder setReceipient( - ChargeCaptureParams.PaymentDetails.Flight.Delivery.Receipient receipient) { - this.receipient = receipient; + public Builder setRecipient( + ChargeCaptureParams.PaymentDetails.Flight.Delivery.Recipient recipient) { + this.recipient = recipient; return this; } } @Getter - public static class Receipient { + public static class Recipient { /** The email of the recipient the ticket is delivered to. */ @SerializedName("email") String email; @@ -2588,7 +2588,7 @@ public static class Receipient { @SerializedName("phone") String phone; - private Receipient( + private Recipient( String email, Map extraParams, String name, String phone) { this.email = email; this.extraParams = extraParams; @@ -2610,8 +2610,8 @@ public static class Builder { private String phone; /** Finalize and obtain parameter instance from this builder. */ - public ChargeCaptureParams.PaymentDetails.Flight.Delivery.Receipient build() { - return new ChargeCaptureParams.PaymentDetails.Flight.Delivery.Receipient( + public ChargeCaptureParams.PaymentDetails.Flight.Delivery.Recipient build() { + return new ChargeCaptureParams.PaymentDetails.Flight.Delivery.Recipient( this.email, this.extraParams, this.name, this.phone); } @@ -2625,7 +2625,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.Receipient#extraParams} for the + * ChargeCaptureParams.PaymentDetails.Flight.Delivery.Recipient#extraParams} for the * field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -2640,7 +2640,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.Receipient#extraParams} for the + * ChargeCaptureParams.PaymentDetails.Flight.Delivery.Recipient#extraParams} for the * field documentation. */ public Builder putAllExtraParam(Map map) { @@ -3623,13 +3623,13 @@ public static class Delivery { Mode mode; /** Details of the recipient. */ - @SerializedName("receipient") - Receipient receipient; + @SerializedName("recipient") + Recipient recipient; - private Delivery(Map extraParams, Mode mode, Receipient receipient) { + private Delivery(Map extraParams, Mode mode, Recipient recipient) { this.extraParams = extraParams; this.mode = mode; - this.receipient = receipient; + this.recipient = recipient; } public static Builder builder() { @@ -3641,12 +3641,12 @@ public static class Builder { private Mode mode; - private Receipient receipient; + 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.receipient); + this.extraParams, this.mode, this.recipient); } /** @@ -3684,15 +3684,15 @@ public Builder setMode(ChargeCaptureParams.PaymentDetails.Lodging.Delivery.Mode } /** Details of the recipient. */ - public Builder setReceipient( - ChargeCaptureParams.PaymentDetails.Lodging.Delivery.Receipient receipient) { - this.receipient = receipient; + public Builder setRecipient( + ChargeCaptureParams.PaymentDetails.Lodging.Delivery.Recipient recipient) { + this.recipient = recipient; return this; } } @Getter - public static class Receipient { + public static class Recipient { /** The email of the recipient the ticket is delivered to. */ @SerializedName("email") String email; @@ -3715,7 +3715,7 @@ public static class Receipient { @SerializedName("phone") String phone; - private Receipient( + private Recipient( String email, Map extraParams, String name, String phone) { this.email = email; this.extraParams = extraParams; @@ -3737,8 +3737,8 @@ public static class Builder { private String phone; /** Finalize and obtain parameter instance from this builder. */ - public ChargeCaptureParams.PaymentDetails.Lodging.Delivery.Receipient build() { - return new ChargeCaptureParams.PaymentDetails.Lodging.Delivery.Receipient( + public ChargeCaptureParams.PaymentDetails.Lodging.Delivery.Recipient build() { + return new ChargeCaptureParams.PaymentDetails.Lodging.Delivery.Recipient( this.email, this.extraParams, this.name, this.phone); } @@ -3752,7 +3752,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.Receipient#extraParams} for the + * ChargeCaptureParams.PaymentDetails.Lodging.Delivery.Recipient#extraParams} for the * field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -3767,7 +3767,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.Receipient#extraParams} for the + * ChargeCaptureParams.PaymentDetails.Lodging.Delivery.Recipient#extraParams} for the * field documentation. */ public Builder putAllExtraParam(Map map) { diff --git a/src/main/java/com/stripe/param/ChargeUpdateParams.java b/src/main/java/com/stripe/param/ChargeUpdateParams.java index 73399bfb0af..2e002cccde5 100644 --- a/src/main/java/com/stripe/param/ChargeUpdateParams.java +++ b/src/main/java/com/stripe/param/ChargeUpdateParams.java @@ -1124,13 +1124,13 @@ public static class Delivery { Mode mode; /** Details of the recipient. */ - @SerializedName("receipient") - Receipient receipient; + @SerializedName("recipient") + Recipient recipient; - private Delivery(Map extraParams, Mode mode, Receipient receipient) { + private Delivery(Map extraParams, Mode mode, Recipient recipient) { this.extraParams = extraParams; this.mode = mode; - this.receipient = receipient; + this.recipient = recipient; } public static Builder builder() { @@ -1142,12 +1142,12 @@ public static class Builder { private Mode mode; - private Receipient receipient; + private Recipient recipient; /** Finalize and obtain parameter instance from this builder. */ public ChargeUpdateParams.PaymentDetails.CarRental.Delivery build() { return new ChargeUpdateParams.PaymentDetails.CarRental.Delivery( - this.extraParams, this.mode, this.receipient); + this.extraParams, this.mode, this.recipient); } /** @@ -1185,15 +1185,15 @@ public Builder setMode(ChargeUpdateParams.PaymentDetails.CarRental.Delivery.Mode } /** Details of the recipient. */ - public Builder setReceipient( - ChargeUpdateParams.PaymentDetails.CarRental.Delivery.Receipient receipient) { - this.receipient = receipient; + public Builder setRecipient( + ChargeUpdateParams.PaymentDetails.CarRental.Delivery.Recipient recipient) { + this.recipient = recipient; return this; } } @Getter - public static class Receipient { + public static class Recipient { /** The email of the recipient the ticket is delivered to. */ @SerializedName("email") Object email; @@ -1216,7 +1216,7 @@ public static class Receipient { @SerializedName("phone") Object phone; - private Receipient( + private Recipient( Object email, Map extraParams, Object name, Object phone) { this.email = email; this.extraParams = extraParams; @@ -1238,8 +1238,8 @@ public static class Builder { private Object phone; /** Finalize and obtain parameter instance from this builder. */ - public ChargeUpdateParams.PaymentDetails.CarRental.Delivery.Receipient build() { - return new ChargeUpdateParams.PaymentDetails.CarRental.Delivery.Receipient( + public ChargeUpdateParams.PaymentDetails.CarRental.Delivery.Recipient build() { + return new ChargeUpdateParams.PaymentDetails.CarRental.Delivery.Recipient( this.email, this.extraParams, this.name, this.phone); } @@ -1259,7 +1259,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.CarRental.Delivery.Receipient#extraParams} for the + * ChargeUpdateParams.PaymentDetails.CarRental.Delivery.Recipient#extraParams} for the * field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -1274,7 +1274,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.CarRental.Delivery.Receipient#extraParams} for the + * ChargeUpdateParams.PaymentDetails.CarRental.Delivery.Recipient#extraParams} for the * field documentation. */ public Builder putAllExtraParam(Map map) { @@ -2351,13 +2351,13 @@ public static class Delivery { Mode mode; /** Details of the recipient. */ - @SerializedName("receipient") - Receipient receipient; + @SerializedName("recipient") + Recipient recipient; - private Delivery(Map extraParams, Mode mode, Receipient receipient) { + private Delivery(Map extraParams, Mode mode, Recipient recipient) { this.extraParams = extraParams; this.mode = mode; - this.receipient = receipient; + this.recipient = recipient; } public static Builder builder() { @@ -2369,12 +2369,12 @@ public static class Builder { private Mode mode; - private Receipient receipient; + 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.receipient); + this.extraParams, this.mode, this.recipient); } /** @@ -2413,15 +2413,15 @@ public Builder setMode( } /** Details of the recipient. */ - public Builder setReceipient( - ChargeUpdateParams.PaymentDetails.EventDetails.Delivery.Receipient receipient) { - this.receipient = receipient; + public Builder setRecipient( + ChargeUpdateParams.PaymentDetails.EventDetails.Delivery.Recipient recipient) { + this.recipient = recipient; return this; } } @Getter - public static class Receipient { + public static class Recipient { /** The email of the recipient the ticket is delivered to. */ @SerializedName("email") Object email; @@ -2444,7 +2444,7 @@ public static class Receipient { @SerializedName("phone") Object phone; - private Receipient( + private Recipient( Object email, Map extraParams, Object name, Object phone) { this.email = email; this.extraParams = extraParams; @@ -2466,8 +2466,8 @@ public static class Builder { private Object phone; /** Finalize and obtain parameter instance from this builder. */ - public ChargeUpdateParams.PaymentDetails.EventDetails.Delivery.Receipient build() { - return new ChargeUpdateParams.PaymentDetails.EventDetails.Delivery.Receipient( + public ChargeUpdateParams.PaymentDetails.EventDetails.Delivery.Recipient build() { + return new ChargeUpdateParams.PaymentDetails.EventDetails.Delivery.Recipient( this.email, this.extraParams, this.name, this.phone); } @@ -2487,7 +2487,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.Receipient#extraParams} for + * ChargeUpdateParams.PaymentDetails.EventDetails.Delivery.Recipient#extraParams} for * the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -2502,7 +2502,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.Receipient#extraParams} for + * ChargeUpdateParams.PaymentDetails.EventDetails.Delivery.Recipient#extraParams} for * the field documentation. */ public Builder putAllExtraParam(Map map) { @@ -2919,13 +2919,13 @@ public static class Delivery { Mode mode; /** Details of the recipient. */ - @SerializedName("receipient") - Receipient receipient; + @SerializedName("recipient") + Recipient recipient; - private Delivery(Map extraParams, Mode mode, Receipient receipient) { + private Delivery(Map extraParams, Mode mode, Recipient recipient) { this.extraParams = extraParams; this.mode = mode; - this.receipient = receipient; + this.recipient = recipient; } public static Builder builder() { @@ -2937,12 +2937,12 @@ public static class Builder { private Mode mode; - private Receipient receipient; + 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.receipient); + this.extraParams, this.mode, this.recipient); } /** @@ -2980,15 +2980,15 @@ public Builder setMode(ChargeUpdateParams.PaymentDetails.Flight.Delivery.Mode mo } /** Details of the recipient. */ - public Builder setReceipient( - ChargeUpdateParams.PaymentDetails.Flight.Delivery.Receipient receipient) { - this.receipient = receipient; + public Builder setRecipient( + ChargeUpdateParams.PaymentDetails.Flight.Delivery.Recipient recipient) { + this.recipient = recipient; return this; } } @Getter - public static class Receipient { + public static class Recipient { /** The email of the recipient the ticket is delivered to. */ @SerializedName("email") Object email; @@ -3011,7 +3011,7 @@ public static class Receipient { @SerializedName("phone") Object phone; - private Receipient( + private Recipient( Object email, Map extraParams, Object name, Object phone) { this.email = email; this.extraParams = extraParams; @@ -3033,8 +3033,8 @@ public static class Builder { private Object phone; /** Finalize and obtain parameter instance from this builder. */ - public ChargeUpdateParams.PaymentDetails.Flight.Delivery.Receipient build() { - return new ChargeUpdateParams.PaymentDetails.Flight.Delivery.Receipient( + public ChargeUpdateParams.PaymentDetails.Flight.Delivery.Recipient build() { + return new ChargeUpdateParams.PaymentDetails.Flight.Delivery.Recipient( this.email, this.extraParams, this.name, this.phone); } @@ -3054,7 +3054,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.Receipient#extraParams} for the + * ChargeUpdateParams.PaymentDetails.Flight.Delivery.Recipient#extraParams} for the * field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -3069,7 +3069,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.Receipient#extraParams} for the + * ChargeUpdateParams.PaymentDetails.Flight.Delivery.Recipient#extraParams} for the * field documentation. */ public Builder putAllExtraParam(Map map) { @@ -4173,13 +4173,13 @@ public static class Delivery { Mode mode; /** Details of the recipient. */ - @SerializedName("receipient") - Receipient receipient; + @SerializedName("recipient") + Recipient recipient; - private Delivery(Map extraParams, Mode mode, Receipient receipient) { + private Delivery(Map extraParams, Mode mode, Recipient recipient) { this.extraParams = extraParams; this.mode = mode; - this.receipient = receipient; + this.recipient = recipient; } public static Builder builder() { @@ -4191,12 +4191,12 @@ public static class Builder { private Mode mode; - private Receipient receipient; + 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.receipient); + this.extraParams, this.mode, this.recipient); } /** @@ -4234,15 +4234,15 @@ public Builder setMode(ChargeUpdateParams.PaymentDetails.Lodging.Delivery.Mode m } /** Details of the recipient. */ - public Builder setReceipient( - ChargeUpdateParams.PaymentDetails.Lodging.Delivery.Receipient receipient) { - this.receipient = receipient; + public Builder setRecipient( + ChargeUpdateParams.PaymentDetails.Lodging.Delivery.Recipient recipient) { + this.recipient = recipient; return this; } } @Getter - public static class Receipient { + public static class Recipient { /** The email of the recipient the ticket is delivered to. */ @SerializedName("email") Object email; @@ -4265,7 +4265,7 @@ public static class Receipient { @SerializedName("phone") Object phone; - private Receipient( + private Recipient( Object email, Map extraParams, Object name, Object phone) { this.email = email; this.extraParams = extraParams; @@ -4287,8 +4287,8 @@ public static class Builder { private Object phone; /** Finalize and obtain parameter instance from this builder. */ - public ChargeUpdateParams.PaymentDetails.Lodging.Delivery.Receipient build() { - return new ChargeUpdateParams.PaymentDetails.Lodging.Delivery.Receipient( + public ChargeUpdateParams.PaymentDetails.Lodging.Delivery.Recipient build() { + return new ChargeUpdateParams.PaymentDetails.Lodging.Delivery.Recipient( this.email, this.extraParams, this.name, this.phone); } @@ -4308,7 +4308,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.Receipient#extraParams} for the + * ChargeUpdateParams.PaymentDetails.Lodging.Delivery.Recipient#extraParams} for the * field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -4323,7 +4323,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.Receipient#extraParams} for the + * ChargeUpdateParams.PaymentDetails.Lodging.Delivery.Recipient#extraParams} for the * field documentation. */ public Builder putAllExtraParam(Map map) { diff --git a/src/main/java/com/stripe/param/CustomerSessionCreateParams.java b/src/main/java/com/stripe/param/CustomerSessionCreateParams.java index f786e5f2541..90919e03cab 100644 --- a/src/main/java/com/stripe/param/CustomerSessionCreateParams.java +++ b/src/main/java/com/stripe/param/CustomerSessionCreateParams.java @@ -11,6 +11,10 @@ @Getter public class CustomerSessionCreateParams extends ApiRequestParams { + /** Required. Configuration for each component. */ + @SerializedName("components") + Components components; + /** * Required. The ID of an existing customer for which to create the customer * session. @@ -32,7 +36,11 @@ public class CustomerSessionCreateParams extends ApiRequestParams { Map extraParams; private CustomerSessionCreateParams( - String customer, List expand, Map extraParams) { + Components components, + String customer, + List expand, + Map extraParams) { + this.components = components; this.customer = customer; this.expand = expand; this.extraParams = extraParams; @@ -43,6 +51,8 @@ public static Builder builder() { } public static class Builder { + private Components components; + private String customer; private List expand; @@ -51,7 +61,14 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public CustomerSessionCreateParams build() { - return new CustomerSessionCreateParams(this.customer, this.expand, this.extraParams); + return new CustomerSessionCreateParams( + this.components, this.customer, this.expand, this.extraParams); + } + + /** Required. Configuration for each component. */ + public Builder setComponents(CustomerSessionCreateParams.Components components) { + this.components = components; + return this; } /** @@ -115,4 +132,409 @@ public Builder putAllExtraParam(Map map) { return this; } } + + @Getter + public static class Components { + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-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 the payment element. */ + @SerializedName("payment_element") + PaymentElement paymentElement; + + /** Configuration for the pricing table. */ + @SerializedName("pricing_table") + PricingTable pricingTable; + + private Components( + Map extraParams, PaymentElement paymentElement, PricingTable pricingTable) { + this.extraParams = extraParams; + this.paymentElement = paymentElement; + this.pricingTable = pricingTable; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private PaymentElement paymentElement; + + private PricingTable pricingTable; + + /** Finalize and obtain parameter instance from this builder. */ + public CustomerSessionCreateParams.Components build() { + return new CustomerSessionCreateParams.Components( + this.extraParams, this.paymentElement, this.pricingTable); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * CustomerSessionCreateParams.Components#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link CustomerSessionCreateParams.Components#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 the payment element. */ + public Builder setPaymentElement( + CustomerSessionCreateParams.Components.PaymentElement paymentElement) { + this.paymentElement = paymentElement; + return this; + } + + /** Configuration for the pricing table. */ + public Builder setPricingTable( + CustomerSessionCreateParams.Components.PricingTable pricingTable) { + this.pricingTable = pricingTable; + return this; + } + } + + @Getter + public static class PaymentElement { + /** Required. Whether the payment element is enabled. */ + @SerializedName("enabled") + Boolean enabled; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** This hash defines whether the payment element supports certain features. */ + @SerializedName("features") + Features features; + + private PaymentElement(Boolean enabled, Map extraParams, Features features) { + this.enabled = enabled; + this.extraParams = extraParams; + this.features = features; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Boolean enabled; + + private Map extraParams; + + private Features features; + + /** Finalize and obtain parameter instance from this builder. */ + public CustomerSessionCreateParams.Components.PaymentElement build() { + return new CustomerSessionCreateParams.Components.PaymentElement( + this.enabled, this.extraParams, this.features); + } + + /** Required. Whether the payment element is enabled. */ + public Builder setEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link CustomerSessionCreateParams.Components.PaymentElement#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link CustomerSessionCreateParams.Components.PaymentElement#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 defines whether the payment element supports certain features. */ + public Builder setFeatures( + CustomerSessionCreateParams.Components.PaymentElement.Features features) { + this.features = features; + return this; + } + } + + @Getter + public static class Features { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 payment element supports detaching a payment method. */ + @SerializedName("payment_method_detach") + PaymentMethodDetach paymentMethodDetach; + + /** + * Whether the payment element supports setting a payment method as the customer's default. + */ + @SerializedName("payment_method_set_as_customer_default") + PaymentMethodSetAsCustomerDefault paymentMethodSetAsCustomerDefault; + + /** Whether the payment element supports updating a payment method. */ + @SerializedName("payment_method_update") + PaymentMethodUpdate paymentMethodUpdate; + + private Features( + Map extraParams, + PaymentMethodDetach paymentMethodDetach, + PaymentMethodSetAsCustomerDefault paymentMethodSetAsCustomerDefault, + PaymentMethodUpdate paymentMethodUpdate) { + this.extraParams = extraParams; + this.paymentMethodDetach = paymentMethodDetach; + this.paymentMethodSetAsCustomerDefault = paymentMethodSetAsCustomerDefault; + this.paymentMethodUpdate = paymentMethodUpdate; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private PaymentMethodDetach paymentMethodDetach; + + private PaymentMethodSetAsCustomerDefault paymentMethodSetAsCustomerDefault; + + private PaymentMethodUpdate paymentMethodUpdate; + + /** Finalize and obtain parameter instance from this builder. */ + public CustomerSessionCreateParams.Components.PaymentElement.Features build() { + return new CustomerSessionCreateParams.Components.PaymentElement.Features( + this.extraParams, + this.paymentMethodDetach, + this.paymentMethodSetAsCustomerDefault, + this.paymentMethodUpdate); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * CustomerSessionCreateParams.Components.PaymentElement.Features#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * CustomerSessionCreateParams.Components.PaymentElement.Features#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 payment element supports detaching a payment method. */ + public Builder setPaymentMethodDetach( + CustomerSessionCreateParams.Components.PaymentElement.Features.PaymentMethodDetach + paymentMethodDetach) { + this.paymentMethodDetach = paymentMethodDetach; + return this; + } + + /** + * Whether the payment element supports setting a payment method as the customer's + * default. + */ + public Builder setPaymentMethodSetAsCustomerDefault( + CustomerSessionCreateParams.Components.PaymentElement.Features + .PaymentMethodSetAsCustomerDefault + paymentMethodSetAsCustomerDefault) { + this.paymentMethodSetAsCustomerDefault = paymentMethodSetAsCustomerDefault; + return this; + } + + /** Whether the payment element supports updating a payment method. */ + public Builder setPaymentMethodUpdate( + CustomerSessionCreateParams.Components.PaymentElement.Features.PaymentMethodUpdate + paymentMethodUpdate) { + this.paymentMethodUpdate = paymentMethodUpdate; + return this; + } + } + + public enum PaymentMethodDetach implements ApiRequestParams.EnumParam { + @SerializedName("auto") + AUTO("auto"), + + @SerializedName("never") + NEVER("never"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + PaymentMethodDetach(String value) { + this.value = value; + } + } + + public enum PaymentMethodSetAsCustomerDefault implements ApiRequestParams.EnumParam { + @SerializedName("auto") + AUTO("auto"), + + @SerializedName("never") + NEVER("never"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + PaymentMethodSetAsCustomerDefault(String value) { + this.value = value; + } + } + + public enum PaymentMethodUpdate implements ApiRequestParams.EnumParam { + @SerializedName("auto") + AUTO("auto"), + + @SerializedName("never") + NEVER("never"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + PaymentMethodUpdate(String value) { + this.value = value; + } + } + } + } + + @Getter + public static class PricingTable { + /** Required. Whether pricing table is enabled. */ + @SerializedName("enabled") + Boolean enabled; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private PricingTable(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 CustomerSessionCreateParams.Components.PricingTable build() { + return new CustomerSessionCreateParams.Components.PricingTable( + this.enabled, this.extraParams); + } + + /** Required. Whether pricing table is enabled. */ + public Builder setEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link CustomerSessionCreateParams.Components.PricingTable#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link CustomerSessionCreateParams.Components.PricingTable#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/PaymentIntentCaptureParams.java b/src/main/java/com/stripe/param/PaymentIntentCaptureParams.java index 507749cbd2a..19f289ba08d 100644 --- a/src/main/java/com/stripe/param/PaymentIntentCaptureParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentCaptureParams.java @@ -975,13 +975,13 @@ public static class Delivery { Mode mode; /** Details of the recipient. */ - @SerializedName("receipient") - Receipient receipient; + @SerializedName("recipient") + Recipient recipient; - private Delivery(Map extraParams, Mode mode, Receipient receipient) { + private Delivery(Map extraParams, Mode mode, Recipient recipient) { this.extraParams = extraParams; this.mode = mode; - this.receipient = receipient; + this.recipient = recipient; } public static Builder builder() { @@ -993,12 +993,12 @@ public static class Builder { private Mode mode; - private Receipient receipient; + private Recipient recipient; /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentCaptureParams.PaymentDetails.CarRental.Delivery build() { return new PaymentIntentCaptureParams.PaymentDetails.CarRental.Delivery( - this.extraParams, this.mode, this.receipient); + this.extraParams, this.mode, this.recipient); } /** @@ -1039,15 +1039,15 @@ public Builder setMode( } /** Details of the recipient. */ - public Builder setReceipient( - PaymentIntentCaptureParams.PaymentDetails.CarRental.Delivery.Receipient receipient) { - this.receipient = receipient; + public Builder setRecipient( + PaymentIntentCaptureParams.PaymentDetails.CarRental.Delivery.Recipient recipient) { + this.recipient = recipient; return this; } } @Getter - public static class Receipient { + public static class Recipient { /** The email of the recipient the ticket is delivered to. */ @SerializedName("email") String email; @@ -1070,7 +1070,7 @@ public static class Receipient { @SerializedName("phone") String phone; - private Receipient( + private Recipient( String email, Map extraParams, String name, String phone) { this.email = email; this.extraParams = extraParams; @@ -1092,8 +1092,8 @@ public static class Builder { private String phone; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCaptureParams.PaymentDetails.CarRental.Delivery.Receipient build() { - return new PaymentIntentCaptureParams.PaymentDetails.CarRental.Delivery.Receipient( + public PaymentIntentCaptureParams.PaymentDetails.CarRental.Delivery.Recipient build() { + return new PaymentIntentCaptureParams.PaymentDetails.CarRental.Delivery.Recipient( this.email, this.extraParams, this.name, this.phone); } @@ -1107,7 +1107,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.CarRental.Delivery.Receipient#extraParams} + * PaymentIntentCaptureParams.PaymentDetails.CarRental.Delivery.Recipient#extraParams} * for the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -1122,7 +1122,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.CarRental.Delivery.Receipient#extraParams} + * PaymentIntentCaptureParams.PaymentDetails.CarRental.Delivery.Recipient#extraParams} * for the field documentation. */ public Builder putAllExtraParam(Map map) { @@ -2047,13 +2047,13 @@ public static class Delivery { Mode mode; /** Details of the recipient. */ - @SerializedName("receipient") - Receipient receipient; + @SerializedName("recipient") + Recipient recipient; - private Delivery(Map extraParams, Mode mode, Receipient receipient) { + private Delivery(Map extraParams, Mode mode, Recipient recipient) { this.extraParams = extraParams; this.mode = mode; - this.receipient = receipient; + this.recipient = recipient; } public static Builder builder() { @@ -2065,12 +2065,12 @@ public static class Builder { private Mode mode; - private Receipient receipient; + 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.receipient); + this.extraParams, this.mode, this.recipient); } /** @@ -2111,16 +2111,15 @@ public Builder setMode( } /** Details of the recipient. */ - public Builder setReceipient( - PaymentIntentCaptureParams.PaymentDetails.EventDetails.Delivery.Receipient - receipient) { - this.receipient = receipient; + public Builder setRecipient( + PaymentIntentCaptureParams.PaymentDetails.EventDetails.Delivery.Recipient recipient) { + this.recipient = recipient; return this; } } @Getter - public static class Receipient { + public static class Recipient { /** The email of the recipient the ticket is delivered to. */ @SerializedName("email") String email; @@ -2143,7 +2142,7 @@ public static class Receipient { @SerializedName("phone") String phone; - private Receipient( + private Recipient( String email, Map extraParams, String name, String phone) { this.email = email; this.extraParams = extraParams; @@ -2165,9 +2164,9 @@ public static class Builder { private String phone; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCaptureParams.PaymentDetails.EventDetails.Delivery.Receipient + public PaymentIntentCaptureParams.PaymentDetails.EventDetails.Delivery.Recipient build() { - return new PaymentIntentCaptureParams.PaymentDetails.EventDetails.Delivery.Receipient( + return new PaymentIntentCaptureParams.PaymentDetails.EventDetails.Delivery.Recipient( this.email, this.extraParams, this.name, this.phone); } @@ -2181,7 +2180,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.Receipient#extraParams} + * PaymentIntentCaptureParams.PaymentDetails.EventDetails.Delivery.Recipient#extraParams} * for the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -2196,7 +2195,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.Receipient#extraParams} + * PaymentIntentCaptureParams.PaymentDetails.EventDetails.Delivery.Recipient#extraParams} * for the field documentation. */ public Builder putAllExtraParam(Map map) { @@ -2569,13 +2568,13 @@ public static class Delivery { Mode mode; /** Details of the recipient. */ - @SerializedName("receipient") - Receipient receipient; + @SerializedName("recipient") + Recipient recipient; - private Delivery(Map extraParams, Mode mode, Receipient receipient) { + private Delivery(Map extraParams, Mode mode, Recipient recipient) { this.extraParams = extraParams; this.mode = mode; - this.receipient = receipient; + this.recipient = recipient; } public static Builder builder() { @@ -2587,12 +2586,12 @@ public static class Builder { private Mode mode; - private Receipient receipient; + 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.receipient); + this.extraParams, this.mode, this.recipient); } /** @@ -2631,15 +2630,15 @@ public Builder setMode( } /** Details of the recipient. */ - public Builder setReceipient( - PaymentIntentCaptureParams.PaymentDetails.Flight.Delivery.Receipient receipient) { - this.receipient = receipient; + public Builder setRecipient( + PaymentIntentCaptureParams.PaymentDetails.Flight.Delivery.Recipient recipient) { + this.recipient = recipient; return this; } } @Getter - public static class Receipient { + public static class Recipient { /** The email of the recipient the ticket is delivered to. */ @SerializedName("email") String email; @@ -2662,7 +2661,7 @@ public static class Receipient { @SerializedName("phone") String phone; - private Receipient( + private Recipient( String email, Map extraParams, String name, String phone) { this.email = email; this.extraParams = extraParams; @@ -2684,8 +2683,8 @@ public static class Builder { private String phone; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCaptureParams.PaymentDetails.Flight.Delivery.Receipient build() { - return new PaymentIntentCaptureParams.PaymentDetails.Flight.Delivery.Receipient( + public PaymentIntentCaptureParams.PaymentDetails.Flight.Delivery.Recipient build() { + return new PaymentIntentCaptureParams.PaymentDetails.Flight.Delivery.Recipient( this.email, this.extraParams, this.name, this.phone); } @@ -2699,7 +2698,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.Flight.Delivery.Receipient#extraParams} for + * PaymentIntentCaptureParams.PaymentDetails.Flight.Delivery.Recipient#extraParams} for * the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -2714,7 +2713,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.Flight.Delivery.Receipient#extraParams} for + * PaymentIntentCaptureParams.PaymentDetails.Flight.Delivery.Recipient#extraParams} for * the field documentation. */ public Builder putAllExtraParam(Map map) { @@ -3707,13 +3706,13 @@ public static class Delivery { Mode mode; /** Details of the recipient. */ - @SerializedName("receipient") - Receipient receipient; + @SerializedName("recipient") + Recipient recipient; - private Delivery(Map extraParams, Mode mode, Receipient receipient) { + private Delivery(Map extraParams, Mode mode, Recipient recipient) { this.extraParams = extraParams; this.mode = mode; - this.receipient = receipient; + this.recipient = recipient; } public static Builder builder() { @@ -3725,12 +3724,12 @@ public static class Builder { private Mode mode; - private Receipient receipient; + 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.receipient); + this.extraParams, this.mode, this.recipient); } /** @@ -3769,15 +3768,15 @@ public Builder setMode( } /** Details of the recipient. */ - public Builder setReceipient( - PaymentIntentCaptureParams.PaymentDetails.Lodging.Delivery.Receipient receipient) { - this.receipient = receipient; + public Builder setRecipient( + PaymentIntentCaptureParams.PaymentDetails.Lodging.Delivery.Recipient recipient) { + this.recipient = recipient; return this; } } @Getter - public static class Receipient { + public static class Recipient { /** The email of the recipient the ticket is delivered to. */ @SerializedName("email") String email; @@ -3800,7 +3799,7 @@ public static class Receipient { @SerializedName("phone") String phone; - private Receipient( + private Recipient( String email, Map extraParams, String name, String phone) { this.email = email; this.extraParams = extraParams; @@ -3822,8 +3821,8 @@ public static class Builder { private String phone; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCaptureParams.PaymentDetails.Lodging.Delivery.Receipient build() { - return new PaymentIntentCaptureParams.PaymentDetails.Lodging.Delivery.Receipient( + public PaymentIntentCaptureParams.PaymentDetails.Lodging.Delivery.Recipient build() { + return new PaymentIntentCaptureParams.PaymentDetails.Lodging.Delivery.Recipient( this.email, this.extraParams, this.name, this.phone); } @@ -3837,8 +3836,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.Receipient#extraParams} - * for the field documentation. + * PaymentIntentCaptureParams.PaymentDetails.Lodging.Delivery.Recipient#extraParams} for + * the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -3852,8 +3851,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.Receipient#extraParams} - * for the field documentation. + * PaymentIntentCaptureParams.PaymentDetails.Lodging.Delivery.Recipient#extraParams} for + * the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { diff --git a/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java b/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java index 0d4316a6ba8..400623c33d8 100644 --- a/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java @@ -1567,13 +1567,13 @@ public static class Delivery { Mode mode; /** Details of the recipient. */ - @SerializedName("receipient") - Receipient receipient; + @SerializedName("recipient") + Recipient recipient; - private Delivery(Map extraParams, Mode mode, Receipient receipient) { + private Delivery(Map extraParams, Mode mode, Recipient recipient) { this.extraParams = extraParams; this.mode = mode; - this.receipient = receipient; + this.recipient = recipient; } public static Builder builder() { @@ -1585,12 +1585,12 @@ public static class Builder { private Mode mode; - private Receipient receipient; + private Recipient recipient; /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentConfirmParams.PaymentDetails.CarRental.Delivery build() { return new PaymentIntentConfirmParams.PaymentDetails.CarRental.Delivery( - this.extraParams, this.mode, this.receipient); + this.extraParams, this.mode, this.recipient); } /** @@ -1631,15 +1631,15 @@ public Builder setMode( } /** Details of the recipient. */ - public Builder setReceipient( - PaymentIntentConfirmParams.PaymentDetails.CarRental.Delivery.Receipient receipient) { - this.receipient = receipient; + public Builder setRecipient( + PaymentIntentConfirmParams.PaymentDetails.CarRental.Delivery.Recipient recipient) { + this.recipient = recipient; return this; } } @Getter - public static class Receipient { + public static class Recipient { /** The email of the recipient the ticket is delivered to. */ @SerializedName("email") String email; @@ -1662,7 +1662,7 @@ public static class Receipient { @SerializedName("phone") String phone; - private Receipient( + private Recipient( String email, Map extraParams, String name, String phone) { this.email = email; this.extraParams = extraParams; @@ -1684,8 +1684,8 @@ public static class Builder { private String phone; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentDetails.CarRental.Delivery.Receipient build() { - return new PaymentIntentConfirmParams.PaymentDetails.CarRental.Delivery.Receipient( + public PaymentIntentConfirmParams.PaymentDetails.CarRental.Delivery.Recipient build() { + return new PaymentIntentConfirmParams.PaymentDetails.CarRental.Delivery.Recipient( this.email, this.extraParams, this.name, this.phone); } @@ -1699,7 +1699,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.CarRental.Delivery.Receipient#extraParams} + * PaymentIntentConfirmParams.PaymentDetails.CarRental.Delivery.Recipient#extraParams} * for the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -1714,7 +1714,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.CarRental.Delivery.Receipient#extraParams} + * PaymentIntentConfirmParams.PaymentDetails.CarRental.Delivery.Recipient#extraParams} * for the field documentation. */ public Builder putAllExtraParam(Map map) { @@ -2639,13 +2639,13 @@ public static class Delivery { Mode mode; /** Details of the recipient. */ - @SerializedName("receipient") - Receipient receipient; + @SerializedName("recipient") + Recipient recipient; - private Delivery(Map extraParams, Mode mode, Receipient receipient) { + private Delivery(Map extraParams, Mode mode, Recipient recipient) { this.extraParams = extraParams; this.mode = mode; - this.receipient = receipient; + this.recipient = recipient; } public static Builder builder() { @@ -2657,12 +2657,12 @@ public static class Builder { private Mode mode; - private Receipient receipient; + private Recipient recipient; /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentConfirmParams.PaymentDetails.EventDetails.Delivery build() { return new PaymentIntentConfirmParams.PaymentDetails.EventDetails.Delivery( - this.extraParams, this.mode, this.receipient); + this.extraParams, this.mode, this.recipient); } /** @@ -2703,16 +2703,15 @@ public Builder setMode( } /** Details of the recipient. */ - public Builder setReceipient( - PaymentIntentConfirmParams.PaymentDetails.EventDetails.Delivery.Receipient - receipient) { - this.receipient = receipient; + public Builder setRecipient( + PaymentIntentConfirmParams.PaymentDetails.EventDetails.Delivery.Recipient recipient) { + this.recipient = recipient; return this; } } @Getter - public static class Receipient { + public static class Recipient { /** The email of the recipient the ticket is delivered to. */ @SerializedName("email") String email; @@ -2735,7 +2734,7 @@ public static class Receipient { @SerializedName("phone") String phone; - private Receipient( + private Recipient( String email, Map extraParams, String name, String phone) { this.email = email; this.extraParams = extraParams; @@ -2757,9 +2756,9 @@ public static class Builder { private String phone; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentDetails.EventDetails.Delivery.Receipient + public PaymentIntentConfirmParams.PaymentDetails.EventDetails.Delivery.Recipient build() { - return new PaymentIntentConfirmParams.PaymentDetails.EventDetails.Delivery.Receipient( + return new PaymentIntentConfirmParams.PaymentDetails.EventDetails.Delivery.Recipient( this.email, this.extraParams, this.name, this.phone); } @@ -2773,7 +2772,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.Receipient#extraParams} + * PaymentIntentConfirmParams.PaymentDetails.EventDetails.Delivery.Recipient#extraParams} * for the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -2788,7 +2787,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.Receipient#extraParams} + * PaymentIntentConfirmParams.PaymentDetails.EventDetails.Delivery.Recipient#extraParams} * for the field documentation. */ public Builder putAllExtraParam(Map map) { @@ -3161,13 +3160,13 @@ public static class Delivery { Mode mode; /** Details of the recipient. */ - @SerializedName("receipient") - Receipient receipient; + @SerializedName("recipient") + Recipient recipient; - private Delivery(Map extraParams, Mode mode, Receipient receipient) { + private Delivery(Map extraParams, Mode mode, Recipient recipient) { this.extraParams = extraParams; this.mode = mode; - this.receipient = receipient; + this.recipient = recipient; } public static Builder builder() { @@ -3179,12 +3178,12 @@ public static class Builder { private Mode mode; - private Receipient receipient; + private Recipient recipient; /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentConfirmParams.PaymentDetails.Flight.Delivery build() { return new PaymentIntentConfirmParams.PaymentDetails.Flight.Delivery( - this.extraParams, this.mode, this.receipient); + this.extraParams, this.mode, this.recipient); } /** @@ -3223,15 +3222,15 @@ public Builder setMode( } /** Details of the recipient. */ - public Builder setReceipient( - PaymentIntentConfirmParams.PaymentDetails.Flight.Delivery.Receipient receipient) { - this.receipient = receipient; + public Builder setRecipient( + PaymentIntentConfirmParams.PaymentDetails.Flight.Delivery.Recipient recipient) { + this.recipient = recipient; return this; } } @Getter - public static class Receipient { + public static class Recipient { /** The email of the recipient the ticket is delivered to. */ @SerializedName("email") String email; @@ -3254,7 +3253,7 @@ public static class Receipient { @SerializedName("phone") String phone; - private Receipient( + private Recipient( String email, Map extraParams, String name, String phone) { this.email = email; this.extraParams = extraParams; @@ -3276,8 +3275,8 @@ public static class Builder { private String phone; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentDetails.Flight.Delivery.Receipient build() { - return new PaymentIntentConfirmParams.PaymentDetails.Flight.Delivery.Receipient( + public PaymentIntentConfirmParams.PaymentDetails.Flight.Delivery.Recipient build() { + return new PaymentIntentConfirmParams.PaymentDetails.Flight.Delivery.Recipient( this.email, this.extraParams, this.name, this.phone); } @@ -3291,7 +3290,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.Flight.Delivery.Receipient#extraParams} for + * PaymentIntentConfirmParams.PaymentDetails.Flight.Delivery.Recipient#extraParams} for * the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -3306,7 +3305,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.Flight.Delivery.Receipient#extraParams} for + * PaymentIntentConfirmParams.PaymentDetails.Flight.Delivery.Recipient#extraParams} for * the field documentation. */ public Builder putAllExtraParam(Map map) { @@ -4299,13 +4298,13 @@ public static class Delivery { Mode mode; /** Details of the recipient. */ - @SerializedName("receipient") - Receipient receipient; + @SerializedName("recipient") + Recipient recipient; - private Delivery(Map extraParams, Mode mode, Receipient receipient) { + private Delivery(Map extraParams, Mode mode, Recipient recipient) { this.extraParams = extraParams; this.mode = mode; - this.receipient = receipient; + this.recipient = recipient; } public static Builder builder() { @@ -4317,12 +4316,12 @@ public static class Builder { private Mode mode; - private Receipient receipient; + 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.receipient); + this.extraParams, this.mode, this.recipient); } /** @@ -4361,15 +4360,15 @@ public Builder setMode( } /** Details of the recipient. */ - public Builder setReceipient( - PaymentIntentConfirmParams.PaymentDetails.Lodging.Delivery.Receipient receipient) { - this.receipient = receipient; + public Builder setRecipient( + PaymentIntentConfirmParams.PaymentDetails.Lodging.Delivery.Recipient recipient) { + this.recipient = recipient; return this; } } @Getter - public static class Receipient { + public static class Recipient { /** The email of the recipient the ticket is delivered to. */ @SerializedName("email") String email; @@ -4392,7 +4391,7 @@ public static class Receipient { @SerializedName("phone") String phone; - private Receipient( + private Recipient( String email, Map extraParams, String name, String phone) { this.email = email; this.extraParams = extraParams; @@ -4414,8 +4413,8 @@ public static class Builder { private String phone; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentDetails.Lodging.Delivery.Receipient build() { - return new PaymentIntentConfirmParams.PaymentDetails.Lodging.Delivery.Receipient( + public PaymentIntentConfirmParams.PaymentDetails.Lodging.Delivery.Recipient build() { + return new PaymentIntentConfirmParams.PaymentDetails.Lodging.Delivery.Recipient( this.email, this.extraParams, this.name, this.phone); } @@ -4429,8 +4428,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.Lodging.Delivery.Receipient#extraParams} - * for the field documentation. + * PaymentIntentConfirmParams.PaymentDetails.Lodging.Delivery.Recipient#extraParams} for + * the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -4444,8 +4443,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.Delivery.Receipient#extraParams} - * for the field documentation. + * PaymentIntentConfirmParams.PaymentDetails.Lodging.Delivery.Recipient#extraParams} for + * the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -11853,6 +11852,13 @@ public static class Card { @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, @@ -11869,7 +11875,8 @@ private Card( ApiRequestParams.EnumParam setupFutureUsage, Object statementDescriptorSuffixKana, Object statementDescriptorSuffixKanji, - Object statementDetails) { + Object statementDetails, + ThreeDSecure threeDSecure) { this.captureMethod = captureMethod; this.cvcToken = cvcToken; this.extraParams = extraParams; @@ -11886,6 +11893,7 @@ private Card( this.statementDescriptorSuffixKana = statementDescriptorSuffixKana; this.statementDescriptorSuffixKanji = statementDescriptorSuffixKanji; this.statementDetails = statementDetails; + this.threeDSecure = threeDSecure; } public static Builder builder() { @@ -11925,6 +11933,8 @@ public static class Builder { private Object statementDetails; + private ThreeDSecure threeDSecure; + /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentConfirmParams.PaymentMethodOptions.Card build() { return new PaymentIntentConfirmParams.PaymentMethodOptions.Card( @@ -11943,7 +11953,8 @@ public PaymentIntentConfirmParams.PaymentMethodOptions.Card build() { this.setupFutureUsage, this.statementDescriptorSuffixKana, this.statementDescriptorSuffixKanji, - this.statementDetails); + this.statementDetails, + this.threeDSecure); } /** @@ -12236,6 +12247,16 @@ public Builder setStatementDetails(EmptyParam statementDetails) { this.statementDetails = statementDetails; return this; } + + /** + * If 3D Secure authentication was performed with a third-party provider, the authentication + * details to use for this payment. + */ + public Builder setThreeDSecure( + PaymentIntentConfirmParams.PaymentMethodOptions.Card.ThreeDSecure threeDSecure) { + this.threeDSecure = threeDSecure; + return this; + } } @Getter @@ -13069,6 +13090,558 @@ public Builder setState(String state) { } } + @Getter + public static class ThreeDSecure { + /** The {@code transStatus} returned from the card Issuer’s ACS in the ARes. */ + @SerializedName("ares_trans_status") + AresTransStatus aresTransStatus; + + /** + * Required. The cryptogram, also known as the "authentication + * value" (AAV, CAVV or AEVV). This value is 20 bytes, base64-encoded into a + * 28-character string. (Most 3D Secure providers will return the base64-encoded version, + * which is what you should specify here.) + */ + @SerializedName("cryptogram") + String cryptogram; + + /** + * The Electronic Commerce Indicator (ECI) is returned by your 3D Secure provider and + * indicates what degree of authentication was performed. + */ + @SerializedName("electronic_commerce_indicator") + ElectronicCommerceIndicator electronicCommerceIndicator; + + /** The exemption requested via 3DS and accepted by the issuer at authentication time. */ + @SerializedName("exemption_indicator") + ExemptionIndicator exemptionIndicator; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Network specific 3DS fields. Network specific arguments require an explicit card brand + * choice. The parameter `payment_method_options.card.network`` must be populated + * accordingly + */ + @SerializedName("network_options") + NetworkOptions networkOptions; + + /** + * The challenge indicator ({@code threeDSRequestorChallengeInd}) which was requested in the + * AReq sent to the card Issuer's ACS. A string containing 2 digits from 01-99. + */ + @SerializedName("requestor_challenge_indicator") + String requestorChallengeIndicator; + + /** + * Required. For 3D Secure 1, the XID. For 3D Secure 2, the Directory + * Server Transaction ID (dsTransID). + */ + @SerializedName("transaction_id") + String transactionId; + + /** Required. The version of 3D Secure that was performed. */ + @SerializedName("version") + Version version; + + private ThreeDSecure( + AresTransStatus aresTransStatus, + String cryptogram, + ElectronicCommerceIndicator electronicCommerceIndicator, + ExemptionIndicator exemptionIndicator, + Map extraParams, + NetworkOptions networkOptions, + String requestorChallengeIndicator, + String transactionId, + Version version) { + this.aresTransStatus = aresTransStatus; + this.cryptogram = cryptogram; + this.electronicCommerceIndicator = electronicCommerceIndicator; + this.exemptionIndicator = exemptionIndicator; + this.extraParams = extraParams; + this.networkOptions = networkOptions; + this.requestorChallengeIndicator = requestorChallengeIndicator; + this.transactionId = transactionId; + this.version = version; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private AresTransStatus aresTransStatus; + + private String cryptogram; + + private ElectronicCommerceIndicator electronicCommerceIndicator; + + private ExemptionIndicator exemptionIndicator; + + private Map extraParams; + + private NetworkOptions networkOptions; + + private String requestorChallengeIndicator; + + private String transactionId; + + private Version version; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodOptions.Card.ThreeDSecure build() { + return new PaymentIntentConfirmParams.PaymentMethodOptions.Card.ThreeDSecure( + this.aresTransStatus, + this.cryptogram, + this.electronicCommerceIndicator, + this.exemptionIndicator, + this.extraParams, + this.networkOptions, + this.requestorChallengeIndicator, + this.transactionId, + this.version); + } + + /** The {@code transStatus} returned from the card Issuer’s ACS in the ARes. */ + public Builder setAresTransStatus( + PaymentIntentConfirmParams.PaymentMethodOptions.Card.ThreeDSecure.AresTransStatus + aresTransStatus) { + this.aresTransStatus = aresTransStatus; + return this; + } + + /** + * Required. The cryptogram, also known as the "authentication + * value" (AAV, CAVV or AEVV). This value is 20 bytes, base64-encoded into a + * 28-character string. (Most 3D Secure providers will return the base64-encoded version, + * which is what you should specify here.) + */ + public Builder setCryptogram(String cryptogram) { + this.cryptogram = cryptogram; + return this; + } + + /** + * The Electronic Commerce Indicator (ECI) is returned by your 3D Secure provider and + * indicates what degree of authentication was performed. + */ + public Builder setElectronicCommerceIndicator( + PaymentIntentConfirmParams.PaymentMethodOptions.Card.ThreeDSecure + .ElectronicCommerceIndicator + electronicCommerceIndicator) { + this.electronicCommerceIndicator = electronicCommerceIndicator; + return this; + } + + /** The exemption requested via 3DS and accepted by the issuer at authentication time. */ + public Builder setExemptionIndicator( + PaymentIntentConfirmParams.PaymentMethodOptions.Card.ThreeDSecure.ExemptionIndicator + exemptionIndicator) { + this.exemptionIndicator = exemptionIndicator; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Card.ThreeDSecure#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Card.ThreeDSecure#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Network specific 3DS fields. Network specific arguments require an explicit card brand + * choice. The parameter `payment_method_options.card.network`` must be populated + * accordingly + */ + public Builder setNetworkOptions( + PaymentIntentConfirmParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions + networkOptions) { + this.networkOptions = networkOptions; + return this; + } + + /** + * The challenge indicator ({@code threeDSRequestorChallengeInd}) which was requested in + * the AReq sent to the card Issuer's ACS. A string containing 2 digits from 01-99. + */ + public Builder setRequestorChallengeIndicator(String requestorChallengeIndicator) { + this.requestorChallengeIndicator = requestorChallengeIndicator; + return this; + } + + /** + * Required. For 3D Secure 1, the XID. For 3D Secure 2, the Directory + * Server Transaction ID (dsTransID). + */ + public Builder setTransactionId(String transactionId) { + this.transactionId = transactionId; + return this; + } + + /** Required. The version of 3D Secure that was performed. */ + public Builder setVersion( + PaymentIntentConfirmParams.PaymentMethodOptions.Card.ThreeDSecure.Version version) { + this.version = version; + return this; + } + } + + @Getter + public static class NetworkOptions { + /** Cartes Bancaires-specific 3DS fields. */ + @SerializedName("cartes_bancaires") + CartesBancaires cartesBancaires; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private NetworkOptions(CartesBancaires cartesBancaires, Map extraParams) { + this.cartesBancaires = cartesBancaires; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private CartesBancaires cartesBancaires; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions + build() { + return new PaymentIntentConfirmParams.PaymentMethodOptions.Card.ThreeDSecure + .NetworkOptions(this.cartesBancaires, this.extraParams); + } + + /** Cartes Bancaires-specific 3DS fields. */ + public Builder setCartesBancaires( + PaymentIntentConfirmParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions + .CartesBancaires + cartesBancaires) { + this.cartesBancaires = cartesBancaires; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + + @Getter + public static class CartesBancaires { + /** + * Required. The cryptogram calculation algorithm used by the card + * Issuer's ACS to calculate the Authentication cryptogram. Also known as {@code + * cavvAlgorithm}. messageExtension: CB-AVALGO + */ + @SerializedName("cb_avalgo") + CbAvalgo cbAvalgo; + + /** + * The exemption indicator returned from Cartes Bancaires in the ARes. message + * extension: CB-EXEMPTION; string (4 characters) This is a 3 byte bitmap (low + * significant byte first and most significant bit first) that has been Base64 encoded + */ + @SerializedName("cb_exemption") + String cbExemption; + + /** + * The risk score returned from Cartes Bancaires in the ARes. message extension: + * CB-SCORE; numeric value 0-99 + */ + @SerializedName("cb_score") + Long cbScore; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private CartesBancaires( + CbAvalgo cbAvalgo, + String cbExemption, + Long cbScore, + Map extraParams) { + this.cbAvalgo = cbAvalgo; + this.cbExemption = cbExemption; + this.cbScore = cbScore; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private CbAvalgo cbAvalgo; + + private String cbExemption; + + private Long cbScore; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodOptions.Card.ThreeDSecure + .NetworkOptions.CartesBancaires + build() { + return new PaymentIntentConfirmParams.PaymentMethodOptions.Card.ThreeDSecure + .NetworkOptions.CartesBancaires( + this.cbAvalgo, this.cbExemption, this.cbScore, this.extraParams); + } + + /** + * Required. The cryptogram calculation algorithm used by the card + * Issuer's ACS to calculate the Authentication cryptogram. Also known as {@code + * cavvAlgorithm}. messageExtension: CB-AVALGO + */ + public Builder setCbAvalgo( + PaymentIntentConfirmParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions + .CartesBancaires.CbAvalgo + cbAvalgo) { + this.cbAvalgo = cbAvalgo; + return this; + } + + /** + * The exemption indicator returned from Cartes Bancaires in the ARes. message + * extension: CB-EXEMPTION; string (4 characters) This is a 3 byte bitmap (low + * significant byte first and most significant bit first) that has been Base64 encoded + */ + public Builder setCbExemption(String cbExemption) { + this.cbExemption = cbExemption; + return this; + } + + /** + * The risk score returned from Cartes Bancaires in the ARes. message extension: + * CB-SCORE; numeric value 0-99 + */ + public Builder setCbScore(Long cbScore) { + this.cbScore = cbScore; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions.CartesBancaires#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions.CartesBancaires#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + + public enum CbAvalgo implements ApiRequestParams.EnumParam { + @SerializedName("0") + N0("0"), + + @SerializedName("1") + N1("1"), + + @SerializedName("2") + N2("2"), + + @SerializedName("3") + N3("3"), + + @SerializedName("4") + N4("4"), + + @SerializedName("A") + A("A"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + CbAvalgo(String value) { + this.value = value; + } + } + } + } + + public enum AresTransStatus implements ApiRequestParams.EnumParam { + @SerializedName("A") + A("A"), + + @SerializedName("C") + C("C"), + + @SerializedName("I") + I("I"), + + @SerializedName("N") + N("N"), + + @SerializedName("R") + R("R"), + + @SerializedName("U") + U("U"), + + @SerializedName("Y") + Y("Y"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + AresTransStatus(String value) { + this.value = value; + } + } + + public enum ElectronicCommerceIndicator implements ApiRequestParams.EnumParam { + @SerializedName("01") + N01("01"), + + @SerializedName("02") + N02("02"), + + @SerializedName("05") + N05("05"), + + @SerializedName("06") + N06("06"), + + @SerializedName("07") + N07("07"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + ElectronicCommerceIndicator(String value) { + this.value = value; + } + } + + public enum ExemptionIndicator implements ApiRequestParams.EnumParam { + @SerializedName("low_risk") + LOW_RISK("low_risk"), + + @SerializedName("none") + NONE("none"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + ExemptionIndicator(String value) { + this.value = value; + } + } + + public enum Version implements ApiRequestParams.EnumParam { + @SerializedName("1.0.2") + N1__0__2("1.0.2"), + + @SerializedName("2.1.0") + N2__1__0("2.1.0"), + + @SerializedName("2.2.0") + N2__2__0("2.2.0"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Version(String value) { + this.value = value; + } + } + } + public enum CaptureMethod implements ApiRequestParams.EnumParam { @SerializedName("manual") MANUAL("manual"); diff --git a/src/main/java/com/stripe/param/PaymentIntentCreateParams.java b/src/main/java/com/stripe/param/PaymentIntentCreateParams.java index c85fa89c84d..a59ec0d6262 100644 --- a/src/main/java/com/stripe/param/PaymentIntentCreateParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentCreateParams.java @@ -2079,13 +2079,13 @@ public static class Delivery { Mode mode; /** Details of the recipient. */ - @SerializedName("receipient") - Receipient receipient; + @SerializedName("recipient") + Recipient recipient; - private Delivery(Map extraParams, Mode mode, Receipient receipient) { + private Delivery(Map extraParams, Mode mode, Recipient recipient) { this.extraParams = extraParams; this.mode = mode; - this.receipient = receipient; + this.recipient = recipient; } public static Builder builder() { @@ -2097,12 +2097,12 @@ public static class Builder { private Mode mode; - private Receipient receipient; + private Recipient recipient; /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentCreateParams.PaymentDetails.CarRental.Delivery build() { return new PaymentIntentCreateParams.PaymentDetails.CarRental.Delivery( - this.extraParams, this.mode, this.receipient); + this.extraParams, this.mode, this.recipient); } /** @@ -2143,15 +2143,15 @@ public Builder setMode( } /** Details of the recipient. */ - public Builder setReceipient( - PaymentIntentCreateParams.PaymentDetails.CarRental.Delivery.Receipient receipient) { - this.receipient = receipient; + public Builder setRecipient( + PaymentIntentCreateParams.PaymentDetails.CarRental.Delivery.Recipient recipient) { + this.recipient = recipient; return this; } } @Getter - public static class Receipient { + public static class Recipient { /** The email of the recipient the ticket is delivered to. */ @SerializedName("email") String email; @@ -2174,7 +2174,7 @@ public static class Receipient { @SerializedName("phone") String phone; - private Receipient( + private Recipient( String email, Map extraParams, String name, String phone) { this.email = email; this.extraParams = extraParams; @@ -2196,8 +2196,8 @@ public static class Builder { private String phone; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentDetails.CarRental.Delivery.Receipient build() { - return new PaymentIntentCreateParams.PaymentDetails.CarRental.Delivery.Receipient( + public PaymentIntentCreateParams.PaymentDetails.CarRental.Delivery.Recipient build() { + return new PaymentIntentCreateParams.PaymentDetails.CarRental.Delivery.Recipient( this.email, this.extraParams, this.name, this.phone); } @@ -2211,7 +2211,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.CarRental.Delivery.Receipient#extraParams} + * PaymentIntentCreateParams.PaymentDetails.CarRental.Delivery.Recipient#extraParams} * for the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -2226,7 +2226,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.CarRental.Delivery.Receipient#extraParams} + * PaymentIntentCreateParams.PaymentDetails.CarRental.Delivery.Recipient#extraParams} * for the field documentation. */ public Builder putAllExtraParam(Map map) { @@ -3151,13 +3151,13 @@ public static class Delivery { Mode mode; /** Details of the recipient. */ - @SerializedName("receipient") - Receipient receipient; + @SerializedName("recipient") + Recipient recipient; - private Delivery(Map extraParams, Mode mode, Receipient receipient) { + private Delivery(Map extraParams, Mode mode, Recipient recipient) { this.extraParams = extraParams; this.mode = mode; - this.receipient = receipient; + this.recipient = recipient; } public static Builder builder() { @@ -3169,12 +3169,12 @@ public static class Builder { private Mode mode; - private Receipient receipient; + private Recipient recipient; /** 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.receipient); + this.extraParams, this.mode, this.recipient); } /** @@ -3215,16 +3215,15 @@ public Builder setMode( } /** Details of the recipient. */ - public Builder setReceipient( - PaymentIntentCreateParams.PaymentDetails.EventDetails.Delivery.Receipient - receipient) { - this.receipient = receipient; + public Builder setRecipient( + PaymentIntentCreateParams.PaymentDetails.EventDetails.Delivery.Recipient recipient) { + this.recipient = recipient; return this; } } @Getter - public static class Receipient { + public static class Recipient { /** The email of the recipient the ticket is delivered to. */ @SerializedName("email") String email; @@ -3247,7 +3246,7 @@ public static class Receipient { @SerializedName("phone") String phone; - private Receipient( + private Recipient( String email, Map extraParams, String name, String phone) { this.email = email; this.extraParams = extraParams; @@ -3269,9 +3268,9 @@ public static class Builder { private String phone; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentDetails.EventDetails.Delivery.Receipient + public PaymentIntentCreateParams.PaymentDetails.EventDetails.Delivery.Recipient build() { - return new PaymentIntentCreateParams.PaymentDetails.EventDetails.Delivery.Receipient( + return new PaymentIntentCreateParams.PaymentDetails.EventDetails.Delivery.Recipient( this.email, this.extraParams, this.name, this.phone); } @@ -3285,7 +3284,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.Receipient#extraParams} + * PaymentIntentCreateParams.PaymentDetails.EventDetails.Delivery.Recipient#extraParams} * for the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -3300,7 +3299,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.Receipient#extraParams} + * PaymentIntentCreateParams.PaymentDetails.EventDetails.Delivery.Recipient#extraParams} * for the field documentation. */ public Builder putAllExtraParam(Map map) { @@ -3672,13 +3671,13 @@ public static class Delivery { Mode mode; /** Details of the recipient. */ - @SerializedName("receipient") - Receipient receipient; + @SerializedName("recipient") + Recipient recipient; - private Delivery(Map extraParams, Mode mode, Receipient receipient) { + private Delivery(Map extraParams, Mode mode, Recipient recipient) { this.extraParams = extraParams; this.mode = mode; - this.receipient = receipient; + this.recipient = recipient; } public static Builder builder() { @@ -3690,12 +3689,12 @@ public static class Builder { private Mode mode; - private Receipient receipient; + 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.receipient); + this.extraParams, this.mode, this.recipient); } /** @@ -3734,15 +3733,15 @@ public Builder setMode( } /** Details of the recipient. */ - public Builder setReceipient( - PaymentIntentCreateParams.PaymentDetails.Flight.Delivery.Receipient receipient) { - this.receipient = receipient; + public Builder setRecipient( + PaymentIntentCreateParams.PaymentDetails.Flight.Delivery.Recipient recipient) { + this.recipient = recipient; return this; } } @Getter - public static class Receipient { + public static class Recipient { /** The email of the recipient the ticket is delivered to. */ @SerializedName("email") String email; @@ -3765,7 +3764,7 @@ public static class Receipient { @SerializedName("phone") String phone; - private Receipient( + private Recipient( String email, Map extraParams, String name, String phone) { this.email = email; this.extraParams = extraParams; @@ -3787,8 +3786,8 @@ public static class Builder { private String phone; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentDetails.Flight.Delivery.Receipient build() { - return new PaymentIntentCreateParams.PaymentDetails.Flight.Delivery.Receipient( + public PaymentIntentCreateParams.PaymentDetails.Flight.Delivery.Recipient build() { + return new PaymentIntentCreateParams.PaymentDetails.Flight.Delivery.Recipient( this.email, this.extraParams, this.name, this.phone); } @@ -3802,7 +3801,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.Flight.Delivery.Receipient#extraParams} for + * PaymentIntentCreateParams.PaymentDetails.Flight.Delivery.Recipient#extraParams} for * the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -3817,7 +3816,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.Flight.Delivery.Receipient#extraParams} for + * PaymentIntentCreateParams.PaymentDetails.Flight.Delivery.Recipient#extraParams} for * the field documentation. */ public Builder putAllExtraParam(Map map) { @@ -4806,13 +4805,13 @@ public static class Delivery { Mode mode; /** Details of the recipient. */ - @SerializedName("receipient") - Receipient receipient; + @SerializedName("recipient") + Recipient recipient; - private Delivery(Map extraParams, Mode mode, Receipient receipient) { + private Delivery(Map extraParams, Mode mode, Recipient recipient) { this.extraParams = extraParams; this.mode = mode; - this.receipient = receipient; + this.recipient = recipient; } public static Builder builder() { @@ -4824,12 +4823,12 @@ public static class Builder { private Mode mode; - private Receipient receipient; + 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.receipient); + this.extraParams, this.mode, this.recipient); } /** @@ -4868,15 +4867,15 @@ public Builder setMode( } /** Details of the recipient. */ - public Builder setReceipient( - PaymentIntentCreateParams.PaymentDetails.Lodging.Delivery.Receipient receipient) { - this.receipient = receipient; + public Builder setRecipient( + PaymentIntentCreateParams.PaymentDetails.Lodging.Delivery.Recipient recipient) { + this.recipient = recipient; return this; } } @Getter - public static class Receipient { + public static class Recipient { /** The email of the recipient the ticket is delivered to. */ @SerializedName("email") String email; @@ -4899,7 +4898,7 @@ public static class Receipient { @SerializedName("phone") String phone; - private Receipient( + private Recipient( String email, Map extraParams, String name, String phone) { this.email = email; this.extraParams = extraParams; @@ -4921,8 +4920,8 @@ public static class Builder { private String phone; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentDetails.Lodging.Delivery.Receipient build() { - return new PaymentIntentCreateParams.PaymentDetails.Lodging.Delivery.Receipient( + public PaymentIntentCreateParams.PaymentDetails.Lodging.Delivery.Recipient build() { + return new PaymentIntentCreateParams.PaymentDetails.Lodging.Delivery.Recipient( this.email, this.extraParams, this.name, this.phone); } @@ -4936,7 +4935,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.Lodging.Delivery.Receipient#extraParams} for + * PaymentIntentCreateParams.PaymentDetails.Lodging.Delivery.Recipient#extraParams} for * the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -4951,7 +4950,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.Lodging.Delivery.Receipient#extraParams} for + * PaymentIntentCreateParams.PaymentDetails.Lodging.Delivery.Recipient#extraParams} for * the field documentation. */ public Builder putAllExtraParam(Map map) { @@ -12347,6 +12346,13 @@ public static class Card { @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, @@ -12363,7 +12369,8 @@ private Card( ApiRequestParams.EnumParam setupFutureUsage, Object statementDescriptorSuffixKana, Object statementDescriptorSuffixKanji, - Object statementDetails) { + Object statementDetails, + ThreeDSecure threeDSecure) { this.captureMethod = captureMethod; this.cvcToken = cvcToken; this.extraParams = extraParams; @@ -12380,6 +12387,7 @@ private Card( this.statementDescriptorSuffixKana = statementDescriptorSuffixKana; this.statementDescriptorSuffixKanji = statementDescriptorSuffixKanji; this.statementDetails = statementDetails; + this.threeDSecure = threeDSecure; } public static Builder builder() { @@ -12419,6 +12427,8 @@ public static class Builder { private Object statementDetails; + private ThreeDSecure threeDSecure; + /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentCreateParams.PaymentMethodOptions.Card build() { return new PaymentIntentCreateParams.PaymentMethodOptions.Card( @@ -12437,7 +12447,8 @@ public PaymentIntentCreateParams.PaymentMethodOptions.Card build() { this.setupFutureUsage, this.statementDescriptorSuffixKana, this.statementDescriptorSuffixKanji, - this.statementDetails); + this.statementDetails, + this.threeDSecure); } /** @@ -12728,6 +12739,16 @@ public Builder setStatementDetails(EmptyParam statementDetails) { this.statementDetails = statementDetails; return this; } + + /** + * If 3D Secure authentication was performed with a third-party provider, the authentication + * details to use for this payment. + */ + public Builder setThreeDSecure( + PaymentIntentCreateParams.PaymentMethodOptions.Card.ThreeDSecure threeDSecure) { + this.threeDSecure = threeDSecure; + return this; + } } @Getter @@ -13559,6 +13580,558 @@ public Builder setState(String state) { } } + @Getter + public static class ThreeDSecure { + /** The {@code transStatus} returned from the card Issuer’s ACS in the ARes. */ + @SerializedName("ares_trans_status") + AresTransStatus aresTransStatus; + + /** + * Required. The cryptogram, also known as the "authentication + * value" (AAV, CAVV or AEVV). This value is 20 bytes, base64-encoded into a + * 28-character string. (Most 3D Secure providers will return the base64-encoded version, + * which is what you should specify here.) + */ + @SerializedName("cryptogram") + String cryptogram; + + /** + * The Electronic Commerce Indicator (ECI) is returned by your 3D Secure provider and + * indicates what degree of authentication was performed. + */ + @SerializedName("electronic_commerce_indicator") + ElectronicCommerceIndicator electronicCommerceIndicator; + + /** The exemption requested via 3DS and accepted by the issuer at authentication time. */ + @SerializedName("exemption_indicator") + ExemptionIndicator exemptionIndicator; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Network specific 3DS fields. Network specific arguments require an explicit card brand + * choice. The parameter `payment_method_options.card.network`` must be populated + * accordingly + */ + @SerializedName("network_options") + NetworkOptions networkOptions; + + /** + * The challenge indicator ({@code threeDSRequestorChallengeInd}) which was requested in the + * AReq sent to the card Issuer's ACS. A string containing 2 digits from 01-99. + */ + @SerializedName("requestor_challenge_indicator") + String requestorChallengeIndicator; + + /** + * Required. For 3D Secure 1, the XID. For 3D Secure 2, the Directory + * Server Transaction ID (dsTransID). + */ + @SerializedName("transaction_id") + String transactionId; + + /** Required. The version of 3D Secure that was performed. */ + @SerializedName("version") + Version version; + + private ThreeDSecure( + AresTransStatus aresTransStatus, + String cryptogram, + ElectronicCommerceIndicator electronicCommerceIndicator, + ExemptionIndicator exemptionIndicator, + Map extraParams, + NetworkOptions networkOptions, + String requestorChallengeIndicator, + String transactionId, + Version version) { + this.aresTransStatus = aresTransStatus; + this.cryptogram = cryptogram; + this.electronicCommerceIndicator = electronicCommerceIndicator; + this.exemptionIndicator = exemptionIndicator; + this.extraParams = extraParams; + this.networkOptions = networkOptions; + this.requestorChallengeIndicator = requestorChallengeIndicator; + this.transactionId = transactionId; + this.version = version; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private AresTransStatus aresTransStatus; + + private String cryptogram; + + private ElectronicCommerceIndicator electronicCommerceIndicator; + + private ExemptionIndicator exemptionIndicator; + + private Map extraParams; + + private NetworkOptions networkOptions; + + private String requestorChallengeIndicator; + + private String transactionId; + + private Version version; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodOptions.Card.ThreeDSecure build() { + return new PaymentIntentCreateParams.PaymentMethodOptions.Card.ThreeDSecure( + this.aresTransStatus, + this.cryptogram, + this.electronicCommerceIndicator, + this.exemptionIndicator, + this.extraParams, + this.networkOptions, + this.requestorChallengeIndicator, + this.transactionId, + this.version); + } + + /** The {@code transStatus} returned from the card Issuer’s ACS in the ARes. */ + public Builder setAresTransStatus( + PaymentIntentCreateParams.PaymentMethodOptions.Card.ThreeDSecure.AresTransStatus + aresTransStatus) { + this.aresTransStatus = aresTransStatus; + return this; + } + + /** + * Required. The cryptogram, also known as the "authentication + * value" (AAV, CAVV or AEVV). This value is 20 bytes, base64-encoded into a + * 28-character string. (Most 3D Secure providers will return the base64-encoded version, + * which is what you should specify here.) + */ + public Builder setCryptogram(String cryptogram) { + this.cryptogram = cryptogram; + return this; + } + + /** + * The Electronic Commerce Indicator (ECI) is returned by your 3D Secure provider and + * indicates what degree of authentication was performed. + */ + public Builder setElectronicCommerceIndicator( + PaymentIntentCreateParams.PaymentMethodOptions.Card.ThreeDSecure + .ElectronicCommerceIndicator + electronicCommerceIndicator) { + this.electronicCommerceIndicator = electronicCommerceIndicator; + return this; + } + + /** The exemption requested via 3DS and accepted by the issuer at authentication time. */ + public Builder setExemptionIndicator( + PaymentIntentCreateParams.PaymentMethodOptions.Card.ThreeDSecure.ExemptionIndicator + exemptionIndicator) { + this.exemptionIndicator = exemptionIndicator; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Card.ThreeDSecure#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Card.ThreeDSecure#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Network specific 3DS fields. Network specific arguments require an explicit card brand + * choice. The parameter `payment_method_options.card.network`` must be populated + * accordingly + */ + public Builder setNetworkOptions( + PaymentIntentCreateParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions + networkOptions) { + this.networkOptions = networkOptions; + return this; + } + + /** + * The challenge indicator ({@code threeDSRequestorChallengeInd}) which was requested in + * the AReq sent to the card Issuer's ACS. A string containing 2 digits from 01-99. + */ + public Builder setRequestorChallengeIndicator(String requestorChallengeIndicator) { + this.requestorChallengeIndicator = requestorChallengeIndicator; + return this; + } + + /** + * Required. For 3D Secure 1, the XID. For 3D Secure 2, the Directory + * Server Transaction ID (dsTransID). + */ + public Builder setTransactionId(String transactionId) { + this.transactionId = transactionId; + return this; + } + + /** Required. The version of 3D Secure that was performed. */ + public Builder setVersion( + PaymentIntentCreateParams.PaymentMethodOptions.Card.ThreeDSecure.Version version) { + this.version = version; + return this; + } + } + + @Getter + public static class NetworkOptions { + /** Cartes Bancaires-specific 3DS fields. */ + @SerializedName("cartes_bancaires") + CartesBancaires cartesBancaires; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private NetworkOptions(CartesBancaires cartesBancaires, Map extraParams) { + this.cartesBancaires = cartesBancaires; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private CartesBancaires cartesBancaires; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions + build() { + return new PaymentIntentCreateParams.PaymentMethodOptions.Card.ThreeDSecure + .NetworkOptions(this.cartesBancaires, this.extraParams); + } + + /** Cartes Bancaires-specific 3DS fields. */ + public Builder setCartesBancaires( + PaymentIntentCreateParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions + .CartesBancaires + cartesBancaires) { + this.cartesBancaires = cartesBancaires; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + + @Getter + public static class CartesBancaires { + /** + * Required. The cryptogram calculation algorithm used by the card + * Issuer's ACS to calculate the Authentication cryptogram. Also known as {@code + * cavvAlgorithm}. messageExtension: CB-AVALGO + */ + @SerializedName("cb_avalgo") + CbAvalgo cbAvalgo; + + /** + * The exemption indicator returned from Cartes Bancaires in the ARes. message + * extension: CB-EXEMPTION; string (4 characters) This is a 3 byte bitmap (low + * significant byte first and most significant bit first) that has been Base64 encoded + */ + @SerializedName("cb_exemption") + String cbExemption; + + /** + * The risk score returned from Cartes Bancaires in the ARes. message extension: + * CB-SCORE; numeric value 0-99 + */ + @SerializedName("cb_score") + Long cbScore; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private CartesBancaires( + CbAvalgo cbAvalgo, + String cbExemption, + Long cbScore, + Map extraParams) { + this.cbAvalgo = cbAvalgo; + this.cbExemption = cbExemption; + this.cbScore = cbScore; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private CbAvalgo cbAvalgo; + + private String cbExemption; + + private Long cbScore; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions + .CartesBancaires + build() { + return new PaymentIntentCreateParams.PaymentMethodOptions.Card.ThreeDSecure + .NetworkOptions.CartesBancaires( + this.cbAvalgo, this.cbExemption, this.cbScore, this.extraParams); + } + + /** + * Required. The cryptogram calculation algorithm used by the card + * Issuer's ACS to calculate the Authentication cryptogram. Also known as {@code + * cavvAlgorithm}. messageExtension: CB-AVALGO + */ + public Builder setCbAvalgo( + PaymentIntentCreateParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions + .CartesBancaires.CbAvalgo + cbAvalgo) { + this.cbAvalgo = cbAvalgo; + return this; + } + + /** + * The exemption indicator returned from Cartes Bancaires in the ARes. message + * extension: CB-EXEMPTION; string (4 characters) This is a 3 byte bitmap (low + * significant byte first and most significant bit first) that has been Base64 encoded + */ + public Builder setCbExemption(String cbExemption) { + this.cbExemption = cbExemption; + return this; + } + + /** + * The risk score returned from Cartes Bancaires in the ARes. message extension: + * CB-SCORE; numeric value 0-99 + */ + public Builder setCbScore(Long cbScore) { + this.cbScore = cbScore; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions.CartesBancaires#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions.CartesBancaires#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + + public enum CbAvalgo implements ApiRequestParams.EnumParam { + @SerializedName("0") + N0("0"), + + @SerializedName("1") + N1("1"), + + @SerializedName("2") + N2("2"), + + @SerializedName("3") + N3("3"), + + @SerializedName("4") + N4("4"), + + @SerializedName("A") + A("A"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + CbAvalgo(String value) { + this.value = value; + } + } + } + } + + public enum AresTransStatus implements ApiRequestParams.EnumParam { + @SerializedName("A") + A("A"), + + @SerializedName("C") + C("C"), + + @SerializedName("I") + I("I"), + + @SerializedName("N") + N("N"), + + @SerializedName("R") + R("R"), + + @SerializedName("U") + U("U"), + + @SerializedName("Y") + Y("Y"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + AresTransStatus(String value) { + this.value = value; + } + } + + public enum ElectronicCommerceIndicator implements ApiRequestParams.EnumParam { + @SerializedName("01") + N01("01"), + + @SerializedName("02") + N02("02"), + + @SerializedName("05") + N05("05"), + + @SerializedName("06") + N06("06"), + + @SerializedName("07") + N07("07"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + ElectronicCommerceIndicator(String value) { + this.value = value; + } + } + + public enum ExemptionIndicator implements ApiRequestParams.EnumParam { + @SerializedName("low_risk") + LOW_RISK("low_risk"), + + @SerializedName("none") + NONE("none"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + ExemptionIndicator(String value) { + this.value = value; + } + } + + public enum Version implements ApiRequestParams.EnumParam { + @SerializedName("1.0.2") + N1__0__2("1.0.2"), + + @SerializedName("2.1.0") + N2__1__0("2.1.0"), + + @SerializedName("2.2.0") + N2__2__0("2.2.0"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Version(String value) { + this.value = value; + } + } + } + public enum CaptureMethod implements ApiRequestParams.EnumParam { @SerializedName("manual") MANUAL("manual"); diff --git a/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java b/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java index 1fcbb784e56..ca58403c422 100644 --- a/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java @@ -1753,13 +1753,13 @@ public static class Delivery { Mode mode; /** Details of the recipient. */ - @SerializedName("receipient") - Receipient receipient; + @SerializedName("recipient") + Recipient recipient; - private Delivery(Map extraParams, Mode mode, Receipient receipient) { + private Delivery(Map extraParams, Mode mode, Recipient recipient) { this.extraParams = extraParams; this.mode = mode; - this.receipient = receipient; + this.recipient = recipient; } public static Builder builder() { @@ -1771,12 +1771,12 @@ public static class Builder { private Mode mode; - private Receipient receipient; + private Recipient recipient; /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentUpdateParams.PaymentDetails.CarRental.Delivery build() { return new PaymentIntentUpdateParams.PaymentDetails.CarRental.Delivery( - this.extraParams, this.mode, this.receipient); + this.extraParams, this.mode, this.recipient); } /** @@ -1817,15 +1817,15 @@ public Builder setMode( } /** Details of the recipient. */ - public Builder setReceipient( - PaymentIntentUpdateParams.PaymentDetails.CarRental.Delivery.Receipient receipient) { - this.receipient = receipient; + public Builder setRecipient( + PaymentIntentUpdateParams.PaymentDetails.CarRental.Delivery.Recipient recipient) { + this.recipient = recipient; return this; } } @Getter - public static class Receipient { + public static class Recipient { /** The email of the recipient the ticket is delivered to. */ @SerializedName("email") Object email; @@ -1848,7 +1848,7 @@ public static class Receipient { @SerializedName("phone") Object phone; - private Receipient( + private Recipient( Object email, Map extraParams, Object name, Object phone) { this.email = email; this.extraParams = extraParams; @@ -1870,8 +1870,8 @@ public static class Builder { private Object phone; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentDetails.CarRental.Delivery.Receipient build() { - return new PaymentIntentUpdateParams.PaymentDetails.CarRental.Delivery.Receipient( + public PaymentIntentUpdateParams.PaymentDetails.CarRental.Delivery.Recipient build() { + return new PaymentIntentUpdateParams.PaymentDetails.CarRental.Delivery.Recipient( this.email, this.extraParams, this.name, this.phone); } @@ -1891,7 +1891,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.CarRental.Delivery.Receipient#extraParams} + * PaymentIntentUpdateParams.PaymentDetails.CarRental.Delivery.Recipient#extraParams} * for the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -1906,7 +1906,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.CarRental.Delivery.Receipient#extraParams} + * PaymentIntentUpdateParams.PaymentDetails.CarRental.Delivery.Recipient#extraParams} * for the field documentation. */ public Builder putAllExtraParam(Map map) { @@ -2992,13 +2992,13 @@ public static class Delivery { Mode mode; /** Details of the recipient. */ - @SerializedName("receipient") - Receipient receipient; + @SerializedName("recipient") + Recipient recipient; - private Delivery(Map extraParams, Mode mode, Receipient receipient) { + private Delivery(Map extraParams, Mode mode, Recipient recipient) { this.extraParams = extraParams; this.mode = mode; - this.receipient = receipient; + this.recipient = recipient; } public static Builder builder() { @@ -3010,12 +3010,12 @@ public static class Builder { private Mode mode; - private Receipient receipient; + private Recipient recipient; /** 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.receipient); + this.extraParams, this.mode, this.recipient); } /** @@ -3056,16 +3056,15 @@ public Builder setMode( } /** Details of the recipient. */ - public Builder setReceipient( - PaymentIntentUpdateParams.PaymentDetails.EventDetails.Delivery.Receipient - receipient) { - this.receipient = receipient; + public Builder setRecipient( + PaymentIntentUpdateParams.PaymentDetails.EventDetails.Delivery.Recipient recipient) { + this.recipient = recipient; return this; } } @Getter - public static class Receipient { + public static class Recipient { /** The email of the recipient the ticket is delivered to. */ @SerializedName("email") Object email; @@ -3088,7 +3087,7 @@ public static class Receipient { @SerializedName("phone") Object phone; - private Receipient( + private Recipient( Object email, Map extraParams, Object name, Object phone) { this.email = email; this.extraParams = extraParams; @@ -3110,9 +3109,9 @@ public static class Builder { private Object phone; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentDetails.EventDetails.Delivery.Receipient + public PaymentIntentUpdateParams.PaymentDetails.EventDetails.Delivery.Recipient build() { - return new PaymentIntentUpdateParams.PaymentDetails.EventDetails.Delivery.Receipient( + return new PaymentIntentUpdateParams.PaymentDetails.EventDetails.Delivery.Recipient( this.email, this.extraParams, this.name, this.phone); } @@ -3132,7 +3131,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.Receipient#extraParams} + * PaymentIntentUpdateParams.PaymentDetails.EventDetails.Delivery.Recipient#extraParams} * for the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -3147,7 +3146,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.Receipient#extraParams} + * PaymentIntentUpdateParams.PaymentDetails.EventDetails.Delivery.Recipient#extraParams} * for the field documentation. */ public Builder putAllExtraParam(Map map) { @@ -3567,13 +3566,13 @@ public static class Delivery { Mode mode; /** Details of the recipient. */ - @SerializedName("receipient") - Receipient receipient; + @SerializedName("recipient") + Recipient recipient; - private Delivery(Map extraParams, Mode mode, Receipient receipient) { + private Delivery(Map extraParams, Mode mode, Recipient recipient) { this.extraParams = extraParams; this.mode = mode; - this.receipient = receipient; + this.recipient = recipient; } public static Builder builder() { @@ -3585,12 +3584,12 @@ public static class Builder { private Mode mode; - private Receipient receipient; + 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.receipient); + this.extraParams, this.mode, this.recipient); } /** @@ -3629,15 +3628,15 @@ public Builder setMode( } /** Details of the recipient. */ - public Builder setReceipient( - PaymentIntentUpdateParams.PaymentDetails.Flight.Delivery.Receipient receipient) { - this.receipient = receipient; + public Builder setRecipient( + PaymentIntentUpdateParams.PaymentDetails.Flight.Delivery.Recipient recipient) { + this.recipient = recipient; return this; } } @Getter - public static class Receipient { + public static class Recipient { /** The email of the recipient the ticket is delivered to. */ @SerializedName("email") Object email; @@ -3660,7 +3659,7 @@ public static class Receipient { @SerializedName("phone") Object phone; - private Receipient( + private Recipient( Object email, Map extraParams, Object name, Object phone) { this.email = email; this.extraParams = extraParams; @@ -3682,8 +3681,8 @@ public static class Builder { private Object phone; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentDetails.Flight.Delivery.Receipient build() { - return new PaymentIntentUpdateParams.PaymentDetails.Flight.Delivery.Receipient( + public PaymentIntentUpdateParams.PaymentDetails.Flight.Delivery.Recipient build() { + return new PaymentIntentUpdateParams.PaymentDetails.Flight.Delivery.Recipient( this.email, this.extraParams, this.name, this.phone); } @@ -3703,7 +3702,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.Flight.Delivery.Receipient#extraParams} for + * PaymentIntentUpdateParams.PaymentDetails.Flight.Delivery.Recipient#extraParams} for * the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -3718,7 +3717,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.Flight.Delivery.Receipient#extraParams} for + * PaymentIntentUpdateParams.PaymentDetails.Flight.Delivery.Recipient#extraParams} for * the field documentation. */ public Builder putAllExtraParam(Map map) { @@ -4829,13 +4828,13 @@ public static class Delivery { Mode mode; /** Details of the recipient. */ - @SerializedName("receipient") - Receipient receipient; + @SerializedName("recipient") + Recipient recipient; - private Delivery(Map extraParams, Mode mode, Receipient receipient) { + private Delivery(Map extraParams, Mode mode, Recipient recipient) { this.extraParams = extraParams; this.mode = mode; - this.receipient = receipient; + this.recipient = recipient; } public static Builder builder() { @@ -4847,12 +4846,12 @@ public static class Builder { private Mode mode; - private Receipient receipient; + 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.receipient); + this.extraParams, this.mode, this.recipient); } /** @@ -4891,15 +4890,15 @@ public Builder setMode( } /** Details of the recipient. */ - public Builder setReceipient( - PaymentIntentUpdateParams.PaymentDetails.Lodging.Delivery.Receipient receipient) { - this.receipient = receipient; + public Builder setRecipient( + PaymentIntentUpdateParams.PaymentDetails.Lodging.Delivery.Recipient recipient) { + this.recipient = recipient; return this; } } @Getter - public static class Receipient { + public static class Recipient { /** The email of the recipient the ticket is delivered to. */ @SerializedName("email") Object email; @@ -4922,7 +4921,7 @@ public static class Receipient { @SerializedName("phone") Object phone; - private Receipient( + private Recipient( Object email, Map extraParams, Object name, Object phone) { this.email = email; this.extraParams = extraParams; @@ -4944,8 +4943,8 @@ public static class Builder { private Object phone; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentDetails.Lodging.Delivery.Receipient build() { - return new PaymentIntentUpdateParams.PaymentDetails.Lodging.Delivery.Receipient( + public PaymentIntentUpdateParams.PaymentDetails.Lodging.Delivery.Recipient build() { + return new PaymentIntentUpdateParams.PaymentDetails.Lodging.Delivery.Recipient( this.email, this.extraParams, this.name, this.phone); } @@ -4965,7 +4964,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.Lodging.Delivery.Receipient#extraParams} for + * PaymentIntentUpdateParams.PaymentDetails.Lodging.Delivery.Recipient#extraParams} for * the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -4980,7 +4979,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.Lodging.Delivery.Receipient#extraParams} for + * PaymentIntentUpdateParams.PaymentDetails.Lodging.Delivery.Recipient#extraParams} for * the field documentation. */ public Builder putAllExtraParam(Map map) { @@ -12572,6 +12571,13 @@ public static class Card { @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, @@ -12588,7 +12594,8 @@ private Card( ApiRequestParams.EnumParam setupFutureUsage, Object statementDescriptorSuffixKana, Object statementDescriptorSuffixKanji, - Object statementDetails) { + Object statementDetails, + ThreeDSecure threeDSecure) { this.captureMethod = captureMethod; this.cvcToken = cvcToken; this.extraParams = extraParams; @@ -12605,6 +12612,7 @@ private Card( this.statementDescriptorSuffixKana = statementDescriptorSuffixKana; this.statementDescriptorSuffixKanji = statementDescriptorSuffixKanji; this.statementDetails = statementDetails; + this.threeDSecure = threeDSecure; } public static Builder builder() { @@ -12644,6 +12652,8 @@ public static class Builder { private Object statementDetails; + private ThreeDSecure threeDSecure; + /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentUpdateParams.PaymentMethodOptions.Card build() { return new PaymentIntentUpdateParams.PaymentMethodOptions.Card( @@ -12662,7 +12672,8 @@ public PaymentIntentUpdateParams.PaymentMethodOptions.Card build() { this.setupFutureUsage, this.statementDescriptorSuffixKana, this.statementDescriptorSuffixKanji, - this.statementDetails); + this.statementDetails, + this.threeDSecure); } /** @@ -12963,6 +12974,16 @@ public Builder setStatementDetails(EmptyParam statementDetails) { this.statementDetails = statementDetails; return this; } + + /** + * If 3D Secure authentication was performed with a third-party provider, the authentication + * details to use for this payment. + */ + public Builder setThreeDSecure( + PaymentIntentUpdateParams.PaymentMethodOptions.Card.ThreeDSecure threeDSecure) { + this.threeDSecure = threeDSecure; + return this; + } } @Getter @@ -13854,6 +13875,597 @@ public Builder setState(EmptyParam state) { } } + @Getter + public static class ThreeDSecure { + /** The {@code transStatus} returned from the card Issuer’s ACS in the ARes. */ + @SerializedName("ares_trans_status") + AresTransStatus aresTransStatus; + + /** + * Required. The cryptogram, also known as the "authentication + * value" (AAV, CAVV or AEVV). This value is 20 bytes, base64-encoded into a + * 28-character string. (Most 3D Secure providers will return the base64-encoded version, + * which is what you should specify here.) + */ + @SerializedName("cryptogram") + Object cryptogram; + + /** + * The Electronic Commerce Indicator (ECI) is returned by your 3D Secure provider and + * indicates what degree of authentication was performed. + */ + @SerializedName("electronic_commerce_indicator") + ElectronicCommerceIndicator electronicCommerceIndicator; + + /** The exemption requested via 3DS and accepted by the issuer at authentication time. */ + @SerializedName("exemption_indicator") + ExemptionIndicator exemptionIndicator; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Network specific 3DS fields. Network specific arguments require an explicit card brand + * choice. The parameter `payment_method_options.card.network`` must be populated + * accordingly + */ + @SerializedName("network_options") + NetworkOptions networkOptions; + + /** + * 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; + + /** + * Required. For 3D Secure 1, the XID. For 3D Secure 2, the Directory + * Server Transaction ID (dsTransID). + */ + @SerializedName("transaction_id") + Object transactionId; + + /** Required. The version of 3D Secure that was performed. */ + @SerializedName("version") + Version version; + + 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 Builder builder() { + return new Builder(); + } + + public static class Builder { + private AresTransStatus aresTransStatus; + + private Object cryptogram; + + private ElectronicCommerceIndicator electronicCommerceIndicator; + + private ExemptionIndicator exemptionIndicator; + + private Map extraParams; + + private NetworkOptions networkOptions; + + private Object requestorChallengeIndicator; + + private Object transactionId; + + private Version version; + + /** 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 {@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; + } + + /** + * 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; + } + + /** + * Required. The cryptogram, also known as the "authentication + * value" (AAV, CAVV or AEVV). This value is 20 bytes, base64-encoded into a + * 28-character string. (Most 3D Secure providers will return the base64-encoded version, + * which is what you should specify here.) + */ + public Builder setCryptogram(EmptyParam cryptogram) { + this.cryptogram = cryptogram; + return this; + } + + /** + * The Electronic Commerce Indicator (ECI) is returned by your 3D Secure provider and + * indicates what degree of authentication was performed. + */ + public Builder setElectronicCommerceIndicator( + PaymentIntentUpdateParams.PaymentMethodOptions.Card.ThreeDSecure + .ElectronicCommerceIndicator + electronicCommerceIndicator) { + this.electronicCommerceIndicator = electronicCommerceIndicator; + return this; + } + + /** 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; + } + + /** + * Add a key/value pair to `extraParams` map. A map 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; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map 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; + } + + /** + * 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; + } + + /** + * 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; + } + + /** + * 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; + } + + /** + * Required. For 3D Secure 1, the XID. For 3D Secure 2, the Directory + * Server Transaction ID (dsTransID). + */ + public Builder setTransactionId(String transactionId) { + this.transactionId = transactionId; + return this; + } + + /** + * Required. 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; + } + + /** Required. The version of 3D Secure that was performed. */ + public Builder setVersion( + PaymentIntentUpdateParams.PaymentMethodOptions.Card.ThreeDSecure.Version version) { + this.version = version; + return this; + } + } + + @Getter + public static class NetworkOptions { + /** Cartes Bancaires-specific 3DS fields. */ + @SerializedName("cartes_bancaires") + CartesBancaires cartesBancaires; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private NetworkOptions(CartesBancaires cartesBancaires, Map extraParams) { + this.cartesBancaires = cartesBancaires; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private CartesBancaires cartesBancaires; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions + build() { + return new PaymentIntentUpdateParams.PaymentMethodOptions.Card.ThreeDSecure + .NetworkOptions(this.cartesBancaires, this.extraParams); + } + + /** Cartes Bancaires-specific 3DS fields. */ + public Builder setCartesBancaires( + PaymentIntentUpdateParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions + .CartesBancaires + cartesBancaires) { + this.cartesBancaires = cartesBancaires; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + + @Getter + public static class CartesBancaires { + /** + * Required. The cryptogram calculation algorithm used by the card + * Issuer's ACS to calculate the Authentication cryptogram. Also known as {@code + * cavvAlgorithm}. messageExtension: CB-AVALGO + */ + @SerializedName("cb_avalgo") + CbAvalgo cbAvalgo; + + /** + * The exemption indicator returned from Cartes Bancaires in the ARes. message + * extension: CB-EXEMPTION; string (4 characters) This is a 3 byte bitmap (low + * significant byte first and most significant bit first) that has been Base64 encoded + */ + @SerializedName("cb_exemption") + 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; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private CartesBancaires( + CbAvalgo cbAvalgo, + Object cbExemption, + Long cbScore, + Map extraParams) { + this.cbAvalgo = cbAvalgo; + this.cbExemption = cbExemption; + this.cbScore = cbScore; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private CbAvalgo cbAvalgo; + + private Object cbExemption; + + private Long cbScore; + + 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; + } + + /** + * 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; + } + + /** + * The risk score returned from Cartes Bancaires in the ARes. message extension: + * CB-SCORE; numeric value 0-99 + */ + public Builder setCbScore(Long cbScore) { + this.cbScore = cbScore; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * 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; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map 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; + } + } + + public enum CbAvalgo implements ApiRequestParams.EnumParam { + @SerializedName("0") + N0("0"), + + @SerializedName("1") + N1("1"), + + @SerializedName("2") + N2("2"), + + @SerializedName("3") + N3("3"), + + @SerializedName("4") + N4("4"), + + @SerializedName("A") + A("A"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + CbAvalgo(String value) { + this.value = value; + } + } + } + } + + public enum AresTransStatus implements ApiRequestParams.EnumParam { + @SerializedName("A") + A("A"), + + @SerializedName("C") + C("C"), + + @SerializedName("I") + I("I"), + + @SerializedName("N") + N("N"), + + @SerializedName("R") + R("R"), + + @SerializedName("U") + U("U"), + + @SerializedName("Y") + Y("Y"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + AresTransStatus(String value) { + this.value = value; + } + } + + public enum ElectronicCommerceIndicator implements ApiRequestParams.EnumParam { + @SerializedName("01") + N01("01"), + + @SerializedName("02") + N02("02"), + + @SerializedName("05") + N05("05"), + + @SerializedName("06") + N06("06"), + + @SerializedName("07") + N07("07"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + ElectronicCommerceIndicator(String value) { + this.value = value; + } + } + + public enum ExemptionIndicator implements ApiRequestParams.EnumParam { + @SerializedName("low_risk") + LOW_RISK("low_risk"), + + @SerializedName("none") + NONE("none"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + ExemptionIndicator(String value) { + this.value = value; + } + } + + public enum Version implements ApiRequestParams.EnumParam { + @SerializedName("1.0.2") + N1__0__2("1.0.2"), + + @SerializedName("2.1.0") + N2__1__0("2.1.0"), + + @SerializedName("2.2.0") + N2__2__0("2.2.0"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Version(String value) { + this.value = value; + } + } + } + public enum CaptureMethod implements ApiRequestParams.EnumParam { @SerializedName("manual") MANUAL("manual"); diff --git a/src/main/java/com/stripe/param/SetupIntentConfirmParams.java b/src/main/java/com/stripe/param/SetupIntentConfirmParams.java index 96e65189107..0e8594e75cf 100644 --- a/src/main/java/com/stripe/param/SetupIntentConfirmParams.java +++ b/src/main/java/com/stripe/param/SetupIntentConfirmParams.java @@ -5174,17 +5174,26 @@ public static class Card { @SerializedName("request_three_d_secure") RequestThreeDSecure requestThreeDSecure; + /** + * If 3D Secure authentication was performed with a third-party provider, the authentication + * details to use for this setup. + */ + @SerializedName("three_d_secure") + ThreeDSecure threeDSecure; + private Card( Map extraParams, MandateOptions mandateOptions, Boolean moto, Network network, - RequestThreeDSecure requestThreeDSecure) { + RequestThreeDSecure requestThreeDSecure, + ThreeDSecure threeDSecure) { this.extraParams = extraParams; this.mandateOptions = mandateOptions; this.moto = moto; this.network = network; this.requestThreeDSecure = requestThreeDSecure; + this.threeDSecure = threeDSecure; } public static Builder builder() { @@ -5202,6 +5211,8 @@ public static class Builder { private RequestThreeDSecure requestThreeDSecure; + private ThreeDSecure threeDSecure; + /** Finalize and obtain parameter instance from this builder. */ public SetupIntentConfirmParams.PaymentMethodOptions.Card build() { return new SetupIntentConfirmParams.PaymentMethodOptions.Card( @@ -5209,7 +5220,8 @@ public SetupIntentConfirmParams.PaymentMethodOptions.Card build() { this.mandateOptions, this.moto, this.network, - this.requestThreeDSecure); + this.requestThreeDSecure, + this.threeDSecure); } /** @@ -5284,6 +5296,16 @@ public Builder setRequestThreeDSecure( this.requestThreeDSecure = requestThreeDSecure; return this; } + + /** + * If 3D Secure authentication was performed with a third-party provider, the authentication + * details to use for this setup. + */ + public Builder setThreeDSecure( + SetupIntentConfirmParams.PaymentMethodOptions.Card.ThreeDSecure threeDSecure) { + this.threeDSecure = threeDSecure; + return this; + } } @Getter @@ -5638,6 +5660,525 @@ public enum SupportedType implements ApiRequestParams.EnumParam { } } + @Getter + public static class ThreeDSecure { + /** The {@code transStatus} returned from the card Issuer’s ACS in the ARes. */ + @SerializedName("ares_trans_status") + AresTransStatus aresTransStatus; + + /** + * The cryptogram, also known as the "authentication value" (AAV, CAVV or AEVV). + * This value is 20 bytes, base64-encoded into a 28-character string. (Most 3D Secure + * providers will return the base64-encoded version, which is what you should specify here.) + */ + @SerializedName("cryptogram") + String cryptogram; + + /** + * The Electronic Commerce Indicator (ECI) is returned by your 3D Secure provider and + * indicates what degree of authentication was performed. + */ + @SerializedName("electronic_commerce_indicator") + ElectronicCommerceIndicator electronicCommerceIndicator; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Network specific 3DS fields. Network specific arguments require an explicit card brand + * choice. The parameter `payment_method_options.card.network`` must be populated + * accordingly + */ + @SerializedName("network_options") + NetworkOptions networkOptions; + + /** + * The challenge indicator ({@code threeDSRequestorChallengeInd}) which was requested in the + * AReq sent to the card Issuer's ACS. A string containing 2 digits from 01-99. + */ + @SerializedName("requestor_challenge_indicator") + String requestorChallengeIndicator; + + /** + * For 3D Secure 1, the XID. For 3D Secure 2, the Directory Server Transaction ID + * (dsTransID). + */ + @SerializedName("transaction_id") + String transactionId; + + /** The version of 3D Secure that was performed. */ + @SerializedName("version") + Version version; + + private ThreeDSecure( + AresTransStatus aresTransStatus, + String cryptogram, + ElectronicCommerceIndicator electronicCommerceIndicator, + Map extraParams, + NetworkOptions networkOptions, + String requestorChallengeIndicator, + String transactionId, + Version version) { + this.aresTransStatus = aresTransStatus; + this.cryptogram = cryptogram; + this.electronicCommerceIndicator = electronicCommerceIndicator; + this.extraParams = extraParams; + this.networkOptions = networkOptions; + this.requestorChallengeIndicator = requestorChallengeIndicator; + this.transactionId = transactionId; + this.version = version; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private AresTransStatus aresTransStatus; + + private String cryptogram; + + private ElectronicCommerceIndicator electronicCommerceIndicator; + + private Map extraParams; + + private NetworkOptions networkOptions; + + private String requestorChallengeIndicator; + + private String transactionId; + + private Version version; + + /** Finalize and obtain parameter instance from this builder. */ + public SetupIntentConfirmParams.PaymentMethodOptions.Card.ThreeDSecure build() { + return new SetupIntentConfirmParams.PaymentMethodOptions.Card.ThreeDSecure( + this.aresTransStatus, + this.cryptogram, + this.electronicCommerceIndicator, + this.extraParams, + this.networkOptions, + this.requestorChallengeIndicator, + this.transactionId, + this.version); + } + + /** The {@code transStatus} returned from the card Issuer’s ACS in the ARes. */ + public Builder setAresTransStatus( + SetupIntentConfirmParams.PaymentMethodOptions.Card.ThreeDSecure.AresTransStatus + aresTransStatus) { + this.aresTransStatus = aresTransStatus; + return this; + } + + /** + * The cryptogram, also known as the "authentication value" (AAV, CAVV or AEVV). + * This value is 20 bytes, base64-encoded into a 28-character string. (Most 3D Secure + * providers will return the base64-encoded version, which is what you should specify + * here.) + */ + public Builder setCryptogram(String cryptogram) { + this.cryptogram = cryptogram; + return this; + } + + /** + * The Electronic Commerce Indicator (ECI) is returned by your 3D Secure provider and + * indicates what degree of authentication was performed. + */ + public Builder setElectronicCommerceIndicator( + SetupIntentConfirmParams.PaymentMethodOptions.Card.ThreeDSecure + .ElectronicCommerceIndicator + electronicCommerceIndicator) { + this.electronicCommerceIndicator = electronicCommerceIndicator; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * SetupIntentConfirmParams.PaymentMethodOptions.Card.ThreeDSecure#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * SetupIntentConfirmParams.PaymentMethodOptions.Card.ThreeDSecure#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Network specific 3DS fields. Network specific arguments require an explicit card brand + * choice. The parameter `payment_method_options.card.network`` must be populated + * accordingly + */ + public Builder setNetworkOptions( + SetupIntentConfirmParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions + networkOptions) { + this.networkOptions = networkOptions; + return this; + } + + /** + * The challenge indicator ({@code threeDSRequestorChallengeInd}) which was requested in + * the AReq sent to the card Issuer's ACS. A string containing 2 digits from 01-99. + */ + public Builder setRequestorChallengeIndicator(String requestorChallengeIndicator) { + this.requestorChallengeIndicator = requestorChallengeIndicator; + return this; + } + + /** + * For 3D Secure 1, the XID. For 3D Secure 2, the Directory Server Transaction ID + * (dsTransID). + */ + public Builder setTransactionId(String transactionId) { + this.transactionId = transactionId; + return this; + } + + /** The version of 3D Secure that was performed. */ + public Builder setVersion( + SetupIntentConfirmParams.PaymentMethodOptions.Card.ThreeDSecure.Version version) { + this.version = version; + return this; + } + } + + @Getter + public static class NetworkOptions { + /** Cartes Bancaires-specific 3DS fields. */ + @SerializedName("cartes_bancaires") + CartesBancaires cartesBancaires; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private NetworkOptions(CartesBancaires cartesBancaires, Map extraParams) { + this.cartesBancaires = cartesBancaires; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private CartesBancaires cartesBancaires; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public SetupIntentConfirmParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions + build() { + return new SetupIntentConfirmParams.PaymentMethodOptions.Card.ThreeDSecure + .NetworkOptions(this.cartesBancaires, this.extraParams); + } + + /** Cartes Bancaires-specific 3DS fields. */ + public Builder setCartesBancaires( + SetupIntentConfirmParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions + .CartesBancaires + cartesBancaires) { + this.cartesBancaires = cartesBancaires; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * SetupIntentConfirmParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * SetupIntentConfirmParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + + @Getter + public static class CartesBancaires { + /** + * Required. The cryptogram calculation algorithm used by the card + * Issuer's ACS to calculate the Authentication cryptogram. Also known as {@code + * cavvAlgorithm}. messageExtension: CB-AVALGO + */ + @SerializedName("cb_avalgo") + CbAvalgo cbAvalgo; + + /** + * The exemption indicator returned from Cartes Bancaires in the ARes. message + * extension: CB-EXEMPTION; string (4 characters) This is a 3 byte bitmap (low + * significant byte first and most significant bit first) that has been Base64 encoded + */ + @SerializedName("cb_exemption") + String cbExemption; + + /** + * The risk score returned from Cartes Bancaires in the ARes. message extension: + * CB-SCORE; numeric value 0-99 + */ + @SerializedName("cb_score") + Long cbScore; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private CartesBancaires( + CbAvalgo cbAvalgo, + String cbExemption, + Long cbScore, + Map extraParams) { + this.cbAvalgo = cbAvalgo; + this.cbExemption = cbExemption; + this.cbScore = cbScore; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private CbAvalgo cbAvalgo; + + private String cbExemption; + + private Long cbScore; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public SetupIntentConfirmParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions + .CartesBancaires + build() { + return new SetupIntentConfirmParams.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( + SetupIntentConfirmParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions + .CartesBancaires.CbAvalgo + cbAvalgo) { + this.cbAvalgo = cbAvalgo; + return this; + } + + /** + * The exemption indicator returned from Cartes Bancaires in the ARes. message + * extension: CB-EXEMPTION; string (4 characters) This is a 3 byte bitmap (low + * significant byte first and most significant bit first) that has been Base64 encoded + */ + public Builder setCbExemption(String cbExemption) { + this.cbExemption = cbExemption; + return this; + } + + /** + * The risk score returned from Cartes Bancaires in the ARes. message extension: + * CB-SCORE; numeric value 0-99 + */ + public Builder setCbScore(Long cbScore) { + this.cbScore = cbScore; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * SetupIntentConfirmParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions.CartesBancaires#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * SetupIntentConfirmParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions.CartesBancaires#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + + public enum CbAvalgo implements ApiRequestParams.EnumParam { + @SerializedName("0") + N0("0"), + + @SerializedName("1") + N1("1"), + + @SerializedName("2") + N2("2"), + + @SerializedName("3") + N3("3"), + + @SerializedName("4") + N4("4"), + + @SerializedName("A") + A("A"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + CbAvalgo(String value) { + this.value = value; + } + } + } + } + + public enum AresTransStatus implements ApiRequestParams.EnumParam { + @SerializedName("A") + A("A"), + + @SerializedName("C") + C("C"), + + @SerializedName("I") + I("I"), + + @SerializedName("N") + N("N"), + + @SerializedName("R") + R("R"), + + @SerializedName("U") + U("U"), + + @SerializedName("Y") + Y("Y"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + AresTransStatus(String value) { + this.value = value; + } + } + + public enum ElectronicCommerceIndicator implements ApiRequestParams.EnumParam { + @SerializedName("01") + N01("01"), + + @SerializedName("02") + N02("02"), + + @SerializedName("05") + N05("05"), + + @SerializedName("06") + N06("06"), + + @SerializedName("07") + N07("07"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + ElectronicCommerceIndicator(String value) { + this.value = value; + } + } + + public enum Version implements ApiRequestParams.EnumParam { + @SerializedName("1.0.2") + N1__0__2("1.0.2"), + + @SerializedName("2.1.0") + N2__1__0("2.1.0"), + + @SerializedName("2.2.0") + N2__2__0("2.2.0"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Version(String value) { + this.value = value; + } + } + } + public enum Network implements ApiRequestParams.EnumParam { @SerializedName("amex") AMEX("amex"), diff --git a/src/main/java/com/stripe/param/SetupIntentCreateParams.java b/src/main/java/com/stripe/param/SetupIntentCreateParams.java index f412e1a27ed..73937324545 100644 --- a/src/main/java/com/stripe/param/SetupIntentCreateParams.java +++ b/src/main/java/com/stripe/param/SetupIntentCreateParams.java @@ -5628,17 +5628,26 @@ public static class Card { @SerializedName("request_three_d_secure") RequestThreeDSecure requestThreeDSecure; + /** + * If 3D Secure authentication was performed with a third-party provider, the authentication + * details to use for this setup. + */ + @SerializedName("three_d_secure") + ThreeDSecure threeDSecure; + private Card( Map extraParams, MandateOptions mandateOptions, Boolean moto, Network network, - RequestThreeDSecure requestThreeDSecure) { + RequestThreeDSecure requestThreeDSecure, + ThreeDSecure threeDSecure) { this.extraParams = extraParams; this.mandateOptions = mandateOptions; this.moto = moto; this.network = network; this.requestThreeDSecure = requestThreeDSecure; + this.threeDSecure = threeDSecure; } public static Builder builder() { @@ -5656,6 +5665,8 @@ public static class Builder { private RequestThreeDSecure requestThreeDSecure; + private ThreeDSecure threeDSecure; + /** Finalize and obtain parameter instance from this builder. */ public SetupIntentCreateParams.PaymentMethodOptions.Card build() { return new SetupIntentCreateParams.PaymentMethodOptions.Card( @@ -5663,7 +5674,8 @@ public SetupIntentCreateParams.PaymentMethodOptions.Card build() { this.mandateOptions, this.moto, this.network, - this.requestThreeDSecure); + this.requestThreeDSecure, + this.threeDSecure); } /** @@ -5738,6 +5750,16 @@ public Builder setRequestThreeDSecure( this.requestThreeDSecure = requestThreeDSecure; return this; } + + /** + * If 3D Secure authentication was performed with a third-party provider, the authentication + * details to use for this setup. + */ + public Builder setThreeDSecure( + SetupIntentCreateParams.PaymentMethodOptions.Card.ThreeDSecure threeDSecure) { + this.threeDSecure = threeDSecure; + return this; + } } @Getter @@ -6092,6 +6114,525 @@ public enum SupportedType implements ApiRequestParams.EnumParam { } } + @Getter + public static class ThreeDSecure { + /** The {@code transStatus} returned from the card Issuer’s ACS in the ARes. */ + @SerializedName("ares_trans_status") + AresTransStatus aresTransStatus; + + /** + * The cryptogram, also known as the "authentication value" (AAV, CAVV or AEVV). + * This value is 20 bytes, base64-encoded into a 28-character string. (Most 3D Secure + * providers will return the base64-encoded version, which is what you should specify here.) + */ + @SerializedName("cryptogram") + String cryptogram; + + /** + * The Electronic Commerce Indicator (ECI) is returned by your 3D Secure provider and + * indicates what degree of authentication was performed. + */ + @SerializedName("electronic_commerce_indicator") + ElectronicCommerceIndicator electronicCommerceIndicator; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Network specific 3DS fields. Network specific arguments require an explicit card brand + * choice. The parameter `payment_method_options.card.network`` must be populated + * accordingly + */ + @SerializedName("network_options") + NetworkOptions networkOptions; + + /** + * The challenge indicator ({@code threeDSRequestorChallengeInd}) which was requested in the + * AReq sent to the card Issuer's ACS. A string containing 2 digits from 01-99. + */ + @SerializedName("requestor_challenge_indicator") + String requestorChallengeIndicator; + + /** + * For 3D Secure 1, the XID. For 3D Secure 2, the Directory Server Transaction ID + * (dsTransID). + */ + @SerializedName("transaction_id") + String transactionId; + + /** The version of 3D Secure that was performed. */ + @SerializedName("version") + Version version; + + private ThreeDSecure( + AresTransStatus aresTransStatus, + String cryptogram, + ElectronicCommerceIndicator electronicCommerceIndicator, + Map extraParams, + NetworkOptions networkOptions, + String requestorChallengeIndicator, + String transactionId, + Version version) { + this.aresTransStatus = aresTransStatus; + this.cryptogram = cryptogram; + this.electronicCommerceIndicator = electronicCommerceIndicator; + this.extraParams = extraParams; + this.networkOptions = networkOptions; + this.requestorChallengeIndicator = requestorChallengeIndicator; + this.transactionId = transactionId; + this.version = version; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private AresTransStatus aresTransStatus; + + private String cryptogram; + + private ElectronicCommerceIndicator electronicCommerceIndicator; + + private Map extraParams; + + private NetworkOptions networkOptions; + + private String requestorChallengeIndicator; + + private String transactionId; + + private Version version; + + /** Finalize and obtain parameter instance from this builder. */ + public SetupIntentCreateParams.PaymentMethodOptions.Card.ThreeDSecure build() { + return new SetupIntentCreateParams.PaymentMethodOptions.Card.ThreeDSecure( + this.aresTransStatus, + this.cryptogram, + this.electronicCommerceIndicator, + this.extraParams, + this.networkOptions, + this.requestorChallengeIndicator, + this.transactionId, + this.version); + } + + /** The {@code transStatus} returned from the card Issuer’s ACS in the ARes. */ + public Builder setAresTransStatus( + SetupIntentCreateParams.PaymentMethodOptions.Card.ThreeDSecure.AresTransStatus + aresTransStatus) { + this.aresTransStatus = aresTransStatus; + return this; + } + + /** + * The cryptogram, also known as the "authentication value" (AAV, CAVV or AEVV). + * This value is 20 bytes, base64-encoded into a 28-character string. (Most 3D Secure + * providers will return the base64-encoded version, which is what you should specify + * here.) + */ + public Builder setCryptogram(String cryptogram) { + this.cryptogram = cryptogram; + return this; + } + + /** + * The Electronic Commerce Indicator (ECI) is returned by your 3D Secure provider and + * indicates what degree of authentication was performed. + */ + public Builder setElectronicCommerceIndicator( + SetupIntentCreateParams.PaymentMethodOptions.Card.ThreeDSecure + .ElectronicCommerceIndicator + electronicCommerceIndicator) { + this.electronicCommerceIndicator = electronicCommerceIndicator; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * SetupIntentCreateParams.PaymentMethodOptions.Card.ThreeDSecure#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * SetupIntentCreateParams.PaymentMethodOptions.Card.ThreeDSecure#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Network specific 3DS fields. Network specific arguments require an explicit card brand + * choice. The parameter `payment_method_options.card.network`` must be populated + * accordingly + */ + public Builder setNetworkOptions( + SetupIntentCreateParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions + networkOptions) { + this.networkOptions = networkOptions; + return this; + } + + /** + * The challenge indicator ({@code threeDSRequestorChallengeInd}) which was requested in + * the AReq sent to the card Issuer's ACS. A string containing 2 digits from 01-99. + */ + public Builder setRequestorChallengeIndicator(String requestorChallengeIndicator) { + this.requestorChallengeIndicator = requestorChallengeIndicator; + return this; + } + + /** + * For 3D Secure 1, the XID. For 3D Secure 2, the Directory Server Transaction ID + * (dsTransID). + */ + public Builder setTransactionId(String transactionId) { + this.transactionId = transactionId; + return this; + } + + /** The version of 3D Secure that was performed. */ + public Builder setVersion( + SetupIntentCreateParams.PaymentMethodOptions.Card.ThreeDSecure.Version version) { + this.version = version; + return this; + } + } + + @Getter + public static class NetworkOptions { + /** Cartes Bancaires-specific 3DS fields. */ + @SerializedName("cartes_bancaires") + CartesBancaires cartesBancaires; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private NetworkOptions(CartesBancaires cartesBancaires, Map extraParams) { + this.cartesBancaires = cartesBancaires; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private CartesBancaires cartesBancaires; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public SetupIntentCreateParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions + build() { + return new SetupIntentCreateParams.PaymentMethodOptions.Card.ThreeDSecure + .NetworkOptions(this.cartesBancaires, this.extraParams); + } + + /** Cartes Bancaires-specific 3DS fields. */ + public Builder setCartesBancaires( + SetupIntentCreateParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions + .CartesBancaires + cartesBancaires) { + this.cartesBancaires = cartesBancaires; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * SetupIntentCreateParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * SetupIntentCreateParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + + @Getter + public static class CartesBancaires { + /** + * Required. The cryptogram calculation algorithm used by the card + * Issuer's ACS to calculate the Authentication cryptogram. Also known as {@code + * cavvAlgorithm}. messageExtension: CB-AVALGO + */ + @SerializedName("cb_avalgo") + CbAvalgo cbAvalgo; + + /** + * The exemption indicator returned from Cartes Bancaires in the ARes. message + * extension: CB-EXEMPTION; string (4 characters) This is a 3 byte bitmap (low + * significant byte first and most significant bit first) that has been Base64 encoded + */ + @SerializedName("cb_exemption") + String cbExemption; + + /** + * The risk score returned from Cartes Bancaires in the ARes. message extension: + * CB-SCORE; numeric value 0-99 + */ + @SerializedName("cb_score") + Long cbScore; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private CartesBancaires( + CbAvalgo cbAvalgo, + String cbExemption, + Long cbScore, + Map extraParams) { + this.cbAvalgo = cbAvalgo; + this.cbExemption = cbExemption; + this.cbScore = cbScore; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private CbAvalgo cbAvalgo; + + private String cbExemption; + + private Long cbScore; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public SetupIntentCreateParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions + .CartesBancaires + build() { + return new SetupIntentCreateParams.PaymentMethodOptions.Card.ThreeDSecure + .NetworkOptions.CartesBancaires( + this.cbAvalgo, this.cbExemption, this.cbScore, this.extraParams); + } + + /** + * Required. The cryptogram calculation algorithm used by the card + * Issuer's ACS to calculate the Authentication cryptogram. Also known as {@code + * cavvAlgorithm}. messageExtension: CB-AVALGO + */ + public Builder setCbAvalgo( + SetupIntentCreateParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions + .CartesBancaires.CbAvalgo + cbAvalgo) { + this.cbAvalgo = cbAvalgo; + return this; + } + + /** + * The exemption indicator returned from Cartes Bancaires in the ARes. message + * extension: CB-EXEMPTION; string (4 characters) This is a 3 byte bitmap (low + * significant byte first and most significant bit first) that has been Base64 encoded + */ + public Builder setCbExemption(String cbExemption) { + this.cbExemption = cbExemption; + return this; + } + + /** + * The risk score returned from Cartes Bancaires in the ARes. message extension: + * CB-SCORE; numeric value 0-99 + */ + public Builder setCbScore(Long cbScore) { + this.cbScore = cbScore; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * SetupIntentCreateParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions.CartesBancaires#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * SetupIntentCreateParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions.CartesBancaires#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + + public enum CbAvalgo implements ApiRequestParams.EnumParam { + @SerializedName("0") + N0("0"), + + @SerializedName("1") + N1("1"), + + @SerializedName("2") + N2("2"), + + @SerializedName("3") + N3("3"), + + @SerializedName("4") + N4("4"), + + @SerializedName("A") + A("A"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + CbAvalgo(String value) { + this.value = value; + } + } + } + } + + public enum AresTransStatus implements ApiRequestParams.EnumParam { + @SerializedName("A") + A("A"), + + @SerializedName("C") + C("C"), + + @SerializedName("I") + I("I"), + + @SerializedName("N") + N("N"), + + @SerializedName("R") + R("R"), + + @SerializedName("U") + U("U"), + + @SerializedName("Y") + Y("Y"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + AresTransStatus(String value) { + this.value = value; + } + } + + public enum ElectronicCommerceIndicator implements ApiRequestParams.EnumParam { + @SerializedName("01") + N01("01"), + + @SerializedName("02") + N02("02"), + + @SerializedName("05") + N05("05"), + + @SerializedName("06") + N06("06"), + + @SerializedName("07") + N07("07"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + ElectronicCommerceIndicator(String value) { + this.value = value; + } + } + + public enum Version implements ApiRequestParams.EnumParam { + @SerializedName("1.0.2") + N1__0__2("1.0.2"), + + @SerializedName("2.1.0") + N2__1__0("2.1.0"), + + @SerializedName("2.2.0") + N2__2__0("2.2.0"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Version(String value) { + this.value = value; + } + } + } + public enum Network implements ApiRequestParams.EnumParam { @SerializedName("amex") AMEX("amex"), diff --git a/src/main/java/com/stripe/param/SetupIntentUpdateParams.java b/src/main/java/com/stripe/param/SetupIntentUpdateParams.java index 7792ca3aa4b..20c4b191d01 100644 --- a/src/main/java/com/stripe/param/SetupIntentUpdateParams.java +++ b/src/main/java/com/stripe/param/SetupIntentUpdateParams.java @@ -5108,17 +5108,26 @@ public static class Card { @SerializedName("request_three_d_secure") RequestThreeDSecure requestThreeDSecure; + /** + * If 3D Secure authentication was performed with a third-party provider, the authentication + * details to use for this setup. + */ + @SerializedName("three_d_secure") + ThreeDSecure threeDSecure; + private Card( Map extraParams, MandateOptions mandateOptions, Boolean moto, Network network, - RequestThreeDSecure requestThreeDSecure) { + RequestThreeDSecure requestThreeDSecure, + ThreeDSecure threeDSecure) { this.extraParams = extraParams; this.mandateOptions = mandateOptions; this.moto = moto; this.network = network; this.requestThreeDSecure = requestThreeDSecure; + this.threeDSecure = threeDSecure; } public static Builder builder() { @@ -5136,6 +5145,8 @@ public static class Builder { private RequestThreeDSecure requestThreeDSecure; + private ThreeDSecure threeDSecure; + /** Finalize and obtain parameter instance from this builder. */ public SetupIntentUpdateParams.PaymentMethodOptions.Card build() { return new SetupIntentUpdateParams.PaymentMethodOptions.Card( @@ -5143,7 +5154,8 @@ public SetupIntentUpdateParams.PaymentMethodOptions.Card build() { this.mandateOptions, this.moto, this.network, - this.requestThreeDSecure); + this.requestThreeDSecure, + this.threeDSecure); } /** @@ -5218,6 +5230,16 @@ public Builder setRequestThreeDSecure( this.requestThreeDSecure = requestThreeDSecure; return this; } + + /** + * If 3D Secure authentication was performed with a third-party provider, the authentication + * details to use for this setup. + */ + public Builder setThreeDSecure( + SetupIntentUpdateParams.PaymentMethodOptions.Card.ThreeDSecure threeDSecure) { + this.threeDSecure = threeDSecure; + return this; + } } @Getter @@ -5598,6 +5620,564 @@ public enum SupportedType implements ApiRequestParams.EnumParam { } } + @Getter + public static class ThreeDSecure { + /** The {@code transStatus} returned from the card Issuer’s ACS in the ARes. */ + @SerializedName("ares_trans_status") + AresTransStatus aresTransStatus; + + /** + * The cryptogram, also known as the "authentication value" (AAV, CAVV or AEVV). + * This value is 20 bytes, base64-encoded into a 28-character string. (Most 3D Secure + * providers will return the base64-encoded version, which is what you should specify here.) + */ + @SerializedName("cryptogram") + Object cryptogram; + + /** + * The Electronic Commerce Indicator (ECI) is returned by your 3D Secure provider and + * indicates what degree of authentication was performed. + */ + @SerializedName("electronic_commerce_indicator") + ElectronicCommerceIndicator electronicCommerceIndicator; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Network specific 3DS fields. Network specific arguments require an explicit card brand + * choice. The parameter `payment_method_options.card.network`` must be populated + * accordingly + */ + @SerializedName("network_options") + NetworkOptions networkOptions; + + /** + * The challenge indicator ({@code threeDSRequestorChallengeInd}) which was requested in the + * AReq sent to the card Issuer's ACS. A string containing 2 digits from 01-99. + */ + @SerializedName("requestor_challenge_indicator") + Object requestorChallengeIndicator; + + /** + * For 3D Secure 1, the XID. For 3D Secure 2, the Directory Server Transaction ID + * (dsTransID). + */ + @SerializedName("transaction_id") + Object transactionId; + + /** The version of 3D Secure that was performed. */ + @SerializedName("version") + Version version; + + private ThreeDSecure( + AresTransStatus aresTransStatus, + Object cryptogram, + ElectronicCommerceIndicator electronicCommerceIndicator, + Map extraParams, + NetworkOptions networkOptions, + Object requestorChallengeIndicator, + Object transactionId, + Version version) { + this.aresTransStatus = aresTransStatus; + this.cryptogram = cryptogram; + this.electronicCommerceIndicator = electronicCommerceIndicator; + this.extraParams = extraParams; + this.networkOptions = networkOptions; + this.requestorChallengeIndicator = requestorChallengeIndicator; + this.transactionId = transactionId; + this.version = version; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private AresTransStatus aresTransStatus; + + private Object cryptogram; + + private ElectronicCommerceIndicator electronicCommerceIndicator; + + private Map extraParams; + + private NetworkOptions networkOptions; + + private Object requestorChallengeIndicator; + + private Object transactionId; + + private Version version; + + /** Finalize and obtain parameter instance from this builder. */ + public SetupIntentUpdateParams.PaymentMethodOptions.Card.ThreeDSecure build() { + return new SetupIntentUpdateParams.PaymentMethodOptions.Card.ThreeDSecure( + this.aresTransStatus, + this.cryptogram, + this.electronicCommerceIndicator, + this.extraParams, + this.networkOptions, + this.requestorChallengeIndicator, + this.transactionId, + this.version); + } + + /** The {@code transStatus} returned from the card Issuer’s ACS in the ARes. */ + public Builder setAresTransStatus( + SetupIntentUpdateParams.PaymentMethodOptions.Card.ThreeDSecure.AresTransStatus + aresTransStatus) { + this.aresTransStatus = aresTransStatus; + return this; + } + + /** + * The cryptogram, also known as the "authentication value" (AAV, CAVV or AEVV). + * This value is 20 bytes, base64-encoded into a 28-character string. (Most 3D Secure + * providers will return the base64-encoded version, which is what you should specify + * here.) + */ + public Builder setCryptogram(String cryptogram) { + this.cryptogram = cryptogram; + return this; + } + + /** + * The cryptogram, also known as the "authentication value" (AAV, CAVV or AEVV). + * This value is 20 bytes, base64-encoded into a 28-character string. (Most 3D Secure + * providers will return the base64-encoded version, which is what you should specify + * here.) + */ + public Builder setCryptogram(EmptyParam cryptogram) { + this.cryptogram = cryptogram; + return this; + } + + /** + * The Electronic Commerce Indicator (ECI) is returned by your 3D Secure provider and + * indicates what degree of authentication was performed. + */ + public Builder setElectronicCommerceIndicator( + SetupIntentUpdateParams.PaymentMethodOptions.Card.ThreeDSecure + .ElectronicCommerceIndicator + electronicCommerceIndicator) { + this.electronicCommerceIndicator = electronicCommerceIndicator; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * SetupIntentUpdateParams.PaymentMethodOptions.Card.ThreeDSecure#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * SetupIntentUpdateParams.PaymentMethodOptions.Card.ThreeDSecure#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Network specific 3DS fields. Network specific arguments require an explicit card brand + * choice. The parameter `payment_method_options.card.network`` must be populated + * accordingly + */ + public Builder setNetworkOptions( + SetupIntentUpdateParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions + networkOptions) { + this.networkOptions = networkOptions; + return this; + } + + /** + * The challenge indicator ({@code threeDSRequestorChallengeInd}) which was requested in + * the AReq sent to the card Issuer's ACS. A string containing 2 digits from 01-99. + */ + public Builder setRequestorChallengeIndicator(String requestorChallengeIndicator) { + this.requestorChallengeIndicator = requestorChallengeIndicator; + return this; + } + + /** + * 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; + } + + /** + * 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; + } + + /** + * 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; + } + + /** The version of 3D Secure that was performed. */ + public Builder setVersion( + SetupIntentUpdateParams.PaymentMethodOptions.Card.ThreeDSecure.Version version) { + this.version = version; + return this; + } + } + + @Getter + public static class NetworkOptions { + /** Cartes Bancaires-specific 3DS fields. */ + @SerializedName("cartes_bancaires") + CartesBancaires cartesBancaires; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private NetworkOptions(CartesBancaires cartesBancaires, Map extraParams) { + this.cartesBancaires = cartesBancaires; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private CartesBancaires cartesBancaires; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public SetupIntentUpdateParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions + build() { + return new SetupIntentUpdateParams.PaymentMethodOptions.Card.ThreeDSecure + .NetworkOptions(this.cartesBancaires, this.extraParams); + } + + /** Cartes Bancaires-specific 3DS fields. */ + public Builder setCartesBancaires( + SetupIntentUpdateParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions + .CartesBancaires + cartesBancaires) { + this.cartesBancaires = cartesBancaires; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * SetupIntentUpdateParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * SetupIntentUpdateParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + + @Getter + public static class CartesBancaires { + /** + * Required. The cryptogram calculation algorithm used by the card + * Issuer's ACS to calculate the Authentication cryptogram. Also known as {@code + * cavvAlgorithm}. messageExtension: CB-AVALGO + */ + @SerializedName("cb_avalgo") + CbAvalgo cbAvalgo; + + /** + * The exemption indicator returned from Cartes Bancaires in the ARes. message + * extension: CB-EXEMPTION; string (4 characters) This is a 3 byte bitmap (low + * significant byte first and most significant bit first) that has been Base64 encoded + */ + @SerializedName("cb_exemption") + 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; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private CartesBancaires( + CbAvalgo cbAvalgo, + Object cbExemption, + Long cbScore, + Map extraParams) { + this.cbAvalgo = cbAvalgo; + this.cbExemption = cbExemption; + this.cbScore = cbScore; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private CbAvalgo cbAvalgo; + + private Object cbExemption; + + private Long cbScore; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public SetupIntentUpdateParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions + .CartesBancaires + build() { + return new SetupIntentUpdateParams.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( + SetupIntentUpdateParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions + .CartesBancaires.CbAvalgo + cbAvalgo) { + this.cbAvalgo = cbAvalgo; + return this; + } + + /** + * The exemption indicator returned from Cartes Bancaires in the ARes. message + * extension: CB-EXEMPTION; string (4 characters) This is a 3 byte bitmap (low + * significant byte first and most significant bit first) that has been Base64 encoded + */ + public Builder setCbExemption(String cbExemption) { + this.cbExemption = cbExemption; + return this; + } + + /** + * The 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; + } + + /** + * The risk score returned from Cartes Bancaires in the ARes. message extension: + * CB-SCORE; numeric value 0-99 + */ + public Builder setCbScore(Long cbScore) { + this.cbScore = cbScore; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * SetupIntentUpdateParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions.CartesBancaires#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * SetupIntentUpdateParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions.CartesBancaires#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + + public enum CbAvalgo implements ApiRequestParams.EnumParam { + @SerializedName("0") + N0("0"), + + @SerializedName("1") + N1("1"), + + @SerializedName("2") + N2("2"), + + @SerializedName("3") + N3("3"), + + @SerializedName("4") + N4("4"), + + @SerializedName("A") + A("A"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + CbAvalgo(String value) { + this.value = value; + } + } + } + } + + public enum AresTransStatus implements ApiRequestParams.EnumParam { + @SerializedName("A") + A("A"), + + @SerializedName("C") + C("C"), + + @SerializedName("I") + I("I"), + + @SerializedName("N") + N("N"), + + @SerializedName("R") + R("R"), + + @SerializedName("U") + U("U"), + + @SerializedName("Y") + Y("Y"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + AresTransStatus(String value) { + this.value = value; + } + } + + public enum ElectronicCommerceIndicator implements ApiRequestParams.EnumParam { + @SerializedName("01") + N01("01"), + + @SerializedName("02") + N02("02"), + + @SerializedName("05") + N05("05"), + + @SerializedName("06") + N06("06"), + + @SerializedName("07") + N07("07"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + ElectronicCommerceIndicator(String value) { + this.value = value; + } + } + + public enum Version implements ApiRequestParams.EnumParam { + @SerializedName("1.0.2") + N1__0__2("1.0.2"), + + @SerializedName("2.1.0") + N2__1__0("2.1.0"), + + @SerializedName("2.2.0") + N2__2__0("2.2.0"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Version(String value) { + this.value = value; + } + } + } + public enum Network implements ApiRequestParams.EnumParam { @SerializedName("amex") AMEX("amex"), diff --git a/src/main/java/com/stripe/param/treasury/OutboundPaymentCreateParams.java b/src/main/java/com/stripe/param/treasury/OutboundPaymentCreateParams.java index d16c9977f7d..b97ae0fa082 100644 --- a/src/main/java/com/stripe/param/treasury/OutboundPaymentCreateParams.java +++ b/src/main/java/com/stripe/param/treasury/OutboundPaymentCreateParams.java @@ -86,8 +86,8 @@ public class OutboundPaymentCreateParams extends ApiRequestParams { /** * The description that appears on the receiving end for this OutboundPayment (for example, bank * statement for external bank transfer). Maximum 10 characters for {@code ach} payments, 140 - * characters for {@code wire} payments, or 500 characters for {@code stripe} network transfers. - * The default value is {@code payment}. + * characters for {@code us_domestic_wire} payments, or 500 characters for {@code stripe} network + * transfers. The default value is "payment". */ @SerializedName("statement_descriptor") String statementDescriptor; @@ -321,8 +321,8 @@ public Builder putAllMetadata(Map map) { /** * The description that appears on the receiving end for this OutboundPayment (for example, bank * statement for external bank transfer). Maximum 10 characters for {@code ach} payments, 140 - * characters for {@code wire} payments, or 500 characters for {@code stripe} network transfers. - * The default value is {@code payment}. + * characters for {@code us_domestic_wire} payments, or 500 characters for {@code stripe} + * network transfers. The default value is "payment". */ public Builder setStatementDescriptor(String statementDescriptor) { this.statementDescriptor = statementDescriptor; diff --git a/src/main/java/com/stripe/param/treasury/OutboundTransferCreateParams.java b/src/main/java/com/stripe/param/treasury/OutboundTransferCreateParams.java index fee2e399361..36d9b04d504 100644 --- a/src/main/java/com/stripe/param/treasury/OutboundTransferCreateParams.java +++ b/src/main/java/com/stripe/param/treasury/OutboundTransferCreateParams.java @@ -68,8 +68,8 @@ public class OutboundTransferCreateParams extends ApiRequestParams { /** * Statement descriptor to be shown on the receiving end of an OutboundTransfer. Maximum 10 - * characters for {@code ach} transfers or 140 characters for {@code wire} transfers. The default - * value is {@code transfer}. + * characters for {@code ach} transfers or 140 characters for {@code us_domestic_wire} transfers. + * The default value is "transfer". */ @SerializedName("statement_descriptor") String statementDescriptor; @@ -270,8 +270,8 @@ public Builder setNetworkDetails(OutboundTransferCreateParams.NetworkDetails net /** * Statement descriptor to be shown on the receiving end of an OutboundTransfer. Maximum 10 - * characters for {@code ach} transfers or 140 characters for {@code wire} transfers. The - * default value is {@code transfer}. + * characters for {@code ach} transfers or 140 characters for {@code us_domestic_wire} + * transfers. The default value is "transfer". */ public Builder setStatementDescriptor(String statementDescriptor) { this.statementDescriptor = statementDescriptor; diff --git a/src/main/java/com/stripe/service/PriceService.java b/src/main/java/com/stripe/service/PriceService.java index 074e0829c8b..ddc62c086cc 100644 --- a/src/main/java/com/stripe/service/PriceService.java +++ b/src/main/java/com/stripe/service/PriceService.java @@ -57,29 +57,33 @@ public StripeSearchResult search(PriceSearchParams params, RequestOptions ApiMode.V1); } /** - * Returns a list of your active prices. For the list of inactive prices, set {@code active} to - * false. + * Returns a list of your active prices, excluding inline prices. + * For the list of inactive prices, set {@code active} to false. */ public StripeCollection list(PriceListParams params) throws StripeException { return list(params, (RequestOptions) null); } /** - * Returns a list of your active prices. For the list of inactive prices, set {@code active} to - * false. + * Returns a list of your active prices, excluding inline prices. + * For the list of inactive prices, set {@code active} to false. */ public StripeCollection list(RequestOptions options) throws StripeException { return list((PriceListParams) null, options); } /** - * Returns a list of your active prices. For the list of inactive prices, set {@code active} to - * false. + * Returns a list of your active prices, excluding inline prices. + * For the list of inactive prices, set {@code active} to false. */ public StripeCollection list() throws StripeException { return list((PriceListParams) null, (RequestOptions) null); } /** - * Returns a list of your active prices. For the list of inactive prices, set {@code active} to - * false. + * Returns a list of your active prices, excluding inline prices. + * For the list of inactive prices, set {@code active} to false. */ public StripeCollection list(PriceListParams params, RequestOptions options) throws StripeException {