From fe88fbf876b76cd843ce06717e2a2b30cf3e9629 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 17 Nov 2023 18:13:38 +0000 Subject: [PATCH 1/9] Update generated code for v670 --- OPENAPI_VERSION | 2 +- src/main/java/com/stripe/model/Charge.java | 13 +++++++++++++ src/main/java/com/stripe/model/Event.java | 5 +++-- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index d491c28018d..189d7cacc5b 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v669 \ No newline at end of file +v670 \ 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..4b7cc9673f4 100644 --- a/src/main/java/com/stripe/model/Charge.java +++ b/src/main/java/com/stripe/model/Charge.java @@ -2123,6 +2123,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 +2147,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/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 From 8e0a82988a3994752e394d2913e5d884e1079507 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 17 Nov 2023 20:35:08 +0000 Subject: [PATCH 2/9] Update generated code for v671 --- OPENAPI_VERSION | 2 +- src/main/java/com/stripe/model/issuing/Authorization.java | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 189d7cacc5b..ec86c47e3b9 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v670 \ No newline at end of file +v671 \ No newline at end of file diff --git a/src/main/java/com/stripe/model/issuing/Authorization.java b/src/main/java/com/stripe/model/issuing/Authorization.java index ba38b80ea35..66f239fffe5 100644 --- a/src/main/java/com/stripe/model/issuing/Authorization.java +++ b/src/main/java/com/stripe/model/issuing/Authorization.java @@ -815,8 +815,9 @@ 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; From f73056144e9963437976a16fe2450b8277914d2f Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 17 Nov 2023 22:02:10 +0000 Subject: [PATCH 3/9] Update generated code for v672 --- OPENAPI_VERSION | 2 +- src/main/java/com/stripe/model/Price.java | 20 +++++++++++-------- .../java/com/stripe/service/PriceService.java | 20 +++++++++++-------- 3 files changed, 25 insertions(+), 17 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index ec86c47e3b9..d032b92122c 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v671 \ No newline at end of file +v672 \ No newline at end of file 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/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 { From c2d02067e5b9eff17e3254aba6af1d30b54d228f Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 17 Nov 2023 23:50:41 +0000 Subject: [PATCH 4/9] Update generated code for v673 --- OPENAPI_VERSION | 2 +- .../stripe/model/issuing/Authorization.java | 24 ++++++++++++------- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index d032b92122c..ce028ef169c 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v672 \ No newline at end of file +v673 \ No newline at end of file diff --git a/src/main/java/com/stripe/model/issuing/Authorization.java b/src/main/java/com/stripe/model/issuing/Authorization.java index 66f239fffe5..821d3cc6306 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; From 5f267ac5cf8bf82dbbff1f629047e78c3ffb8b9b Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Sat, 18 Nov 2023 01:08:30 +0000 Subject: [PATCH 5/9] Update generated code for v674 --- OPENAPI_VERSION | 2 +- .../stripe/model/issuing/Authorization.java | 35 +++++++++++++++++++ .../com/stripe/model/issuing/Transaction.java | 17 +++++++++ 3 files changed, 53 insertions(+), 1 deletion(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index ce028ef169c..663b86eff09 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v673 \ No newline at end of file +v674 \ No newline at end of file diff --git a/src/main/java/com/stripe/model/issuing/Authorization.java b/src/main/java/com/stripe/model/issuing/Authorization.java index 821d3cc6306..828b397b71f 100644 --- a/src/main/java/com/stripe/model/issuing/Authorization.java +++ b/src/main/java/com/stripe/model/issuing/Authorization.java @@ -680,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 @@ -731,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) @@ -809,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. @@ -830,6 +858,13 @@ public static class RequestHistory extends StripeObject { @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 From ac1efc16be8d184078e2611c1b334d36b3242879 Mon Sep 17 00:00:00 2001 From: "stripe-openapi[bot]" <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Tue, 21 Nov 2023 11:37:35 -0800 Subject: [PATCH 6/9] Update generated code (#1690) * Update generated code for v670 * Update generated code for v671 * Update generated code for v672 * Update generated code for v673 * Update generated code for v674 --------- Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> --- OPENAPI_VERSION | 2 +- src/main/java/com/stripe/model/Charge.java | 13 ++++ src/main/java/com/stripe/model/Event.java | 5 +- src/main/java/com/stripe/model/Price.java | 20 +++--- .../stripe/model/issuing/Authorization.java | 64 ++++++++++++++++--- .../com/stripe/model/issuing/Transaction.java | 17 +++++ .../java/com/stripe/service/PriceService.java | 20 +++--- 7 files changed, 112 insertions(+), 29 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index d491c28018d..663b86eff09 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v669 \ No newline at end of file +v674 \ 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 0e2732e0fc5..19abe5b5806 100644 --- a/src/main/java/com/stripe/model/Charge.java +++ b/src/main/java/com/stripe/model/Charge.java @@ -2123,6 +2123,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 +2147,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/Event.java b/src/main/java/com/stripe/model/Event.java index f64234e80a4..554964dddf7 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/Price.java b/src/main/java/com/stripe/model/Price.java index f987d44fbaa..fb20adcd350 100644 --- a/src/main/java/com/stripe/model/Price.java +++ b/src/main/java/com/stripe/model/Price.java @@ -255,16 +255,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 { @@ -281,16 +283,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/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/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 { From 0604f27070263ff40e84b803f9d194b498997ba4 Mon Sep 17 00:00:00 2001 From: Richard Marmorstein Date: Tue, 21 Nov 2023 12:09:24 -0800 Subject: [PATCH 7/9] Bump version to 24.4.0 --- CHANGELOG.md | 9 +++++++++ README.md | 8 ++++---- VERSION | 2 +- gradle.properties | 2 +- src/main/java/com/stripe/Stripe.java | 2 +- 5 files changed, 16 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ceb60a37b6c..5d40ddcbf38 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,15 @@ # Changelog +## 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.3.0 - 2023-11-16 * [#1685](https://github.com/stripe/stripe-java/pull/1685) Update generated code * Add support for `status` on `checkout.SessionListParams` diff --git a/README.md b/README.md index 2ce4224db39..3c5363745ec 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Stripe Java client library -[![Maven Central](https://img.shields.io/badge/maven--central-v24.3.0-blue)](https://mvnrepository.com/artifact/com.stripe/stripe-java) +[![Maven Central](https://img.shields.io/badge/maven--central-v24.4.0-blue)](https://mvnrepository.com/artifact/com.stripe/stripe-java) [![JavaDoc](http://img.shields.io/badge/javadoc-reference-blue.svg)](https://stripe.dev/stripe-java) [![Build Status](https://github.com/stripe/stripe-java/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/stripe/stripe-java/actions?query=branch%3Amaster) [![Coverage Status](https://coveralls.io/repos/github/stripe/stripe-java/badge.svg?branch=master)](https://coveralls.io/github/stripe/stripe-java?branch=master) @@ -18,7 +18,7 @@ The official [Stripe][stripe] Java client library. Add this dependency to your project's build file: ```groovy -implementation "com.stripe:stripe-java:24.3.0" +implementation "com.stripe:stripe-java:24.4.0" ``` ### Maven users @@ -29,7 +29,7 @@ Add this dependency to your project's POM: com.stripe stripe-java - 24.3.0 + 24.4.0 ``` @@ -37,7 +37,7 @@ Add this dependency to your project's POM: You'll need to manually install the following JARs: -- [The Stripe JAR](https://search.maven.org/remotecontent?filepath=com/stripe/stripe-java/24.3.0/stripe-java-24.3.0.jar) +- [The Stripe JAR](https://search.maven.org/remotecontent?filepath=com/stripe/stripe-java/24.4.0/stripe-java-24.4.0.jar) - [Google Gson][gson] from . ### [ProGuard][proguard] diff --git a/VERSION b/VERSION index e9a9b4514ef..ee3b4246d67 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -24.3.0 +24.4.0 diff --git a/gradle.properties b/gradle.properties index 0edaab368cf..36c6e65c8ab 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,5 @@ GROUP=com.stripe -VERSION_NAME=24.3.0 +VERSION_NAME=24.4.0 POM_URL=https://github.com/stripe/stripe-java POM_SCM_URL=git@github.com:stripe/stripe-java.git diff --git a/src/main/java/com/stripe/Stripe.java b/src/main/java/com/stripe/Stripe.java index 0f16a905b69..f2344011d61 100644 --- a/src/main/java/com/stripe/Stripe.java +++ b/src/main/java/com/stripe/Stripe.java @@ -13,7 +13,7 @@ public abstract class Stripe { public static final String CONNECT_API_BASE = "https://connect.stripe.com"; public static final String LIVE_API_BASE = "https://api.stripe.com"; public static final String UPLOAD_API_BASE = "https://files.stripe.com"; - public static final String VERSION = "24.3.0"; + public static final String VERSION = "24.4.0"; public static volatile String apiKey; public static volatile String clientId; From 90e3fbcdb247e4949a634efa38f0139d7e3bdfd8 Mon Sep 17 00:00:00 2001 From: "stripe-openapi[bot]" <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Tue, 21 Nov 2023 16:18:56 -0800 Subject: [PATCH 8/9] Update generated code for v681 (#1693) Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> --- OPENAPI_VERSION | 2 +- src/main/java/com/stripe/model/Charge.java | 31 + .../model/CustomerCashBalanceTransaction.java | 36 + src/main/java/com/stripe/model/Refund.java | 5 +- .../java/com/stripe/model/SetupAttempt.java | 16 + .../java/com/stripe/model/StripeError.java | 27 +- .../param/PaymentIntentConfirmParams.java | 578 +++++++++++++++- .../param/PaymentIntentCreateParams.java | 578 +++++++++++++++- .../param/PaymentIntentUpdateParams.java | 617 +++++++++++++++++- .../param/SetupIntentConfirmParams.java | 545 +++++++++++++++- .../stripe/param/SetupIntentCreateParams.java | 545 +++++++++++++++- .../stripe/param/SetupIntentUpdateParams.java | 584 ++++++++++++++++- .../treasury/OutboundPaymentCreateParams.java | 8 +- .../OutboundTransferCreateParams.java | 8 +- 14 files changed, 3543 insertions(+), 37 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 663b86eff09..5528f1cf80b 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v674 \ 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 19abe5b5806..55925122ffa 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. * 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/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 a3a3c5cf167..e2bd2a4890c 100644 --- a/src/main/java/com/stripe/model/StripeError.java +++ b/src/main/java/com/stripe/model/StripeError.java @@ -36,19 +36,20 @@ 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 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 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/param/PaymentIntentConfirmParams.java b/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java index af1399d14d0..a340d391e0f 100644 --- a/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java @@ -7717,6 +7717,13 @@ public static class Card { @SerializedName("statement_descriptor_suffix_kanji") Object statementDescriptorSuffixKanji; + /** + * 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, @@ -7732,7 +7739,8 @@ private Card( RequestThreeDSecure requestThreeDSecure, ApiRequestParams.EnumParam setupFutureUsage, Object statementDescriptorSuffixKana, - Object statementDescriptorSuffixKanji) { + Object statementDescriptorSuffixKanji, + ThreeDSecure threeDSecure) { this.captureMethod = captureMethod; this.cvcToken = cvcToken; this.extraParams = extraParams; @@ -7748,6 +7756,7 @@ private Card( this.setupFutureUsage = setupFutureUsage; this.statementDescriptorSuffixKana = statementDescriptorSuffixKana; this.statementDescriptorSuffixKanji = statementDescriptorSuffixKanji; + this.threeDSecure = threeDSecure; } public static Builder builder() { @@ -7785,6 +7794,8 @@ public static class Builder { private Object statementDescriptorSuffixKanji; + private ThreeDSecure threeDSecure; + /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentConfirmParams.PaymentMethodOptions.Card build() { return new PaymentIntentConfirmParams.PaymentMethodOptions.Card( @@ -7802,7 +7813,8 @@ public PaymentIntentConfirmParams.PaymentMethodOptions.Card build() { this.requestThreeDSecure, this.setupFutureUsage, this.statementDescriptorSuffixKana, - this.statementDescriptorSuffixKanji); + this.statementDescriptorSuffixKanji, + this.threeDSecure); } /** @@ -8075,6 +8087,16 @@ public Builder setStatementDescriptorSuffixKanji( this.statementDescriptorSuffixKanji = statementDescriptorSuffixKanji; 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 @@ -8659,6 +8681,558 @@ 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; + + /** + * 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 a752cdf5929..43431a8d90d 100644 --- a/src/main/java/com/stripe/param/PaymentIntentCreateParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentCreateParams.java @@ -8242,6 +8242,13 @@ public static class Card { @SerializedName("statement_descriptor_suffix_kanji") Object statementDescriptorSuffixKanji; + /** + * 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, @@ -8257,7 +8264,8 @@ private Card( RequestThreeDSecure requestThreeDSecure, ApiRequestParams.EnumParam setupFutureUsage, Object statementDescriptorSuffixKana, - Object statementDescriptorSuffixKanji) { + Object statementDescriptorSuffixKanji, + ThreeDSecure threeDSecure) { this.captureMethod = captureMethod; this.cvcToken = cvcToken; this.extraParams = extraParams; @@ -8273,6 +8281,7 @@ private Card( this.setupFutureUsage = setupFutureUsage; this.statementDescriptorSuffixKana = statementDescriptorSuffixKana; this.statementDescriptorSuffixKanji = statementDescriptorSuffixKanji; + this.threeDSecure = threeDSecure; } public static Builder builder() { @@ -8310,6 +8319,8 @@ public static class Builder { private Object statementDescriptorSuffixKanji; + private ThreeDSecure threeDSecure; + /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentCreateParams.PaymentMethodOptions.Card build() { return new PaymentIntentCreateParams.PaymentMethodOptions.Card( @@ -8327,7 +8338,8 @@ public PaymentIntentCreateParams.PaymentMethodOptions.Card build() { this.requestThreeDSecure, this.setupFutureUsage, this.statementDescriptorSuffixKana, - this.statementDescriptorSuffixKanji); + this.statementDescriptorSuffixKanji, + this.threeDSecure); } /** @@ -8599,6 +8611,16 @@ public Builder setStatementDescriptorSuffixKanji( this.statementDescriptorSuffixKanji = statementDescriptorSuffixKanji; 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 @@ -9181,6 +9203,558 @@ 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; + + /** + * 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 3a093262275..185f214534d 100644 --- a/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java @@ -7763,6 +7763,13 @@ public static class Card { @SerializedName("statement_descriptor_suffix_kanji") Object statementDescriptorSuffixKanji; + /** + * 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, @@ -7778,7 +7785,8 @@ private Card( RequestThreeDSecure requestThreeDSecure, ApiRequestParams.EnumParam setupFutureUsage, Object statementDescriptorSuffixKana, - Object statementDescriptorSuffixKanji) { + Object statementDescriptorSuffixKanji, + ThreeDSecure threeDSecure) { this.captureMethod = captureMethod; this.cvcToken = cvcToken; this.extraParams = extraParams; @@ -7794,6 +7802,7 @@ private Card( this.setupFutureUsage = setupFutureUsage; this.statementDescriptorSuffixKana = statementDescriptorSuffixKana; this.statementDescriptorSuffixKanji = statementDescriptorSuffixKanji; + this.threeDSecure = threeDSecure; } public static Builder builder() { @@ -7831,6 +7840,8 @@ public static class Builder { private Object statementDescriptorSuffixKanji; + private ThreeDSecure threeDSecure; + /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentUpdateParams.PaymentMethodOptions.Card build() { return new PaymentIntentUpdateParams.PaymentMethodOptions.Card( @@ -7848,7 +7859,8 @@ public PaymentIntentUpdateParams.PaymentMethodOptions.Card build() { this.requestThreeDSecure, this.setupFutureUsage, this.statementDescriptorSuffixKana, - this.statementDescriptorSuffixKanji); + this.statementDescriptorSuffixKanji, + this.threeDSecure); } /** @@ -8130,6 +8142,16 @@ public Builder setStatementDescriptorSuffixKanji( this.statementDescriptorSuffixKanji = statementDescriptorSuffixKanji; 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 @@ -8727,6 +8749,597 @@ 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; + + /** + * 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 94a5edcf002..e63af40b9c1 100644 --- a/src/main/java/com/stripe/param/SetupIntentConfirmParams.java +++ b/src/main/java/com/stripe/param/SetupIntentConfirmParams.java @@ -5148,17 +5148,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() { @@ -5176,6 +5185,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( @@ -5183,7 +5194,8 @@ public SetupIntentConfirmParams.PaymentMethodOptions.Card build() { this.mandateOptions, this.moto, this.network, - this.requestThreeDSecure); + this.requestThreeDSecure, + this.threeDSecure); } /** @@ -5258,6 +5270,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 @@ -5612,6 +5634,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 1c6b53fb3bf..8a4b9cc9b15 100644 --- a/src/main/java/com/stripe/param/SetupIntentCreateParams.java +++ b/src/main/java/com/stripe/param/SetupIntentCreateParams.java @@ -5602,17 +5602,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() { @@ -5630,6 +5639,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( @@ -5637,7 +5648,8 @@ public SetupIntentCreateParams.PaymentMethodOptions.Card build() { this.mandateOptions, this.moto, this.network, - this.requestThreeDSecure); + this.requestThreeDSecure, + this.threeDSecure); } /** @@ -5712,6 +5724,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 @@ -6066,6 +6088,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 6360a2293bb..e217dd51796 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 98a5cb9eff4..4d111b4365e 100644 --- a/src/main/java/com/stripe/param/treasury/OutboundTransferCreateParams.java +++ b/src/main/java/com/stripe/param/treasury/OutboundTransferCreateParams.java @@ -64,8 +64,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; @@ -255,8 +255,8 @@ public Builder putAllMetadata(Map map) { /** * 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; From 37e4deaf82de0ec91c53122d39f4da5fe3434c93 Mon Sep 17 00:00:00 2001 From: Richard Marmorstein Date: Tue, 21 Nov 2023 16:21:16 -0800 Subject: [PATCH 9/9] Bump version to 24.5.0 --- CHANGELOG.md | 5 +++++ README.md | 8 ++++---- VERSION | 2 +- gradle.properties | 2 +- src/main/java/com/stripe/Stripe.java | 2 +- 5 files changed, 12 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5d40ddcbf38..4fa5048b5b0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # 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 diff --git a/README.md b/README.md index 3c5363745ec..27adfc54f75 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Stripe Java client library -[![Maven Central](https://img.shields.io/badge/maven--central-v24.4.0-blue)](https://mvnrepository.com/artifact/com.stripe/stripe-java) +[![Maven Central](https://img.shields.io/badge/maven--central-v24.5.0-blue)](https://mvnrepository.com/artifact/com.stripe/stripe-java) [![JavaDoc](http://img.shields.io/badge/javadoc-reference-blue.svg)](https://stripe.dev/stripe-java) [![Build Status](https://github.com/stripe/stripe-java/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/stripe/stripe-java/actions?query=branch%3Amaster) [![Coverage Status](https://coveralls.io/repos/github/stripe/stripe-java/badge.svg?branch=master)](https://coveralls.io/github/stripe/stripe-java?branch=master) @@ -18,7 +18,7 @@ The official [Stripe][stripe] Java client library. Add this dependency to your project's build file: ```groovy -implementation "com.stripe:stripe-java:24.4.0" +implementation "com.stripe:stripe-java:24.5.0" ``` ### Maven users @@ -29,7 +29,7 @@ Add this dependency to your project's POM: com.stripe stripe-java - 24.4.0 + 24.5.0 ``` @@ -37,7 +37,7 @@ Add this dependency to your project's POM: You'll need to manually install the following JARs: -- [The Stripe JAR](https://search.maven.org/remotecontent?filepath=com/stripe/stripe-java/24.4.0/stripe-java-24.4.0.jar) +- [The Stripe JAR](https://search.maven.org/remotecontent?filepath=com/stripe/stripe-java/24.5.0/stripe-java-24.5.0.jar) - [Google Gson][gson] from . ### [ProGuard][proguard] diff --git a/VERSION b/VERSION index ee3b4246d67..341cb50613a 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -24.4.0 +24.5.0 diff --git a/gradle.properties b/gradle.properties index 36c6e65c8ab..27b76aa9993 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,5 @@ GROUP=com.stripe -VERSION_NAME=24.4.0 +VERSION_NAME=24.5.0 POM_URL=https://github.com/stripe/stripe-java POM_SCM_URL=git@github.com:stripe/stripe-java.git diff --git a/src/main/java/com/stripe/Stripe.java b/src/main/java/com/stripe/Stripe.java index f2344011d61..6e56c8911ad 100644 --- a/src/main/java/com/stripe/Stripe.java +++ b/src/main/java/com/stripe/Stripe.java @@ -13,7 +13,7 @@ public abstract class Stripe { public static final String CONNECT_API_BASE = "https://connect.stripe.com"; public static final String LIVE_API_BASE = "https://api.stripe.com"; public static final String UPLOAD_API_BASE = "https://files.stripe.com"; - public static final String VERSION = "24.4.0"; + public static final String VERSION = "24.5.0"; public static volatile String apiKey; public static volatile String clientId;