From a3b6fc8a1ed3e94aff3e55cdcbd977a4570c02cc Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Wed, 11 Mar 2026 16:16:46 +0000 Subject: [PATCH 01/13] Update generated code for v2191 and --- OPENAPI_VERSION | 2 +- src/main/java/com/stripe/StripeClient.java | 12 + .../stripe/model/EventDataClassLookup.java | 3 + .../stripe/model/PaymentAttemptRecord.java | 306 +++++++++ .../java/com/stripe/model/PaymentRecord.java | 35 + .../com/stripe/model/checkout/Session.java | 256 +++++++ .../model/orchestration/PaymentAttempt.java | 87 +++ .../com/stripe/model/tax/Registration.java | 27 +- ...ttemptRecordReportAuthenticatedParams.java | 180 +++++ ...mentAttemptRecordReportCanceledParams.java | 178 +++++ ...aymentAttemptRecordReportFailedParams.java | 216 ++++++ ...ntAttemptRecordReportGuaranteedParams.java | 179 +++++ ...ttemptRecordReportInformationalParams.java | 606 +++++++++++++++++ ...aymentAttemptRecordReportRefundParams.java | 628 ++++++++++++++++++ ...ordReportPaymentAttemptCanceledParams.java | 10 +- ...ecordReportPaymentAttemptFailedParams.java | 53 +- ...dReportPaymentAttemptGuaranteedParams.java | 10 +- ...ymentRecordReportPaymentAttemptParams.java | 40 +- .../PaymentRecordReportPaymentParams.java | 40 +- .../PaymentRecordReportRefundParams.java | 4 +- .../param/checkout/SessionApproveParams.java | 354 ++++++++++ .../param/checkout/SessionCreateParams.java | 46 ++ .../PaymentAttemptRetrieveParams.java | 100 +++ .../param/tax/RegistrationCreateParams.java | 100 +++ .../stripe/service/OrchestrationService.java | 15 + .../service/PaymentAttemptRecordService.java | 221 ++++++ .../stripe/service/PaymentRecordService.java | 37 ++ .../java/com/stripe/service/V1Services.java | 4 + .../service/checkout/SessionService.java | 25 + .../orchestration/PaymentAttemptService.java | 51 ++ 30 files changed, 3789 insertions(+), 36 deletions(-) create mode 100644 src/main/java/com/stripe/model/orchestration/PaymentAttempt.java create mode 100644 src/main/java/com/stripe/param/PaymentAttemptRecordReportAuthenticatedParams.java create mode 100644 src/main/java/com/stripe/param/PaymentAttemptRecordReportCanceledParams.java create mode 100644 src/main/java/com/stripe/param/PaymentAttemptRecordReportFailedParams.java create mode 100644 src/main/java/com/stripe/param/PaymentAttemptRecordReportGuaranteedParams.java create mode 100644 src/main/java/com/stripe/param/PaymentAttemptRecordReportInformationalParams.java create mode 100644 src/main/java/com/stripe/param/PaymentAttemptRecordReportRefundParams.java create mode 100644 src/main/java/com/stripe/param/checkout/SessionApproveParams.java create mode 100644 src/main/java/com/stripe/param/orchestration/PaymentAttemptRetrieveParams.java create mode 100644 src/main/java/com/stripe/service/OrchestrationService.java create mode 100644 src/main/java/com/stripe/service/orchestration/PaymentAttemptService.java diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 466b261db46..dceb4ec65df 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v2190 \ No newline at end of file +v2191 \ No newline at end of file diff --git a/src/main/java/com/stripe/StripeClient.java b/src/main/java/com/stripe/StripeClient.java index ed34024675b..6092c3c23cf 100644 --- a/src/main/java/com/stripe/StripeClient.java +++ b/src/main/java/com/stripe/StripeClient.java @@ -634,6 +634,18 @@ public com.stripe.service.MarginService margins() { return new com.stripe.service.MarginService(this.getResponseGetter()); } + /** + * @deprecated StripeClient.orchestration() is deprecated, use StripeClient.v1().orchestration() + * instead. All functionality under it has been copied over to + * StripeClient.v1().orchestration(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. + */ + @Deprecated + public com.stripe.service.OrchestrationService orchestration() { + return new com.stripe.service.OrchestrationService(this.getResponseGetter()); + } + /** * @deprecated StripeClient.orders() is deprecated, use StripeClient.v1().orders() instead. All * functionality under it has been copied over to StripeClient.v1().orders(). See ) null, (RequestOptions) null); + } + + /** Report that the specified Payment Attempt Record was authenticated. */ + public PaymentAttemptRecord reportAuthenticated(RequestOptions options) throws StripeException { + return reportAuthenticated((Map) null, options); + } + + /** Report that the specified Payment Attempt Record was authenticated. */ + public PaymentAttemptRecord reportAuthenticated(Map params) + throws StripeException { + return reportAuthenticated(params, (RequestOptions) null); + } + + /** Report that the specified Payment Attempt Record was authenticated. */ + public PaymentAttemptRecord reportAuthenticated( + Map params, RequestOptions options) throws StripeException { + String path = + String.format( + "/v1/payment_attempt_records/%s/report_authenticated", + ApiResource.urlEncodeId(this.getId())); + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, params, options); + return getResponseGetter().request(request, PaymentAttemptRecord.class); + } + + /** Report that the specified Payment Attempt Record was authenticated. */ + public PaymentAttemptRecord reportAuthenticated( + PaymentAttemptRecordReportAuthenticatedParams params) throws StripeException { + return reportAuthenticated(params, (RequestOptions) null); + } + + /** Report that the specified Payment Attempt Record was authenticated. */ + public PaymentAttemptRecord reportAuthenticated( + PaymentAttemptRecordReportAuthenticatedParams params, RequestOptions options) + throws StripeException { + String path = + String.format( + "/v1/payment_attempt_records/%s/report_authenticated", + ApiResource.urlEncodeId(this.getId())); + ApiResource.checkNullTypedParams(path, params); + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return getResponseGetter().request(request, PaymentAttemptRecord.class); + } + + /** Report that the specified Payment Attempt Record was canceled. */ + public PaymentAttemptRecord reportCanceled() throws StripeException { + return reportCanceled((Map) null, (RequestOptions) null); + } + + /** Report that the specified Payment Attempt Record was canceled. */ + public PaymentAttemptRecord reportCanceled(RequestOptions options) throws StripeException { + return reportCanceled((Map) null, options); + } + + /** Report that the specified Payment Attempt Record was canceled. */ + public PaymentAttemptRecord reportCanceled(Map params) throws StripeException { + return reportCanceled(params, (RequestOptions) null); + } + + /** Report that the specified Payment Attempt Record was canceled. */ + public PaymentAttemptRecord reportCanceled(Map params, RequestOptions options) + throws StripeException { + String path = + String.format( + "/v1/payment_attempt_records/%s/report_canceled", + ApiResource.urlEncodeId(this.getId())); + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, params, options); + return getResponseGetter().request(request, PaymentAttemptRecord.class); + } + + /** Report that the specified Payment Attempt Record was canceled. */ + public PaymentAttemptRecord reportCanceled(PaymentAttemptRecordReportCanceledParams params) + throws StripeException { + return reportCanceled(params, (RequestOptions) null); + } + + /** Report that the specified Payment Attempt Record was canceled. */ + public PaymentAttemptRecord reportCanceled( + PaymentAttemptRecordReportCanceledParams params, RequestOptions options) + throws StripeException { + String path = + String.format( + "/v1/payment_attempt_records/%s/report_canceled", + ApiResource.urlEncodeId(this.getId())); + ApiResource.checkNullTypedParams(path, params); + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return getResponseGetter().request(request, PaymentAttemptRecord.class); + } + + /** Report that the specified Payment Attempt Record failed. */ + public PaymentAttemptRecord reportFailed() throws StripeException { + return reportFailed((Map) null, (RequestOptions) null); + } + + /** Report that the specified Payment Attempt Record failed. */ + public PaymentAttemptRecord reportFailed(RequestOptions options) throws StripeException { + return reportFailed((Map) null, options); + } + + /** Report that the specified Payment Attempt Record failed. */ + public PaymentAttemptRecord reportFailed(Map params) throws StripeException { + return reportFailed(params, (RequestOptions) null); + } + + /** Report that the specified Payment Attempt Record failed. */ + public PaymentAttemptRecord reportFailed(Map params, RequestOptions options) + throws StripeException { + String path = + String.format( + "/v1/payment_attempt_records/%s/report_failed", ApiResource.urlEncodeId(this.getId())); + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, params, options); + return getResponseGetter().request(request, PaymentAttemptRecord.class); + } + + /** Report that the specified Payment Attempt Record failed. */ + public PaymentAttemptRecord reportFailed(PaymentAttemptRecordReportFailedParams params) + throws StripeException { + return reportFailed(params, (RequestOptions) null); + } + + /** Report that the specified Payment Attempt Record failed. */ + public PaymentAttemptRecord reportFailed( + PaymentAttemptRecordReportFailedParams params, RequestOptions options) + throws StripeException { + String path = + String.format( + "/v1/payment_attempt_records/%s/report_failed", ApiResource.urlEncodeId(this.getId())); + ApiResource.checkNullTypedParams(path, params); + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return getResponseGetter().request(request, PaymentAttemptRecord.class); + } + + /** Report that the specified Payment Attempt Record was guaranteed. */ + public PaymentAttemptRecord reportGuaranteed() throws StripeException { + return reportGuaranteed((Map) null, (RequestOptions) null); + } + + /** Report that the specified Payment Attempt Record was guaranteed. */ + public PaymentAttemptRecord reportGuaranteed(RequestOptions options) throws StripeException { + return reportGuaranteed((Map) null, options); + } + + /** Report that the specified Payment Attempt Record was guaranteed. */ + public PaymentAttemptRecord reportGuaranteed(Map params) throws StripeException { + return reportGuaranteed(params, (RequestOptions) null); + } + + /** Report that the specified Payment Attempt Record was guaranteed. */ + public PaymentAttemptRecord reportGuaranteed(Map params, RequestOptions options) + throws StripeException { + String path = + String.format( + "/v1/payment_attempt_records/%s/report_guaranteed", + ApiResource.urlEncodeId(this.getId())); + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, params, options); + return getResponseGetter().request(request, PaymentAttemptRecord.class); + } + + /** Report that the specified Payment Attempt Record was guaranteed. */ + public PaymentAttemptRecord reportGuaranteed(PaymentAttemptRecordReportGuaranteedParams params) + throws StripeException { + return reportGuaranteed(params, (RequestOptions) null); + } + + /** Report that the specified Payment Attempt Record was guaranteed. */ + public PaymentAttemptRecord reportGuaranteed( + PaymentAttemptRecordReportGuaranteedParams params, RequestOptions options) + throws StripeException { + String path = + String.format( + "/v1/payment_attempt_records/%s/report_guaranteed", + ApiResource.urlEncodeId(this.getId())); + ApiResource.checkNullTypedParams(path, params); + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return getResponseGetter().request(request, PaymentAttemptRecord.class); + } + + /** Report informational updates on the specified Payment Attempt Record. */ + public PaymentAttemptRecord reportInformational() throws StripeException { + return reportInformational((Map) null, (RequestOptions) null); + } + + /** Report informational updates on the specified Payment Attempt Record. */ + public PaymentAttemptRecord reportInformational(RequestOptions options) throws StripeException { + return reportInformational((Map) null, options); + } + + /** Report informational updates on the specified Payment Attempt Record. */ + public PaymentAttemptRecord reportInformational(Map params) + throws StripeException { + return reportInformational(params, (RequestOptions) null); + } + + /** Report informational updates on the specified Payment Attempt Record. */ + public PaymentAttemptRecord reportInformational( + Map params, RequestOptions options) throws StripeException { + String path = + String.format( + "/v1/payment_attempt_records/%s/report_informational", + ApiResource.urlEncodeId(this.getId())); + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, params, options); + return getResponseGetter().request(request, PaymentAttemptRecord.class); + } + + /** Report informational updates on the specified Payment Attempt Record. */ + public PaymentAttemptRecord reportInformational( + PaymentAttemptRecordReportInformationalParams params) throws StripeException { + return reportInformational(params, (RequestOptions) null); + } + + /** Report informational updates on the specified Payment Attempt Record. */ + public PaymentAttemptRecord reportInformational( + PaymentAttemptRecordReportInformationalParams params, RequestOptions options) + throws StripeException { + String path = + String.format( + "/v1/payment_attempt_records/%s/report_informational", + ApiResource.urlEncodeId(this.getId())); + ApiResource.checkNullTypedParams(path, params); + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return getResponseGetter().request(request, PaymentAttemptRecord.class); + } + + /** Report that the specified Payment Attempt Record was refunded. */ + public PaymentAttemptRecord reportRefund(Map params) throws StripeException { + return reportRefund(params, (RequestOptions) null); + } + + /** Report that the specified Payment Attempt Record was refunded. */ + public PaymentAttemptRecord reportRefund(Map params, RequestOptions options) + throws StripeException { + String path = + String.format( + "/v1/payment_attempt_records/%s/report_refund", ApiResource.urlEncodeId(this.getId())); + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, params, options); + return getResponseGetter().request(request, PaymentAttemptRecord.class); + } + + /** Report that the specified Payment Attempt Record was refunded. */ + public PaymentAttemptRecord reportRefund(PaymentAttemptRecordReportRefundParams params) + throws StripeException { + return reportRefund(params, (RequestOptions) null); + } + + /** Report that the specified Payment Attempt Record was refunded. */ + public PaymentAttemptRecord reportRefund( + PaymentAttemptRecordReportRefundParams params, RequestOptions options) + throws StripeException { + String path = + String.format( + "/v1/payment_attempt_records/%s/report_refund", ApiResource.urlEncodeId(this.getId())); + ApiResource.checkNullTypedParams(path, params); + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return getResponseGetter().request(request, PaymentAttemptRecord.class); + } + /** Retrieves a Payment Attempt Record with the given ID. */ public static PaymentAttemptRecord retrieve(String id) throws StripeException { return retrieve(id, (Map) null, (RequestOptions) null); diff --git a/src/main/java/com/stripe/model/PaymentRecord.java b/src/main/java/com/stripe/model/PaymentRecord.java index f6b686675e2..685007cc099 100644 --- a/src/main/java/com/stripe/model/PaymentRecord.java +++ b/src/main/java/com/stripe/model/PaymentRecord.java @@ -241,6 +241,16 @@ public PaymentRecord reportPaymentAttempt( return getResponseGetter().request(request, PaymentRecord.class); } + /** Report that the most recent payment attempt on the specified Payment Record was canceled. */ + public PaymentRecord reportPaymentAttemptCanceled() throws StripeException { + return reportPaymentAttemptCanceled((Map) null, (RequestOptions) null); + } + + /** Report that the most recent payment attempt on the specified Payment Record was canceled. */ + public PaymentRecord reportPaymentAttemptCanceled(RequestOptions options) throws StripeException { + return reportPaymentAttemptCanceled((Map) null, options); + } + /** Report that the most recent payment attempt on the specified Payment Record was canceled. */ public PaymentRecord reportPaymentAttemptCanceled(Map params) throws StripeException { @@ -284,6 +294,20 @@ public PaymentRecord reportPaymentAttemptCanceled( return getResponseGetter().request(request, PaymentRecord.class); } + /** + * Report that the most recent payment attempt on the specified Payment Record failed or errored. + */ + public PaymentRecord reportPaymentAttemptFailed() throws StripeException { + return reportPaymentAttemptFailed((Map) null, (RequestOptions) null); + } + + /** + * Report that the most recent payment attempt on the specified Payment Record failed or errored. + */ + public PaymentRecord reportPaymentAttemptFailed(RequestOptions options) throws StripeException { + return reportPaymentAttemptFailed((Map) null, options); + } + /** * Report that the most recent payment attempt on the specified Payment Record failed or errored. */ @@ -335,6 +359,17 @@ public PaymentRecord reportPaymentAttemptFailed( return getResponseGetter().request(request, PaymentRecord.class); } + /** Report that the most recent payment attempt on the specified Payment Record was guaranteed. */ + public PaymentRecord reportPaymentAttemptGuaranteed() throws StripeException { + return reportPaymentAttemptGuaranteed((Map) null, (RequestOptions) null); + } + + /** Report that the most recent payment attempt on the specified Payment Record was guaranteed. */ + public PaymentRecord reportPaymentAttemptGuaranteed(RequestOptions options) + throws StripeException { + return reportPaymentAttemptGuaranteed((Map) null, options); + } + /** Report that the most recent payment attempt on the specified Payment Record was guaranteed. */ public PaymentRecord reportPaymentAttemptGuaranteed(Map params) throws StripeException { diff --git a/src/main/java/com/stripe/model/checkout/Session.java b/src/main/java/com/stripe/model/checkout/Session.java index 01565a2a2cd..9cbc0bffc0d 100644 --- a/src/main/java/com/stripe/model/checkout/Session.java +++ b/src/main/java/com/stripe/model/checkout/Session.java @@ -26,6 +26,7 @@ import com.stripe.net.BaseAddress; import com.stripe.net.RequestOptions; import com.stripe.net.StripeResponseGetter; +import com.stripe.param.checkout.SessionApproveParams; import com.stripe.param.checkout.SessionCreateParams; import com.stripe.param.checkout.SessionExpireParams; import com.stripe.param.checkout.SessionListLineItemsParams; @@ -82,6 +83,20 @@ public class Session extends ApiResource implements HasId, MetadataStoreDefault is {@code auto}, when the customer's attempt to pay is approved automatically with + * no action required on your server. + * + *

When set to {@code manual}, you must approve the customer's attempt to pay by calling approve from your server. + * + *

One of {@code auto}, or {@code manual}. + */ + @SerializedName("approval_method") + String approvalMethod; + @SerializedName("automatic_tax") AutomaticTax automaticTax; @@ -158,6 +173,13 @@ public class Session extends ApiResource implements HasId, MetadataStore(expandableObject.getId(), expandableObject); } + /** + * Approves a customer’s attempt to pay for a Checkout Session with {@code approval_method} set to + * {@code manual}. + */ + public Session approve(Map params) throws StripeException { + return approve(params, (RequestOptions) null); + } + + /** + * Approves a customer’s attempt to pay for a Checkout Session with {@code approval_method} set to + * {@code manual}. + */ + public Session approve(Map params, RequestOptions options) + throws StripeException { + String path = + String.format("/v1/checkout/sessions/%s/approve", ApiResource.urlEncodeId(this.getId())); + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, params, options); + return getResponseGetter().request(request, Session.class); + } + + /** + * Approves a customer’s attempt to pay for a Checkout Session with {@code approval_method} set to + * {@code manual}. + */ + public Session approve(SessionApproveParams params) throws StripeException { + return approve(params, (RequestOptions) null); + } + + /** + * Approves a customer’s attempt to pay for a Checkout Session with {@code approval_method} set to + * {@code manual}. + */ + public Session approve(SessionApproveParams params, RequestOptions options) + throws StripeException { + String path = + String.format("/v1/checkout/sessions/%s/approve", ApiResource.urlEncodeId(this.getId())); + ApiResource.checkNullTypedParams(path, params); + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return getResponseGetter().request(request, Session.class); + } + /** Creates a Checkout Session object. */ public static Session create(Map params) throws StripeException { return create(params, (RequestOptions) null); @@ -1432,6 +1502,191 @@ public static class CurrencyConversion extends StripeObject { String sourceCurrency; } + /** + * For more details about CurrentAttempt, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class CurrentAttempt extends StripeObject implements HasId { + /** The customer's billing information, if provided. */ + @SerializedName("billing_details") + BillingDetails billingDetails; + + /** The customer's email. */ + @SerializedName("email") + String email; + + /** + * The attempt ID you will pass to the Checkout Session + * approve endpoint to approve the attempt. + */ + @Getter(onMethod_ = {@Override}) + @SerializedName("id") + String id; + + /** Information about the payment method the customer is attempting to pay with. */ + @SerializedName("payment_method_details") + PaymentMethodDetails paymentMethodDetails; + + /** The customer's phone number. */ + @SerializedName("phone") + String phone; + + /** The customer's shipping information, if provided. */ + @SerializedName("shipping_details") + ShippingDetails shippingDetails; + + /** + * For more details about BillingDetails, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class BillingDetails extends StripeObject { + @SerializedName("address") + Address address; + + /** Customer name. */ + @SerializedName("name") + String name; + } + + /** + * For more details about PaymentMethodDetails, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class PaymentMethodDetails extends StripeObject { + /** + * Indicates whether this payment method can be shown again to its customer in a checkout + * flow. + * + *

One of {@code always}, {@code limited}, or {@code unspecified}. + */ + @SerializedName("allow_redisplay") + String allowRedisplay; + + @SerializedName("card") + Card card; + + /** + * The type of payment method the customer is attempting to pay with. An additional hash is + * included in the payment method details with a name matching this value. It contains + * additional information specific to the payment method type. + */ + @SerializedName("type") + String type; + + /** + * For more details about Card, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Card extends StripeObject { + /** + * The brand of the card, accounting for customer's brand choice on dual-branded cards. + * + *

One of {@code accel}, {@code amex}, {@code carnet}, {@code cartes_bancaires}, {@code + * conecs}, {@code diners}, {@code discover}, {@code eftpos_au}, {@code elo}, {@code + * girocard}, {@code interac}, {@code jcb}, {@code link}, {@code maestro}, {@code + * mastercard}, {@code nyce}, {@code pulse}, {@code rupay}, {@code star}, {@code unionpay}, + * {@code unknown}, or {@code visa}. + */ + @SerializedName("brand") + String brand; + + /** + * Two-letter ISO code representing the country of the card. You could use this attribute to + * get a sense of the international breakdown of cards you've collected. + */ + @SerializedName("country") + String country; + + /** Two-digit number representing the card's expiration month. */ + @SerializedName("exp_month") + Long expMonth; + + /** Four-digit number representing the card's expiration year. */ + @SerializedName("exp_year") + Long expYear; + + /** + * Uniquely identifies this particular card number. You can use this attribute to check + * whether two customers who’ve signed up with you are using the same card number, for + * example. For payment methods that tokenize card information (Apple Pay, Google Pay), the + * tokenized number might be provided instead of the underlying card number. + * + *

As of May 1, 2021, card fingerprint in India for Connect changed to allow two + * fingerprints for the same card---one for India and one for the rest of the world. + */ + @SerializedName("fingerprint") + String fingerprint; + + /** + * Card funding type. Can be {@code credit}, {@code debit}, {@code prepaid}, or {@code + * unknown}. + */ + @SerializedName("funding") + String funding; + + /** + * Issuer identification number of the card. (For internal use only and not typically + * available in standard API requests.) + */ + @SerializedName("iin") + String iin; + + /** The last four digits of the card. */ + @SerializedName("last4") + String last4; + + /** If this Card is part of a card wallet, this contains the details of the card wallet. */ + @SerializedName("wallet") + Wallet wallet; + + /** + * For more details about Wallet, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Wallet extends StripeObject { + /** + * The type of the wallet, one of {@code amex_express_checkout}, {@code apple_pay}, {@code + * google_pay}, {@code masterpass}, {@code samsung_pay}, {@code visa_checkout}, {@code + * meta_pay}, or {@code link}. + */ + @SerializedName("type") + String type; + } + } + } + + /** + * For more details about ShippingDetails, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class ShippingDetails extends StripeObject { + @SerializedName("address") + Address address; + + /** Customer name. */ + @SerializedName("name") + String name; + } + } + /** * For more details about CustomField, please refer to the API Reference. @@ -4730,6 +4985,7 @@ public void setResponseGetter(StripeResponseGetter responseGetter) { trySetResponseGetter(consent, responseGetter); trySetResponseGetter(consentCollection, responseGetter); trySetResponseGetter(currencyConversion, responseGetter); + trySetResponseGetter(currentAttempt, responseGetter); trySetResponseGetter(customText, responseGetter); trySetResponseGetter(customer, responseGetter); trySetResponseGetter(customerDetails, responseGetter); diff --git a/src/main/java/com/stripe/model/orchestration/PaymentAttempt.java b/src/main/java/com/stripe/model/orchestration/PaymentAttempt.java new file mode 100644 index 00000000000..ba82c1ab212 --- /dev/null +++ b/src/main/java/com/stripe/model/orchestration/PaymentAttempt.java @@ -0,0 +1,87 @@ +// File generated from our OpenAPI spec +package com.stripe.model.orchestration; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.HasId; +import com.stripe.net.ApiRequest; +import com.stripe.net.ApiRequestParams; +import com.stripe.net.ApiResource; +import com.stripe.net.BaseAddress; +import com.stripe.net.RequestOptions; +import com.stripe.param.orchestration.PaymentAttemptRetrieveParams; +import java.util.Map; +import lombok.EqualsAndHashCode; +import lombok.Getter; +import lombok.Setter; + +/** Represents orchestration information for a payment attempt record (e.g. return url). */ +@Getter +@Setter +@EqualsAndHashCode(callSuper = false) +public class PaymentAttempt extends ApiResource implements HasId { + /** Unique identifier for the object. */ + @Getter(onMethod_ = {@Override}) + @SerializedName("id") + String id; + + /** + * If the object exists in live mode, the value is {@code true}. If the object exists in test + * mode, the value is {@code false}. + */ + @SerializedName("livemode") + Boolean livemode; + + /** + * String representing the object's type. Objects of the same type share the same value. + * + *

Equal to {@code orchestration.payment_attempt}. + */ + @SerializedName("object") + String object; + + /** If present, the return URL for this payment attempt. */ + @SerializedName("return_url") + String returnUrl; + + /** Retrieves orchestration information for the given payment attempt record (e.g. return url). */ + public static PaymentAttempt retrieve(String paymentAttemptRecord) throws StripeException { + return retrieve(paymentAttemptRecord, (Map) null, (RequestOptions) null); + } + + /** Retrieves orchestration information for the given payment attempt record (e.g. return url). */ + public static PaymentAttempt retrieve(String paymentAttemptRecord, RequestOptions options) + throws StripeException { + return retrieve(paymentAttemptRecord, (Map) null, options); + } + + /** Retrieves orchestration information for the given payment attempt record (e.g. return url). */ + public static PaymentAttempt retrieve( + String paymentAttemptRecord, Map params, RequestOptions options) + throws StripeException { + String path = + String.format( + "/v1/orchestration/payment_attempts/%s", ApiResource.urlEncodeId(paymentAttemptRecord)); + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.GET, path, params, options); + return getGlobalResponseGetter().request(request, PaymentAttempt.class); + } + + /** Retrieves orchestration information for the given payment attempt record (e.g. return url). */ + public static PaymentAttempt retrieve( + String paymentAttemptRecord, PaymentAttemptRetrieveParams params, RequestOptions options) + throws StripeException { + String path = + String.format( + "/v1/orchestration/payment_attempts/%s", ApiResource.urlEncodeId(paymentAttemptRecord)); + ApiResource.checkNullTypedParams(path, params); + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + path, + ApiRequestParams.paramsToMap(params), + options); + return getGlobalResponseGetter().request(request, PaymentAttempt.class); + } +} diff --git a/src/main/java/com/stripe/model/tax/Registration.java b/src/main/java/com/stripe/model/tax/Registration.java index c6b684df3f3..8546c0f8ca9 100644 --- a/src/main/java/com/stripe/model/tax/Registration.java +++ b/src/main/java/com/stripe/model/tax/Registration.java @@ -2895,6 +2895,9 @@ public static class Us extends StripeObject { @SerializedName("gross_receipts_tax") GrossReceiptsTax grossReceiptsTax; + @SerializedName("home_rule_tax") + HomeRuleTax homeRuleTax; + @SerializedName("hospitality_tax") HospitalityTax hospitalityTax; @@ -2927,9 +2930,10 @@ public static class Us extends StripeObject { * Type of registration in the US. * *

One of {@code admissions_tax}, {@code attendance_tax}, {@code entertainment_tax}, {@code - * gross_receipts_tax}, {@code hospitality_tax}, {@code local_amusement_tax}, {@code - * local_lease_tax}, {@code luxury_tax}, {@code resort_tax}, {@code state_communications_tax}, - * {@code state_retail_delivery_fee}, {@code state_sales_tax}, or {@code tourism_tax}. + * gross_receipts_tax}, {@code home_rule_tax}, {@code hospitality_tax}, {@code + * local_amusement_tax}, {@code local_lease_tax}, {@code luxury_tax}, {@code resort_tax}, + * {@code state_communications_tax}, {@code state_retail_delivery_fee}, {@code + * state_sales_tax}, or {@code tourism_tax}. */ @SerializedName("type") String type; @@ -3002,6 +3006,23 @@ public static class GrossReceiptsTax extends StripeObject { String jurisdiction; } + /** + * For more details about HomeRuleTax, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class HomeRuleTax extends StripeObject { + /** + * A jurisdiction + * code representing the local jurisdiction. + */ + @SerializedName("jurisdiction") + String jurisdiction; + } + /** * For more details about HospitalityTax, please refer to the API Reference. diff --git a/src/main/java/com/stripe/param/PaymentAttemptRecordReportAuthenticatedParams.java b/src/main/java/com/stripe/param/PaymentAttemptRecordReportAuthenticatedParams.java new file mode 100644 index 00000000000..90b00a720fe --- /dev/null +++ b/src/main/java/com/stripe/param/PaymentAttemptRecordReportAuthenticatedParams.java @@ -0,0 +1,180 @@ +// File generated from our OpenAPI spec +package com.stripe.param; + +import com.google.gson.annotations.SerializedName; +import com.stripe.net.ApiRequestParams; +import com.stripe.param.common.EmptyParam; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import lombok.EqualsAndHashCode; +import lombok.Getter; + +@Getter +@EqualsAndHashCode(callSuper = false) +public class PaymentAttemptRecordReportAuthenticatedParams extends ApiRequestParams { + /** When the reported payment was authenticated. Measured in seconds since the Unix epoch. */ + @SerializedName("authenticated_at") + Long authenticatedAt; + + /** Specifies which fields in the response should be expanded. */ + @SerializedName("expand") + List expand; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Set of key-value pairs that you can attach + * to an object. This can be useful for storing additional information about the object in a + * structured format. Individual keys can be unset by posting an empty value to them. All keys can + * be unset by posting an empty value to {@code metadata}. + */ + @SerializedName("metadata") + Object metadata; + + private PaymentAttemptRecordReportAuthenticatedParams( + Long authenticatedAt, List expand, Map extraParams, Object metadata) { + this.authenticatedAt = authenticatedAt; + this.expand = expand; + this.extraParams = extraParams; + this.metadata = metadata; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long authenticatedAt; + + private List expand; + + private Map extraParams; + + private Object metadata; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentAttemptRecordReportAuthenticatedParams build() { + return new PaymentAttemptRecordReportAuthenticatedParams( + this.authenticatedAt, this.expand, this.extraParams, this.metadata); + } + + /** When the reported payment was authenticated. Measured in seconds since the Unix epoch. */ + public Builder setAuthenticatedAt(Long authenticatedAt) { + this.authenticatedAt = authenticatedAt; + return this; + } + + /** + * Add an element to `expand` list. A list is initialized for the first `add/addAll` call, and + * subsequent calls adds additional elements to the original list. See {@link + * PaymentAttemptRecordReportAuthenticatedParams#expand} for the field documentation. + */ + public Builder addExpand(String element) { + if (this.expand == null) { + this.expand = new ArrayList<>(); + } + this.expand.add(element); + return this; + } + + /** + * Add all elements to `expand` list. A list is initialized for the first `add/addAll` call, and + * subsequent calls adds additional elements to the original list. See {@link + * PaymentAttemptRecordReportAuthenticatedParams#expand} for the field documentation. + */ + public Builder addAllExpand(List elements) { + if (this.expand == null) { + this.expand = new ArrayList<>(); + } + this.expand.addAll(elements); + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PaymentAttemptRecordReportAuthenticatedParams#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PaymentAttemptRecordReportAuthenticatedParams#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add a key/value pair to `metadata` map. A map is initialized for the first `put/putAll` call, + * and subsequent calls add additional key/value pairs to the original map. See {@link + * PaymentAttemptRecordReportAuthenticatedParams#metadata} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder putMetadata(String key, String value) { + if (this.metadata == null || this.metadata instanceof EmptyParam) { + this.metadata = new HashMap(); + } + ((Map) this.metadata).put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `metadata` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PaymentAttemptRecordReportAuthenticatedParams#metadata} for the field + * documentation. + */ + @SuppressWarnings("unchecked") + public Builder putAllMetadata(Map map) { + if (this.metadata == null || this.metadata instanceof EmptyParam) { + this.metadata = new HashMap(); + } + ((Map) this.metadata).putAll(map); + return this; + } + + /** + * Set of key-value pairs that you can attach + * to an object. This can be useful for storing additional information about the object in a + * structured format. Individual keys can be unset by posting an empty value to them. All keys + * can be unset by posting an empty value to {@code metadata}. + */ + public Builder setMetadata(EmptyParam metadata) { + this.metadata = metadata; + return this; + } + + /** + * Set of key-value pairs that you can attach + * to an object. This can be useful for storing additional information about the object in a + * structured format. Individual keys can be unset by posting an empty value to them. All keys + * can be unset by posting an empty value to {@code metadata}. + */ + public Builder setMetadata(Map metadata) { + this.metadata = metadata; + return this; + } + } +} diff --git a/src/main/java/com/stripe/param/PaymentAttemptRecordReportCanceledParams.java b/src/main/java/com/stripe/param/PaymentAttemptRecordReportCanceledParams.java new file mode 100644 index 00000000000..4dfdf8cd7fd --- /dev/null +++ b/src/main/java/com/stripe/param/PaymentAttemptRecordReportCanceledParams.java @@ -0,0 +1,178 @@ +// File generated from our OpenAPI spec +package com.stripe.param; + +import com.google.gson.annotations.SerializedName; +import com.stripe.net.ApiRequestParams; +import com.stripe.param.common.EmptyParam; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import lombok.EqualsAndHashCode; +import lombok.Getter; + +@Getter +@EqualsAndHashCode(callSuper = false) +public class PaymentAttemptRecordReportCanceledParams extends ApiRequestParams { + /** When the reported payment was canceled. Measured in seconds since the Unix epoch. */ + @SerializedName("canceled_at") + Long canceledAt; + + /** Specifies which fields in the response should be expanded. */ + @SerializedName("expand") + List expand; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Set of key-value pairs that you can attach + * to an object. This can be useful for storing additional information about the object in a + * structured format. Individual keys can be unset by posting an empty value to them. All keys can + * be unset by posting an empty value to {@code metadata}. + */ + @SerializedName("metadata") + Object metadata; + + private PaymentAttemptRecordReportCanceledParams( + Long canceledAt, List expand, Map extraParams, Object metadata) { + this.canceledAt = canceledAt; + this.expand = expand; + this.extraParams = extraParams; + this.metadata = metadata; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long canceledAt; + + private List expand; + + private Map extraParams; + + private Object metadata; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentAttemptRecordReportCanceledParams build() { + return new PaymentAttemptRecordReportCanceledParams( + this.canceledAt, this.expand, this.extraParams, this.metadata); + } + + /** When the reported payment was canceled. Measured in seconds since the Unix epoch. */ + public Builder setCanceledAt(Long canceledAt) { + this.canceledAt = canceledAt; + return this; + } + + /** + * Add an element to `expand` list. A list is initialized for the first `add/addAll` call, and + * subsequent calls adds additional elements to the original list. See {@link + * PaymentAttemptRecordReportCanceledParams#expand} for the field documentation. + */ + public Builder addExpand(String element) { + if (this.expand == null) { + this.expand = new ArrayList<>(); + } + this.expand.add(element); + return this; + } + + /** + * Add all elements to `expand` list. A list is initialized for the first `add/addAll` call, and + * subsequent calls adds additional elements to the original list. See {@link + * PaymentAttemptRecordReportCanceledParams#expand} for the field documentation. + */ + public Builder addAllExpand(List elements) { + if (this.expand == null) { + this.expand = new ArrayList<>(); + } + this.expand.addAll(elements); + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PaymentAttemptRecordReportCanceledParams#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PaymentAttemptRecordReportCanceledParams#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add a key/value pair to `metadata` map. A map is initialized for the first `put/putAll` call, + * and subsequent calls add additional key/value pairs to the original map. See {@link + * PaymentAttemptRecordReportCanceledParams#metadata} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder putMetadata(String key, String value) { + if (this.metadata == null || this.metadata instanceof EmptyParam) { + this.metadata = new HashMap(); + } + ((Map) this.metadata).put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `metadata` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PaymentAttemptRecordReportCanceledParams#metadata} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder putAllMetadata(Map map) { + if (this.metadata == null || this.metadata instanceof EmptyParam) { + this.metadata = new HashMap(); + } + ((Map) this.metadata).putAll(map); + return this; + } + + /** + * Set of key-value pairs that you can attach + * to an object. This can be useful for storing additional information about the object in a + * structured format. Individual keys can be unset by posting an empty value to them. All keys + * can be unset by posting an empty value to {@code metadata}. + */ + public Builder setMetadata(EmptyParam metadata) { + this.metadata = metadata; + return this; + } + + /** + * Set of key-value pairs that you can attach + * to an object. This can be useful for storing additional information about the object in a + * structured format. Individual keys can be unset by posting an empty value to them. All keys + * can be unset by posting an empty value to {@code metadata}. + */ + public Builder setMetadata(Map metadata) { + this.metadata = metadata; + return this; + } + } +} diff --git a/src/main/java/com/stripe/param/PaymentAttemptRecordReportFailedParams.java b/src/main/java/com/stripe/param/PaymentAttemptRecordReportFailedParams.java new file mode 100644 index 00000000000..5cdb21a6ed5 --- /dev/null +++ b/src/main/java/com/stripe/param/PaymentAttemptRecordReportFailedParams.java @@ -0,0 +1,216 @@ +// File generated from our OpenAPI spec +package com.stripe.param; + +import com.google.gson.annotations.SerializedName; +import com.stripe.net.ApiRequestParams; +import com.stripe.param.common.EmptyParam; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import lombok.EqualsAndHashCode; +import lombok.Getter; + +@Getter +@EqualsAndHashCode(callSuper = false) +public class PaymentAttemptRecordReportFailedParams extends ApiRequestParams { + /** Specifies which fields in the response should be expanded. */ + @SerializedName("expand") + List expand; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** When the reported payment failed. Measured in seconds since the Unix epoch. */ + @SerializedName("failed_at") + Long failedAt; + + /** + * The failure code for this payment attempt. Must be one of {@code + * payment_method_customer_decline} or {@code payment_method_provider_unknown_outcome}. + */ + @SerializedName("failure_code") + FailureCode failureCode; + + /** + * Set of key-value pairs that you can attach + * to an object. This can be useful for storing additional information about the object in a + * structured format. Individual keys can be unset by posting an empty value to them. All keys can + * be unset by posting an empty value to {@code metadata}. + */ + @SerializedName("metadata") + Object metadata; + + private PaymentAttemptRecordReportFailedParams( + List expand, + Map extraParams, + Long failedAt, + FailureCode failureCode, + Object metadata) { + this.expand = expand; + this.extraParams = extraParams; + this.failedAt = failedAt; + this.failureCode = failureCode; + this.metadata = metadata; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private List expand; + + private Map extraParams; + + private Long failedAt; + + private FailureCode failureCode; + + private Object metadata; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentAttemptRecordReportFailedParams build() { + return new PaymentAttemptRecordReportFailedParams( + this.expand, this.extraParams, this.failedAt, this.failureCode, this.metadata); + } + + /** + * Add an element to `expand` list. A list is initialized for the first `add/addAll` call, and + * subsequent calls adds additional elements to the original list. See {@link + * PaymentAttemptRecordReportFailedParams#expand} for the field documentation. + */ + public Builder addExpand(String element) { + if (this.expand == null) { + this.expand = new ArrayList<>(); + } + this.expand.add(element); + return this; + } + + /** + * Add all elements to `expand` list. A list is initialized for the first `add/addAll` call, and + * subsequent calls adds additional elements to the original list. See {@link + * PaymentAttemptRecordReportFailedParams#expand} for the field documentation. + */ + public Builder addAllExpand(List elements) { + if (this.expand == null) { + this.expand = new ArrayList<>(); + } + this.expand.addAll(elements); + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PaymentAttemptRecordReportFailedParams#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PaymentAttemptRecordReportFailedParams#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** When the reported payment failed. Measured in seconds since the Unix epoch. */ + public Builder setFailedAt(Long failedAt) { + this.failedAt = failedAt; + return this; + } + + /** + * The failure code for this payment attempt. Must be one of {@code + * payment_method_customer_decline} or {@code payment_method_provider_unknown_outcome}. + */ + public Builder setFailureCode(PaymentAttemptRecordReportFailedParams.FailureCode failureCode) { + this.failureCode = failureCode; + return this; + } + + /** + * Add a key/value pair to `metadata` map. A map is initialized for the first `put/putAll` call, + * and subsequent calls add additional key/value pairs to the original map. See {@link + * PaymentAttemptRecordReportFailedParams#metadata} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder putMetadata(String key, String value) { + if (this.metadata == null || this.metadata instanceof EmptyParam) { + this.metadata = new HashMap(); + } + ((Map) this.metadata).put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `metadata` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PaymentAttemptRecordReportFailedParams#metadata} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder putAllMetadata(Map map) { + if (this.metadata == null || this.metadata instanceof EmptyParam) { + this.metadata = new HashMap(); + } + ((Map) this.metadata).putAll(map); + return this; + } + + /** + * Set of key-value pairs that you can attach + * to an object. This can be useful for storing additional information about the object in a + * structured format. Individual keys can be unset by posting an empty value to them. All keys + * can be unset by posting an empty value to {@code metadata}. + */ + public Builder setMetadata(EmptyParam metadata) { + this.metadata = metadata; + return this; + } + + /** + * Set of key-value pairs that you can attach + * to an object. This can be useful for storing additional information about the object in a + * structured format. Individual keys can be unset by posting an empty value to them. All keys + * can be unset by posting an empty value to {@code metadata}. + */ + public Builder setMetadata(Map metadata) { + this.metadata = metadata; + return this; + } + } + + public enum FailureCode implements ApiRequestParams.EnumParam { + @SerializedName("payment_method_customer_decline") + PAYMENT_METHOD_CUSTOMER_DECLINE("payment_method_customer_decline"), + + @SerializedName("payment_method_provider_unknown_outcome") + PAYMENT_METHOD_PROVIDER_UNKNOWN_OUTCOME("payment_method_provider_unknown_outcome"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + FailureCode(String value) { + this.value = value; + } + } +} diff --git a/src/main/java/com/stripe/param/PaymentAttemptRecordReportGuaranteedParams.java b/src/main/java/com/stripe/param/PaymentAttemptRecordReportGuaranteedParams.java new file mode 100644 index 00000000000..62648e04445 --- /dev/null +++ b/src/main/java/com/stripe/param/PaymentAttemptRecordReportGuaranteedParams.java @@ -0,0 +1,179 @@ +// File generated from our OpenAPI spec +package com.stripe.param; + +import com.google.gson.annotations.SerializedName; +import com.stripe.net.ApiRequestParams; +import com.stripe.param.common.EmptyParam; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import lombok.EqualsAndHashCode; +import lombok.Getter; + +@Getter +@EqualsAndHashCode(callSuper = false) +public class PaymentAttemptRecordReportGuaranteedParams extends ApiRequestParams { + /** Specifies which fields in the response should be expanded. */ + @SerializedName("expand") + List expand; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** When the reported payment was guaranteed. Measured in seconds since the Unix epoch. */ + @SerializedName("guaranteed_at") + Long guaranteedAt; + + /** + * Set of key-value pairs that you can attach + * to an object. This can be useful for storing additional information about the object in a + * structured format. Individual keys can be unset by posting an empty value to them. All keys can + * be unset by posting an empty value to {@code metadata}. + */ + @SerializedName("metadata") + Object metadata; + + private PaymentAttemptRecordReportGuaranteedParams( + List expand, Map extraParams, Long guaranteedAt, Object metadata) { + this.expand = expand; + this.extraParams = extraParams; + this.guaranteedAt = guaranteedAt; + this.metadata = metadata; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private List expand; + + private Map extraParams; + + private Long guaranteedAt; + + private Object metadata; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentAttemptRecordReportGuaranteedParams build() { + return new PaymentAttemptRecordReportGuaranteedParams( + this.expand, this.extraParams, this.guaranteedAt, this.metadata); + } + + /** + * Add an element to `expand` list. A list is initialized for the first `add/addAll` call, and + * subsequent calls adds additional elements to the original list. See {@link + * PaymentAttemptRecordReportGuaranteedParams#expand} for the field documentation. + */ + public Builder addExpand(String element) { + if (this.expand == null) { + this.expand = new ArrayList<>(); + } + this.expand.add(element); + return this; + } + + /** + * Add all elements to `expand` list. A list is initialized for the first `add/addAll` call, and + * subsequent calls adds additional elements to the original list. See {@link + * PaymentAttemptRecordReportGuaranteedParams#expand} for the field documentation. + */ + public Builder addAllExpand(List elements) { + if (this.expand == null) { + this.expand = new ArrayList<>(); + } + this.expand.addAll(elements); + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PaymentAttemptRecordReportGuaranteedParams#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PaymentAttemptRecordReportGuaranteedParams#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** When the reported payment was guaranteed. Measured in seconds since the Unix epoch. */ + public Builder setGuaranteedAt(Long guaranteedAt) { + this.guaranteedAt = guaranteedAt; + return this; + } + + /** + * Add a key/value pair to `metadata` map. A map is initialized for the first `put/putAll` call, + * and subsequent calls add additional key/value pairs to the original map. See {@link + * PaymentAttemptRecordReportGuaranteedParams#metadata} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder putMetadata(String key, String value) { + if (this.metadata == null || this.metadata instanceof EmptyParam) { + this.metadata = new HashMap(); + } + ((Map) this.metadata).put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `metadata` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PaymentAttemptRecordReportGuaranteedParams#metadata} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder putAllMetadata(Map map) { + if (this.metadata == null || this.metadata instanceof EmptyParam) { + this.metadata = new HashMap(); + } + ((Map) this.metadata).putAll(map); + return this; + } + + /** + * Set of key-value pairs that you can attach + * to an object. This can be useful for storing additional information about the object in a + * structured format. Individual keys can be unset by posting an empty value to them. All keys + * can be unset by posting an empty value to {@code metadata}. + */ + public Builder setMetadata(EmptyParam metadata) { + this.metadata = metadata; + return this; + } + + /** + * Set of key-value pairs that you can attach + * to an object. This can be useful for storing additional information about the object in a + * structured format. Individual keys can be unset by posting an empty value to them. All keys + * can be unset by posting an empty value to {@code metadata}. + */ + public Builder setMetadata(Map metadata) { + this.metadata = metadata; + return this; + } + } +} diff --git a/src/main/java/com/stripe/param/PaymentAttemptRecordReportInformationalParams.java b/src/main/java/com/stripe/param/PaymentAttemptRecordReportInformationalParams.java new file mode 100644 index 00000000000..3e056e6fc89 --- /dev/null +++ b/src/main/java/com/stripe/param/PaymentAttemptRecordReportInformationalParams.java @@ -0,0 +1,606 @@ +// File generated from our OpenAPI spec +package com.stripe.param; + +import com.google.gson.annotations.SerializedName; +import com.stripe.net.ApiRequestParams; +import com.stripe.param.common.EmptyParam; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import lombok.EqualsAndHashCode; +import lombok.Getter; + +@Getter +@EqualsAndHashCode(callSuper = false) +public class PaymentAttemptRecordReportInformationalParams extends ApiRequestParams { + /** Customer information for this payment. */ + @SerializedName("customer_details") + CustomerDetails customerDetails; + + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + @SerializedName("description") + Object description; + + /** Specifies which fields in the response should be expanded. */ + @SerializedName("expand") + List expand; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Set of key-value pairs that you can attach + * to an object. This can be useful for storing additional information about the object in a + * structured format. Individual keys can be unset by posting an empty value to them. All keys can + * be unset by posting an empty value to {@code metadata}. + */ + @SerializedName("metadata") + Object metadata; + + /** Shipping information for this payment. */ + @SerializedName("shipping_details") + Object shippingDetails; + + private PaymentAttemptRecordReportInformationalParams( + CustomerDetails customerDetails, + Object description, + List expand, + Map extraParams, + Object metadata, + Object shippingDetails) { + this.customerDetails = customerDetails; + this.description = description; + this.expand = expand; + this.extraParams = extraParams; + this.metadata = metadata; + this.shippingDetails = shippingDetails; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private CustomerDetails customerDetails; + + private Object description; + + private List expand; + + private Map extraParams; + + private Object metadata; + + private Object shippingDetails; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentAttemptRecordReportInformationalParams build() { + return new PaymentAttemptRecordReportInformationalParams( + this.customerDetails, + this.description, + this.expand, + this.extraParams, + this.metadata, + this.shippingDetails); + } + + /** Customer information for this payment. */ + public Builder setCustomerDetails( + PaymentAttemptRecordReportInformationalParams.CustomerDetails customerDetails) { + this.customerDetails = customerDetails; + return this; + } + + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + public Builder setDescription(String description) { + this.description = description; + return this; + } + + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + public Builder setDescription(EmptyParam description) { + this.description = description; + return this; + } + + /** + * Add an element to `expand` list. A list is initialized for the first `add/addAll` call, and + * subsequent calls adds additional elements to the original list. See {@link + * PaymentAttemptRecordReportInformationalParams#expand} for the field documentation. + */ + public Builder addExpand(String element) { + if (this.expand == null) { + this.expand = new ArrayList<>(); + } + this.expand.add(element); + return this; + } + + /** + * Add all elements to `expand` list. A list is initialized for the first `add/addAll` call, and + * subsequent calls adds additional elements to the original list. See {@link + * PaymentAttemptRecordReportInformationalParams#expand} for the field documentation. + */ + public Builder addAllExpand(List elements) { + if (this.expand == null) { + this.expand = new ArrayList<>(); + } + this.expand.addAll(elements); + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PaymentAttemptRecordReportInformationalParams#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PaymentAttemptRecordReportInformationalParams#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add a key/value pair to `metadata` map. A map is initialized for the first `put/putAll` call, + * and subsequent calls add additional key/value pairs to the original map. See {@link + * PaymentAttemptRecordReportInformationalParams#metadata} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder putMetadata(String key, String value) { + if (this.metadata == null || this.metadata instanceof EmptyParam) { + this.metadata = new HashMap(); + } + ((Map) this.metadata).put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `metadata` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PaymentAttemptRecordReportInformationalParams#metadata} for the field + * documentation. + */ + @SuppressWarnings("unchecked") + public Builder putAllMetadata(Map map) { + if (this.metadata == null || this.metadata instanceof EmptyParam) { + this.metadata = new HashMap(); + } + ((Map) this.metadata).putAll(map); + return this; + } + + /** + * Set of key-value pairs that you can attach + * to an object. This can be useful for storing additional information about the object in a + * structured format. Individual keys can be unset by posting an empty value to them. All keys + * can be unset by posting an empty value to {@code metadata}. + */ + public Builder setMetadata(EmptyParam metadata) { + this.metadata = metadata; + return this; + } + + /** + * Set of key-value pairs that you can attach + * to an object. This can be useful for storing additional information about the object in a + * structured format. Individual keys can be unset by posting an empty value to them. All keys + * can be unset by posting an empty value to {@code metadata}. + */ + public Builder setMetadata(Map metadata) { + this.metadata = metadata; + return this; + } + + /** Shipping information for this payment. */ + public Builder setShippingDetails( + PaymentAttemptRecordReportInformationalParams.ShippingDetails shippingDetails) { + this.shippingDetails = shippingDetails; + return this; + } + + /** Shipping information for this payment. */ + public Builder setShippingDetails(EmptyParam shippingDetails) { + this.shippingDetails = shippingDetails; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class CustomerDetails { + /** The customer who made the payment. */ + @SerializedName("customer") + String customer; + + /** The customer's phone number. */ + @SerializedName("email") + String email; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The customer's name. */ + @SerializedName("name") + String name; + + /** The customer's phone number. */ + @SerializedName("phone") + String phone; + + private CustomerDetails( + String customer, String email, Map extraParams, String name, String phone) { + this.customer = customer; + this.email = email; + this.extraParams = extraParams; + this.name = name; + this.phone = phone; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String customer; + + private String email; + + private Map extraParams; + + private String name; + + private String phone; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentAttemptRecordReportInformationalParams.CustomerDetails build() { + return new PaymentAttemptRecordReportInformationalParams.CustomerDetails( + this.customer, this.email, this.extraParams, this.name, this.phone); + } + + /** The customer who made the payment. */ + public Builder setCustomer(String customer) { + this.customer = customer; + return this; + } + + /** The customer's phone number. */ + public Builder setEmail(String email) { + this.email = email; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PaymentAttemptRecordReportInformationalParams.CustomerDetails#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PaymentAttemptRecordReportInformationalParams.CustomerDetails#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The customer's name. */ + public Builder setName(String name) { + this.name = name; + return this; + } + + /** The customer's phone number. */ + public Builder setPhone(String phone) { + this.phone = phone; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class ShippingDetails { + /** The physical shipping address. */ + @SerializedName("address") + Address address; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The shipping recipient's name. */ + @SerializedName("name") + String name; + + /** The shipping recipient's phone number. */ + @SerializedName("phone") + String phone; + + private ShippingDetails( + Address address, Map extraParams, String name, String phone) { + this.address = address; + this.extraParams = extraParams; + this.name = name; + this.phone = phone; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Address address; + + private Map extraParams; + + private String name; + + private String phone; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentAttemptRecordReportInformationalParams.ShippingDetails build() { + return new PaymentAttemptRecordReportInformationalParams.ShippingDetails( + this.address, this.extraParams, this.name, this.phone); + } + + /** The physical shipping address. */ + public Builder setAddress( + PaymentAttemptRecordReportInformationalParams.ShippingDetails.Address address) { + this.address = address; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PaymentAttemptRecordReportInformationalParams.ShippingDetails#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PaymentAttemptRecordReportInformationalParams.ShippingDetails#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The shipping recipient's name. */ + public Builder setName(String name) { + this.name = name; + return this; + } + + /** The shipping recipient's phone number. */ + public Builder setPhone(String phone) { + this.phone = phone; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Address { + /** City, district, suburb, town, or village. */ + @SerializedName("city") + String city; + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + @SerializedName("country") + String country; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Address line 1, such as the street, PO Box, or company name. */ + @SerializedName("line1") + String line1; + + /** Address line 2, such as the apartment, suite, unit, or building. */ + @SerializedName("line2") + String line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + String postalCode; + + /** + * State, county, province, or region (ISO + * 3166-2). + */ + @SerializedName("state") + String state; + + private Address( + String city, + String country, + Map extraParams, + String line1, + String line2, + String postalCode, + String state) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.line1 = line1; + this.line2 = line2; + this.postalCode = postalCode; + this.state = state; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String city; + + private String country; + + private Map extraParams; + + private String line1; + + private String line2; + + private String postalCode; + + private String state; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentAttemptRecordReportInformationalParams.ShippingDetails.Address build() { + return new PaymentAttemptRecordReportInformationalParams.ShippingDetails.Address( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.state); + } + + /** City, district, suburb, town, or village. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + public Builder setCountry(String country) { + this.country = country; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentAttemptRecordReportInformationalParams.ShippingDetails.Address#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentAttemptRecordReportInformationalParams.ShippingDetails.Address#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Address line 1, such as the street, PO Box, or company name. */ + public Builder setLine1(String line1) { + this.line1 = line1; + return this; + } + + /** Address line 2, such as the apartment, suite, unit, or building. */ + public Builder setLine2(String line2) { + this.line2 = line2; + return this; + } + + /** ZIP or postal code. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** + * State, county, province, or region (ISO 3166-2). + */ + public Builder setState(String state) { + this.state = state; + return this; + } + } + } + } +} diff --git a/src/main/java/com/stripe/param/PaymentAttemptRecordReportRefundParams.java b/src/main/java/com/stripe/param/PaymentAttemptRecordReportRefundParams.java new file mode 100644 index 00000000000..4619c9197ae --- /dev/null +++ b/src/main/java/com/stripe/param/PaymentAttemptRecordReportRefundParams.java @@ -0,0 +1,628 @@ +// File generated from our OpenAPI spec +package com.stripe.param; + +import com.google.gson.annotations.SerializedName; +import com.stripe.net.ApiRequestParams; +import com.stripe.param.common.EmptyParam; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import lombok.EqualsAndHashCode; +import lombok.Getter; + +@Getter +@EqualsAndHashCode(callSuper = false) +public class PaymentAttemptRecordReportRefundParams extends ApiRequestParams { + /** + * A positive integer in the smallest + * currency unit representing how much of this payment to refund. Can refund only up to the + * remaining, unrefunded amount of the payment. + */ + @SerializedName("amount") + Amount amount; + + /** Specifies which fields in the response should be expanded. */ + @SerializedName("expand") + List expand; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** When the reported refund was initiated. Measured in seconds since the Unix epoch. */ + @SerializedName("initiated_at") + Long initiatedAt; + + /** + * Set of key-value pairs that you can attach + * to an object. This can be useful for storing additional information about the object in a + * structured format. Individual keys can be unset by posting an empty value to them. All keys can + * be unset by posting an empty value to {@code metadata}. + */ + @SerializedName("metadata") + Object metadata; + + /** Required. The outcome of the reported refund. */ + @SerializedName("outcome") + Outcome outcome; + + /** Required. Processor information for this refund. */ + @SerializedName("processor_details") + ProcessorDetails processorDetails; + + /** Information about the payment attempt refund. */ + @SerializedName("refunded") + Refunded refunded; + + private PaymentAttemptRecordReportRefundParams( + Amount amount, + List expand, + Map extraParams, + Long initiatedAt, + Object metadata, + Outcome outcome, + ProcessorDetails processorDetails, + Refunded refunded) { + this.amount = amount; + this.expand = expand; + this.extraParams = extraParams; + this.initiatedAt = initiatedAt; + this.metadata = metadata; + this.outcome = outcome; + this.processorDetails = processorDetails; + this.refunded = refunded; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Amount amount; + + private List expand; + + private Map extraParams; + + private Long initiatedAt; + + private Object metadata; + + private Outcome outcome; + + private ProcessorDetails processorDetails; + + private Refunded refunded; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentAttemptRecordReportRefundParams build() { + return new PaymentAttemptRecordReportRefundParams( + this.amount, + this.expand, + this.extraParams, + this.initiatedAt, + this.metadata, + this.outcome, + this.processorDetails, + this.refunded); + } + + /** + * A positive integer in the smallest + * currency unit representing how much of this payment to refund. Can refund only up to the + * remaining, unrefunded amount of the payment. + */ + public Builder setAmount(PaymentAttemptRecordReportRefundParams.Amount amount) { + this.amount = amount; + return this; + } + + /** + * Add an element to `expand` list. A list is initialized for the first `add/addAll` call, and + * subsequent calls adds additional elements to the original list. See {@link + * PaymentAttemptRecordReportRefundParams#expand} for the field documentation. + */ + public Builder addExpand(String element) { + if (this.expand == null) { + this.expand = new ArrayList<>(); + } + this.expand.add(element); + return this; + } + + /** + * Add all elements to `expand` list. A list is initialized for the first `add/addAll` call, and + * subsequent calls adds additional elements to the original list. See {@link + * PaymentAttemptRecordReportRefundParams#expand} for the field documentation. + */ + public Builder addAllExpand(List elements) { + if (this.expand == null) { + this.expand = new ArrayList<>(); + } + this.expand.addAll(elements); + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PaymentAttemptRecordReportRefundParams#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PaymentAttemptRecordReportRefundParams#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** When the reported refund was initiated. Measured in seconds since the Unix epoch. */ + public Builder setInitiatedAt(Long initiatedAt) { + this.initiatedAt = initiatedAt; + return this; + } + + /** + * Add a key/value pair to `metadata` map. A map is initialized for the first `put/putAll` call, + * and subsequent calls add additional key/value pairs to the original map. See {@link + * PaymentAttemptRecordReportRefundParams#metadata} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder putMetadata(String key, String value) { + if (this.metadata == null || this.metadata instanceof EmptyParam) { + this.metadata = new HashMap(); + } + ((Map) this.metadata).put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `metadata` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PaymentAttemptRecordReportRefundParams#metadata} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder putAllMetadata(Map map) { + if (this.metadata == null || this.metadata instanceof EmptyParam) { + this.metadata = new HashMap(); + } + ((Map) this.metadata).putAll(map); + return this; + } + + /** + * Set of key-value pairs that you can attach + * to an object. This can be useful for storing additional information about the object in a + * structured format. Individual keys can be unset by posting an empty value to them. All keys + * can be unset by posting an empty value to {@code metadata}. + */ + public Builder setMetadata(EmptyParam metadata) { + this.metadata = metadata; + return this; + } + + /** + * Set of key-value pairs that you can attach + * to an object. This can be useful for storing additional information about the object in a + * structured format. Individual keys can be unset by posting an empty value to them. All keys + * can be unset by posting an empty value to {@code metadata}. + */ + public Builder setMetadata(Map metadata) { + this.metadata = metadata; + return this; + } + + /** Required. The outcome of the reported refund. */ + public Builder setOutcome(PaymentAttemptRecordReportRefundParams.Outcome outcome) { + this.outcome = outcome; + return this; + } + + /** Required. Processor information for this refund. */ + public Builder setProcessorDetails( + PaymentAttemptRecordReportRefundParams.ProcessorDetails processorDetails) { + this.processorDetails = processorDetails; + return this; + } + + /** Information about the payment attempt refund. */ + public Builder setRefunded(PaymentAttemptRecordReportRefundParams.Refunded refunded) { + this.refunded = refunded; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Amount { + /** + * Required. Three-letter ISO currency code, in lowercase. + * Must be a supported currency. + */ + @SerializedName("currency") + String currency; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. A positive integer representing the amount in the currency's minor unit. For example, {@code + * 100} can represent 1 USD or 100 JPY. + */ + @SerializedName("value") + Long value; + + private Amount(String currency, Map extraParams, Long value) { + this.currency = currency; + this.extraParams = extraParams; + this.value = value; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String currency; + + private Map extraParams; + + private Long value; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentAttemptRecordReportRefundParams.Amount build() { + return new PaymentAttemptRecordReportRefundParams.Amount( + this.currency, this.extraParams, this.value); + } + + /** + * Required. Three-letter ISO currency code, in + * lowercase. Must be a supported currency. + */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PaymentAttemptRecordReportRefundParams.Amount#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PaymentAttemptRecordReportRefundParams.Amount#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. A positive integer representing the amount in the currency's minor unit. For example, {@code + * 100} can represent 1 USD or 100 JPY. + */ + public Builder setValue(Long value) { + this.value = value; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class ProcessorDetails { + /** Information about the custom processor used to make this refund. */ + @SerializedName("custom") + Custom custom; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. The type of the processor details. An additional hash is included + * on processor_details with a name matching this value. It contains additional information + * specific to the processor. + */ + @SerializedName("type") + Type type; + + private ProcessorDetails(Custom custom, Map extraParams, Type type) { + this.custom = custom; + this.extraParams = extraParams; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Custom custom; + + private Map extraParams; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentAttemptRecordReportRefundParams.ProcessorDetails build() { + return new PaymentAttemptRecordReportRefundParams.ProcessorDetails( + this.custom, this.extraParams, this.type); + } + + /** Information about the custom processor used to make this refund. */ + public Builder setCustom( + PaymentAttemptRecordReportRefundParams.ProcessorDetails.Custom custom) { + this.custom = custom; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PaymentAttemptRecordReportRefundParams.ProcessorDetails#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PaymentAttemptRecordReportRefundParams.ProcessorDetails#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. The type of the processor details. An additional hash is + * included on processor_details with a name matching this value. It contains additional + * information specific to the processor. + */ + public Builder setType(PaymentAttemptRecordReportRefundParams.ProcessorDetails.Type type) { + this.type = type; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Custom { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. A reference to the external refund. This field must be unique + * across all refunds. + */ + @SerializedName("refund_reference") + String refundReference; + + private Custom(Map extraParams, String refundReference) { + this.extraParams = extraParams; + this.refundReference = refundReference; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String refundReference; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentAttemptRecordReportRefundParams.ProcessorDetails.Custom build() { + return new PaymentAttemptRecordReportRefundParams.ProcessorDetails.Custom( + this.extraParams, this.refundReference); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentAttemptRecordReportRefundParams.ProcessorDetails.Custom#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentAttemptRecordReportRefundParams.ProcessorDetails.Custom#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. A reference to the external refund. This field must be unique + * across all refunds. + */ + public Builder setRefundReference(String refundReference) { + this.refundReference = refundReference; + return this; + } + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("custom") + CUSTOM("custom"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Refunded { + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. When the reported refund completed. Measured in seconds since the + * Unix epoch. + */ + @SerializedName("refunded_at") + Long refundedAt; + + private Refunded(Map extraParams, Long refundedAt) { + this.extraParams = extraParams; + this.refundedAt = refundedAt; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Long refundedAt; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentAttemptRecordReportRefundParams.Refunded build() { + return new PaymentAttemptRecordReportRefundParams.Refunded( + this.extraParams, this.refundedAt); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PaymentAttemptRecordReportRefundParams.Refunded#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PaymentAttemptRecordReportRefundParams.Refunded#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. When the reported refund completed. Measured in seconds since + * the Unix epoch. + */ + public Builder setRefundedAt(Long refundedAt) { + this.refundedAt = refundedAt; + return this; + } + } + } + + public enum Outcome implements ApiRequestParams.EnumParam { + @SerializedName("refunded") + REFUNDED("refunded"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Outcome(String value) { + this.value = value; + } + } +} diff --git a/src/main/java/com/stripe/param/PaymentRecordReportPaymentAttemptCanceledParams.java b/src/main/java/com/stripe/param/PaymentRecordReportPaymentAttemptCanceledParams.java index 3b0884e6813..4930d6c02a3 100644 --- a/src/main/java/com/stripe/param/PaymentRecordReportPaymentAttemptCanceledParams.java +++ b/src/main/java/com/stripe/param/PaymentRecordReportPaymentAttemptCanceledParams.java @@ -14,10 +14,7 @@ @Getter @EqualsAndHashCode(callSuper = false) public class PaymentRecordReportPaymentAttemptCanceledParams extends ApiRequestParams { - /** - * Required. When the reported payment was canceled. Measured in seconds since - * the Unix epoch. - */ + /** When the reported payment was canceled. Measured in seconds since the Unix epoch. */ @SerializedName("canceled_at") Long canceledAt; @@ -70,10 +67,7 @@ public PaymentRecordReportPaymentAttemptCanceledParams build() { this.canceledAt, this.expand, this.extraParams, this.metadata); } - /** - * Required. When the reported payment was canceled. Measured in seconds since - * the Unix epoch. - */ + /** When the reported payment was canceled. Measured in seconds since the Unix epoch. */ public Builder setCanceledAt(Long canceledAt) { this.canceledAt = canceledAt; return this; diff --git a/src/main/java/com/stripe/param/PaymentRecordReportPaymentAttemptFailedParams.java b/src/main/java/com/stripe/param/PaymentRecordReportPaymentAttemptFailedParams.java index 5b4bf31506f..714b8647cab 100644 --- a/src/main/java/com/stripe/param/PaymentRecordReportPaymentAttemptFailedParams.java +++ b/src/main/java/com/stripe/param/PaymentRecordReportPaymentAttemptFailedParams.java @@ -27,13 +27,17 @@ public class PaymentRecordReportPaymentAttemptFailedParams extends ApiRequestPar @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** - * Required. When the reported payment failed. Measured in seconds since the Unix - * epoch. - */ + /** When the reported payment failed. Measured in seconds since the Unix epoch. */ @SerializedName("failed_at") Long failedAt; + /** + * The failure code for this payment attempt. Must be one of {@code + * payment_method_customer_decline} or {@code payment_method_provider_unknown_outcome}. + */ + @SerializedName("failure_code") + FailureCode failureCode; + /** * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a @@ -44,10 +48,15 @@ public class PaymentRecordReportPaymentAttemptFailedParams extends ApiRequestPar Object metadata; private PaymentRecordReportPaymentAttemptFailedParams( - List expand, Map extraParams, Long failedAt, Object metadata) { + List expand, + Map extraParams, + Long failedAt, + FailureCode failureCode, + Object metadata) { this.expand = expand; this.extraParams = extraParams; this.failedAt = failedAt; + this.failureCode = failureCode; this.metadata = metadata; } @@ -62,12 +71,14 @@ public static class Builder { private Long failedAt; + private FailureCode failureCode; + private Object metadata; /** Finalize and obtain parameter instance from this builder. */ public PaymentRecordReportPaymentAttemptFailedParams build() { return new PaymentRecordReportPaymentAttemptFailedParams( - this.expand, this.extraParams, this.failedAt, this.metadata); + this.expand, this.extraParams, this.failedAt, this.failureCode, this.metadata); } /** @@ -123,15 +134,22 @@ public Builder putAllExtraParam(Map map) { return this; } - /** - * Required. When the reported payment failed. Measured in seconds since the - * Unix epoch. - */ + /** When the reported payment failed. Measured in seconds since the Unix epoch. */ public Builder setFailedAt(Long failedAt) { this.failedAt = failedAt; return this; } + /** + * The failure code for this payment attempt. Must be one of {@code + * payment_method_customer_decline} or {@code payment_method_provider_unknown_outcome}. + */ + public Builder setFailureCode( + PaymentRecordReportPaymentAttemptFailedParams.FailureCode failureCode) { + this.failureCode = failureCode; + return this; + } + /** * Add a key/value pair to `metadata` map. A map is initialized for the first `put/putAll` call, * and subsequent calls add additional key/value pairs to the original map. See {@link @@ -183,4 +201,19 @@ public Builder setMetadata(Map metadata) { return this; } } + + public enum FailureCode implements ApiRequestParams.EnumParam { + @SerializedName("payment_method_customer_decline") + PAYMENT_METHOD_CUSTOMER_DECLINE("payment_method_customer_decline"), + + @SerializedName("payment_method_provider_unknown_outcome") + PAYMENT_METHOD_PROVIDER_UNKNOWN_OUTCOME("payment_method_provider_unknown_outcome"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + FailureCode(String value) { + this.value = value; + } + } } diff --git a/src/main/java/com/stripe/param/PaymentRecordReportPaymentAttemptGuaranteedParams.java b/src/main/java/com/stripe/param/PaymentRecordReportPaymentAttemptGuaranteedParams.java index ad95ccaf5bc..19149b01b96 100644 --- a/src/main/java/com/stripe/param/PaymentRecordReportPaymentAttemptGuaranteedParams.java +++ b/src/main/java/com/stripe/param/PaymentRecordReportPaymentAttemptGuaranteedParams.java @@ -27,10 +27,7 @@ public class PaymentRecordReportPaymentAttemptGuaranteedParams extends ApiReques @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** - * Required. When the reported payment was guaranteed. Measured in seconds since - * the Unix epoch. - */ + /** When the reported payment was guaranteed. Measured in seconds since the Unix epoch. */ @SerializedName("guaranteed_at") Long guaranteedAt; @@ -123,10 +120,7 @@ public Builder putAllExtraParam(Map map) { return this; } - /** - * Required. When the reported payment was guaranteed. Measured in seconds - * since the Unix epoch. - */ + /** When the reported payment was guaranteed. Measured in seconds since the Unix epoch. */ public Builder setGuaranteedAt(Long guaranteedAt) { this.guaranteedAt = guaranteedAt; return this; diff --git a/src/main/java/com/stripe/param/PaymentRecordReportPaymentAttemptParams.java b/src/main/java/com/stripe/param/PaymentRecordReportPaymentAttemptParams.java index 8d960fabddc..cebd6f25e51 100644 --- a/src/main/java/com/stripe/param/PaymentRecordReportPaymentAttemptParams.java +++ b/src/main/java/com/stripe/param/PaymentRecordReportPaymentAttemptParams.java @@ -299,9 +299,17 @@ public static class Failed { @SerializedName("failed_at") Long failedAt; - private Failed(Map extraParams, Long failedAt) { + /** + * The failure code for this payment attempt. Must be one of {@code + * payment_method_customer_decline} or {@code payment_method_provider_unknown_outcome}. + */ + @SerializedName("failure_code") + FailureCode failureCode; + + private Failed(Map extraParams, Long failedAt, FailureCode failureCode) { this.extraParams = extraParams; this.failedAt = failedAt; + this.failureCode = failureCode; } public static Builder builder() { @@ -313,9 +321,12 @@ public static class Builder { private Long failedAt; + private FailureCode failureCode; + /** Finalize and obtain parameter instance from this builder. */ public PaymentRecordReportPaymentAttemptParams.Failed build() { - return new PaymentRecordReportPaymentAttemptParams.Failed(this.extraParams, this.failedAt); + return new PaymentRecordReportPaymentAttemptParams.Failed( + this.extraParams, this.failedAt, this.failureCode); } /** @@ -353,6 +364,31 @@ public Builder setFailedAt(Long failedAt) { this.failedAt = failedAt; return this; } + + /** + * The failure code for this payment attempt. Must be one of {@code + * payment_method_customer_decline} or {@code payment_method_provider_unknown_outcome}. + */ + public Builder setFailureCode( + PaymentRecordReportPaymentAttemptParams.Failed.FailureCode failureCode) { + this.failureCode = failureCode; + return this; + } + } + + public enum FailureCode implements ApiRequestParams.EnumParam { + @SerializedName("payment_method_customer_decline") + PAYMENT_METHOD_CUSTOMER_DECLINE("payment_method_customer_decline"), + + @SerializedName("payment_method_provider_unknown_outcome") + PAYMENT_METHOD_PROVIDER_UNKNOWN_OUTCOME("payment_method_provider_unknown_outcome"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + FailureCode(String value) { + this.value = value; + } } } diff --git a/src/main/java/com/stripe/param/PaymentRecordReportPaymentParams.java b/src/main/java/com/stripe/param/PaymentRecordReportPaymentParams.java index 2194f0f91db..a48a472b62a 100644 --- a/src/main/java/com/stripe/param/PaymentRecordReportPaymentParams.java +++ b/src/main/java/com/stripe/param/PaymentRecordReportPaymentParams.java @@ -574,9 +574,17 @@ public static class Failed { @SerializedName("failed_at") Long failedAt; - private Failed(Map extraParams, Long failedAt) { + /** + * The failure code for this payment attempt. Must be one of {@code + * payment_method_customer_decline} or {@code payment_method_provider_unknown_outcome}. + */ + @SerializedName("failure_code") + FailureCode failureCode; + + private Failed(Map extraParams, Long failedAt, FailureCode failureCode) { this.extraParams = extraParams; this.failedAt = failedAt; + this.failureCode = failureCode; } public static Builder builder() { @@ -588,9 +596,12 @@ public static class Builder { private Long failedAt; + private FailureCode failureCode; + /** Finalize and obtain parameter instance from this builder. */ public PaymentRecordReportPaymentParams.Failed build() { - return new PaymentRecordReportPaymentParams.Failed(this.extraParams, this.failedAt); + return new PaymentRecordReportPaymentParams.Failed( + this.extraParams, this.failedAt, this.failureCode); } /** @@ -628,6 +639,31 @@ public Builder setFailedAt(Long failedAt) { this.failedAt = failedAt; return this; } + + /** + * The failure code for this payment attempt. Must be one of {@code + * payment_method_customer_decline} or {@code payment_method_provider_unknown_outcome}. + */ + public Builder setFailureCode( + PaymentRecordReportPaymentParams.Failed.FailureCode failureCode) { + this.failureCode = failureCode; + return this; + } + } + + public enum FailureCode implements ApiRequestParams.EnumParam { + @SerializedName("payment_method_customer_decline") + PAYMENT_METHOD_CUSTOMER_DECLINE("payment_method_customer_decline"), + + @SerializedName("payment_method_provider_unknown_outcome") + PAYMENT_METHOD_PROVIDER_UNKNOWN_OUTCOME("payment_method_provider_unknown_outcome"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + FailureCode(String value) { + this.value = value; + } } } diff --git a/src/main/java/com/stripe/param/PaymentRecordReportRefundParams.java b/src/main/java/com/stripe/param/PaymentRecordReportRefundParams.java index 3d4f5354b69..1bc65013b6c 100644 --- a/src/main/java/com/stripe/param/PaymentRecordReportRefundParams.java +++ b/src/main/java/com/stripe/param/PaymentRecordReportRefundParams.java @@ -56,7 +56,7 @@ public class PaymentRecordReportRefundParams extends ApiRequestParams { @SerializedName("processor_details") ProcessorDetails processorDetails; - /** Required. Information about the payment attempt refund. */ + /** Information about the payment attempt refund. */ @SerializedName("refunded") Refunded refunded; @@ -244,7 +244,7 @@ public Builder setProcessorDetails( return this; } - /** Required. Information about the payment attempt refund. */ + /** Information about the payment attempt refund. */ public Builder setRefunded(PaymentRecordReportRefundParams.Refunded refunded) { this.refunded = refunded; return this; diff --git a/src/main/java/com/stripe/param/checkout/SessionApproveParams.java b/src/main/java/com/stripe/param/checkout/SessionApproveParams.java new file mode 100644 index 00000000000..e6ceedeeee7 --- /dev/null +++ b/src/main/java/com/stripe/param/checkout/SessionApproveParams.java @@ -0,0 +1,354 @@ +// File generated from our OpenAPI spec +package com.stripe.param.checkout; + +import com.google.gson.annotations.SerializedName; +import com.stripe.net.ApiRequestParams; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import lombok.EqualsAndHashCode; +import lombok.Getter; + +@Getter +@EqualsAndHashCode(callSuper = false) +public class SessionApproveParams extends ApiRequestParams { + /** Required. The ID of the customer's attempt to pay to approve. */ + @SerializedName("attempt") + String attempt; + + /** Specifies which fields in the response should be expanded. */ + @SerializedName("expand") + List expand; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in {@code + * payment} mode. + */ + @SerializedName("payment_intent_data") + PaymentIntentData paymentIntentData; + + /** + * The URL to redirect your customer back to after they authenticate or cancel their payment on + * the payment method's app or site. This parameter is allowed and required if and only if you did + * not set the return URL during Checkout Session creation or in {@code checkout.confirm()} in + * Stripe.js. + */ + @SerializedName("return_url") + String returnUrl; + + /** + * A subset of parameters to be passed to subscription creation for Checkout Sessions in {@code + * subscription} mode. + */ + @SerializedName("subscription_data") + SubscriptionData subscriptionData; + + private SessionApproveParams( + String attempt, + List expand, + Map extraParams, + PaymentIntentData paymentIntentData, + String returnUrl, + SubscriptionData subscriptionData) { + this.attempt = attempt; + this.expand = expand; + this.extraParams = extraParams; + this.paymentIntentData = paymentIntentData; + this.returnUrl = returnUrl; + this.subscriptionData = subscriptionData; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String attempt; + + private List expand; + + private Map extraParams; + + private PaymentIntentData paymentIntentData; + + private String returnUrl; + + private SubscriptionData subscriptionData; + + /** Finalize and obtain parameter instance from this builder. */ + public SessionApproveParams build() { + return new SessionApproveParams( + this.attempt, + this.expand, + this.extraParams, + this.paymentIntentData, + this.returnUrl, + this.subscriptionData); + } + + /** Required. The ID of the customer's attempt to pay to approve. */ + public Builder setAttempt(String attempt) { + this.attempt = attempt; + return this; + } + + /** + * Add an element to `expand` list. A list is initialized for the first `add/addAll` call, and + * subsequent calls adds additional elements to the original list. See {@link + * SessionApproveParams#expand} for the field documentation. + */ + public Builder addExpand(String element) { + if (this.expand == null) { + this.expand = new ArrayList<>(); + } + this.expand.add(element); + return this; + } + + /** + * Add all elements to `expand` list. A list is initialized for the first `add/addAll` call, and + * subsequent calls adds additional elements to the original list. See {@link + * SessionApproveParams#expand} for the field documentation. + */ + public Builder addAllExpand(List elements) { + if (this.expand == null) { + this.expand = new ArrayList<>(); + } + this.expand.addAll(elements); + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * SessionApproveParams#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link SessionApproveParams#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in {@code + * payment} mode. + */ + public Builder setPaymentIntentData(SessionApproveParams.PaymentIntentData paymentIntentData) { + this.paymentIntentData = paymentIntentData; + return this; + } + + /** + * The URL to redirect your customer back to after they authenticate or cancel their payment on + * the payment method's app or site. This parameter is allowed and required if and only if you + * did not set the return URL during Checkout Session creation or in {@code checkout.confirm()} + * in Stripe.js. + */ + public Builder setReturnUrl(String returnUrl) { + this.returnUrl = returnUrl; + return this; + } + + /** + * A subset of parameters to be passed to subscription creation for Checkout Sessions in {@code + * subscription} mode. + */ + public Builder setSubscriptionData(SessionApproveParams.SubscriptionData subscriptionData) { + this.subscriptionData = subscriptionData; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class PaymentIntentData { + /** + * The amount of the application fee (if any) that will be requested to be applied to the + * payment and transferred to the application owner's Stripe account. The amount of the + * application fee collected will be capped at the total amount captured. For more information, + * see the PaymentIntents use case + * for connected accounts. + */ + @SerializedName("application_fee_amount") + Long applicationFeeAmount; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private PaymentIntentData(Long applicationFeeAmount, Map extraParams) { + this.applicationFeeAmount = applicationFeeAmount; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long applicationFeeAmount; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public SessionApproveParams.PaymentIntentData build() { + return new SessionApproveParams.PaymentIntentData( + this.applicationFeeAmount, this.extraParams); + } + + /** + * The amount of the application fee (if any) that will be requested to be applied to the + * payment and transferred to the application owner's Stripe account. The amount of the + * application fee collected will be capped at the total amount captured. For more + * information, see the PaymentIntents use case for connected + * accounts. + */ + public Builder setApplicationFeeAmount(Long applicationFeeAmount) { + this.applicationFeeAmount = applicationFeeAmount; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * SessionApproveParams.PaymentIntentData#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link SessionApproveParams.PaymentIntentData#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class SubscriptionData { + /** + * A non-negative decimal between 0 and 100, with at most two decimal places. This represents + * the percentage of the subscription invoice total that will be transferred to the application + * owner's Stripe account. To use an application fee percent, the request must be made on behalf + * of another account, using the {@code Stripe-Account} header or an OAuth key. For more + * information, see the application fees documentation. + */ + @SerializedName("application_fee_percent") + BigDecimal applicationFeePercent; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private SubscriptionData(BigDecimal applicationFeePercent, Map extraParams) { + this.applicationFeePercent = applicationFeePercent; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private BigDecimal applicationFeePercent; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public SessionApproveParams.SubscriptionData build() { + return new SessionApproveParams.SubscriptionData( + this.applicationFeePercent, this.extraParams); + } + + /** + * A non-negative decimal between 0 and 100, with at most two decimal places. This represents + * the percentage of the subscription invoice total that will be transferred to the + * application owner's Stripe account. To use an application fee percent, the request must be + * made on behalf of another account, using the {@code Stripe-Account} header or an OAuth key. + * For more information, see the application fees documentation. + */ + public Builder setApplicationFeePercent(BigDecimal applicationFeePercent) { + this.applicationFeePercent = applicationFeePercent; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * SessionApproveParams.SubscriptionData#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link SessionApproveParams.SubscriptionData#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } +} diff --git a/src/main/java/com/stripe/param/checkout/SessionCreateParams.java b/src/main/java/com/stripe/param/checkout/SessionCreateParams.java index 1b36c42cf63..f226a5e86fe 100644 --- a/src/main/java/com/stripe/param/checkout/SessionCreateParams.java +++ b/src/main/java/com/stripe/param/checkout/SessionCreateParams.java @@ -33,6 +33,18 @@ public class SessionCreateParams extends ApiRequestParams { @SerializedName("allow_promotion_codes") Boolean allowPromotionCodes; + /** + * Determines whether the customer's attempt to pay must be manually approved. + * + *

Default is {@code auto}, when the customer's attempt to pay is approved automatically with + * no action required on your server. + * + *

When set to {@code manual}, you must approve the customer's attempt to pay by calling approve from your server. + */ + @SerializedName("approval_method") + ApprovalMethod approvalMethod; + /** * Settings for automatic tax lookup for this session and resulting payments, invoices, and * subscriptions. @@ -449,6 +461,7 @@ private SessionCreateParams( AdaptivePricing adaptivePricing, AfterExpiration afterExpiration, Boolean allowPromotionCodes, + ApprovalMethod approvalMethod, AutomaticTax automaticTax, BillingAddressCollection billingAddressCollection, BrandingSettings brandingSettings, @@ -501,6 +514,7 @@ private SessionCreateParams( this.adaptivePricing = adaptivePricing; this.afterExpiration = afterExpiration; this.allowPromotionCodes = allowPromotionCodes; + this.approvalMethod = approvalMethod; this.automaticTax = automaticTax; this.billingAddressCollection = billingAddressCollection; this.brandingSettings = brandingSettings; @@ -563,6 +577,8 @@ public static class Builder { private Boolean allowPromotionCodes; + private ApprovalMethod approvalMethod; + private AutomaticTax automaticTax; private BillingAddressCollection billingAddressCollection; @@ -667,6 +683,7 @@ public SessionCreateParams build() { this.adaptivePricing, this.afterExpiration, this.allowPromotionCodes, + this.approvalMethod, this.automaticTax, this.billingAddressCollection, this.brandingSettings, @@ -742,6 +759,20 @@ public Builder setAllowPromotionCodes(Boolean allowPromotionCodes) { return this; } + /** + * Determines whether the customer's attempt to pay must be manually approved. + * + *

Default is {@code auto}, when the customer's attempt to pay is approved automatically with + * no action required on your server. + * + *

When set to {@code manual}, you must approve the customer's attempt to pay by calling approve from your server. + */ + public Builder setApprovalMethod(SessionCreateParams.ApprovalMethod approvalMethod) { + this.approvalMethod = approvalMethod; + return this; + } + /** * Settings for automatic tax lookup for this session and resulting payments, invoices, and * subscriptions. @@ -21812,6 +21843,21 @@ public enum Display implements ApiRequestParams.EnumParam { } } + public enum ApprovalMethod implements ApiRequestParams.EnumParam { + @SerializedName("auto") + AUTO("auto"), + + @SerializedName("manual") + MANUAL("manual"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + ApprovalMethod(String value) { + this.value = value; + } + } + public enum BillingAddressCollection implements ApiRequestParams.EnumParam { @SerializedName("auto") AUTO("auto"), diff --git a/src/main/java/com/stripe/param/orchestration/PaymentAttemptRetrieveParams.java b/src/main/java/com/stripe/param/orchestration/PaymentAttemptRetrieveParams.java new file mode 100644 index 00000000000..36a9f762258 --- /dev/null +++ b/src/main/java/com/stripe/param/orchestration/PaymentAttemptRetrieveParams.java @@ -0,0 +1,100 @@ +// File generated from our OpenAPI spec +package com.stripe.param.orchestration; + +import com.google.gson.annotations.SerializedName; +import com.stripe.net.ApiRequestParams; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import lombok.EqualsAndHashCode; +import lombok.Getter; + +@Getter +@EqualsAndHashCode(callSuper = false) +public class PaymentAttemptRetrieveParams extends ApiRequestParams { + /** Specifies which fields in the response should be expanded. */ + @SerializedName("expand") + List expand; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private PaymentAttemptRetrieveParams(List expand, Map extraParams) { + this.expand = expand; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private List expand; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentAttemptRetrieveParams build() { + return new PaymentAttemptRetrieveParams(this.expand, this.extraParams); + } + + /** + * Add an element to `expand` list. A list is initialized for the first `add/addAll` call, and + * subsequent calls adds additional elements to the original list. See {@link + * PaymentAttemptRetrieveParams#expand} for the field documentation. + */ + public Builder addExpand(String element) { + if (this.expand == null) { + this.expand = new ArrayList<>(); + } + this.expand.add(element); + return this; + } + + /** + * Add all elements to `expand` list. A list is initialized for the first `add/addAll` call, and + * subsequent calls adds additional elements to the original list. See {@link + * PaymentAttemptRetrieveParams#expand} for the field documentation. + */ + public Builder addAllExpand(List elements) { + if (this.expand == null) { + this.expand = new ArrayList<>(); + } + this.expand.addAll(elements); + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PaymentAttemptRetrieveParams#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PaymentAttemptRetrieveParams#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } +} diff --git a/src/main/java/com/stripe/param/tax/RegistrationCreateParams.java b/src/main/java/com/stripe/param/tax/RegistrationCreateParams.java index 6a8c1dce2e6..29f51e1331e 100644 --- a/src/main/java/com/stripe/param/tax/RegistrationCreateParams.java +++ b/src/main/java/com/stripe/param/tax/RegistrationCreateParams.java @@ -15735,6 +15735,10 @@ public static class Us { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** Options for the home rule tax registration. */ + @SerializedName("home_rule_tax") + HomeRuleTax homeRuleTax; + /** Options for the local amusement tax registration. */ @SerializedName("local_amusement_tax") LocalAmusementTax localAmusementTax; @@ -15760,12 +15764,14 @@ public static class Us { private Us( Map extraParams, + HomeRuleTax homeRuleTax, LocalAmusementTax localAmusementTax, LocalLeaseTax localLeaseTax, String state, StateSalesTax stateSalesTax, Type type) { this.extraParams = extraParams; + this.homeRuleTax = homeRuleTax; this.localAmusementTax = localAmusementTax; this.localLeaseTax = localLeaseTax; this.state = state; @@ -15780,6 +15786,8 @@ public static Builder builder() { public static class Builder { private Map extraParams; + private HomeRuleTax homeRuleTax; + private LocalAmusementTax localAmusementTax; private LocalLeaseTax localLeaseTax; @@ -15794,6 +15802,7 @@ public static class Builder { public RegistrationCreateParams.CountryOptions.Us build() { return new RegistrationCreateParams.CountryOptions.Us( this.extraParams, + this.homeRuleTax, this.localAmusementTax, this.localLeaseTax, this.state, @@ -15829,6 +15838,13 @@ public Builder putAllExtraParam(Map map) { return this; } + /** Options for the home rule tax registration. */ + public Builder setHomeRuleTax( + RegistrationCreateParams.CountryOptions.Us.HomeRuleTax homeRuleTax) { + this.homeRuleTax = homeRuleTax; + return this; + } + /** Options for the local amusement tax registration. */ public Builder setLocalAmusementTax( RegistrationCreateParams.CountryOptions.Us.LocalAmusementTax localAmusementTax) { @@ -15866,6 +15882,87 @@ public Builder setType(RegistrationCreateParams.CountryOptions.Us.Type type) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class HomeRuleTax { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. A jurisdiction code representing the local + * jurisdiction. + */ + @SerializedName("jurisdiction") + String jurisdiction; + + private HomeRuleTax(Map extraParams, String jurisdiction) { + this.extraParams = extraParams; + this.jurisdiction = jurisdiction; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String jurisdiction; + + /** Finalize and obtain parameter instance from this builder. */ + public RegistrationCreateParams.CountryOptions.Us.HomeRuleTax build() { + return new RegistrationCreateParams.CountryOptions.Us.HomeRuleTax( + this.extraParams, this.jurisdiction); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link RegistrationCreateParams.CountryOptions.Us.HomeRuleTax#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link RegistrationCreateParams.CountryOptions.Us.HomeRuleTax#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. A jurisdiction code representing the local + * jurisdiction. + */ + public Builder setJurisdiction(String jurisdiction) { + this.jurisdiction = jurisdiction; + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class LocalAmusementTax { @@ -16273,6 +16370,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("gross_receipts_tax") GROSS_RECEIPTS_TAX("gross_receipts_tax"), + @SerializedName("home_rule_tax") + HOME_RULE_TAX("home_rule_tax"), + @SerializedName("hospitality_tax") HOSPITALITY_TAX("hospitality_tax"), diff --git a/src/main/java/com/stripe/service/OrchestrationService.java b/src/main/java/com/stripe/service/OrchestrationService.java new file mode 100644 index 00000000000..b89912d9aae --- /dev/null +++ b/src/main/java/com/stripe/service/OrchestrationService.java @@ -0,0 +1,15 @@ +// File generated from our OpenAPI spec +package com.stripe.service; + +import com.stripe.net.ApiService; +import com.stripe.net.StripeResponseGetter; + +public final class OrchestrationService extends ApiService { + public OrchestrationService(StripeResponseGetter responseGetter) { + super(responseGetter); + } + + public com.stripe.service.orchestration.PaymentAttemptService paymentAttempts() { + return new com.stripe.service.orchestration.PaymentAttemptService(this.getResponseGetter()); + } +} diff --git a/src/main/java/com/stripe/service/PaymentAttemptRecordService.java b/src/main/java/com/stripe/service/PaymentAttemptRecordService.java index e27811829a2..76832f66a9d 100644 --- a/src/main/java/com/stripe/service/PaymentAttemptRecordService.java +++ b/src/main/java/com/stripe/service/PaymentAttemptRecordService.java @@ -13,6 +13,12 @@ import com.stripe.net.RequestOptions; import com.stripe.net.StripeResponseGetter; import com.stripe.param.PaymentAttemptRecordListParams; +import com.stripe.param.PaymentAttemptRecordReportAuthenticatedParams; +import com.stripe.param.PaymentAttemptRecordReportCanceledParams; +import com.stripe.param.PaymentAttemptRecordReportFailedParams; +import com.stripe.param.PaymentAttemptRecordReportGuaranteedParams; +import com.stripe.param.PaymentAttemptRecordReportInformationalParams; +import com.stripe.param.PaymentAttemptRecordReportRefundParams; import com.stripe.param.PaymentAttemptRecordRetrieveParams; public final class PaymentAttemptRecordService extends ApiService { @@ -66,4 +72,219 @@ public PaymentAttemptRecord retrieve( options); return this.request(request, PaymentAttemptRecord.class); } + /** Report that the specified Payment Attempt Record was authenticated. */ + public PaymentAttemptRecord reportAuthenticated( + String paymentAttemptRecord, PaymentAttemptRecordReportAuthenticatedParams params) + throws StripeException { + return reportAuthenticated(paymentAttemptRecord, params, (RequestOptions) null); + } + /** Report that the specified Payment Attempt Record was authenticated. */ + public PaymentAttemptRecord reportAuthenticated( + String paymentAttemptRecord, RequestOptions options) throws StripeException { + return reportAuthenticated( + paymentAttemptRecord, (PaymentAttemptRecordReportAuthenticatedParams) null, options); + } + /** Report that the specified Payment Attempt Record was authenticated. */ + public PaymentAttemptRecord reportAuthenticated(String paymentAttemptRecord) + throws StripeException { + return reportAuthenticated( + paymentAttemptRecord, + (PaymentAttemptRecordReportAuthenticatedParams) null, + (RequestOptions) null); + } + /** Report that the specified Payment Attempt Record was authenticated. */ + public PaymentAttemptRecord reportAuthenticated( + String paymentAttemptRecord, + PaymentAttemptRecordReportAuthenticatedParams params, + RequestOptions options) + throws StripeException { + String path = + String.format( + "/v1/payment_attempt_records/%s/report_authenticated", + ApiResource.urlEncodeId(paymentAttemptRecord)); + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, PaymentAttemptRecord.class); + } + /** Report that the specified Payment Attempt Record was canceled. */ + public PaymentAttemptRecord reportCanceled( + String paymentAttemptRecord, PaymentAttemptRecordReportCanceledParams params) + throws StripeException { + return reportCanceled(paymentAttemptRecord, params, (RequestOptions) null); + } + /** Report that the specified Payment Attempt Record was canceled. */ + public PaymentAttemptRecord reportCanceled(String paymentAttemptRecord, RequestOptions options) + throws StripeException { + return reportCanceled( + paymentAttemptRecord, (PaymentAttemptRecordReportCanceledParams) null, options); + } + /** Report that the specified Payment Attempt Record was canceled. */ + public PaymentAttemptRecord reportCanceled(String paymentAttemptRecord) throws StripeException { + return reportCanceled( + paymentAttemptRecord, + (PaymentAttemptRecordReportCanceledParams) null, + (RequestOptions) null); + } + /** Report that the specified Payment Attempt Record was canceled. */ + public PaymentAttemptRecord reportCanceled( + String paymentAttemptRecord, + PaymentAttemptRecordReportCanceledParams params, + RequestOptions options) + throws StripeException { + String path = + String.format( + "/v1/payment_attempt_records/%s/report_canceled", + ApiResource.urlEncodeId(paymentAttemptRecord)); + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, PaymentAttemptRecord.class); + } + /** Report that the specified Payment Attempt Record failed. */ + public PaymentAttemptRecord reportFailed( + String paymentAttemptRecord, PaymentAttemptRecordReportFailedParams params) + throws StripeException { + return reportFailed(paymentAttemptRecord, params, (RequestOptions) null); + } + /** Report that the specified Payment Attempt Record failed. */ + public PaymentAttemptRecord reportFailed(String paymentAttemptRecord, RequestOptions options) + throws StripeException { + return reportFailed( + paymentAttemptRecord, (PaymentAttemptRecordReportFailedParams) null, options); + } + /** Report that the specified Payment Attempt Record failed. */ + public PaymentAttemptRecord reportFailed(String paymentAttemptRecord) throws StripeException { + return reportFailed( + paymentAttemptRecord, (PaymentAttemptRecordReportFailedParams) null, (RequestOptions) null); + } + /** Report that the specified Payment Attempt Record failed. */ + public PaymentAttemptRecord reportFailed( + String paymentAttemptRecord, + PaymentAttemptRecordReportFailedParams params, + RequestOptions options) + throws StripeException { + String path = + String.format( + "/v1/payment_attempt_records/%s/report_failed", + ApiResource.urlEncodeId(paymentAttemptRecord)); + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, PaymentAttemptRecord.class); + } + /** Report that the specified Payment Attempt Record was guaranteed. */ + public PaymentAttemptRecord reportGuaranteed( + String paymentAttemptRecord, PaymentAttemptRecordReportGuaranteedParams params) + throws StripeException { + return reportGuaranteed(paymentAttemptRecord, params, (RequestOptions) null); + } + /** Report that the specified Payment Attempt Record was guaranteed. */ + public PaymentAttemptRecord reportGuaranteed(String paymentAttemptRecord, RequestOptions options) + throws StripeException { + return reportGuaranteed( + paymentAttemptRecord, (PaymentAttemptRecordReportGuaranteedParams) null, options); + } + /** Report that the specified Payment Attempt Record was guaranteed. */ + public PaymentAttemptRecord reportGuaranteed(String paymentAttemptRecord) throws StripeException { + return reportGuaranteed( + paymentAttemptRecord, + (PaymentAttemptRecordReportGuaranteedParams) null, + (RequestOptions) null); + } + /** Report that the specified Payment Attempt Record was guaranteed. */ + public PaymentAttemptRecord reportGuaranteed( + String paymentAttemptRecord, + PaymentAttemptRecordReportGuaranteedParams params, + RequestOptions options) + throws StripeException { + String path = + String.format( + "/v1/payment_attempt_records/%s/report_guaranteed", + ApiResource.urlEncodeId(paymentAttemptRecord)); + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, PaymentAttemptRecord.class); + } + /** Report informational updates on the specified Payment Attempt Record. */ + public PaymentAttemptRecord reportInformational( + String paymentAttemptRecord, PaymentAttemptRecordReportInformationalParams params) + throws StripeException { + return reportInformational(paymentAttemptRecord, params, (RequestOptions) null); + } + /** Report informational updates on the specified Payment Attempt Record. */ + public PaymentAttemptRecord reportInformational( + String paymentAttemptRecord, RequestOptions options) throws StripeException { + return reportInformational( + paymentAttemptRecord, (PaymentAttemptRecordReportInformationalParams) null, options); + } + /** Report informational updates on the specified Payment Attempt Record. */ + public PaymentAttemptRecord reportInformational(String paymentAttemptRecord) + throws StripeException { + return reportInformational( + paymentAttemptRecord, + (PaymentAttemptRecordReportInformationalParams) null, + (RequestOptions) null); + } + /** Report informational updates on the specified Payment Attempt Record. */ + public PaymentAttemptRecord reportInformational( + String paymentAttemptRecord, + PaymentAttemptRecordReportInformationalParams params, + RequestOptions options) + throws StripeException { + String path = + String.format( + "/v1/payment_attempt_records/%s/report_informational", + ApiResource.urlEncodeId(paymentAttemptRecord)); + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, PaymentAttemptRecord.class); + } + /** Report that the specified Payment Attempt Record was refunded. */ + public PaymentAttemptRecord reportRefund( + String paymentAttemptRecord, PaymentAttemptRecordReportRefundParams params) + throws StripeException { + return reportRefund(paymentAttemptRecord, params, (RequestOptions) null); + } + /** Report that the specified Payment Attempt Record was refunded. */ + public PaymentAttemptRecord reportRefund( + String paymentAttemptRecord, + PaymentAttemptRecordReportRefundParams params, + RequestOptions options) + throws StripeException { + String path = + String.format( + "/v1/payment_attempt_records/%s/report_refund", + ApiResource.urlEncodeId(paymentAttemptRecord)); + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, PaymentAttemptRecord.class); + } } diff --git a/src/main/java/com/stripe/service/PaymentRecordService.java b/src/main/java/com/stripe/service/PaymentRecordService.java index 8ab61a4ef4d..75d101ff387 100644 --- a/src/main/java/com/stripe/service/PaymentRecordService.java +++ b/src/main/java/com/stripe/service/PaymentRecordService.java @@ -83,6 +83,17 @@ public PaymentRecord reportPaymentAttemptCanceled( return reportPaymentAttemptCanceled(id, params, (RequestOptions) null); } /** Report that the most recent payment attempt on the specified Payment Record was canceled. */ + public PaymentRecord reportPaymentAttemptCanceled(String id, RequestOptions options) + throws StripeException { + return reportPaymentAttemptCanceled( + id, (PaymentRecordReportPaymentAttemptCanceledParams) null, options); + } + /** Report that the most recent payment attempt on the specified Payment Record was canceled. */ + public PaymentRecord reportPaymentAttemptCanceled(String id) throws StripeException { + return reportPaymentAttemptCanceled( + id, (PaymentRecordReportPaymentAttemptCanceledParams) null, (RequestOptions) null); + } + /** Report that the most recent payment attempt on the specified Payment Record was canceled. */ public PaymentRecord reportPaymentAttemptCanceled( String id, PaymentRecordReportPaymentAttemptCanceledParams params, RequestOptions options) throws StripeException { @@ -105,6 +116,21 @@ public PaymentRecord reportPaymentAttemptFailed( String id, PaymentRecordReportPaymentAttemptFailedParams params) throws StripeException { return reportPaymentAttemptFailed(id, params, (RequestOptions) null); } + /** + * Report that the most recent payment attempt on the specified Payment Record failed or errored. + */ + public PaymentRecord reportPaymentAttemptFailed(String id, RequestOptions options) + throws StripeException { + return reportPaymentAttemptFailed( + id, (PaymentRecordReportPaymentAttemptFailedParams) null, options); + } + /** + * Report that the most recent payment attempt on the specified Payment Record failed or errored. + */ + public PaymentRecord reportPaymentAttemptFailed(String id) throws StripeException { + return reportPaymentAttemptFailed( + id, (PaymentRecordReportPaymentAttemptFailedParams) null, (RequestOptions) null); + } /** * Report that the most recent payment attempt on the specified Payment Record failed or errored. */ @@ -129,6 +155,17 @@ public PaymentRecord reportPaymentAttemptGuaranteed( return reportPaymentAttemptGuaranteed(id, params, (RequestOptions) null); } /** Report that the most recent payment attempt on the specified Payment Record was guaranteed. */ + public PaymentRecord reportPaymentAttemptGuaranteed(String id, RequestOptions options) + throws StripeException { + return reportPaymentAttemptGuaranteed( + id, (PaymentRecordReportPaymentAttemptGuaranteedParams) null, options); + } + /** Report that the most recent payment attempt on the specified Payment Record was guaranteed. */ + public PaymentRecord reportPaymentAttemptGuaranteed(String id) throws StripeException { + return reportPaymentAttemptGuaranteed( + id, (PaymentRecordReportPaymentAttemptGuaranteedParams) null, (RequestOptions) null); + } + /** Report that the most recent payment attempt on the specified Payment Record was guaranteed. */ public PaymentRecord reportPaymentAttemptGuaranteed( String id, PaymentRecordReportPaymentAttemptGuaranteedParams params, RequestOptions options) throws StripeException { diff --git a/src/main/java/com/stripe/service/V1Services.java b/src/main/java/com/stripe/service/V1Services.java index 063fd4a1c12..a710222f790 100644 --- a/src/main/java/com/stripe/service/V1Services.java +++ b/src/main/java/com/stripe/service/V1Services.java @@ -185,6 +185,10 @@ public com.stripe.service.MarginService margins() { return new com.stripe.service.MarginService(this.getResponseGetter()); } + public com.stripe.service.OrchestrationService orchestration() { + return new com.stripe.service.OrchestrationService(this.getResponseGetter()); + } + public com.stripe.service.OrderService orders() { return new com.stripe.service.OrderService(this.getResponseGetter()); } diff --git a/src/main/java/com/stripe/service/checkout/SessionService.java b/src/main/java/com/stripe/service/checkout/SessionService.java index b5a1799a1f1..c4a9b17b5a9 100644 --- a/src/main/java/com/stripe/service/checkout/SessionService.java +++ b/src/main/java/com/stripe/service/checkout/SessionService.java @@ -12,6 +12,7 @@ import com.stripe.net.BaseAddress; import com.stripe.net.RequestOptions; import com.stripe.net.StripeResponseGetter; +import com.stripe.param.checkout.SessionApproveParams; import com.stripe.param.checkout.SessionCreateParams; import com.stripe.param.checkout.SessionExpireParams; import com.stripe.param.checkout.SessionListParams; @@ -142,6 +143,30 @@ public Session update(String session, SessionUpdateParams params, RequestOptions options); return this.request(request, Session.class); } + /** + * Approves a customer’s attempt to pay for a Checkout Session with {@code approval_method} set to + * {@code manual}. + */ + public Session approve(String session, SessionApproveParams params) throws StripeException { + return approve(session, params, (RequestOptions) null); + } + /** + * Approves a customer’s attempt to pay for a Checkout Session with {@code approval_method} set to + * {@code manual}. + */ + public Session approve(String session, SessionApproveParams params, RequestOptions options) + throws StripeException { + String path = + String.format("/v1/checkout/sessions/%s/approve", ApiResource.urlEncodeId(session)); + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, Session.class); + } /** * A Checkout Session can be expired when it is in one of these statuses: {@code open} * diff --git a/src/main/java/com/stripe/service/orchestration/PaymentAttemptService.java b/src/main/java/com/stripe/service/orchestration/PaymentAttemptService.java new file mode 100644 index 00000000000..3a621141b48 --- /dev/null +++ b/src/main/java/com/stripe/service/orchestration/PaymentAttemptService.java @@ -0,0 +1,51 @@ +// File generated from our OpenAPI spec +package com.stripe.service.orchestration; + +import com.stripe.exception.StripeException; +import com.stripe.model.orchestration.PaymentAttempt; +import com.stripe.net.ApiRequest; +import com.stripe.net.ApiRequestParams; +import com.stripe.net.ApiResource; +import com.stripe.net.ApiService; +import com.stripe.net.BaseAddress; +import com.stripe.net.RequestOptions; +import com.stripe.net.StripeResponseGetter; +import com.stripe.param.orchestration.PaymentAttemptRetrieveParams; + +public final class PaymentAttemptService extends ApiService { + public PaymentAttemptService(StripeResponseGetter responseGetter) { + super(responseGetter); + } + + /** Retrieves orchestration information for the given payment attempt record (e.g. return url). */ + public PaymentAttempt retrieve(String paymentAttemptRecord, PaymentAttemptRetrieveParams params) + throws StripeException { + return retrieve(paymentAttemptRecord, params, (RequestOptions) null); + } + /** Retrieves orchestration information for the given payment attempt record (e.g. return url). */ + public PaymentAttempt retrieve(String paymentAttemptRecord, RequestOptions options) + throws StripeException { + return retrieve(paymentAttemptRecord, (PaymentAttemptRetrieveParams) null, options); + } + /** Retrieves orchestration information for the given payment attempt record (e.g. return url). */ + public PaymentAttempt retrieve(String paymentAttemptRecord) throws StripeException { + return retrieve( + paymentAttemptRecord, (PaymentAttemptRetrieveParams) null, (RequestOptions) null); + } + /** Retrieves orchestration information for the given payment attempt record (e.g. return url). */ + public PaymentAttempt retrieve( + String paymentAttemptRecord, PaymentAttemptRetrieveParams params, RequestOptions options) + throws StripeException { + String path = + String.format( + "/v1/orchestration/payment_attempts/%s", ApiResource.urlEncodeId(paymentAttemptRecord)); + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, PaymentAttempt.class); + } +} From 48f832d48dee7648ef2a1bebfde16ed7ace2829f Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Wed, 11 Mar 2026 17:08:43 +0000 Subject: [PATCH 02/13] Update generated code for v2192 and --- CODEGEN_VERSION | 2 +- OPENAPI_VERSION | 2 +- .../java/com/stripe/model/InvoiceItem.java | 32 +++++-------------- 3 files changed, 10 insertions(+), 26 deletions(-) diff --git a/CODEGEN_VERSION b/CODEGEN_VERSION index f5f04d71b05..1c6a7c2e6cc 100644 --- a/CODEGEN_VERSION +++ b/CODEGEN_VERSION @@ -1 +1 @@ -2feaeea9e3c2b01dd5b7e4092d8364af4bf1e740 \ No newline at end of file +2033ed0f1da19257965b13ea10eb8b8a138704bd \ No newline at end of file diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index dceb4ec65df..f4558c7764d 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v2191 \ No newline at end of file +v2192 \ No newline at end of file diff --git a/src/main/java/com/stripe/model/InvoiceItem.java b/src/main/java/com/stripe/model/InvoiceItem.java index 48a0846804f..6e0f794a4b3 100644 --- a/src/main/java/com/stripe/model/InvoiceItem.java +++ b/src/main/java/com/stripe/model/InvoiceItem.java @@ -546,9 +546,9 @@ public InvoiceItem update(InvoiceItemUpdateParams params, RequestOptions options @Setter @EqualsAndHashCode(callSuper = false) public static class Parent extends StripeObject { - /** Details about the license fee subscription that generated this invoice item. */ - @SerializedName("license_fee_subscription_details") - LicenseFeeSubscriptionDetails licenseFeeSubscriptionDetails; + /** Details about the pricing plan subscription that generated this invoice item. */ + @SerializedName("pricing_plan_subscription_details") + PricingPlanSubscriptionDetails pricingPlanSubscriptionDetails; /** Details about the rate card subscription that generated this invoice item. */ @SerializedName("rate_card_subscription_details") @@ -565,33 +565,25 @@ public static class Parent extends StripeObject { /** * The type of parent that generated this invoice item * - *

One of {@code license_fee_subscription_details}, {@code rate_card_subscription_details}, + *

One of {@code pricing_plan_subscription_details}, {@code rate_card_subscription_details}, * {@code schedule_details}, or {@code subscription_details}. */ @SerializedName("type") String type; /** - * For more details about LicenseFeeSubscriptionDetails, please refer to the API Reference. */ @Getter @Setter @EqualsAndHashCode(callSuper = false) - public static class LicenseFeeSubscriptionDetails extends StripeObject { - /** The license fee subscription that generated this invoice item. */ - @SerializedName("license_fee_subscription") - String licenseFeeSubscription; - - /** The license fee version that generated this invoice item. */ - @SerializedName("license_fee_version") - String licenseFeeVersion; - - /** The pricing plan subscription that manages the license fee subscription. */ + public static class PricingPlanSubscriptionDetails extends StripeObject { + /** The pricing plan subscription that manages this charge. */ @SerializedName("pricing_plan_subscription") String pricingPlanSubscription; - /** The pricing plan version at the time this invoice item was generated. */ + /** The pricing plan version at the time this charge was generated. */ @SerializedName("pricing_plan_version") String pricingPlanVersion; } @@ -604,14 +596,6 @@ public static class LicenseFeeSubscriptionDetails extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class RateCardSubscriptionDetails extends StripeObject { - /** The pricing plan subscription that manages the rate card subscription. */ - @SerializedName("pricing_plan_subscription") - String pricingPlanSubscription; - - /** The pricing plan version at the time this invoice item was generated. */ - @SerializedName("pricing_plan_version") - String pricingPlanVersion; - /** The rate card subscription that generated this invoice item. */ @SerializedName("rate_card_subscription") String rateCardSubscription; From cf7d59ece37de323bd91fcea87a905cd1698552a Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Wed, 11 Mar 2026 22:33:28 +0000 Subject: [PATCH 03/13] Update generated code for v2194 and --- CODEGEN_VERSION | 2 +- OPENAPI_VERSION | 2 +- .../radar/IssuingAuthorizationEvaluation.java | 105 +++-- .../RequestedSessionUpdateParams.java | 380 +++++++++++++++++- ...ngAuthorizationEvaluationCreateParams.java | 194 +++++---- 5 files changed, 570 insertions(+), 113 deletions(-) diff --git a/CODEGEN_VERSION b/CODEGEN_VERSION index 1c6a7c2e6cc..796cb171e4b 100644 --- a/CODEGEN_VERSION +++ b/CODEGEN_VERSION @@ -1 +1 @@ -2033ed0f1da19257965b13ea10eb8b8a138704bd \ No newline at end of file +d5d4a14b7efae104f15e32b63c37ad2af0007dad \ No newline at end of file diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index f4558c7764d..6f40e247ed5 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v2192 \ No newline at end of file +v2194 \ No newline at end of file diff --git a/src/main/java/com/stripe/model/radar/IssuingAuthorizationEvaluation.java b/src/main/java/com/stripe/model/radar/IssuingAuthorizationEvaluation.java index 0464af5bbb1..b1111d327e8 100644 --- a/src/main/java/com/stripe/model/radar/IssuingAuthorizationEvaluation.java +++ b/src/main/java/com/stripe/model/radar/IssuingAuthorizationEvaluation.java @@ -26,7 +26,7 @@ @Setter @EqualsAndHashCode(callSuper = false) public class IssuingAuthorizationEvaluation extends ApiResource implements HasId { - /** Details about the authorization transaction. */ + /** Details about the authorization. */ @SerializedName("authorization_details") AuthorizationDetails authorizationDetails; @@ -50,7 +50,10 @@ public class IssuingAuthorizationEvaluation extends ApiResource implements HasId @SerializedName("livemode") Boolean livemode; - /** Details about the merchant where the authorization occurred. */ + /** + * Details about the seller (grocery store, e-commerce website, etc.) where the card authorization + * happened. + */ @SerializedName("merchant_details") MerchantDetails merchantDetails; @@ -61,7 +64,7 @@ public class IssuingAuthorizationEvaluation extends ApiResource implements HasId @SerializedName("metadata") Map metadata; - /** Details about the card network processing. */ + /** Details about the authorization, such as identifiers, set by the card network. */ @SerializedName("network_details") NetworkDetails networkDetails; @@ -77,11 +80,11 @@ public class IssuingAuthorizationEvaluation extends ApiResource implements HasId @SerializedName("signals") Signals signals; - /** Details about the token, if a tokenized payment method was used. */ + /** Details about the token, if a tokenized payment method was used for the authorization. */ @SerializedName("token_details") TokenDetails tokenDetails; - /** Details about verification checks performed. */ + /** Details about verification data for the authorization. */ @SerializedName("verification_details") VerificationDetails verificationDetails; @@ -122,17 +125,20 @@ public static IssuingAuthorizationEvaluation create( return getGlobalResponseGetter().request(request, IssuingAuthorizationEvaluation.class); } - /** Details about the authorization transaction. */ + /** Details about the authorization. */ @Getter @Setter @EqualsAndHashCode(callSuper = false) public static class AuthorizationDetails extends StripeObject { - /** The authorization amount in the smallest currency unit. */ + /** + * The total amount of the authorization in the smallest currency unit. + */ @SerializedName("amount") Long amount; /** - * The method used for authorization. + * How the card details were provided. * *

One of {@code chip}, {@code contactless}, {@code keyed_in}, {@code online}, or {@code * swipe}. @@ -140,12 +146,16 @@ public static class AuthorizationDetails extends StripeObject { @SerializedName("authorization_method") String authorizationMethod; - /** Three-letter ISO currency code in lowercase. */ + /** + * Three-letter ISO currency + * code, in lowercase. Must be a supported + * currency. + */ @SerializedName("currency") String currency; /** - * The card entry mode. + * Defines how the card's information was entered for the authorization. * *

One of {@code contactless}, {@code contactless_magstripe}, {@code credential_on_file}, * {@code integrated_circuit_card}, {@code magstripe}, {@code magstripe_no_cvv}, {@code manual}, @@ -154,16 +164,16 @@ public static class AuthorizationDetails extends StripeObject { @SerializedName("entry_mode") String entryMode; - /** The raw code for the card entry mode. */ + /** Raw code indicating the entry mode from the network message. */ @SerializedName("entry_mode_raw_code") String entryModeRawCode; - /** The time when the authorization was initiated. */ + /** The timestamp of the authorization initiated in seconds. */ @SerializedName("initiated_at") Long initiatedAt; /** - * The point of sale condition. + * Defines how the card was read at the point of sale. * *

One of {@code account_verification}, {@code card_not_present}, {@code card_present}, * {@code e_commerce}, {@code key_entered_pos}, {@code missing}, {@code moto}, {@code other}, @@ -172,11 +182,13 @@ public static class AuthorizationDetails extends StripeObject { @SerializedName("point_of_sale_condition") String pointOfSaleCondition; - /** The raw code for the point of sale condition. */ + /** Raw code indicating the point of sale condition from the network message. */ @SerializedName("point_of_sale_condition_raw_code") String pointOfSaleConditionRawCode; - /** External reference for the authorization. */ + /** + * User's specified unique ID for this authorization attempt (e.g., RRN or internal reference). + */ @SerializedName("reference") String reference; } @@ -190,19 +202,19 @@ public static class CardDetails extends StripeObject { @SerializedName("bin") String bin; - /** The country code associated with the card BIN. */ + /** The two-letter country code of the BIN issuer. */ @SerializedName("bin_country") String binCountry; /** - * The type of card (physical or virtual). + * The type of the card. * *

One of {@code physical}, or {@code virtual}. */ @SerializedName("card_type") String cardType; - /** The time when the card was created. */ + /** The timestamp when the card was created. */ @SerializedName("created_at") Long createdAt; @@ -210,7 +222,10 @@ public static class CardDetails extends StripeObject { @SerializedName("last4") String last4; - /** External reference for the card. */ + /** + * User's specified unique ID of the card for this authorization attempt (e.g., RRN or internal + * reference). + */ @SerializedName("reference") String reference; } @@ -220,52 +235,64 @@ public static class CardDetails extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class CardholderDetails extends StripeObject { - /** The time when the cardholder was created. */ + /** The timestamp when the cardholder was created. */ @SerializedName("created_at") Long createdAt; - /** External reference for the cardholder. */ + /** + * User's specified unique ID of the cardholder for this authorization attempt (e.g., RRN or + * internal reference). + */ @SerializedName("reference") String reference; } - /** Details about the merchant where the authorization occurred. */ + /** + * Details about the seller (grocery store, e-commerce website, etc.) where the card authorization + * happened. + */ @Getter @Setter @EqualsAndHashCode(callSuper = false) public static class MerchantDetails extends StripeObject { - /** The merchant category code (MCC). */ + /** The merchant category code for the seller's business. */ @SerializedName("category_code") String categoryCode; - /** The merchant country code. */ + /** Country where the seller is located. */ @SerializedName("country") String country; - /** The merchant name. */ + /** Name of the seller. */ @SerializedName("name") String name; - /** The merchant identifier from the card network. */ + /** + * Identifier assigned to the seller by the card network. Different card networks may assign + * different network_id fields to the same merchant. + */ @SerializedName("network_id") String networkId; - /** The terminal identifier. */ + /** An ID assigned by the seller to the location of the sale. */ @SerializedName("terminal_id") String terminalId; } - /** Details about the card network processing. */ + /** Details about the authorization, such as identifiers, set by the card network. */ @Getter @Setter @EqualsAndHashCode(callSuper = false) public static class NetworkDetails extends StripeObject { - /** The acquiring institution identifier. */ + /** + * Identifier assigned to the acquirer by the card network. Sometimes this value is not provided + * by the network; in this case, the value will be null. + */ @SerializedName("acquiring_institution_id") String acquiringInstitutionId; /** - * The card network that processed the authorization. + * The card network over which Stripe received the authorization. * *

One of {@code cirrus}, {@code interlink}, {@code maestro}, {@code mastercard}, {@code * other}, {@code plus}, or {@code visa}. @@ -332,35 +359,37 @@ public static class Data extends StripeObject { } } - /** Details about the token, if a tokenized payment method was used. */ + /** Details about the token, if a tokenized payment method was used for the authorization. */ @Getter @Setter @EqualsAndHashCode(callSuper = false) public static class TokenDetails extends StripeObject { - /** The time when the token was created. */ + /** The timestamp when the network token was created. */ @SerializedName("created_at") Long createdAt; - /** External reference for the token. */ + /** + * User's specified unique ID of the card token for this authorization attempt (e.g., RRN or + * internal reference). + */ @SerializedName("reference") String reference; /** - * The wallet provider, if applicable. - * - *

One of {@code apple_pay}, {@code google_pay}, or {@code samsung_pay}. + * The digital wallet used for this transaction. One of {@code apple_pay}, {@code google_pay}, + * or {@code samsung_pay}. */ @SerializedName("wallet") String wallet; } - /** Details about verification checks performed. */ + /** Details about verification data for the authorization. */ @Getter @Setter @EqualsAndHashCode(callSuper = false) public static class VerificationDetails extends StripeObject { /** - * The result of the 3D Secure verification. + * The outcome of the 3D Secure authentication request. * *

One of {@code attempt_acknowledged}, {@code authenticated}, {@code exempted}, {@code * failed}, or {@code required}. diff --git a/src/main/java/com/stripe/param/delegatedcheckout/RequestedSessionUpdateParams.java b/src/main/java/com/stripe/param/delegatedcheckout/RequestedSessionUpdateParams.java index 9d5bd3cbe46..5210cf9fe65 100644 --- a/src/main/java/com/stripe/param/delegatedcheckout/RequestedSessionUpdateParams.java +++ b/src/main/java/com/stripe/param/delegatedcheckout/RequestedSessionUpdateParams.java @@ -328,19 +328,27 @@ public static class FulfillmentDetails { @SerializedName("selected_fulfillment_option") SelectedFulfillmentOption selectedFulfillmentOption; + /** The fulfillment option overrides for specific line items. */ + @SerializedName("selected_fulfillment_option_overrides") + List + selectedFulfillmentOptionOverrides; + private FulfillmentDetails( Address address, Object email, Map extraParams, Object name, Object phone, - SelectedFulfillmentOption selectedFulfillmentOption) { + SelectedFulfillmentOption selectedFulfillmentOption, + List + selectedFulfillmentOptionOverrides) { this.address = address; this.email = email; this.extraParams = extraParams; this.name = name; this.phone = phone; this.selectedFulfillmentOption = selectedFulfillmentOption; + this.selectedFulfillmentOptionOverrides = selectedFulfillmentOptionOverrides; } public static Builder builder() { @@ -360,6 +368,10 @@ public static class Builder { private SelectedFulfillmentOption selectedFulfillmentOption; + private List< + RequestedSessionUpdateParams.FulfillmentDetails.SelectedFulfillmentOptionOverride> + selectedFulfillmentOptionOverrides; + /** Finalize and obtain parameter instance from this builder. */ public RequestedSessionUpdateParams.FulfillmentDetails build() { return new RequestedSessionUpdateParams.FulfillmentDetails( @@ -368,7 +380,8 @@ public RequestedSessionUpdateParams.FulfillmentDetails build() { this.extraParams, this.name, this.phone, - this.selectedFulfillmentOption); + this.selectedFulfillmentOption, + this.selectedFulfillmentOptionOverrides); } /** The customer's address. */ @@ -447,6 +460,40 @@ public Builder setSelectedFulfillmentOption( this.selectedFulfillmentOption = selectedFulfillmentOption; return this; } + + /** + * Add an element to `selectedFulfillmentOptionOverrides` list. A list is initialized for the + * first `add/addAll` call, and subsequent calls adds additional elements to the original + * list. See {@link + * RequestedSessionUpdateParams.FulfillmentDetails#selectedFulfillmentOptionOverrides} for the + * field documentation. + */ + public Builder addSelectedFulfillmentOptionOverride( + RequestedSessionUpdateParams.FulfillmentDetails.SelectedFulfillmentOptionOverride + element) { + if (this.selectedFulfillmentOptionOverrides == null) { + this.selectedFulfillmentOptionOverrides = new ArrayList<>(); + } + this.selectedFulfillmentOptionOverrides.add(element); + return this; + } + + /** + * Add all elements to `selectedFulfillmentOptionOverrides` list. A list is initialized for + * the first `add/addAll` call, and subsequent calls adds additional elements to the original + * list. See {@link + * RequestedSessionUpdateParams.FulfillmentDetails#selectedFulfillmentOptionOverrides} for the + * field documentation. + */ + public Builder addAllSelectedFulfillmentOptionOverride( + List + elements) { + if (this.selectedFulfillmentOptionOverrides == null) { + this.selectedFulfillmentOptionOverrides = new ArrayList<>(); + } + this.selectedFulfillmentOptionOverrides.addAll(elements); + return this; + } } @Getter @@ -858,7 +905,7 @@ public static class Shipping { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Required. The shipping option identifer. */ + /** Required. The shipping option identifier. */ @SerializedName("shipping_option") Object shippingOption; @@ -913,13 +960,336 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Required. The shipping option identifer. */ + /** Required. The shipping option identifier. */ + public Builder setShippingOption(String shippingOption) { + this.shippingOption = shippingOption; + return this; + } + + /** Required. The shipping option identifier. */ + public Builder setShippingOption(EmptyParam shippingOption) { + this.shippingOption = shippingOption; + return this; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class SelectedFulfillmentOptionOverride { + /** The digital fulfillment option. */ + @SerializedName("digital") + Digital digital; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. The line item keys that this fulfillment option override applies + * to. + */ + @SerializedName("line_item_keys") + List lineItemKeys; + + /** The shipping fulfillment option. */ + @SerializedName("shipping") + Shipping shipping; + + /** Required. The type of fulfillment option. */ + @SerializedName("type") + Object type; + + private SelectedFulfillmentOptionOverride( + Digital digital, + Map extraParams, + List lineItemKeys, + Shipping shipping, + Object type) { + this.digital = digital; + this.extraParams = extraParams; + this.lineItemKeys = lineItemKeys; + this.shipping = shipping; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Digital digital; + + private Map extraParams; + + private List lineItemKeys; + + private Shipping shipping; + + private Object type; + + /** Finalize and obtain parameter instance from this builder. */ + public RequestedSessionUpdateParams.FulfillmentDetails.SelectedFulfillmentOptionOverride + build() { + return new RequestedSessionUpdateParams.FulfillmentDetails + .SelectedFulfillmentOptionOverride( + this.digital, this.extraParams, this.lineItemKeys, this.shipping, this.type); + } + + /** The digital fulfillment option. */ + public Builder setDigital( + RequestedSessionUpdateParams.FulfillmentDetails.SelectedFulfillmentOptionOverride + .Digital + digital) { + this.digital = digital; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * RequestedSessionUpdateParams.FulfillmentDetails.SelectedFulfillmentOptionOverride#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * RequestedSessionUpdateParams.FulfillmentDetails.SelectedFulfillmentOptionOverride#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `lineItemKeys` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * RequestedSessionUpdateParams.FulfillmentDetails.SelectedFulfillmentOptionOverride#lineItemKeys} + * for the field documentation. + */ + public Builder addLineItemKey(String element) { + if (this.lineItemKeys == null) { + this.lineItemKeys = new ArrayList<>(); + } + this.lineItemKeys.add(element); + return this; + } + + /** + * Add all elements to `lineItemKeys` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * RequestedSessionUpdateParams.FulfillmentDetails.SelectedFulfillmentOptionOverride#lineItemKeys} + * for the field documentation. + */ + public Builder addAllLineItemKey(List elements) { + if (this.lineItemKeys == null) { + this.lineItemKeys = new ArrayList<>(); + } + this.lineItemKeys.addAll(elements); + return this; + } + + /** The shipping fulfillment option. */ + public Builder setShipping( + RequestedSessionUpdateParams.FulfillmentDetails.SelectedFulfillmentOptionOverride + .Shipping + shipping) { + this.shipping = shipping; + return this; + } + + /** Required. The type of fulfillment option. */ + public Builder setType(String type) { + this.type = type; + return this; + } + + /** Required. The type of fulfillment option. */ + public Builder setType(EmptyParam type) { + this.type = type; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Digital { + /** Required. The digital option identifier. */ + @SerializedName("digital_option") + Object digitalOption; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Digital(Object digitalOption, Map extraParams) { + this.digitalOption = digitalOption; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object digitalOption; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public RequestedSessionUpdateParams.FulfillmentDetails.SelectedFulfillmentOptionOverride + .Digital + build() { + return new RequestedSessionUpdateParams.FulfillmentDetails + .SelectedFulfillmentOptionOverride.Digital(this.digitalOption, this.extraParams); + } + + /** Required. The digital option identifier. */ + public Builder setDigitalOption(String digitalOption) { + this.digitalOption = digitalOption; + return this; + } + + /** Required. The digital option identifier. */ + public Builder setDigitalOption(EmptyParam digitalOption) { + this.digitalOption = digitalOption; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * RequestedSessionUpdateParams.FulfillmentDetails.SelectedFulfillmentOptionOverride.Digital#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * RequestedSessionUpdateParams.FulfillmentDetails.SelectedFulfillmentOptionOverride.Digital#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Shipping { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Required. The shipping option identifier. */ + @SerializedName("shipping_option") + Object shippingOption; + + private Shipping(Map extraParams, Object shippingOption) { + this.extraParams = extraParams; + this.shippingOption = shippingOption; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Object shippingOption; + + /** Finalize and obtain parameter instance from this builder. */ + public RequestedSessionUpdateParams.FulfillmentDetails.SelectedFulfillmentOptionOverride + .Shipping + build() { + return new RequestedSessionUpdateParams.FulfillmentDetails + .SelectedFulfillmentOptionOverride.Shipping(this.extraParams, this.shippingOption); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * RequestedSessionUpdateParams.FulfillmentDetails.SelectedFulfillmentOptionOverride.Shipping#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * RequestedSessionUpdateParams.FulfillmentDetails.SelectedFulfillmentOptionOverride.Shipping#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Required. The shipping option identifier. */ public Builder setShippingOption(String shippingOption) { this.shippingOption = shippingOption; return this; } - /** Required. The shipping option identifer. */ + /** Required. The shipping option identifier. */ public Builder setShippingOption(EmptyParam shippingOption) { this.shippingOption = shippingOption; return this; diff --git a/src/main/java/com/stripe/param/radar/IssuingAuthorizationEvaluationCreateParams.java b/src/main/java/com/stripe/param/radar/IssuingAuthorizationEvaluationCreateParams.java index 9865f2d923e..efdf595f901 100644 --- a/src/main/java/com/stripe/param/radar/IssuingAuthorizationEvaluationCreateParams.java +++ b/src/main/java/com/stripe/param/radar/IssuingAuthorizationEvaluationCreateParams.java @@ -38,7 +38,10 @@ public class IssuingAuthorizationEvaluationCreateParams extends ApiRequestParams @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Required. Details about the merchant where the authorization occurred. */ + /** + * Required. Details about the seller (grocery store, e-commerce website, etc.) + * where the card authorization happened. + */ @SerializedName("merchant_details") MerchantDetails merchantDetails; @@ -51,15 +54,15 @@ public class IssuingAuthorizationEvaluationCreateParams extends ApiRequestParams @SerializedName("metadata") Map metadata; - /** Details about the card network processing. */ + /** Details about the authorization, such as identifiers, set by the card network. */ @SerializedName("network_details") NetworkDetails networkDetails; - /** Details about the token, if a tokenized payment method was used. */ + /** Details about the token, if a tokenized payment method was used for the authorization. */ @SerializedName("token_details") TokenDetails tokenDetails; - /** Details about verification checks performed. */ + /** Details about verification data for the authorization. */ @SerializedName("verification_details") VerificationDetails verificationDetails; @@ -200,7 +203,10 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Required. Details about the merchant where the authorization occurred. */ + /** + * Required. Details about the seller (grocery store, e-commerce website, etc.) + * where the card authorization happened. + */ public Builder setMerchantDetails( IssuingAuthorizationEvaluationCreateParams.MerchantDetails merchantDetails) { this.merchantDetails = merchantDetails; @@ -233,21 +239,21 @@ public Builder putAllMetadata(Map map) { return this; } - /** Details about the card network processing. */ + /** Details about the authorization, such as identifiers, set by the card network. */ public Builder setNetworkDetails( IssuingAuthorizationEvaluationCreateParams.NetworkDetails networkDetails) { this.networkDetails = networkDetails; return this; } - /** Details about the token, if a tokenized payment method was used. */ + /** Details about the token, if a tokenized payment method was used for the authorization. */ public Builder setTokenDetails( IssuingAuthorizationEvaluationCreateParams.TokenDetails tokenDetails) { this.tokenDetails = tokenDetails; return this; } - /** Details about verification checks performed. */ + /** Details about verification data for the authorization. */ public Builder setVerificationDetails( IssuingAuthorizationEvaluationCreateParams.VerificationDetails verificationDetails) { this.verificationDetails = verificationDetails; @@ -258,23 +264,30 @@ public Builder setVerificationDetails( @Getter @EqualsAndHashCode(callSuper = false) public static class AuthorizationDetails { - /** Required. The authorization amount in the smallest currency unit. */ + /** + * Required. The total amount of the authorization in the smallest currency unit. + */ @SerializedName("amount") Long amount; - /** The method used for authorization. */ + /** How the card details were provided. */ @SerializedName("authorization_method") AuthorizationMethod authorizationMethod; - /** Required. Three-letter ISO currency code in lowercase. */ + /** + * Required. Three-letter ISO currency code, in lowercase. + * Must be a supported currency. + */ @SerializedName("currency") String currency; - /** The card entry mode. */ + /** Defines how the card's information was entered for the authorization. */ @SerializedName("entry_mode") EntryMode entryMode; - /** The raw code for the card entry mode. */ + /** Raw code indicating the entry mode from the network message. */ @SerializedName("entry_mode_raw_code") String entryModeRawCode; @@ -287,21 +300,22 @@ public static class AuthorizationDetails { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** - * Required. The time when the authorization was initiated (Unix timestamp). - */ + /** Required. The timestamp of the authorization initiated in seconds. */ @SerializedName("initiated_at") Long initiatedAt; - /** The point of sale condition. */ + /** Defines how the card was read at the point of sale. */ @SerializedName("point_of_sale_condition") PointOfSaleCondition pointOfSaleCondition; - /** The raw code for the point of sale condition. */ + /** Raw code indicating the point of sale condition from the network message. */ @SerializedName("point_of_sale_condition_raw_code") String pointOfSaleConditionRawCode; - /** Required. External reference for the authorization. */ + /** + * Required. User's specified unique ID for this authorization attempt (e.g., + * RRN or internal reference). + */ @SerializedName("reference") String reference; @@ -368,13 +382,16 @@ public IssuingAuthorizationEvaluationCreateParams.AuthorizationDetails build() { this.reference); } - /** Required. The authorization amount in the smallest currency unit. */ + /** + * Required. The total amount of the authorization in the smallest currency unit. + */ public Builder setAmount(Long amount) { this.amount = amount; return this; } - /** The method used for authorization. */ + /** How the card details were provided. */ public Builder setAuthorizationMethod( IssuingAuthorizationEvaluationCreateParams.AuthorizationDetails.AuthorizationMethod authorizationMethod) { @@ -382,20 +399,24 @@ public Builder setAuthorizationMethod( return this; } - /** Required. Three-letter ISO currency code in lowercase. */ + /** + * Required. Three-letter ISO currency code, in + * lowercase. Must be a supported currency. + */ public Builder setCurrency(String currency) { this.currency = currency; return this; } - /** The card entry mode. */ + /** Defines how the card's information was entered for the authorization. */ public Builder setEntryMode( IssuingAuthorizationEvaluationCreateParams.AuthorizationDetails.EntryMode entryMode) { this.entryMode = entryMode; return this; } - /** The raw code for the card entry mode. */ + /** Raw code indicating the entry mode from the network message. */ public Builder setEntryModeRawCode(String entryModeRawCode) { this.entryModeRawCode = entryModeRawCode; return this; @@ -429,15 +450,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** - * Required. The time when the authorization was initiated (Unix timestamp). - */ + /** Required. The timestamp of the authorization initiated in seconds. */ public Builder setInitiatedAt(Long initiatedAt) { this.initiatedAt = initiatedAt; return this; } - /** The point of sale condition. */ + /** Defines how the card was read at the point of sale. */ public Builder setPointOfSaleCondition( IssuingAuthorizationEvaluationCreateParams.AuthorizationDetails.PointOfSaleCondition pointOfSaleCondition) { @@ -445,13 +464,16 @@ public Builder setPointOfSaleCondition( return this; } - /** The raw code for the point of sale condition. */ + /** Raw code indicating the point of sale condition from the network message. */ public Builder setPointOfSaleConditionRawCode(String pointOfSaleConditionRawCode) { this.pointOfSaleConditionRawCode = pointOfSaleConditionRawCode; return this; } - /** Required. External reference for the authorization. */ + /** + * Required. User's specified unique ID for this authorization attempt (e.g., + * RRN or internal reference). + */ public Builder setReference(String reference) { this.reference = reference; return this; @@ -561,19 +583,19 @@ public enum PointOfSaleCondition implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) public static class CardDetails { - /** Required. Bank Identification Number (BIN) of the card. */ + /** Required. The Bank Identification Number (BIN) of the card. */ @SerializedName("bin") String bin; - /** Two-letter ISO country code of the card's issuing bank. */ + /** Required. The two-letter country code of the BIN issuer. */ @SerializedName("bin_country") String binCountry; - /** Required. The type of card (physical or virtual). */ + /** Required. The type of the card. */ @SerializedName("card_type") CardType cardType; - /** Required. The time when the card was created (Unix timestamp). */ + /** Required. The timestamp when the card was created. */ @SerializedName("created_at") Long createdAt; @@ -586,11 +608,14 @@ public static class CardDetails { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Last 4 digits of the card number. */ + /** The last 4 digits of the card number. */ @SerializedName("last4") String last4; - /** Required. External reference for the card. */ + /** + * Required. User's specified unique ID of the card for this authorization + * attempt (e.g., RRN or internal reference). + */ @SerializedName("reference") String reference; @@ -642,26 +667,26 @@ public IssuingAuthorizationEvaluationCreateParams.CardDetails build() { this.reference); } - /** Required. Bank Identification Number (BIN) of the card. */ + /** Required. The Bank Identification Number (BIN) of the card. */ public Builder setBin(String bin) { this.bin = bin; return this; } - /** Two-letter ISO country code of the card's issuing bank. */ + /** Required. The two-letter country code of the BIN issuer. */ public Builder setBinCountry(String binCountry) { this.binCountry = binCountry; return this; } - /** Required. The type of card (physical or virtual). */ + /** Required. The type of the card. */ public Builder setCardType( IssuingAuthorizationEvaluationCreateParams.CardDetails.CardType cardType) { this.cardType = cardType; return this; } - /** Required. The time when the card was created (Unix timestamp). */ + /** Required. The timestamp when the card was created. */ public Builder setCreatedAt(Long createdAt) { this.createdAt = createdAt; return this; @@ -695,13 +720,16 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Last 4 digits of the card number. */ + /** The last 4 digits of the card number. */ public Builder setLast4(String last4) { this.last4 = last4; return this; } - /** Required. External reference for the card. */ + /** + * Required. User's specified unique ID of the card for this authorization + * attempt (e.g., RRN or internal reference). + */ public Builder setReference(String reference) { this.reference = reference; return this; @@ -727,7 +755,7 @@ public enum CardType implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) public static class CardholderDetails { - /** The time when the cardholder was created (Unix timestamp). */ + /** The timestamp when the cardholder was created. */ @SerializedName("created_at") Long createdAt; @@ -740,7 +768,10 @@ public static class CardholderDetails { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** External reference for the cardholder. */ + /** + * User's specified unique ID of the cardholder for this authorization attempt (e.g., RRN or + * internal reference). + */ @SerializedName("reference") String reference; @@ -767,7 +798,7 @@ public IssuingAuthorizationEvaluationCreateParams.CardholderDetails build() { this.createdAt, this.extraParams, this.reference); } - /** The time when the cardholder was created (Unix timestamp). */ + /** The timestamp when the cardholder was created. */ public Builder setCreatedAt(Long createdAt) { this.createdAt = createdAt; return this; @@ -801,7 +832,10 @@ public Builder putAllExtraParam(Map map) { return this; } - /** External reference for the cardholder. */ + /** + * User's specified unique ID of the cardholder for this authorization attempt (e.g., RRN or + * internal reference). + */ public Builder setReference(String reference) { this.reference = reference; return this; @@ -812,11 +846,11 @@ public Builder setReference(String reference) { @Getter @EqualsAndHashCode(callSuper = false) public static class MerchantDetails { - /** Required. Merchant Category Code (MCC). */ + /** Required. The merchant category code for the seller's business. */ @SerializedName("category_code") String categoryCode; - /** Two-letter ISO country code of the merchant. */ + /** Country where the seller is located. */ @SerializedName("country") String country; @@ -829,15 +863,18 @@ public static class MerchantDetails { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Required. Name of the merchant. */ + /** Required. Name of the seller. */ @SerializedName("name") String name; - /** Required. Network merchant identifier. */ + /** + * Required. Identifier assigned to the seller by the card network. Different + * card networks may assign different network_id fields to the same merchant. + */ @SerializedName("network_id") String networkId; - /** Terminal identifier. */ + /** An ID assigned by the seller to the location of the sale. */ @SerializedName("terminal_id") String terminalId; @@ -884,13 +921,13 @@ public IssuingAuthorizationEvaluationCreateParams.MerchantDetails build() { this.terminalId); } - /** Required. Merchant Category Code (MCC). */ + /** Required. The merchant category code for the seller's business. */ public Builder setCategoryCode(String categoryCode) { this.categoryCode = categoryCode; return this; } - /** Two-letter ISO country code of the merchant. */ + /** Country where the seller is located. */ public Builder setCountry(String country) { this.country = country; return this; @@ -924,19 +961,22 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Required. Name of the merchant. */ + /** Required. Name of the seller. */ public Builder setName(String name) { this.name = name; return this; } - /** Required. Network merchant identifier. */ + /** + * Required. Identifier assigned to the seller by the card network. Different + * card networks may assign different network_id fields to the same merchant. + */ public Builder setNetworkId(String networkId) { this.networkId = networkId; return this; } - /** Terminal identifier. */ + /** An ID assigned by the seller to the location of the sale. */ public Builder setTerminalId(String terminalId) { this.terminalId = terminalId; return this; @@ -947,7 +987,10 @@ public Builder setTerminalId(String terminalId) { @Getter @EqualsAndHashCode(callSuper = false) public static class NetworkDetails { - /** The acquiring institution identifier. */ + /** + * Identifier assigned to the acquirer by the card network. Sometimes this value is not provided + * by the network; in this case, the value will be null. + */ @SerializedName("acquiring_institution_id") String acquiringInstitutionId; @@ -960,7 +1003,7 @@ public static class NetworkDetails { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** The card network that routed the authorization. */ + /** The card network over which Stripe received the authorization. */ @SerializedName("routed_network") RoutedNetwork routedNetwork; @@ -990,7 +1033,10 @@ public IssuingAuthorizationEvaluationCreateParams.NetworkDetails build() { this.acquiringInstitutionId, this.extraParams, this.routedNetwork); } - /** The acquiring institution identifier. */ + /** + * Identifier assigned to the acquirer by the card network. Sometimes this value is not + * provided by the network; in this case, the value will be null. + */ public Builder setAcquiringInstitutionId(String acquiringInstitutionId) { this.acquiringInstitutionId = acquiringInstitutionId; return this; @@ -1024,7 +1070,7 @@ public Builder putAllExtraParam(Map map) { return this; } - /** The card network that routed the authorization. */ + /** The card network over which Stripe received the authorization. */ public Builder setRoutedNetwork( IssuingAuthorizationEvaluationCreateParams.NetworkDetails.RoutedNetwork routedNetwork) { this.routedNetwork = routedNetwork; @@ -1066,7 +1112,7 @@ public enum RoutedNetwork implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) public static class TokenDetails { - /** The time when the token was created (Unix timestamp). */ + /** The timestamp when the network token was created. */ @SerializedName("created_at") Long createdAt; @@ -1079,11 +1125,17 @@ public static class TokenDetails { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** External reference for the token. */ + /** + * User's specified unique ID of the card token for this authorization attempt (e.g., RRN or + * internal reference). + */ @SerializedName("reference") String reference; - /** The wallet provider for the tokenized payment method. */ + /** + * The digital wallet used for this transaction. One of {@code apple_pay}, {@code google_pay}, + * or {@code samsung_pay}. + */ @SerializedName("wallet") Wallet wallet; @@ -1114,7 +1166,7 @@ public IssuingAuthorizationEvaluationCreateParams.TokenDetails build() { this.createdAt, this.extraParams, this.reference, this.wallet); } - /** The time when the token was created (Unix timestamp). */ + /** The timestamp when the network token was created. */ public Builder setCreatedAt(Long createdAt) { this.createdAt = createdAt; return this; @@ -1148,13 +1200,19 @@ public Builder putAllExtraParam(Map map) { return this; } - /** External reference for the token. */ + /** + * User's specified unique ID of the card token for this authorization attempt (e.g., RRN or + * internal reference). + */ public Builder setReference(String reference) { this.reference = reference; return this; } - /** The wallet provider for the tokenized payment method. */ + /** + * The digital wallet used for this transaction. One of {@code apple_pay}, {@code google_pay}, + * or {@code samsung_pay}. + */ public Builder setWallet( IssuingAuthorizationEvaluationCreateParams.TokenDetails.Wallet wallet) { this.wallet = wallet; @@ -1193,7 +1251,7 @@ public static class VerificationDetails { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** The result of 3D Secure verification. */ + /** The outcome of the 3D Secure authentication request. */ @SerializedName("three_d_secure_result") ThreeDSecureResult threeDSecureResult; @@ -1246,7 +1304,7 @@ public Builder putAllExtraParam(Map map) { return this; } - /** The result of 3D Secure verification. */ + /** The outcome of the 3D Secure authentication request. */ public Builder setThreeDSecureResult( IssuingAuthorizationEvaluationCreateParams.VerificationDetails.ThreeDSecureResult threeDSecureResult) { From cc0f32dd97c032abc11d9608b3e383e457fce576 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 12 Mar 2026 16:49:12 +0000 Subject: [PATCH 04/13] Update generated code for v2195 and --- CODEGEN_VERSION | 2 +- OPENAPI_VERSION | 2 +- .../param/AccountSessionCreateParams.java | 20 +++++++++++++++---- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/CODEGEN_VERSION b/CODEGEN_VERSION index 796cb171e4b..1287ef935f4 100644 --- a/CODEGEN_VERSION +++ b/CODEGEN_VERSION @@ -1 +1 @@ -d5d4a14b7efae104f15e32b63c37ad2af0007dad \ No newline at end of file +f21ab0095efca84ae73c15397ffc7fea52990e0f \ No newline at end of file diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 6f40e247ed5..96f5652a96f 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v2194 \ No newline at end of file +v2195 \ No newline at end of file diff --git a/src/main/java/com/stripe/param/AccountSessionCreateParams.java b/src/main/java/com/stripe/param/AccountSessionCreateParams.java index 20e79ef289a..58e266ee965 100644 --- a/src/main/java/com/stripe/param/AccountSessionCreateParams.java +++ b/src/main/java/com/stripe/param/AccountSessionCreateParams.java @@ -2852,7 +2852,7 @@ public static class CheckScanning { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** An empty list, because this embedded component has no features. */ + /** The list of features enabled in the embedded component. */ @SerializedName("features") Features features; @@ -2913,7 +2913,7 @@ public Builder putAllExtraParam(Map map) { return this; } - /** An empty list, because this embedded component has no features. */ + /** The list of features enabled in the embedded component. */ public Builder setFeatures( AccountSessionCreateParams.Components.CheckScanning.Features features) { this.features = features; @@ -2924,6 +2924,9 @@ public Builder setFeatures( @Getter @EqualsAndHashCode(callSuper = false) public static class Features { + @SerializedName("create_us_paper_check_on_application") + Boolean createUsPaperCheckOnApplication; + /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -2934,7 +2937,8 @@ public static class Features { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Features(Map extraParams) { + private Features(Boolean createUsPaperCheckOnApplication, Map extraParams) { + this.createUsPaperCheckOnApplication = createUsPaperCheckOnApplication; this.extraParams = extraParams; } @@ -2943,12 +2947,20 @@ public static Builder builder() { } public static class Builder { + private Boolean createUsPaperCheckOnApplication; + private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ public AccountSessionCreateParams.Components.CheckScanning.Features build() { return new AccountSessionCreateParams.Components.CheckScanning.Features( - this.extraParams); + this.createUsPaperCheckOnApplication, this.extraParams); + } + + public Builder setCreateUsPaperCheckOnApplication( + Boolean createUsPaperCheckOnApplication) { + this.createUsPaperCheckOnApplication = createUsPaperCheckOnApplication; + return this; } /** From 56849e0e762afdf26f33fbc7096292d09a800395 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 12 Mar 2026 22:09:05 +0000 Subject: [PATCH 05/13] Update generated code for v2196 and --- CODEGEN_VERSION | 2 +- OPENAPI_VERSION | 2 +- .../GrantedTokenCreateParams.java | 56 +++++++++++++++++-- 3 files changed, 52 insertions(+), 8 deletions(-) diff --git a/CODEGEN_VERSION b/CODEGEN_VERSION index 1287ef935f4..bf1e3ea4fc7 100644 --- a/CODEGEN_VERSION +++ b/CODEGEN_VERSION @@ -1 +1 @@ -f21ab0095efca84ae73c15397ffc7fea52990e0f \ No newline at end of file +b2b6ac2ae2ea46b678ca6df0040e6ba2f9ea11af \ No newline at end of file diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 96f5652a96f..2ff8e6f28ca 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v2195 \ No newline at end of file +v2196 \ No newline at end of file diff --git a/src/main/java/com/stripe/param/sharedpayment/GrantedTokenCreateParams.java b/src/main/java/com/stripe/param/sharedpayment/GrantedTokenCreateParams.java index 18398d3e454..c98e98a5997 100644 --- a/src/main/java/com/stripe/param/sharedpayment/GrantedTokenCreateParams.java +++ b/src/main/java/com/stripe/param/sharedpayment/GrantedTokenCreateParams.java @@ -230,8 +230,8 @@ public static class UsageLimits { String currency; /** - * Required. Time at which this SharedPaymentToken expires and can no longer be - * used to confirm a PaymentIntent. + * Time at which this SharedPaymentToken expires and can no longer be used to confirm a + * PaymentIntent. */ @SerializedName("expires_at") Long expiresAt; @@ -249,12 +249,23 @@ public static class UsageLimits { @SerializedName("max_amount") Long maxAmount; + /** + * The recurring interval at which the shared payment token's amount usage restrictions reset. + */ + @SerializedName("recurring_interval") + RecurringInterval recurringInterval; + private UsageLimits( - String currency, Long expiresAt, Map extraParams, Long maxAmount) { + String currency, + Long expiresAt, + Map extraParams, + Long maxAmount, + RecurringInterval recurringInterval) { this.currency = currency; this.expiresAt = expiresAt; this.extraParams = extraParams; this.maxAmount = maxAmount; + this.recurringInterval = recurringInterval; } public static Builder builder() { @@ -270,10 +281,16 @@ public static class Builder { private Long maxAmount; + private RecurringInterval recurringInterval; + /** Finalize and obtain parameter instance from this builder. */ public GrantedTokenCreateParams.UsageLimits build() { return new GrantedTokenCreateParams.UsageLimits( - this.currency, this.expiresAt, this.extraParams, this.maxAmount); + this.currency, + this.expiresAt, + this.extraParams, + this.maxAmount, + this.recurringInterval); } /** @@ -287,8 +304,8 @@ public Builder setCurrency(String currency) { } /** - * Required. Time at which this SharedPaymentToken expires and can no longer - * be used to confirm a PaymentIntent. + * Time at which this SharedPaymentToken expires and can no longer be used to confirm a + * PaymentIntent. */ public Builder setExpiresAt(Long expiresAt) { this.expiresAt = expiresAt; @@ -328,6 +345,33 @@ public Builder setMaxAmount(Long maxAmount) { this.maxAmount = maxAmount; return this; } + + /** + * The recurring interval at which the shared payment token's amount usage restrictions reset. + */ + public Builder setRecurringInterval( + GrantedTokenCreateParams.UsageLimits.RecurringInterval recurringInterval) { + this.recurringInterval = recurringInterval; + return this; + } + } + + public enum RecurringInterval implements ApiRequestParams.EnumParam { + @SerializedName("month") + MONTH("month"), + + @SerializedName("week") + WEEK("week"), + + @SerializedName("year") + YEAR("year"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + RecurringInterval(String value) { + this.value = value; + } } } } From bf7de588e1bfe9fe648a9769aeb910f8cbcf0203 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 13 Mar 2026 02:51:36 +0000 Subject: [PATCH 06/13] Update generated code for v2197 and --- CODEGEN_VERSION | 2 +- OPENAPI_VERSION | 2 +- .../stripe/model/issuing/Authorization.java | 201 ++++++++++++++++++ .../com/stripe/param/QuoteCreateParams.java | 6 - .../com/stripe/param/QuoteUpdateParams.java | 6 - 5 files changed, 203 insertions(+), 14 deletions(-) diff --git a/CODEGEN_VERSION b/CODEGEN_VERSION index bf1e3ea4fc7..b0a4efa7298 100644 --- a/CODEGEN_VERSION +++ b/CODEGEN_VERSION @@ -1 +1 @@ -b2b6ac2ae2ea46b678ca6df0040e6ba2f9ea11af \ No newline at end of file +2909a9f94e3392db0c39d4c1c776fe1d4977caab \ No newline at end of file diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 2ff8e6f28ca..f2b73a7d8d8 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v2196 \ No newline at end of file +v2197 \ 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 80c1efef7f7..4e48b8d3bbd 100644 --- a/src/main/java/com/stripe/model/issuing/Authorization.java +++ b/src/main/java/com/stripe/model/issuing/Authorization.java @@ -214,6 +214,9 @@ public class Authorization extends ApiResource @Setter(lombok.AccessLevel.NONE) ExpandableField token; + @SerializedName("token_details") + TokenDetails tokenDetails; + /** * List of transactions associated * with this authorization. @@ -1158,6 +1161,203 @@ public static class AmountDetails extends StripeObject { } } + /** + * For more details about TokenDetails, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class TokenDetails extends StripeObject { + /** The card associated with this token. */ + @SerializedName("card") + String card; + + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + @SerializedName("created") + Long created; + + /** The hashed ID derived from the device ID from the card network associated with the token. */ + @SerializedName("device_fingerprint") + String deviceFingerprint; + + @SerializedName("network_data") + NetworkData networkData; + + /** + * For more details about NetworkData, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class NetworkData extends StripeObject { + @SerializedName("device") + Device device; + + @SerializedName("mastercard") + Mastercard mastercard; + + /** + * The card network for this token. + * + *

One of {@code mastercard}, or {@code visa}. + */ + @SerializedName("type") + String type; + + @SerializedName("visa") + Visa visa; + + @SerializedName("wallet_provider") + WalletProvider walletProvider; + + /** + * For more details about Device, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Device extends StripeObject { + /** The IP address of the device at provisioning time. */ + @SerializedName("ip_address") + String ipAddress; + + /** + * The ISO 639-1 language code of the device associated with the tokenization request. + * + *

One of {@code aa}, {@code ab}, {@code ae}, {@code af}, {@code ak}, {@code am}, {@code + * an}, {@code ar}, {@code as}, {@code av}, {@code ay}, {@code az}, {@code ba}, {@code be}, + * {@code bg}, {@code bi}, {@code bm}, {@code bn}, {@code bo}, {@code br}, {@code bs}, + * {@code ca}, {@code ce}, {@code ch}, {@code co}, {@code cr}, {@code cs}, {@code cu}, + * {@code cv}, {@code cy}, {@code da}, {@code de}, {@code dv}, {@code dz}, {@code ee}, + * {@code el}, {@code en}, {@code eo}, {@code es}, {@code et}, {@code eu}, {@code fa}, + * {@code ff}, {@code fi}, {@code fj}, {@code fo}, {@code fr}, {@code fy}, {@code ga}, + * {@code gd}, {@code gl}, {@code gn}, {@code gu}, {@code gv}, {@code ha}, {@code he}, + * {@code hi}, {@code ho}, {@code hr}, {@code ht}, {@code hu}, {@code hy}, {@code hz}, + * {@code ia}, {@code id}, {@code ie}, {@code ig}, {@code ii}, {@code ik}, {@code io}, + * {@code is}, {@code it}, {@code iu}, {@code ja}, {@code jv}, {@code ka}, {@code kg}, + * {@code ki}, {@code kj}, {@code kk}, {@code kl}, {@code km}, {@code kn}, {@code ko}, + * {@code kr}, {@code ks}, {@code ku}, {@code kv}, {@code kw}, {@code ky}, {@code la}, + * {@code lb}, {@code lg}, {@code li}, {@code ln}, {@code lo}, {@code lt}, {@code lu}, + * {@code lv}, {@code mg}, {@code mh}, {@code mi}, {@code mk}, {@code ml}, {@code mn}, + * {@code mr}, {@code ms}, {@code mt}, {@code my}, {@code na}, {@code nb}, {@code nd}, + * {@code ne}, {@code ng}, {@code nl}, {@code nn}, {@code no}, {@code nr}, {@code nv}, + * {@code ny}, {@code oc}, {@code oj}, {@code om}, {@code or}, {@code os}, {@code pa}, + * {@code pi}, {@code pl}, {@code ps}, {@code pt}, {@code qu}, {@code rm}, {@code rn}, + * {@code ro}, {@code ru}, {@code rw}, {@code sa}, {@code sc}, {@code sd}, {@code se}, + * {@code sg}, {@code si}, {@code sk}, {@code sl}, {@code sm}, {@code sn}, {@code so}, + * {@code sq}, {@code sr}, {@code ss}, {@code st}, {@code su}, {@code sv}, {@code sw}, + * {@code ta}, {@code te}, {@code tg}, {@code th}, {@code ti}, {@code tk}, {@code tl}, + * {@code tn}, {@code to}, {@code tr}, {@code ts}, {@code tt}, {@code tw}, {@code ty}, + * {@code ug}, {@code uk}, {@code ur}, {@code uz}, {@code ve}, {@code vi}, {@code vo}, + * {@code wa}, {@code wo}, {@code xh}, {@code yi}, {@code yo}, {@code za}, {@code zh}, or + * {@code zu}. + */ + @SerializedName("language") + String language; + + /** The phone number of the device used for tokenization. */ + @SerializedName("phone_number") + String phoneNumber; + } + + /** + * For more details about Mastercard, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Mastercard extends StripeObject { + /** A unique reference ID from the network to represent the card account number. */ + @SerializedName("card_reference_id") + String cardReferenceId; + + /** The network-unique identifier for the token. */ + @SerializedName("token_reference_id") + String tokenReferenceId; + + /** The ID of the entity requesting tokenization. */ + @SerializedName("token_requestor_id") + String tokenRequestorId; + } + + /** + * For more details about Visa, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Visa extends StripeObject { + /** A unique reference ID from the network to represent the card account number. */ + @SerializedName("card_reference_id") + String cardReferenceId; + + /** The network-unique identifier for the token. */ + @SerializedName("token_reference_id") + String tokenReferenceId; + + /** The ID of the entity requesting tokenization. */ + @SerializedName("token_requestor_id") + String tokenRequestorId; + + /** + * Degree of risk associated with the token between {@code 01} and {@code 99}, with higher + * number indicating higher risk. A {@code 00} value indicates the token was not scored by + * Visa. + */ + @SerializedName("token_risk_score") + String tokenRiskScore; + } + + /** + * For more details about WalletProvider, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class WalletProvider extends StripeObject { + /** + * An evaluation on the trustworthiness of the wallet account between 1 and 5. A higher + * score indicates more trustworthy. + */ + @SerializedName("account_trust_score") + Long accountTrustScore; + + /** + * The method used for tokenizing a card. + * + *

One of {@code app}, {@code manual}, {@code on_file}, or {@code other}. + */ + @SerializedName("card_number_source") + String cardNumberSource; + + /** + * An evaluation on the trustworthiness of the device. A higher score indicates more + * trustworthy. + */ + @SerializedName("device_trust_score") + Long deviceTrustScore; + + /** The reasons for suggested tokenization given by the card network. */ + @SerializedName("reason_codes") + List reasonCodes; + + /** + * The recommendation on responding to the tokenization request. + * + *

One of {@code approve}, {@code decline}, or {@code require_auth}. + */ + @SerializedName("suggested_decision") + String suggestedDecision; + } + } + } + /** * For more details about Treasury, please refer to the API * Reference. @@ -1642,6 +1842,7 @@ public void setResponseGetter(StripeResponseGetter responseGetter) { trySetResponseGetter(networkData, responseGetter); trySetResponseGetter(pendingRequest, responseGetter); trySetResponseGetter(token, responseGetter); + trySetResponseGetter(tokenDetails, responseGetter); trySetResponseGetter(treasury, responseGetter); trySetResponseGetter(verificationData, responseGetter); } diff --git a/src/main/java/com/stripe/param/QuoteCreateParams.java b/src/main/java/com/stripe/param/QuoteCreateParams.java index 776baffb886..e7b0b75233b 100644 --- a/src/main/java/com/stripe/param/QuoteCreateParams.java +++ b/src/main/java/com/stripe/param/QuoteCreateParams.java @@ -9941,9 +9941,6 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("line_starts_at") LINE_STARTS_AT("line_starts_at"), - @SerializedName("now") - NOW("now"), - @SerializedName("pause_collection_start") PAUSE_COLLECTION_START("pause_collection_start"), @@ -12079,9 +12076,6 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("line_starts_at") LINE_STARTS_AT("line_starts_at"), - @SerializedName("now") - NOW("now"), - @SerializedName("pause_collection_start") PAUSE_COLLECTION_START("pause_collection_start"), diff --git a/src/main/java/com/stripe/param/QuoteUpdateParams.java b/src/main/java/com/stripe/param/QuoteUpdateParams.java index 7b38b277630..1a5d31097b8 100644 --- a/src/main/java/com/stripe/param/QuoteUpdateParams.java +++ b/src/main/java/com/stripe/param/QuoteUpdateParams.java @@ -9943,9 +9943,6 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("line_starts_at") LINE_STARTS_AT("line_starts_at"), - @SerializedName("now") - NOW("now"), - @SerializedName("pause_collection_start") PAUSE_COLLECTION_START("pause_collection_start"), @@ -12142,9 +12139,6 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("line_starts_at") LINE_STARTS_AT("line_starts_at"), - @SerializedName("now") - NOW("now"), - @SerializedName("pause_collection_start") PAUSE_COLLECTION_START("pause_collection_start"), From f9762e482009c6d41f3a8e01f215ebcb5140994d Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 13 Mar 2026 03:49:10 +0000 Subject: [PATCH 07/13] Update generated code for v2198 and --- OPENAPI_VERSION | 2 +- .../stripe/model/EventDataClassLookup.java | 1 + .../model/radar/CustomerEvaluation.java | 156 +++++ .../radar/CustomerEvaluationCreateParams.java | 555 ++++++++++++++++++ .../java/com/stripe/service/RadarService.java | 4 + .../radar/CustomerEvaluationService.java | 37 ++ 6 files changed, 754 insertions(+), 1 deletion(-) create mode 100644 src/main/java/com/stripe/model/radar/CustomerEvaluation.java create mode 100644 src/main/java/com/stripe/param/radar/CustomerEvaluationCreateParams.java create mode 100644 src/main/java/com/stripe/service/radar/CustomerEvaluationService.java diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index f2b73a7d8d8..46cddfca964 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v2197 \ No newline at end of file +v2198 \ No newline at end of file diff --git a/src/main/java/com/stripe/model/EventDataClassLookup.java b/src/main/java/com/stripe/model/EventDataClassLookup.java index eaf12cc152e..79455d75d5f 100644 --- a/src/main/java/com/stripe/model/EventDataClassLookup.java +++ b/src/main/java/com/stripe/model/EventDataClassLookup.java @@ -228,6 +228,7 @@ public final class EventDataClassLookup { "product_catalog.trial_offer", com.stripe.model.productcatalog.TrialOffer.class); classLookup.put("radar.account_evaluation", com.stripe.model.radar.AccountEvaluation.class); + classLookup.put("radar.customer_evaluation", com.stripe.model.radar.CustomerEvaluation.class); classLookup.put("radar.early_fraud_warning", com.stripe.model.radar.EarlyFraudWarning.class); classLookup.put( "radar.issuing_authorization_evaluation", diff --git a/src/main/java/com/stripe/model/radar/CustomerEvaluation.java b/src/main/java/com/stripe/model/radar/CustomerEvaluation.java new file mode 100644 index 00000000000..76c1883a469 --- /dev/null +++ b/src/main/java/com/stripe/model/radar/CustomerEvaluation.java @@ -0,0 +1,156 @@ +// File generated from our OpenAPI spec +package com.stripe.model.radar; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.HasId; +import com.stripe.model.StripeObject; +import com.stripe.net.ApiRequest; +import com.stripe.net.ApiRequestParams; +import com.stripe.net.ApiResource; +import com.stripe.net.BaseAddress; +import com.stripe.net.RequestOptions; +import com.stripe.net.StripeResponseGetter; +import com.stripe.param.radar.CustomerEvaluationCreateParams; +import java.math.BigDecimal; +import java.util.Map; +import lombok.EqualsAndHashCode; +import lombok.Getter; +import lombok.Setter; + +/** Customer Evaluation resource returned by the Radar Customer Evaluations API. */ +@Getter +@Setter +@EqualsAndHashCode(callSuper = false) +public class CustomerEvaluation extends ApiResource implements HasId { + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + @SerializedName("created_at") + Long createdAt; + + /** The ID of the Stripe customer the customer evaluation is associated with. */ + @SerializedName("customer") + String customer; + + /** The type of evaluation event. */ + @SerializedName("event_type") + String eventType; + + /** Unique identifier for the object. */ + @Getter(onMethod_ = {@Override}) + @SerializedName("id") + String id; + + /** + * If the object exists in live mode, the value is {@code true}. If the object exists in test + * mode, the value is {@code false}. + */ + @SerializedName("livemode") + Boolean livemode; + + /** + * String representing the object's type. Objects of the same type share the same value. + * + *

Equal to {@code radar.customer_evaluation}. + */ + @SerializedName("object") + String object; + + /** A hash of signal objects providing Radar's evaluation for the lifecycle event. */ + @SerializedName("signals") + Signals signals; + + /** Creates a new {@code CustomerEvaluation} object. */ + public static CustomerEvaluation create(Map params) throws StripeException { + return create(params, (RequestOptions) null); + } + + /** Creates a new {@code CustomerEvaluation} object. */ + public static CustomerEvaluation create(Map params, RequestOptions options) + throws StripeException { + String path = "/v1/radar/customer_evaluations"; + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, params, options); + return getGlobalResponseGetter().request(request, CustomerEvaluation.class); + } + + /** Creates a new {@code CustomerEvaluation} object. */ + public static CustomerEvaluation create(CustomerEvaluationCreateParams params) + throws StripeException { + return create(params, (RequestOptions) null); + } + + /** Creates a new {@code CustomerEvaluation} object. */ + public static CustomerEvaluation create( + CustomerEvaluationCreateParams params, RequestOptions options) throws StripeException { + String path = "/v1/radar/customer_evaluations"; + ApiResource.checkNullTypedParams(path, params); + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return getGlobalResponseGetter().request(request, CustomerEvaluation.class); + } + + /** Customer Evaluation Signals resource returned by the Radar Customer Evaluations API. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Signals extends StripeObject { + @SerializedName("account_sharing") + AccountSharing accountSharing; + + @SerializedName("multi_accounting") + MultiAccounting multiAccounting; + + /** + * For more details about AccountSharing, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class AccountSharing extends StripeObject { + /** Time at which the signal was evaluated. Measured in seconds since the Unix epoch. */ + @SerializedName("evaluated_at") + Long evaluatedAt; + + /** The risk level for this signal. */ + @SerializedName("risk_level") + String riskLevel; + + /** Score for this signal (float between 0.0-100.0). */ + @SerializedName("score") + BigDecimal score; + } + + /** + * For more details about MultiAccounting, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class MultiAccounting extends StripeObject { + /** Time at which the signal was evaluated. Measured in seconds since the Unix epoch. */ + @SerializedName("evaluated_at") + Long evaluatedAt; + + /** The risk level for this signal. */ + @SerializedName("risk_level") + String riskLevel; + + /** Score for this signal (float between 0.0-100.0). */ + @SerializedName("score") + BigDecimal score; + } + } + + @Override + public void setResponseGetter(StripeResponseGetter responseGetter) { + super.setResponseGetter(responseGetter); + trySetResponseGetter(signals, responseGetter); + } +} diff --git a/src/main/java/com/stripe/param/radar/CustomerEvaluationCreateParams.java b/src/main/java/com/stripe/param/radar/CustomerEvaluationCreateParams.java new file mode 100644 index 00000000000..beb63a0f54d --- /dev/null +++ b/src/main/java/com/stripe/param/radar/CustomerEvaluationCreateParams.java @@ -0,0 +1,555 @@ +// File generated from our OpenAPI spec +package com.stripe.param.radar; + +import com.google.gson.annotations.SerializedName; +import com.stripe.net.ApiRequestParams; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import lombok.EqualsAndHashCode; +import lombok.Getter; + +@Getter +@EqualsAndHashCode(callSuper = false) +public class CustomerEvaluationCreateParams extends ApiRequestParams { + /** Required. Array of context entries for the evaluation. */ + @SerializedName("evaluation_context") + List evaluationContext; + + /** Required. The type of evaluation event. */ + @SerializedName("event_type") + EventType eventType; + + /** Specifies which fields in the response should be expanded. */ + @SerializedName("expand") + List expand; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private CustomerEvaluationCreateParams( + List evaluationContext, + EventType eventType, + List expand, + Map extraParams) { + this.evaluationContext = evaluationContext; + this.eventType = eventType; + this.expand = expand; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private List evaluationContext; + + private EventType eventType; + + private List expand; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public CustomerEvaluationCreateParams build() { + return new CustomerEvaluationCreateParams( + this.evaluationContext, this.eventType, this.expand, this.extraParams); + } + + /** + * Add an element to `evaluationContext` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * CustomerEvaluationCreateParams#evaluationContext} for the field documentation. + */ + public Builder addEvaluationContext(CustomerEvaluationCreateParams.EvaluationContext element) { + if (this.evaluationContext == null) { + this.evaluationContext = new ArrayList<>(); + } + this.evaluationContext.add(element); + return this; + } + + /** + * Add all elements to `evaluationContext` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. See + * {@link CustomerEvaluationCreateParams#evaluationContext} for the field documentation. + */ + public Builder addAllEvaluationContext( + List elements) { + if (this.evaluationContext == null) { + this.evaluationContext = new ArrayList<>(); + } + this.evaluationContext.addAll(elements); + return this; + } + + /** Required. The type of evaluation event. */ + public Builder setEventType(CustomerEvaluationCreateParams.EventType eventType) { + this.eventType = eventType; + return this; + } + + /** + * Add an element to `expand` list. A list is initialized for the first `add/addAll` call, and + * subsequent calls adds additional elements to the original list. See {@link + * CustomerEvaluationCreateParams#expand} for the field documentation. + */ + public Builder addExpand(String element) { + if (this.expand == null) { + this.expand = new ArrayList<>(); + } + this.expand.add(element); + return this; + } + + /** + * Add all elements to `expand` list. A list is initialized for the first `add/addAll` call, and + * subsequent calls adds additional elements to the original list. See {@link + * CustomerEvaluationCreateParams#expand} for the field documentation. + */ + public Builder addAllExpand(List elements) { + if (this.expand == null) { + this.expand = new ArrayList<>(); + } + this.expand.addAll(elements); + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * CustomerEvaluationCreateParams#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link CustomerEvaluationCreateParams#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class EvaluationContext { + /** Client details context. */ + @SerializedName("client_details") + ClientDetails clientDetails; + + /** Customer details context. */ + @SerializedName("customer_details") + CustomerDetails customerDetails; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Required. The type of context entry. */ + @SerializedName("type") + Type type; + + private EvaluationContext( + ClientDetails clientDetails, + CustomerDetails customerDetails, + Map extraParams, + Type type) { + this.clientDetails = clientDetails; + this.customerDetails = customerDetails; + this.extraParams = extraParams; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private ClientDetails clientDetails; + + private CustomerDetails customerDetails; + + private Map extraParams; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public CustomerEvaluationCreateParams.EvaluationContext build() { + return new CustomerEvaluationCreateParams.EvaluationContext( + this.clientDetails, this.customerDetails, this.extraParams, this.type); + } + + /** Client details context. */ + public Builder setClientDetails( + CustomerEvaluationCreateParams.EvaluationContext.ClientDetails clientDetails) { + this.clientDetails = clientDetails; + return this; + } + + /** Customer details context. */ + public Builder setCustomerDetails( + CustomerEvaluationCreateParams.EvaluationContext.CustomerDetails customerDetails) { + this.customerDetails = customerDetails; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * CustomerEvaluationCreateParams.EvaluationContext#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link CustomerEvaluationCreateParams.EvaluationContext#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Required. The type of context entry. */ + public Builder setType(CustomerEvaluationCreateParams.EvaluationContext.Type type) { + this.type = type; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class ClientDetails { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. ID for the Radar Session associated with the customer + * evaluation. + */ + @SerializedName("radar_session") + String radarSession; + + private ClientDetails(Map extraParams, String radarSession) { + this.extraParams = extraParams; + this.radarSession = radarSession; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String radarSession; + + /** Finalize and obtain parameter instance from this builder. */ + public CustomerEvaluationCreateParams.EvaluationContext.ClientDetails build() { + return new CustomerEvaluationCreateParams.EvaluationContext.ClientDetails( + this.extraParams, this.radarSession); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * CustomerEvaluationCreateParams.EvaluationContext.ClientDetails#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * CustomerEvaluationCreateParams.EvaluationContext.ClientDetails#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. ID for the Radar Session associated with the customer + * evaluation. + */ + public Builder setRadarSession(String radarSession) { + this.radarSession = radarSession; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class CustomerDetails { + /** Stripe customer ID. */ + @SerializedName("customer") + String customer; + + /** Customer data. */ + @SerializedName("customer_data") + CustomerData customerData; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private CustomerDetails( + String customer, CustomerData customerData, Map extraParams) { + this.customer = customer; + this.customerData = customerData; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String customer; + + private CustomerData customerData; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public CustomerEvaluationCreateParams.EvaluationContext.CustomerDetails build() { + return new CustomerEvaluationCreateParams.EvaluationContext.CustomerDetails( + this.customer, this.customerData, this.extraParams); + } + + /** Stripe customer ID. */ + public Builder setCustomer(String customer) { + this.customer = customer; + return this; + } + + /** Customer data. */ + public Builder setCustomerData( + CustomerEvaluationCreateParams.EvaluationContext.CustomerDetails.CustomerData + customerData) { + this.customerData = customerData; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * CustomerEvaluationCreateParams.EvaluationContext.CustomerDetails#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * CustomerEvaluationCreateParams.EvaluationContext.CustomerDetails#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class CustomerData { + /** Customer email. */ + @SerializedName("email") + String email; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Customer name. */ + @SerializedName("name") + String name; + + /** Customer phone. */ + @SerializedName("phone") + String phone; + + private CustomerData( + String email, Map extraParams, String name, String phone) { + this.email = email; + this.extraParams = extraParams; + this.name = name; + this.phone = phone; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String email; + + private Map extraParams; + + private String name; + + private String phone; + + /** Finalize and obtain parameter instance from this builder. */ + public CustomerEvaluationCreateParams.EvaluationContext.CustomerDetails.CustomerData + build() { + return new CustomerEvaluationCreateParams.EvaluationContext.CustomerDetails + .CustomerData(this.email, this.extraParams, this.name, this.phone); + } + + /** Customer email. */ + public Builder setEmail(String email) { + this.email = email; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * CustomerEvaluationCreateParams.EvaluationContext.CustomerDetails.CustomerData#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * CustomerEvaluationCreateParams.EvaluationContext.CustomerDetails.CustomerData#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Customer name. */ + public Builder setName(String name) { + this.name = name; + return this; + } + + /** Customer phone. */ + public Builder setPhone(String phone) { + this.phone = phone; + return this; + } + } + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("client_details") + CLIENT_DETAILS("client_details"), + + @SerializedName("customer_details") + CUSTOMER_DETAILS("customer_details"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + public enum EventType implements ApiRequestParams.EnumParam { + @SerializedName("registration") + REGISTRATION("registration"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + EventType(String value) { + this.value = value; + } + } +} diff --git a/src/main/java/com/stripe/service/RadarService.java b/src/main/java/com/stripe/service/RadarService.java index f206c140487..539e9155b6d 100644 --- a/src/main/java/com/stripe/service/RadarService.java +++ b/src/main/java/com/stripe/service/RadarService.java @@ -13,6 +13,10 @@ public com.stripe.service.radar.AccountEvaluationService accountEvaluations() { return new com.stripe.service.radar.AccountEvaluationService(this.getResponseGetter()); } + public com.stripe.service.radar.CustomerEvaluationService customerEvaluations() { + return new com.stripe.service.radar.CustomerEvaluationService(this.getResponseGetter()); + } + public com.stripe.service.radar.EarlyFraudWarningService earlyFraudWarnings() { return new com.stripe.service.radar.EarlyFraudWarningService(this.getResponseGetter()); } diff --git a/src/main/java/com/stripe/service/radar/CustomerEvaluationService.java b/src/main/java/com/stripe/service/radar/CustomerEvaluationService.java new file mode 100644 index 00000000000..141aa48b7c4 --- /dev/null +++ b/src/main/java/com/stripe/service/radar/CustomerEvaluationService.java @@ -0,0 +1,37 @@ +// File generated from our OpenAPI spec +package com.stripe.service.radar; + +import com.stripe.exception.StripeException; +import com.stripe.model.radar.CustomerEvaluation; +import com.stripe.net.ApiRequest; +import com.stripe.net.ApiRequestParams; +import com.stripe.net.ApiResource; +import com.stripe.net.ApiService; +import com.stripe.net.BaseAddress; +import com.stripe.net.RequestOptions; +import com.stripe.net.StripeResponseGetter; +import com.stripe.param.radar.CustomerEvaluationCreateParams; + +public final class CustomerEvaluationService extends ApiService { + public CustomerEvaluationService(StripeResponseGetter responseGetter) { + super(responseGetter); + } + + /** Creates a new {@code CustomerEvaluation} object. */ + public CustomerEvaluation create(CustomerEvaluationCreateParams params) throws StripeException { + return create(params, (RequestOptions) null); + } + /** Creates a new {@code CustomerEvaluation} object. */ + public CustomerEvaluation create(CustomerEvaluationCreateParams params, RequestOptions options) + throws StripeException { + String path = "/v1/radar/customer_evaluations"; + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, CustomerEvaluation.class); + } +} From 3eb6e7e5bf2499779058de3be83ce08b7fc2693d Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 13 Mar 2026 17:49:34 +0000 Subject: [PATCH 08/13] Update generated code for v2200 and --- CODEGEN_VERSION | 2 +- OPENAPI_VERSION | 2 +- .../model/radar/CustomerEvaluation.java | 86 ++++ .../radar/CustomerEvaluationCreateParams.java | 3 + .../radar/CustomerEvaluationUpdateParams.java | 436 ++++++++++++++++++ .../radar/CustomerEvaluationService.java | 23 + 6 files changed, 550 insertions(+), 2 deletions(-) create mode 100644 src/main/java/com/stripe/param/radar/CustomerEvaluationUpdateParams.java diff --git a/CODEGEN_VERSION b/CODEGEN_VERSION index b0a4efa7298..8cde21126e2 100644 --- a/CODEGEN_VERSION +++ b/CODEGEN_VERSION @@ -1 +1 @@ -2909a9f94e3392db0c39d4c1c776fe1d4977caab \ No newline at end of file +adcc4a45af6a5ca7926677971ce60771f7803c14 \ No newline at end of file diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 46cddfca964..bd5e2f98e58 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v2198 \ No newline at end of file +v2200 \ No newline at end of file diff --git a/src/main/java/com/stripe/model/radar/CustomerEvaluation.java b/src/main/java/com/stripe/model/radar/CustomerEvaluation.java index 76c1883a469..27c22cadc9a 100644 --- a/src/main/java/com/stripe/model/radar/CustomerEvaluation.java +++ b/src/main/java/com/stripe/model/radar/CustomerEvaluation.java @@ -12,7 +12,9 @@ import com.stripe.net.RequestOptions; import com.stripe.net.StripeResponseGetter; import com.stripe.param.radar.CustomerEvaluationCreateParams; +import com.stripe.param.radar.CustomerEvaluationUpdateParams; import java.math.BigDecimal; +import java.util.List; import java.util.Map; import lombok.EqualsAndHashCode; import lombok.Getter; @@ -35,6 +37,10 @@ public class CustomerEvaluation extends ApiResource implements HasId { @SerializedName("event_type") String eventType; + /** A list of events that have been reported on this customer evaluation. */ + @SerializedName("events") + List events; + /** Unique identifier for the object. */ @Getter(onMethod_ = {@Override}) @SerializedName("id") @@ -94,6 +100,86 @@ public static CustomerEvaluation create( return getGlobalResponseGetter().request(request, CustomerEvaluation.class); } + /** Reports an event on a {@code CustomerEvaluation} object. */ + public CustomerEvaluation update(Map params) throws StripeException { + return update(params, (RequestOptions) null); + } + + /** Reports an event on a {@code CustomerEvaluation} object. */ + public CustomerEvaluation update(Map params, RequestOptions options) + throws StripeException { + String path = + String.format( + "/v1/radar/customer_evaluations/%s/report", ApiResource.urlEncodeId(this.getId())); + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, params, options); + return getResponseGetter().request(request, CustomerEvaluation.class); + } + + /** Reports an event on a {@code CustomerEvaluation} object. */ + public CustomerEvaluation update(CustomerEvaluationUpdateParams params) throws StripeException { + return update(params, (RequestOptions) null); + } + + /** Reports an event on a {@code CustomerEvaluation} object. */ + public CustomerEvaluation update(CustomerEvaluationUpdateParams params, RequestOptions options) + throws StripeException { + String path = + String.format( + "/v1/radar/customer_evaluations/%s/report", ApiResource.urlEncodeId(this.getId())); + ApiResource.checkNullTypedParams(path, params); + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return getResponseGetter().request(request, CustomerEvaluation.class); + } + + /** Event object representing an event reported for a Customer Evaluation via the report API. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Event extends StripeObject { + /** Data about a failed login event. */ + @SerializedName("login_failed") + LoginFailed loginFailed; + + /** Time at which the event occurred. Measured in seconds since the Unix epoch. */ + @SerializedName("occurred_at") + Long occurredAt; + + /** Data about a failed registration event. */ + @SerializedName("registration_failed") + RegistrationFailed registrationFailed; + + /** The type of event that occurred. */ + @SerializedName("type") + String type; + + /** Data about a failed login event. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class LoginFailed extends StripeObject { + /** The reason why this login failed. */ + @SerializedName("reason") + String reason; + } + + /** Data about a failed registration event. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class RegistrationFailed extends StripeObject { + /** The reason why this registration failed. */ + @SerializedName("reason") + String reason; + } + } + /** Customer Evaluation Signals resource returned by the Radar Customer Evaluations API. */ @Getter @Setter diff --git a/src/main/java/com/stripe/param/radar/CustomerEvaluationCreateParams.java b/src/main/java/com/stripe/param/radar/CustomerEvaluationCreateParams.java index beb63a0f54d..a1cec0742c5 100644 --- a/src/main/java/com/stripe/param/radar/CustomerEvaluationCreateParams.java +++ b/src/main/java/com/stripe/param/radar/CustomerEvaluationCreateParams.java @@ -542,6 +542,9 @@ public enum Type implements ApiRequestParams.EnumParam { } public enum EventType implements ApiRequestParams.EnumParam { + @SerializedName("login") + LOGIN("login"), + @SerializedName("registration") REGISTRATION("registration"); diff --git a/src/main/java/com/stripe/param/radar/CustomerEvaluationUpdateParams.java b/src/main/java/com/stripe/param/radar/CustomerEvaluationUpdateParams.java new file mode 100644 index 00000000000..ed05bcc6ccf --- /dev/null +++ b/src/main/java/com/stripe/param/radar/CustomerEvaluationUpdateParams.java @@ -0,0 +1,436 @@ +// File generated from our OpenAPI spec +package com.stripe.param.radar; + +import com.google.gson.annotations.SerializedName; +import com.stripe.net.ApiRequestParams; +import com.stripe.param.common.EmptyParam; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import lombok.EqualsAndHashCode; +import lombok.Getter; + +@Getter +@EqualsAndHashCode(callSuper = false) +public class CustomerEvaluationUpdateParams extends ApiRequestParams { + /** Specifies which fields in the response should be expanded. */ + @SerializedName("expand") + List expand; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Event payload for login_failed. */ + @SerializedName("login_failed") + LoginFailed loginFailed; + + /** Event payload for registration_failed. */ + @SerializedName("registration_failed") + RegistrationFailed registrationFailed; + + /** Event payload for registration_success. */ + @SerializedName("registration_success") + RegistrationSuccess registrationSuccess; + + /** Required. The type of event to report. */ + @SerializedName("type") + Type type; + + private CustomerEvaluationUpdateParams( + List expand, + Map extraParams, + LoginFailed loginFailed, + RegistrationFailed registrationFailed, + RegistrationSuccess registrationSuccess, + Type type) { + this.expand = expand; + this.extraParams = extraParams; + this.loginFailed = loginFailed; + this.registrationFailed = registrationFailed; + this.registrationSuccess = registrationSuccess; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private List expand; + + private Map extraParams; + + private LoginFailed loginFailed; + + private RegistrationFailed registrationFailed; + + private RegistrationSuccess registrationSuccess; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public CustomerEvaluationUpdateParams build() { + return new CustomerEvaluationUpdateParams( + this.expand, + this.extraParams, + this.loginFailed, + this.registrationFailed, + this.registrationSuccess, + this.type); + } + + /** + * Add an element to `expand` list. A list is initialized for the first `add/addAll` call, and + * subsequent calls adds additional elements to the original list. See {@link + * CustomerEvaluationUpdateParams#expand} for the field documentation. + */ + public Builder addExpand(String element) { + if (this.expand == null) { + this.expand = new ArrayList<>(); + } + this.expand.add(element); + return this; + } + + /** + * Add all elements to `expand` list. A list is initialized for the first `add/addAll` call, and + * subsequent calls adds additional elements to the original list. See {@link + * CustomerEvaluationUpdateParams#expand} for the field documentation. + */ + public Builder addAllExpand(List elements) { + if (this.expand == null) { + this.expand = new ArrayList<>(); + } + this.expand.addAll(elements); + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * CustomerEvaluationUpdateParams#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link CustomerEvaluationUpdateParams#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Event payload for login_failed. */ + public Builder setLoginFailed(CustomerEvaluationUpdateParams.LoginFailed loginFailed) { + this.loginFailed = loginFailed; + return this; + } + + /** Event payload for registration_failed. */ + public Builder setRegistrationFailed( + CustomerEvaluationUpdateParams.RegistrationFailed registrationFailed) { + this.registrationFailed = registrationFailed; + return this; + } + + /** Event payload for registration_success. */ + public Builder setRegistrationSuccess( + CustomerEvaluationUpdateParams.RegistrationSuccess registrationSuccess) { + this.registrationSuccess = registrationSuccess; + return this; + } + + /** Required. The type of event to report. */ + public Builder setType(CustomerEvaluationUpdateParams.Type type) { + this.type = type; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class LoginFailed { + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Required. The reason why this login failed. */ + @SerializedName("reason") + Reason reason; + + private LoginFailed(Map extraParams, Reason reason) { + this.extraParams = extraParams; + this.reason = reason; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Reason reason; + + /** Finalize and obtain parameter instance from this builder. */ + public CustomerEvaluationUpdateParams.LoginFailed build() { + return new CustomerEvaluationUpdateParams.LoginFailed(this.extraParams, this.reason); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * CustomerEvaluationUpdateParams.LoginFailed#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link CustomerEvaluationUpdateParams.LoginFailed#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Required. The reason why this login failed. */ + public Builder setReason(CustomerEvaluationUpdateParams.LoginFailed.Reason reason) { + this.reason = reason; + return this; + } + } + + public enum Reason implements ApiRequestParams.EnumParam { + @SerializedName("other") + OTHER("other"), + + @SerializedName("suspected_account_sharing") + SUSPECTED_ACCOUNT_SHARING("suspected_account_sharing"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Reason(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class RegistrationFailed { + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Required. The reason why this registration failed. */ + @SerializedName("reason") + Reason reason; + + private RegistrationFailed(Map extraParams, Reason reason) { + this.extraParams = extraParams; + this.reason = reason; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Reason reason; + + /** Finalize and obtain parameter instance from this builder. */ + public CustomerEvaluationUpdateParams.RegistrationFailed build() { + return new CustomerEvaluationUpdateParams.RegistrationFailed(this.extraParams, this.reason); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * CustomerEvaluationUpdateParams.RegistrationFailed#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link CustomerEvaluationUpdateParams.RegistrationFailed#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Required. The reason why this registration failed. */ + public Builder setReason(CustomerEvaluationUpdateParams.RegistrationFailed.Reason reason) { + this.reason = reason; + return this; + } + } + + public enum Reason implements ApiRequestParams.EnumParam { + @SerializedName("other") + OTHER("other"), + + @SerializedName("suspected_multi_accounting") + SUSPECTED_MULTI_ACCOUNTING("suspected_multi_accounting"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Reason(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class RegistrationSuccess { + /** Stripe customer ID to attach to an entity-less registration evaluation. */ + @SerializedName("customer") + Object customer; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private RegistrationSuccess(Object customer, Map extraParams) { + this.customer = customer; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object customer; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public CustomerEvaluationUpdateParams.RegistrationSuccess build() { + return new CustomerEvaluationUpdateParams.RegistrationSuccess( + this.customer, this.extraParams); + } + + /** Stripe customer ID to attach to an entity-less registration evaluation. */ + public Builder setCustomer(String customer) { + this.customer = customer; + return this; + } + + /** Stripe customer ID to attach to an entity-less registration evaluation. */ + public Builder setCustomer(EmptyParam customer) { + this.customer = customer; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * CustomerEvaluationUpdateParams.RegistrationSuccess#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link CustomerEvaluationUpdateParams.RegistrationSuccess#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("login_failed") + LOGIN_FAILED("login_failed"), + + @SerializedName("login_success") + LOGIN_SUCCESS("login_success"), + + @SerializedName("registration_failed") + REGISTRATION_FAILED("registration_failed"), + + @SerializedName("registration_success") + REGISTRATION_SUCCESS("registration_success"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } +} diff --git a/src/main/java/com/stripe/service/radar/CustomerEvaluationService.java b/src/main/java/com/stripe/service/radar/CustomerEvaluationService.java index 141aa48b7c4..531534ce330 100644 --- a/src/main/java/com/stripe/service/radar/CustomerEvaluationService.java +++ b/src/main/java/com/stripe/service/radar/CustomerEvaluationService.java @@ -11,6 +11,7 @@ import com.stripe.net.RequestOptions; import com.stripe.net.StripeResponseGetter; import com.stripe.param.radar.CustomerEvaluationCreateParams; +import com.stripe.param.radar.CustomerEvaluationUpdateParams; public final class CustomerEvaluationService extends ApiService { public CustomerEvaluationService(StripeResponseGetter responseGetter) { @@ -34,4 +35,26 @@ public CustomerEvaluation create(CustomerEvaluationCreateParams params, RequestO options); return this.request(request, CustomerEvaluation.class); } + /** Reports an event on a {@code CustomerEvaluation} object. */ + public CustomerEvaluation update(String customerEvaluation, CustomerEvaluationUpdateParams params) + throws StripeException { + return update(customerEvaluation, params, (RequestOptions) null); + } + /** Reports an event on a {@code CustomerEvaluation} object. */ + public CustomerEvaluation update( + String customerEvaluation, CustomerEvaluationUpdateParams params, RequestOptions options) + throws StripeException { + String path = + String.format( + "/v1/radar/customer_evaluations/%s/report", + ApiResource.urlEncodeId(customerEvaluation)); + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, CustomerEvaluation.class); + } } From 1db7e29888887b6005c00f008aca8368b78fccab Mon Sep 17 00:00:00 2001 From: remi-stripe Date: Fri, 13 Mar 2026 12:10:41 -0700 Subject: [PATCH 09/13] Add link to Stripe's Discord server to the readme (#2178) --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 5fb6b3ee362..9b0aa187bc5 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,9 @@ [![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) +> [!TIP] +> Want to chat live with Stripe engineers? Join us on our [Discord server](https://stripe.com/go/discord/java). + The official [Stripe][stripe] Java client library. ## Installation From 6edd96f38551948e2c7e19d33e48f8c6abb20043 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 13 Mar 2026 20:32:26 +0000 Subject: [PATCH 10/13] Update generated code for v2201 and --- OPENAPI_VERSION | 2 +- .../com/stripe/model/InvoiceLineItem.java | 32 +++++-------------- 2 files changed, 9 insertions(+), 25 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index bd5e2f98e58..21fcb610e46 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v2200 \ No newline at end of file +v2201 \ No newline at end of file diff --git a/src/main/java/com/stripe/model/InvoiceLineItem.java b/src/main/java/com/stripe/model/InvoiceLineItem.java index 6bedb4053c7..18eae958ab1 100644 --- a/src/main/java/com/stripe/model/InvoiceLineItem.java +++ b/src/main/java/com/stripe/model/InvoiceLineItem.java @@ -401,9 +401,9 @@ public static class Parent extends StripeObject { @SerializedName("invoice_item_details") InvoiceItemDetails invoiceItemDetails; - /** Details about the license fee subscription that generated this line item. */ - @SerializedName("license_fee_subscription_details") - LicenseFeeSubscriptionDetails licenseFeeSubscriptionDetails; + /** Details about the pricing plan subscription that generated this line item. */ + @SerializedName("pricing_plan_subscription_details") + PricingPlanSubscriptionDetails pricingPlanSubscriptionDetails; /** Details about the rate card subscription that generated this line item. */ @SerializedName("rate_card_subscription_details") @@ -420,7 +420,7 @@ public static class Parent extends StripeObject { /** * The type of parent that generated this line item * - *

One of {@code invoice_item_details}, {@code license_fee_subscription_details}, {@code + *

One of {@code invoice_item_details}, {@code pricing_plan_subscription_details}, {@code * rate_card_subscription_details}, {@code schedule_details}, or {@code * subscription_item_details}. */ @@ -486,30 +486,22 @@ public static class CreditedItems extends StripeObject { } /** - * For more details about LicenseFeeSubscriptionDetails, please refer to the API Reference. */ @Getter @Setter @EqualsAndHashCode(callSuper = false) - public static class LicenseFeeSubscriptionDetails extends StripeObject { + public static class PricingPlanSubscriptionDetails extends StripeObject { /** The invoice item that generated this line item. */ @SerializedName("invoice_item") String invoiceItem; - /** The license fee subscription that generated this line item. */ - @SerializedName("license_fee_subscription") - String licenseFeeSubscription; - - /** The license fee version at the time this line item was generated. */ - @SerializedName("license_fee_version") - String licenseFeeVersion; - - /** The pricing plan subscription that manages the license fee subscription. */ + /** The pricing plan subscription that manages this charge. */ @SerializedName("pricing_plan_subscription") String pricingPlanSubscription; - /** The pricing plan version at the time this line item was generated. */ + /** The pricing plan version at the time this charge was generated. */ @SerializedName("pricing_plan_version") String pricingPlanVersion; } @@ -526,14 +518,6 @@ public static class RateCardSubscriptionDetails extends StripeObject { @SerializedName("invoice_item") String invoiceItem; - /** The pricing plan subscription that manages the rate card subscription. */ - @SerializedName("pricing_plan_subscription") - String pricingPlanSubscription; - - /** The pricing plan version at the time this line item was generated. */ - @SerializedName("pricing_plan_version") - String pricingPlanVersion; - /** The rate card subscription that generated this line item. */ @SerializedName("rate_card_subscription") String rateCardSubscription; From 623abf287d03ea11cd992bf312aed96a8728811c Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Mon, 16 Mar 2026 20:56:53 +0000 Subject: [PATCH 11/13] Update generated code for v2202 and --- CODEGEN_VERSION | 2 +- OPENAPI_VERSION | 2 +- .../V2CoreHealthFraudRateIncreasedEvent.java | 19 +- ...AuthorizationRequestErrorsFiringEvent.java | 37 +-- ...thorizationRequestErrorsResolvedEvent.java | 37 +-- ...uthorizationRequestTimeoutFiringEvent.java | 37 +-- ...horizationRequestTimeoutResolvedEvent.java | 37 +-- ...inancialAddressGeneratedMicrodeposits.java | 27 +- .../model/v2/billing/ServiceAction.java | 50 +--- .../com/stripe/model/v2/core/Account.java | 46 +--- .../model/v2/moneymanagement/Adjustment.java | 22 +- .../moneymanagement/CurrencyConversion.java | 43 +--- .../v2/moneymanagement/FinancialAccount.java | 105 +------- .../v2/moneymanagement/InboundTransfer.java | 68 +---- .../v2/moneymanagement/OutboundPayment.java | 68 +---- .../moneymanagement/OutboundPaymentQuote.java | 89 +------ .../v2/moneymanagement/OutboundTransfer.java | 68 +---- .../v2/moneymanagement/ReceivedCredit.java | 45 +--- .../v2/moneymanagement/ReceivedDebit.java | 87 +------ .../model/v2/moneymanagement/Transaction.java | 91 +------ .../v2/moneymanagement/TransactionEntry.java | 70 +---- .../model/v2/payments/OffSessionPayment.java | 47 +--- .../payments/SettlementAllocationIntent.java | 22 +- .../SettlementAllocationIntentSplit.java | 22 +- .../v2/billing/ActionServiceCreateParams.java | 236 ++--------------- .../param/v2/core/AccountCreateParams.java | 220 +--------------- .../v2/core/AccountTokenCreateParams.java | 221 +--------------- .../param/v2/core/AccountUpdateParams.java | 242 +----------------- .../CurrencyConversionCreateParams.java | 203 +-------------- .../InboundTransferCreateParams.java | 99 +------ .../OutboundPaymentCreateParams.java | 99 +------ .../OutboundPaymentQuoteCreateParams.java | 101 +------- .../OutboundTransferCreateParams.java | 99 +------ .../OffSessionPaymentCreateParams.java | 100 +------- ...ettlementAllocationIntentCreateParams.java | 101 +------- ...ettlementAllocationIntentUpdateParams.java | 111 +------- .../SplitCreateParams.java | 99 +------ .../FinancialAddressCreditParams.java | 99 +------ .../stripe/functional/GeneratedExamples.java | 170 +++++------- 39 files changed, 163 insertions(+), 3178 deletions(-) diff --git a/CODEGEN_VERSION b/CODEGEN_VERSION index 282d09dd407..86c9b57e800 100644 --- a/CODEGEN_VERSION +++ b/CODEGEN_VERSION @@ -1 +1 @@ -9302385c295e8882b47b61945d61dc2470f0cfce \ No newline at end of file +f504fb42951e8181250357c8af0cab513111e480 \ No newline at end of file diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 21fcb610e46..8110841c8f5 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v2201 \ No newline at end of file +v2202 \ No newline at end of file diff --git a/src/main/java/com/stripe/events/V2CoreHealthFraudRateIncreasedEvent.java b/src/main/java/com/stripe/events/V2CoreHealthFraudRateIncreasedEvent.java index 85696a900e3..6ba5b5249b2 100644 --- a/src/main/java/com/stripe/events/V2CoreHealthFraudRateIncreasedEvent.java +++ b/src/main/java/com/stripe/events/V2CoreHealthFraudRateIncreasedEvent.java @@ -3,6 +3,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.model.v2.core.Event; +import com.stripe.v2.Amount; import java.time.Instant; import lombok.Getter; import lombok.Setter; @@ -48,23 +49,7 @@ public static final class Impact { Long impactedRequests; /** Estimated aggregated amount for the impacted requests. */ @SerializedName("realized_fraud_amount") - RealizedFraudAmount realizedFraudAmount; - - public static final class RealizedFraudAmount { - /** - * Three-letter ISO currency - * code, in lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - /** - * A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - } + Amount realizedFraudAmount; } } } diff --git a/src/main/java/com/stripe/events/V2CoreHealthIssuingAuthorizationRequestErrorsFiringEvent.java b/src/main/java/com/stripe/events/V2CoreHealthIssuingAuthorizationRequestErrorsFiringEvent.java index 90ae8a47990..3bc15bf47d6 100644 --- a/src/main/java/com/stripe/events/V2CoreHealthIssuingAuthorizationRequestErrorsFiringEvent.java +++ b/src/main/java/com/stripe/events/V2CoreHealthIssuingAuthorizationRequestErrorsFiringEvent.java @@ -3,6 +3,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.model.v2.core.Event; +import com.stripe.v2.Amount; import java.time.Instant; import lombok.Getter; import lombok.Setter; @@ -32,48 +33,16 @@ public static final class EventData { public static final class Impact { /** Estimated aggregated amount for the approved requests. */ @SerializedName("approved_amount") - ApprovedAmount approvedAmount; + Amount approvedAmount; /** The number of approved requests which are impacted. */ @SerializedName("approved_impacted_requests") Long approvedImpactedRequests; /** Estimated aggregated amount for the declined requests. */ @SerializedName("declined_amount") - DeclinedAmount declinedAmount; + Amount declinedAmount; /** The number of declined requests which are impacted. */ @SerializedName("declined_impacted_requests") Long declinedImpactedRequests; - - public static final class ApprovedAmount { - /** - * Three-letter ISO currency - * code, in lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - /** - * A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - } - - public static final class DeclinedAmount { - /** - * Three-letter ISO currency - * code, in lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - /** - * A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - } } } } diff --git a/src/main/java/com/stripe/events/V2CoreHealthIssuingAuthorizationRequestErrorsResolvedEvent.java b/src/main/java/com/stripe/events/V2CoreHealthIssuingAuthorizationRequestErrorsResolvedEvent.java index 1f1464a4738..fce01ca74c9 100644 --- a/src/main/java/com/stripe/events/V2CoreHealthIssuingAuthorizationRequestErrorsResolvedEvent.java +++ b/src/main/java/com/stripe/events/V2CoreHealthIssuingAuthorizationRequestErrorsResolvedEvent.java @@ -3,6 +3,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.model.v2.core.Event; +import com.stripe.v2.Amount; import java.time.Instant; import lombok.Getter; import lombok.Setter; @@ -35,48 +36,16 @@ public static final class EventData { public static final class Impact { /** Estimated aggregated amount for the approved requests. */ @SerializedName("approved_amount") - ApprovedAmount approvedAmount; + Amount approvedAmount; /** The number of approved requests which are impacted. */ @SerializedName("approved_impacted_requests") Long approvedImpactedRequests; /** Estimated aggregated amount for the declined requests. */ @SerializedName("declined_amount") - DeclinedAmount declinedAmount; + Amount declinedAmount; /** The number of declined requests which are impacted. */ @SerializedName("declined_impacted_requests") Long declinedImpactedRequests; - - public static final class ApprovedAmount { - /** - * Three-letter ISO currency - * code, in lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - /** - * A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - } - - public static final class DeclinedAmount { - /** - * Three-letter ISO currency - * code, in lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - /** - * A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - } } } } diff --git a/src/main/java/com/stripe/events/V2CoreHealthIssuingAuthorizationRequestTimeoutFiringEvent.java b/src/main/java/com/stripe/events/V2CoreHealthIssuingAuthorizationRequestTimeoutFiringEvent.java index c135ce92f45..3817a4b835d 100644 --- a/src/main/java/com/stripe/events/V2CoreHealthIssuingAuthorizationRequestTimeoutFiringEvent.java +++ b/src/main/java/com/stripe/events/V2CoreHealthIssuingAuthorizationRequestTimeoutFiringEvent.java @@ -3,6 +3,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.model.v2.core.Event; +import com.stripe.v2.Amount; import java.time.Instant; import lombok.Getter; import lombok.Setter; @@ -35,48 +36,16 @@ public static final class EventData { public static final class Impact { /** Estimated aggregated amount for the approved requests. */ @SerializedName("approved_amount") - ApprovedAmount approvedAmount; + Amount approvedAmount; /** The number of approved requests which are impacted. */ @SerializedName("approved_impacted_requests") Long approvedImpactedRequests; /** Estimated aggregated amount for the declined requests. */ @SerializedName("declined_amount") - DeclinedAmount declinedAmount; + Amount declinedAmount; /** The number of declined requests which are impacted. */ @SerializedName("declined_impacted_requests") Long declinedImpactedRequests; - - public static final class ApprovedAmount { - /** - * Three-letter ISO currency - * code, in lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - /** - * A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - } - - public static final class DeclinedAmount { - /** - * Three-letter ISO currency - * code, in lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - /** - * A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - } } } } diff --git a/src/main/java/com/stripe/events/V2CoreHealthIssuingAuthorizationRequestTimeoutResolvedEvent.java b/src/main/java/com/stripe/events/V2CoreHealthIssuingAuthorizationRequestTimeoutResolvedEvent.java index 339af97079b..f374cedcf01 100644 --- a/src/main/java/com/stripe/events/V2CoreHealthIssuingAuthorizationRequestTimeoutResolvedEvent.java +++ b/src/main/java/com/stripe/events/V2CoreHealthIssuingAuthorizationRequestTimeoutResolvedEvent.java @@ -3,6 +3,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.model.v2.core.Event; +import com.stripe.v2.Amount; import java.time.Instant; import lombok.Getter; import lombok.Setter; @@ -35,48 +36,16 @@ public static final class EventData { public static final class Impact { /** Estimated aggregated amount for the approved requests. */ @SerializedName("approved_amount") - ApprovedAmount approvedAmount; + Amount approvedAmount; /** The number of approved requests which are impacted. */ @SerializedName("approved_impacted_requests") Long approvedImpactedRequests; /** Estimated aggregated amount for the declined requests. */ @SerializedName("declined_amount") - DeclinedAmount declinedAmount; + Amount declinedAmount; /** The number of declined requests which are impacted. */ @SerializedName("declined_impacted_requests") Long declinedImpactedRequests; - - public static final class ApprovedAmount { - /** - * Three-letter ISO currency - * code, in lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - /** - * A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - } - - public static final class DeclinedAmount { - /** - * Three-letter ISO currency - * code, in lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - /** - * A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - } } } } diff --git a/src/main/java/com/stripe/model/v2/FinancialAddressGeneratedMicrodeposits.java b/src/main/java/com/stripe/model/v2/FinancialAddressGeneratedMicrodeposits.java index 621a62e20f3..1405406e3ee 100644 --- a/src/main/java/com/stripe/model/v2/FinancialAddressGeneratedMicrodeposits.java +++ b/src/main/java/com/stripe/model/v2/FinancialAddressGeneratedMicrodeposits.java @@ -3,6 +3,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.model.StripeObject; +import com.stripe.v2.Amount; import java.util.List; import lombok.EqualsAndHashCode; import lombok.Getter; @@ -18,7 +19,7 @@ public class FinancialAddressGeneratedMicrodeposits extends StripeObject { /** The amounts of the microdeposits that were generated. */ @SerializedName("amounts") - List amounts; + List amounts; /** * Has the value {@code true} if the object exists in live mode or the value {@code false} if the @@ -43,28 +44,4 @@ public class FinancialAddressGeneratedMicrodeposits extends StripeObject { */ @SerializedName("status") String status; - - /** - * For more details about Amount, please refer to the API - * Reference. - */ - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class Amount extends StripeObject { - /** - * Three-letter ISO currency - * code, in lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - - /** - * A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - } } diff --git a/src/main/java/com/stripe/model/v2/billing/ServiceAction.java b/src/main/java/com/stripe/model/v2/billing/ServiceAction.java index 5c1d212d7b8..4b818462a64 100644 --- a/src/main/java/com/stripe/model/v2/billing/ServiceAction.java +++ b/src/main/java/com/stripe/model/v2/billing/ServiceAction.java @@ -85,7 +85,7 @@ public class ServiceAction extends StripeObject implements HasId { public static class CreditGrant extends StripeObject { /** The amount of the credit grant. */ @SerializedName("amount") - Amount amount; + com.stripe.model.v2.billing.ServiceAction.CreditGrant.Amount amount; /** Defines the scope where the credit grant is applicable. */ @SerializedName("applicability_config") @@ -129,7 +129,7 @@ public static class Amount extends StripeObject { /** The monetary amount of the credit grant. Required if {@code type} is {@code monetary}. */ @SerializedName("monetary") - Monetary monetary; + com.stripe.v2.Amount monetary; /** * The type of the credit grant amount. We currently support {@code monetary} and {@code @@ -161,27 +161,6 @@ public static class CustomPricingUnit extends StripeObject implements HasId { @SerializedName("value") String value; } - - /** The monetary amount of the credit grant. Required if {@code type} is {@code monetary}. */ - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class Monetary extends StripeObject { - /** - * Three-letter ISO currency - * code, in lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - - /** - * A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - } } /** Defines the scope where the credit grant is applicable. */ @@ -239,7 +218,7 @@ public static class ExpiryConfig extends StripeObject { public static class CreditGrantPerTenant extends StripeObject { /** The amount of the credit grant. */ @SerializedName("amount") - Amount amount; + com.stripe.model.v2.billing.ServiceAction.CreditGrantPerTenant.Amount amount; /** Defines the scope where the credit grant is applicable. */ @SerializedName("applicability_config") @@ -283,7 +262,7 @@ public static class Amount extends StripeObject { /** The monetary amount of the credit grant. Required if {@code type} is {@code monetary}. */ @SerializedName("monetary") - Monetary monetary; + com.stripe.v2.Amount monetary; /** * The type of the credit grant amount. We currently support {@code monetary} and {@code @@ -315,27 +294,6 @@ public static class CustomPricingUnit extends StripeObject implements HasId { @SerializedName("value") String value; } - - /** The monetary amount of the credit grant. Required if {@code type} is {@code monetary}. */ - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class Monetary extends StripeObject { - /** - * Three-letter ISO currency - * code, in lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - - /** - * A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - } } /** Defines the scope where the credit grant is applicable. */ diff --git a/src/main/java/com/stripe/model/v2/core/Account.java b/src/main/java/com/stripe/model/v2/core/Account.java index 150007c9f63..47bc3ff8fdf 100644 --- a/src/main/java/com/stripe/model/v2/core/Account.java +++ b/src/main/java/com/stripe/model/v2/core/Account.java @@ -4,6 +4,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.model.HasId; import com.stripe.model.StripeObject; +import com.stripe.v2.Amount; import java.util.List; import java.util.Map; import lombok.EqualsAndHashCode; @@ -8344,27 +8345,6 @@ public static class AnnualRevenue extends StripeObject { */ @SerializedName("fiscal_year_end") String fiscalYearEnd; - - /** Annual revenue amount in minor currency units (for example, '123' for 1.23 USD). */ - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class Amount extends StripeObject { - /** - * Three-letter ISO currency - * code, in lowercase. Must be a supported currency. - */ - @SerializedName("currency") - String currency; - - /** - * A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - } } /** Documents that may be submitted to satisfy various informational requests. */ @@ -8743,30 +8723,6 @@ public static class MonthlyEstimatedRevenue extends StripeObject { */ @SerializedName("amount") Amount amount; - - /** - * Estimated monthly revenue amount in minor currency units (for example, '123' for 1.23 - * USD). - */ - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class Amount extends StripeObject { - /** - * Three-letter ISO currency - * code, in lowercase. Must be a supported currency. - */ - @SerializedName("currency") - String currency; - - /** - * A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - } } /** When the business was incorporated or registered. */ diff --git a/src/main/java/com/stripe/model/v2/moneymanagement/Adjustment.java b/src/main/java/com/stripe/model/v2/moneymanagement/Adjustment.java index 9c271edb4bd..f66d9526216 100644 --- a/src/main/java/com/stripe/model/v2/moneymanagement/Adjustment.java +++ b/src/main/java/com/stripe/model/v2/moneymanagement/Adjustment.java @@ -4,6 +4,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.model.HasId; import com.stripe.model.StripeObject; +import com.stripe.v2.Amount; import java.time.Instant; import lombok.EqualsAndHashCode; import lombok.Getter; @@ -114,25 +115,4 @@ public static class AdjustedFlow extends StripeObject { @SerializedName("type") String type; } - - /** The amount of the Adjustment. */ - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class Amount extends StripeObject { - /** - * Three-letter ISO currency - * code, in lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - - /** - * A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - } } diff --git a/src/main/java/com/stripe/model/v2/moneymanagement/CurrencyConversion.java b/src/main/java/com/stripe/model/v2/moneymanagement/CurrencyConversion.java index 1e97ae3b232..4fe82ec58ed 100644 --- a/src/main/java/com/stripe/model/v2/moneymanagement/CurrencyConversion.java +++ b/src/main/java/com/stripe/model/v2/moneymanagement/CurrencyConversion.java @@ -4,6 +4,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.model.HasId; import com.stripe.model.StripeObject; +import com.stripe.v2.Amount; import java.time.Instant; import lombok.EqualsAndHashCode; import lombok.Getter; @@ -63,27 +64,6 @@ public static class From extends StripeObject { /** Amount object. */ @SerializedName("amount") Amount amount; - - /** Amount object. */ - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class Amount extends StripeObject { - /** - * Three-letter ISO currency - * code, in lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - - /** - * A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - } } /** The to block containing what was credited. */ @@ -94,26 +74,5 @@ public static class To extends StripeObject { /** Amount object. */ @SerializedName("amount") Amount amount; - - /** Amount object. */ - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class Amount extends StripeObject { - /** - * Three-letter ISO currency - * code, in lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - - /** - * A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - } } } diff --git a/src/main/java/com/stripe/model/v2/moneymanagement/FinancialAccount.java b/src/main/java/com/stripe/model/v2/moneymanagement/FinancialAccount.java index 54fe5b06a1f..a723675d246 100644 --- a/src/main/java/com/stripe/model/v2/moneymanagement/FinancialAccount.java +++ b/src/main/java/com/stripe/model/v2/moneymanagement/FinancialAccount.java @@ -4,6 +4,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.model.HasId; import com.stripe.model.StripeObject; +import com.stripe.v2.Amount; import java.time.Instant; import java.util.List; import java.util.Map; @@ -160,87 +161,15 @@ public static class AccruedFees extends StripeObject { public static class Balance extends StripeObject { /** Balance that can be used for money movement. */ @SerializedName("available") - Map available; + Map available; /** Balance of inbound funds that will later transition to the {@code available} balance. */ @SerializedName("inbound_pending") - Map inboundPending; + Map inboundPending; /** Balance of funds that are being used for a pending outbound money movement. */ @SerializedName("outbound_pending") - Map outboundPending; - - /** - * For more details about Available, please refer to the API Reference. - */ - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class Available extends StripeObject { - /** - * Three-letter ISO currency - * code, in lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - - /** - * A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - } - - /** - * For more details about InboundPending, please refer to the API Reference. - */ - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class InboundPending extends StripeObject { - /** - * Three-letter ISO currency - * code, in lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - - /** - * A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - } - - /** - * For more details about OutboundPending, please refer to the API Reference. - */ - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class OutboundPending extends StripeObject { - /** - * Three-letter ISO currency - * code, in lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - - /** - * A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - } + Map outboundPending; } /** @@ -311,31 +240,7 @@ public static class StartingBalance extends StripeObject { /** The available balance at the time when the balance was projected. */ @SerializedName("available") - Map available; - - /** - * For more details about Available, please refer to the API Reference. - */ - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class Available extends StripeObject { - /** - * Three-letter ISO currency - * code, in lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - - /** - * A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - } + Map available; } } diff --git a/src/main/java/com/stripe/model/v2/moneymanagement/InboundTransfer.java b/src/main/java/com/stripe/model/v2/moneymanagement/InboundTransfer.java index 56e054e8aa0..4816f0ba479 100644 --- a/src/main/java/com/stripe/model/v2/moneymanagement/InboundTransfer.java +++ b/src/main/java/com/stripe/model/v2/moneymanagement/InboundTransfer.java @@ -4,6 +4,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.model.HasId; import com.stripe.model.StripeObject; +import com.stripe.v2.Amount; import java.time.Instant; import java.util.List; import java.util.Map; @@ -74,27 +75,6 @@ public class InboundTransfer extends StripeObject implements HasId { @SerializedName("transfer_history") List transferHistory; - /** The amount in specified currency that will land in the FinancialAccount balance. */ - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class Amount extends StripeObject { - /** - * Three-letter ISO currency - * code, in lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - - /** - * A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - } - /** A nested object containing information about the origin of the InboundTransfer. */ @Getter @Setter @@ -102,33 +82,12 @@ public static class Amount extends StripeObject { public static class From extends StripeObject { /** The amount in specified currency that was debited from the Payment Method. */ @SerializedName("debited") - Debited debited; + Amount debited; /** The Payment Method object used to create the InboundTransfer. */ @SerializedName("payment_method") PaymentMethod paymentMethod; - /** The amount in specified currency that was debited from the Payment Method. */ - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class Debited extends StripeObject { - /** - * Three-letter ISO currency - * code, in lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - - /** - * A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - } - /** The Payment Method object used to create the InboundTransfer. */ @Getter @Setter @@ -154,32 +113,11 @@ public static class PaymentMethod extends StripeObject { public static class To extends StripeObject { /** The amount by which the FinancialAccount balance is credited. */ @SerializedName("credited") - Credited credited; + Amount credited; /** The FinancialAccount that funds will land in. */ @SerializedName("financial_account") String financialAccount; - - /** The amount by which the FinancialAccount balance is credited. */ - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class Credited extends StripeObject { - /** - * Three-letter ISO currency - * code, in lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - - /** - * A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - } } /** diff --git a/src/main/java/com/stripe/model/v2/moneymanagement/OutboundPayment.java b/src/main/java/com/stripe/model/v2/moneymanagement/OutboundPayment.java index a5375d64a02..f028a1da013 100644 --- a/src/main/java/com/stripe/model/v2/moneymanagement/OutboundPayment.java +++ b/src/main/java/com/stripe/model/v2/moneymanagement/OutboundPayment.java @@ -4,6 +4,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.model.HasId; import com.stripe.model.StripeObject; +import com.stripe.v2.Amount; import java.time.Instant; import java.util.Map; import lombok.EqualsAndHashCode; @@ -161,27 +162,6 @@ public class OutboundPayment extends StripeObject implements HasId { @SerializedName("tracking_details") TrackingDetails trackingDetails; - /** The "presentment amount" for the OutboundPayment. */ - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class Amount extends StripeObject { - /** - * Three-letter ISO currency - * code, in lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - - /** - * A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - } - /** Delivery options to be used to send the OutboundPayment. */ @Getter @Setter @@ -237,32 +217,11 @@ public static class PaperCheck extends StripeObject { public static class From extends StripeObject { /** The monetary amount debited from the sender, only set on responses. */ @SerializedName("debited") - Debited debited; + Amount debited; /** The FinancialAccount that funds were pulled from. */ @SerializedName("financial_account") String financialAccount; - - /** The monetary amount debited from the sender, only set on responses. */ - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class Debited extends StripeObject { - /** - * Three-letter ISO currency - * code, in lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - - /** - * A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - } } /** Details about the OutboundPayment notification settings for recipient. */ @@ -374,7 +333,7 @@ public static class StatusTransitions extends StripeObject { public static class To extends StripeObject { /** The monetary amount being credited to the destination. */ @SerializedName("credited") - Credited credited; + Amount credited; /** The payout method which the OutboundPayment uses to send payout. */ @SerializedName("payout_method") @@ -383,27 +342,6 @@ public static class To extends StripeObject { /** To which account the OutboundPayment is sent. */ @SerializedName("recipient") String recipient; - - /** The monetary amount being credited to the destination. */ - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class Credited extends StripeObject { - /** - * Three-letter ISO currency - * code, in lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - - /** - * A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - } } /** diff --git a/src/main/java/com/stripe/model/v2/moneymanagement/OutboundPaymentQuote.java b/src/main/java/com/stripe/model/v2/moneymanagement/OutboundPaymentQuote.java index a9602b89124..e90feb2965e 100644 --- a/src/main/java/com/stripe/model/v2/moneymanagement/OutboundPaymentQuote.java +++ b/src/main/java/com/stripe/model/v2/moneymanagement/OutboundPaymentQuote.java @@ -4,6 +4,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.model.HasId; import com.stripe.model.StripeObject; +import com.stripe.v2.Amount; import java.time.Instant; import java.util.List; import java.util.Map; @@ -71,27 +72,6 @@ public class OutboundPaymentQuote extends StripeObject implements HasId { @SerializedName("to") To to; - /** The "presentment amount" for the OutboundPaymentQuote. */ - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class Amount extends StripeObject { - /** - * Three-letter ISO currency - * code, in lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - - /** - * A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - } - /** Delivery options to be used to send the OutboundPayment. */ @Getter @Setter @@ -135,27 +115,6 @@ public static class EstimatedFee extends StripeObject { */ @SerializedName("type") String type; - - /** The fee amount for corresponding fee type. */ - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class Amount extends StripeObject { - /** - * Three-letter ISO currency - * code, in lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - - /** - * A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - } } /** Details about the sender of an OutboundPaymentQuote. */ @@ -165,32 +124,11 @@ public static class Amount extends StripeObject { public static class From extends StripeObject { /** The monetary amount debited from the sender, only set on responses. */ @SerializedName("debited") - Debited debited; + Amount debited; /** The FinancialAccount that funds were pulled from. */ @SerializedName("financial_account") String financialAccount; - - /** The monetary amount debited from the sender, only set on responses. */ - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class Debited extends StripeObject { - /** - * Three-letter ISO currency - * code, in lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - - /** - * A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - } } /** The underlying FXQuote details for the OutboundPaymentQuote. */ @@ -252,7 +190,7 @@ public static class Rate extends StripeObject { public static class To extends StripeObject { /** The monetary amount being credited to the destination. */ @SerializedName("credited") - Credited credited; + Amount credited; /** The payout method which the OutboundPayment uses to send payout. */ @SerializedName("payout_method") @@ -261,26 +199,5 @@ public static class To extends StripeObject { /** To which account the OutboundPayment is sent. */ @SerializedName("recipient") String recipient; - - /** The monetary amount being credited to the destination. */ - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class Credited extends StripeObject { - /** - * Three-letter ISO currency - * code, in lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - - /** - * A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - } } } diff --git a/src/main/java/com/stripe/model/v2/moneymanagement/OutboundTransfer.java b/src/main/java/com/stripe/model/v2/moneymanagement/OutboundTransfer.java index a93728b73f5..8f9db4c7129 100644 --- a/src/main/java/com/stripe/model/v2/moneymanagement/OutboundTransfer.java +++ b/src/main/java/com/stripe/model/v2/moneymanagement/OutboundTransfer.java @@ -4,6 +4,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.model.HasId; import com.stripe.model.StripeObject; +import com.stripe.v2.Amount; import java.time.Instant; import java.util.Map; import lombok.EqualsAndHashCode; @@ -138,27 +139,6 @@ public class OutboundTransfer extends StripeObject implements HasId { @SerializedName("trace_id") TraceId traceId; - /** The "presentment amount" for the OutboundTransfer. */ - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class Amount extends StripeObject { - /** - * Three-letter ISO currency - * code, in lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - - /** - * A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - } - /** Delivery options to be used to send the OutboundTransfer. */ @Getter @Setter @@ -180,32 +160,11 @@ public static class DeliveryOptions extends StripeObject { public static class From extends StripeObject { /** The monetary amount debited from the sender, only set on responses. */ @SerializedName("debited") - Debited debited; + Amount debited; /** The FinancialAccount that funds were pulled from. */ @SerializedName("financial_account") String financialAccount; - - /** The monetary amount debited from the sender, only set on responses. */ - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class Debited extends StripeObject { - /** - * Three-letter ISO currency - * code, in lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - - /** - * A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - } } /** Status details for an OutboundTransfer in a {@code failed} or {@code returned} state. */ @@ -301,32 +260,11 @@ public static class StatusTransitions extends StripeObject { public static class To extends StripeObject { /** The monetary amount being credited to the destination. */ @SerializedName("credited") - Credited credited; + Amount credited; /** The payout method which the OutboundTransfer uses to send payout. */ @SerializedName("payout_method") String payoutMethod; - - /** The monetary amount being credited to the destination. */ - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class Credited extends StripeObject { - /** - * Three-letter ISO currency - * code, in lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - - /** - * A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - } } /** diff --git a/src/main/java/com/stripe/model/v2/moneymanagement/ReceivedCredit.java b/src/main/java/com/stripe/model/v2/moneymanagement/ReceivedCredit.java index f98a4962840..3c541808fbe 100644 --- a/src/main/java/com/stripe/model/v2/moneymanagement/ReceivedCredit.java +++ b/src/main/java/com/stripe/model/v2/moneymanagement/ReceivedCredit.java @@ -4,6 +4,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.model.HasId; import com.stripe.model.StripeObject; +import com.stripe.v2.Amount; import java.time.Instant; import lombok.EqualsAndHashCode; import lombok.Getter; @@ -55,7 +56,7 @@ public class ReceivedCredit extends StripeObject implements HasId { /** The amount and currency of the original/external credit request. */ @SerializedName("external_amount") - ExternalAmount externalAmount; + Amount externalAmount; /** Financial Account ID on which funds for ReceivedCredit were received. */ @SerializedName("financial_account") @@ -124,27 +125,6 @@ public class ReceivedCredit extends StripeObject implements HasId { @SerializedName("type") String type; - /** The amount and currency of the ReceivedCredit. */ - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class Amount extends StripeObject { - /** - * Three-letter ISO currency - * code, in lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - - /** - * A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - } - /** * This object stores details about the originating Stripe transaction that resulted in the * ReceivedCredit. Present if {@code type} field value is {@code balance_transfer}. @@ -369,27 +349,6 @@ public static class Refund extends StripeObject { } } - /** The amount and currency of the original/external credit request. */ - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class ExternalAmount extends StripeObject { - /** - * Three-letter ISO currency - * code, in lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - - /** - * A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - } - /** * This hash contains detailed information that elaborates on the specific status of the * ReceivedCredit. e.g the reason behind a failure if the status is marked as {@code failed}. diff --git a/src/main/java/com/stripe/model/v2/moneymanagement/ReceivedDebit.java b/src/main/java/com/stripe/model/v2/moneymanagement/ReceivedDebit.java index f665af59399..e763a4168e4 100644 --- a/src/main/java/com/stripe/model/v2/moneymanagement/ReceivedDebit.java +++ b/src/main/java/com/stripe/model/v2/moneymanagement/ReceivedDebit.java @@ -4,6 +4,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.model.HasId; import com.stripe.model.StripeObject; +import com.stripe.v2.Amount; import java.time.Instant; import java.util.List; import lombok.EqualsAndHashCode; @@ -53,7 +54,7 @@ public class ReceivedDebit extends StripeObject implements HasId { /** The amount and currency of the original/external debit request. */ @SerializedName("external_amount") - ExternalAmount externalAmount; + Amount externalAmount; /** Financial Account on which funds for ReceivedDebit were debited. */ @SerializedName("financial_account") @@ -116,27 +117,6 @@ public class ReceivedDebit extends StripeObject implements HasId { @SerializedName("type") String type; - /** Amount and currency of the ReceivedDebit. */ - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class Amount extends StripeObject { - /** - * Three-letter ISO currency - * code, in lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - - /** - * A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - } - /** * This object stores details about the balance transfer object that resulted in the * ReceivedDebit. @@ -252,27 +232,6 @@ public static class Authorization extends StripeObject { /** The reference to the v1 issuing authorization ID. */ @SerializedName("issuing_authorization_v1") String issuingAuthorizationV1; - - /** Amount associated with this issuing authorization. */ - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class Amount extends StripeObject { - /** - * Three-letter ISO currency - * code, in lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - - /** - * A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - } } /** @@ -290,51 +249,9 @@ public static class CardTransaction extends StripeObject { /** The reference to the v1 issuing transaction ID. */ @SerializedName("issuing_transaction_v1") String issuingTransactionV1; - - /** Amount associated with this issuing transaction. */ - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class Amount extends StripeObject { - /** - * Three-letter ISO currency - * code, in lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - - /** - * A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - } } } - /** The amount and currency of the original/external debit request. */ - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class ExternalAmount extends StripeObject { - /** - * Three-letter ISO currency - * code, in lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - - /** - * A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - } - /** Detailed information about the status of the ReceivedDebit. */ @Getter @Setter diff --git a/src/main/java/com/stripe/model/v2/moneymanagement/Transaction.java b/src/main/java/com/stripe/model/v2/moneymanagement/Transaction.java index 4a42d26653e..f5eeaadb119 100644 --- a/src/main/java/com/stripe/model/v2/moneymanagement/Transaction.java +++ b/src/main/java/com/stripe/model/v2/moneymanagement/Transaction.java @@ -4,6 +4,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.model.HasId; import com.stripe.model.StripeObject; +import com.stripe.v2.Amount; import java.time.Instant; import lombok.EqualsAndHashCode; import lombok.Getter; @@ -108,27 +109,6 @@ public class Transaction extends StripeObject implements HasId { @SerializedName("status_transitions") StatusTransitions statusTransitions; - /** The amount of the Transaction. */ - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class Amount extends StripeObject { - /** - * Three-letter ISO currency - * code, in lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - - /** - * A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - } - /** * The delta to the FinancialAccount's balance. The balance_impact for the Transaction is equal to * sum of its TransactionEntries that have {@code effective_at}s in the past. @@ -139,78 +119,15 @@ public static class Amount extends StripeObject { public static class BalanceImpact extends StripeObject { /** Impact to the available balance. */ @SerializedName("available") - Available available; + Amount available; /** Impact to the inbound_pending balance. */ @SerializedName("inbound_pending") - InboundPending inboundPending; + Amount inboundPending; /** Impact to the outbound_pending balance. */ @SerializedName("outbound_pending") - OutboundPending outboundPending; - - /** Impact to the available balance. */ - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class Available extends StripeObject { - /** - * Three-letter ISO currency - * code, in lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - - /** - * A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - } - - /** Impact to the inbound_pending balance. */ - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class InboundPending extends StripeObject { - /** - * Three-letter ISO currency - * code, in lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - - /** - * A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - } - - /** Impact to the outbound_pending balance. */ - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class OutboundPending extends StripeObject { - /** - * Three-letter ISO currency - * code, in lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - - /** - * A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - } + Amount outboundPending; } /** Details about the Flow object that created the Transaction. */ diff --git a/src/main/java/com/stripe/model/v2/moneymanagement/TransactionEntry.java b/src/main/java/com/stripe/model/v2/moneymanagement/TransactionEntry.java index de8bb601070..976e1c09cae 100644 --- a/src/main/java/com/stripe/model/v2/moneymanagement/TransactionEntry.java +++ b/src/main/java/com/stripe/model/v2/moneymanagement/TransactionEntry.java @@ -4,6 +4,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.model.HasId; import com.stripe.model.StripeObject; +import com.stripe.v2.Amount; import java.time.Instant; import lombok.EqualsAndHashCode; import lombok.Getter; @@ -68,78 +69,15 @@ public class TransactionEntry extends StripeObject implements HasId { public static class BalanceImpact extends StripeObject { /** Impact to the available balance. */ @SerializedName("available") - Available available; + Amount available; /** Impact to the inbound_pending balance. */ @SerializedName("inbound_pending") - InboundPending inboundPending; + Amount inboundPending; /** Impact to the outbound_pending balance. */ @SerializedName("outbound_pending") - OutboundPending outboundPending; - - /** Impact to the available balance. */ - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class Available extends StripeObject { - /** - * Three-letter ISO currency - * code, in lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - - /** - * A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - } - - /** Impact to the inbound_pending balance. */ - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class InboundPending extends StripeObject { - /** - * Three-letter ISO currency - * code, in lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - - /** - * A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - } - - /** Impact to the outbound_pending balance. */ - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class OutboundPending extends StripeObject { - /** - * Three-letter ISO currency - * code, in lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - - /** - * A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - } + Amount outboundPending; } /** Details copied from the transaction that this TransactionEntry belongs to. */ diff --git a/src/main/java/com/stripe/model/v2/payments/OffSessionPayment.java b/src/main/java/com/stripe/model/v2/payments/OffSessionPayment.java index f1ae51a7129..da3766cedc3 100644 --- a/src/main/java/com/stripe/model/v2/payments/OffSessionPayment.java +++ b/src/main/java/com/stripe/model/v2/payments/OffSessionPayment.java @@ -4,6 +4,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.model.HasId; import com.stripe.model.StripeObject; +import com.stripe.v2.Amount; import java.time.Instant; import java.util.Map; import lombok.EqualsAndHashCode; @@ -26,11 +27,11 @@ public class OffSessionPayment extends StripeObject implements HasId { /** The amount available to be captured. */ @SerializedName("amount_capturable") - AmountCapturable amountCapturable; + Amount amountCapturable; /** The “presentment amount” to be collected from the customer. */ @SerializedName("amount_requested") - AmountRequested amountRequested; + Amount amountRequested; /** * The frequency of the underlying payment. @@ -165,48 +166,6 @@ public class OffSessionPayment extends StripeObject implements HasId { @SerializedName("transfer_data") TransferData transferData; - /** The amount available to be captured. */ - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class AmountCapturable extends StripeObject { - /** - * Three-letter ISO currency - * code, in lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - - /** - * A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - } - - /** The “presentment amount” to be collected from the customer. */ - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class AmountRequested extends StripeObject { - /** - * Three-letter ISO currency - * code, in lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - - /** - * A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - } - /** Details about the capture configuration for the OffSessionPayment. */ @Getter @Setter diff --git a/src/main/java/com/stripe/model/v2/payments/SettlementAllocationIntent.java b/src/main/java/com/stripe/model/v2/payments/SettlementAllocationIntent.java index a57c6f217d1..803ee95936a 100644 --- a/src/main/java/com/stripe/model/v2/payments/SettlementAllocationIntent.java +++ b/src/main/java/com/stripe/model/v2/payments/SettlementAllocationIntent.java @@ -4,6 +4,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.model.HasId; import com.stripe.model.StripeObject; +import com.stripe.v2.Amount; import java.time.Instant; import java.util.List; import java.util.Map; @@ -81,27 +82,6 @@ public class SettlementAllocationIntent extends StripeObject implements HasId { @SerializedName("status_details") StatusDetails statusDetails; - /** The amount and currency of the SettlementAllocationIntent. */ - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class Amount extends StripeObject { - /** - * Three-letter ISO currency - * code, in lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - - /** - * A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - } - /** Status details for a SettlementAllocationIntent in {@code errored} state. */ @Getter @Setter diff --git a/src/main/java/com/stripe/model/v2/payments/SettlementAllocationIntentSplit.java b/src/main/java/com/stripe/model/v2/payments/SettlementAllocationIntentSplit.java index c870e9150e6..06677de52b7 100644 --- a/src/main/java/com/stripe/model/v2/payments/SettlementAllocationIntentSplit.java +++ b/src/main/java/com/stripe/model/v2/payments/SettlementAllocationIntentSplit.java @@ -4,6 +4,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.model.HasId; import com.stripe.model.StripeObject; +import com.stripe.v2.Amount; import java.time.Instant; import lombok.EqualsAndHashCode; import lombok.Getter; @@ -71,27 +72,6 @@ public class SettlementAllocationIntentSplit extends StripeObject implements Has @SerializedName("type") String type; - /** The amount and currency of the SettlementAllocationIntentSplit. */ - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class Amount extends StripeObject { - /** - * Three-letter ISO currency - * code, in lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - - /** - * A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - } - /** Details about the Flow object that settled the split. */ @Getter @Setter diff --git a/src/main/java/com/stripe/param/v2/billing/ActionServiceCreateParams.java b/src/main/java/com/stripe/param/v2/billing/ActionServiceCreateParams.java index 1be8e11f0fc..2e7c2e2e600 100644 --- a/src/main/java/com/stripe/param/v2/billing/ActionServiceCreateParams.java +++ b/src/main/java/com/stripe/param/v2/billing/ActionServiceCreateParams.java @@ -175,7 +175,7 @@ public Builder setType(ActionServiceCreateParams.Type type) { public static class CreditGrant { /** Required. The amount of the credit grant. */ @SerializedName("amount") - Amount amount; + com.stripe.param.v2.billing.ActionServiceCreateParams.CreditGrant.Amount amount; /** Required. Defines the scope where the credit grant is applicable. */ @SerializedName("applicability_config") @@ -210,7 +210,7 @@ public static class CreditGrant { Long priority; private CreditGrant( - Amount amount, + com.stripe.param.v2.billing.ActionServiceCreateParams.CreditGrant.Amount amount, ApplicabilityConfig applicabilityConfig, Category category, ExpiryConfig expiryConfig, @@ -231,7 +231,7 @@ public static Builder builder() { } public static class Builder { - private Amount amount; + private com.stripe.param.v2.billing.ActionServiceCreateParams.CreditGrant.Amount amount; private ApplicabilityConfig applicabilityConfig; @@ -346,7 +346,7 @@ public static class Amount { /** The monetary amount of the credit grant. Required if {@code type} is {@code monetary}. */ @SerializedName("monetary") - Monetary monetary; + com.stripe.v2.Amount monetary; /** * Required. The type of the credit grant amount. We currently support {@code @@ -358,7 +358,7 @@ public static class Amount { private Amount( CustomPricingUnit customPricingUnit, Map extraParams, - Monetary monetary, + com.stripe.v2.Amount monetary, Type type) { this.customPricingUnit = customPricingUnit; this.extraParams = extraParams; @@ -375,7 +375,7 @@ public static class Builder { private Map extraParams; - private Monetary monetary; + private com.stripe.v2.Amount monetary; private Type type; @@ -426,7 +426,7 @@ public Builder putAllExtraParam(Map map) { /** * The monetary amount of the credit grant. Required if {@code type} is {@code monetary}. */ - public Builder setMonetary(ActionServiceCreateParams.CreditGrant.Amount.Monetary monetary) { + public Builder setMonetary(com.stripe.v2.Amount monetary) { this.monetary = monetary; return this; } @@ -535,108 +535,6 @@ public Builder setValue(String value) { } } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Monetary { - /** - * Required. Three-letter ISO currency code, in - * lowercase. Must be a supported currency. - */ - @SerializedName("currency") - String currency; - - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field - * (serialized) name in this param object. Effectively, this map is flattened to its parent - * instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - - /** - * Required. A non-negative integer representing how much to charge in the - * smallest currency unit. - */ - @SerializedName("value") - Long value; - - private Monetary(String currency, Map extraParams, Long value) { - this.currency = currency; - this.extraParams = extraParams; - this.value = value; - } - - public static Builder builder() { - return new Builder(); - } - - public static class Builder { - private String currency; - - private Map extraParams; - - private Long value; - - /** Finalize and obtain parameter instance from this builder. */ - public ActionServiceCreateParams.CreditGrant.Amount.Monetary build() { - return new ActionServiceCreateParams.CreditGrant.Amount.Monetary( - this.currency, this.extraParams, this.value); - } - - /** - * Required. Three-letter ISO currency code, in - * lowercase. Must be a supported - * currency. - */ - public Builder setCurrency(String currency) { - this.currency = currency; - return this; - } - - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link ActionServiceCreateParams.CreditGrant.Amount.Monetary#extraParams} for - * the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } - - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link ActionServiceCreateParams.CreditGrant.Amount.Monetary#extraParams} for - * the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } - - /** - * Required. A non-negative integer representing how much to charge in - * the smallest currency - * unit. - */ - public Builder setValue(Long value) { - this.value = value; - return this; - } - } - } - public enum Type implements ApiRequestParams.EnumParam { @SerializedName("custom_pricing_unit") CUSTOM_PRICING_UNIT("custom_pricing_unit"), @@ -971,7 +869,7 @@ public enum Category implements ApiRequestParams.EnumParam { public static class CreditGrantPerTenant { /** Required. The amount of the credit grant. */ @SerializedName("amount") - Amount amount; + com.stripe.param.v2.billing.ActionServiceCreateParams.CreditGrantPerTenant.Amount amount; /** Required. Defines the scope where the credit grant is applicable. */ @SerializedName("applicability_config") @@ -1010,7 +908,7 @@ public static class CreditGrantPerTenant { Long priority; private CreditGrantPerTenant( - Amount amount, + com.stripe.param.v2.billing.ActionServiceCreateParams.CreditGrantPerTenant.Amount amount, ApplicabilityConfig applicabilityConfig, Category category, ExpiryConfig expiryConfig, @@ -1033,7 +931,8 @@ public static Builder builder() { } public static class Builder { - private Amount amount; + private com.stripe.param.v2.billing.ActionServiceCreateParams.CreditGrantPerTenant.Amount + amount; private ApplicabilityConfig applicabilityConfig; @@ -1159,7 +1058,7 @@ public static class Amount { /** The monetary amount of the credit grant. Required if {@code type} is {@code monetary}. */ @SerializedName("monetary") - Monetary monetary; + com.stripe.v2.Amount monetary; /** * Required. The type of the credit grant amount. We currently support {@code @@ -1171,7 +1070,7 @@ public static class Amount { private Amount( CustomPricingUnit customPricingUnit, Map extraParams, - Monetary monetary, + com.stripe.v2.Amount monetary, Type type) { this.customPricingUnit = customPricingUnit; this.extraParams = extraParams; @@ -1188,7 +1087,7 @@ public static class Builder { private Map extraParams; - private Monetary monetary; + private com.stripe.v2.Amount monetary; private Type type; @@ -1240,8 +1139,7 @@ public Builder putAllExtraParam(Map map) { /** * The monetary amount of the credit grant. Required if {@code type} is {@code monetary}. */ - public Builder setMonetary( - ActionServiceCreateParams.CreditGrantPerTenant.Amount.Monetary monetary) { + public Builder setMonetary(com.stripe.v2.Amount monetary) { this.monetary = monetary; return this; } @@ -1350,110 +1248,6 @@ public Builder setValue(String value) { } } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Monetary { - /** - * Required. Three-letter ISO currency code, in - * lowercase. Must be a supported currency. - */ - @SerializedName("currency") - String currency; - - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field - * (serialized) name in this param object. Effectively, this map is flattened to its parent - * instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - - /** - * Required. A non-negative integer representing how much to charge in the - * smallest currency unit. - */ - @SerializedName("value") - Long value; - - private Monetary(String currency, Map extraParams, Long value) { - this.currency = currency; - this.extraParams = extraParams; - this.value = value; - } - - public static Builder builder() { - return new Builder(); - } - - public static class Builder { - private String currency; - - private Map extraParams; - - private Long value; - - /** Finalize and obtain parameter instance from this builder. */ - public ActionServiceCreateParams.CreditGrantPerTenant.Amount.Monetary build() { - return new ActionServiceCreateParams.CreditGrantPerTenant.Amount.Monetary( - this.currency, this.extraParams, this.value); - } - - /** - * Required. Three-letter ISO currency code, in - * lowercase. Must be a supported - * currency. - */ - public Builder setCurrency(String currency) { - this.currency = currency; - return this; - } - - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link - * ActionServiceCreateParams.CreditGrantPerTenant.Amount.Monetary#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } - - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link - * ActionServiceCreateParams.CreditGrantPerTenant.Amount.Monetary#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } - - /** - * Required. A non-negative integer representing how much to charge in - * the smallest currency - * unit. - */ - public Builder setValue(Long value) { - this.value = value; - return this; - } - } - } - public enum Type implements ApiRequestParams.EnumParam { @SerializedName("custom_pricing_unit") CUSTOM_PRICING_UNIT("custom_pricing_unit"), diff --git a/src/main/java/com/stripe/param/v2/core/AccountCreateParams.java b/src/main/java/com/stripe/param/v2/core/AccountCreateParams.java index 698cbe234e6..4e8f38f6247 100644 --- a/src/main/java/com/stripe/param/v2/core/AccountCreateParams.java +++ b/src/main/java/com/stripe/param/v2/core/AccountCreateParams.java @@ -3,6 +3,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.net.ApiRequestParams; +import com.stripe.v2.Amount; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -23002,8 +23003,7 @@ public AccountCreateParams.Identity.BusinessDetails.AnnualRevenue build() { } /** A non-negative integer representing the amount in the smallest currency unit. */ - public Builder setAmount( - AccountCreateParams.Identity.BusinessDetails.AnnualRevenue.Amount amount) { + public Builder setAmount(Amount amount) { this.amount = amount; return this; } @@ -23045,112 +23045,6 @@ public Builder setFiscalYearEnd(String fiscalYearEnd) { return this; } } - - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Amount { - /** - * Required. Three-letter ISO currency code, in - * lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field - * (serialized) name in this param object. Effectively, this map is flattened to its - * parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - - /** - * Required. A non-negative integer representing how much to charge in - * the smallest currency - * unit. - */ - @SerializedName("value") - Long value; - - private Amount(String currency, Map extraParams, Long value) { - this.currency = currency; - this.extraParams = extraParams; - this.value = value; - } - - public static Builder builder() { - return new Builder(); - } - - public static class Builder { - private String currency; - - private Map extraParams; - - private Long value; - - /** Finalize and obtain parameter instance from this builder. */ - public AccountCreateParams.Identity.BusinessDetails.AnnualRevenue.Amount build() { - return new AccountCreateParams.Identity.BusinessDetails.AnnualRevenue.Amount( - this.currency, this.extraParams, this.value); - } - - /** - * Required. Three-letter ISO currency code, in - * lowercase. Must be a supported - * currency. - */ - public Builder setCurrency(String currency) { - this.currency = currency; - return this; - } - - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the - * original map. See {@link - * AccountCreateParams.Identity.BusinessDetails.AnnualRevenue.Amount#extraParams} for - * the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } - - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the - * original map. See {@link - * AccountCreateParams.Identity.BusinessDetails.AnnualRevenue.Amount#extraParams} for - * the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } - - /** - * Required. A non-negative integer representing how much to charge in - * the smallest currency - * unit. - */ - public Builder setValue(Long value) { - this.value = value; - return this; - } - } - } } @Getter @@ -25365,8 +25259,7 @@ public AccountCreateParams.Identity.BusinessDetails.MonthlyEstimatedRevenue buil } /** A non-negative integer representing the amount in the smallest currency unit. */ - public Builder setAmount( - AccountCreateParams.Identity.BusinessDetails.MonthlyEstimatedRevenue.Amount amount) { + public Builder setAmount(Amount amount) { this.amount = amount; return this; } @@ -25401,113 +25294,6 @@ public Builder putAllExtraParam(Map map) { return this; } } - - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Amount { - /** - * Required. Three-letter ISO currency code, in - * lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field - * (serialized) name in this param object. Effectively, this map is flattened to its - * parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - - /** - * Required. A non-negative integer representing how much to charge in - * the smallest currency - * unit. - */ - @SerializedName("value") - Long value; - - private Amount(String currency, Map extraParams, Long value) { - this.currency = currency; - this.extraParams = extraParams; - this.value = value; - } - - public static Builder builder() { - return new Builder(); - } - - public static class Builder { - private String currency; - - private Map extraParams; - - private Long value; - - /** Finalize and obtain parameter instance from this builder. */ - public AccountCreateParams.Identity.BusinessDetails.MonthlyEstimatedRevenue.Amount - build() { - return new AccountCreateParams.Identity.BusinessDetails.MonthlyEstimatedRevenue - .Amount(this.currency, this.extraParams, this.value); - } - - /** - * Required. Three-letter ISO currency code, in - * lowercase. Must be a supported - * currency. - */ - public Builder setCurrency(String currency) { - this.currency = currency; - return this; - } - - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the - * original map. See {@link - * AccountCreateParams.Identity.BusinessDetails.MonthlyEstimatedRevenue.Amount#extraParams} - * for the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } - - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the - * original map. See {@link - * AccountCreateParams.Identity.BusinessDetails.MonthlyEstimatedRevenue.Amount#extraParams} - * for the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } - - /** - * Required. A non-negative integer representing how much to charge in - * the smallest currency - * unit. - */ - public Builder setValue(Long value) { - this.value = value; - return this; - } - } - } } @Getter diff --git a/src/main/java/com/stripe/param/v2/core/AccountTokenCreateParams.java b/src/main/java/com/stripe/param/v2/core/AccountTokenCreateParams.java index 9485d08657b..ad8400a2a74 100644 --- a/src/main/java/com/stripe/param/v2/core/AccountTokenCreateParams.java +++ b/src/main/java/com/stripe/param/v2/core/AccountTokenCreateParams.java @@ -4,6 +4,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.net.ApiRequestParams; import com.stripe.param.common.EmptyParam; +import com.stripe.v2.Amount; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -3690,8 +3691,7 @@ public AccountTokenCreateParams.Identity.BusinessDetails.AnnualRevenue build() { } /** A non-negative integer representing the amount in the smallest currency unit. */ - public Builder setAmount( - AccountTokenCreateParams.Identity.BusinessDetails.AnnualRevenue.Amount amount) { + public Builder setAmount(Amount amount) { this.amount = amount; return this; } @@ -3735,112 +3735,6 @@ public Builder setFiscalYearEnd(String fiscalYearEnd) { return this; } } - - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Amount { - /** - * Required. Three-letter ISO currency code, in - * lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field - * (serialized) name in this param object. Effectively, this map is flattened to its - * parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - - /** - * Required. A non-negative integer representing how much to charge in - * the smallest currency - * unit. - */ - @SerializedName("value") - Long value; - - private Amount(String currency, Map extraParams, Long value) { - this.currency = currency; - this.extraParams = extraParams; - this.value = value; - } - - public static Builder builder() { - return new Builder(); - } - - public static class Builder { - private String currency; - - private Map extraParams; - - private Long value; - - /** Finalize and obtain parameter instance from this builder. */ - public AccountTokenCreateParams.Identity.BusinessDetails.AnnualRevenue.Amount build() { - return new AccountTokenCreateParams.Identity.BusinessDetails.AnnualRevenue.Amount( - this.currency, this.extraParams, this.value); - } - - /** - * Required. Three-letter ISO currency code, in - * lowercase. Must be a supported - * currency. - */ - public Builder setCurrency(String currency) { - this.currency = currency; - return this; - } - - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the - * original map. See {@link - * AccountTokenCreateParams.Identity.BusinessDetails.AnnualRevenue.Amount#extraParams} - * for the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } - - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the - * original map. See {@link - * AccountTokenCreateParams.Identity.BusinessDetails.AnnualRevenue.Amount#extraParams} - * for the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } - - /** - * Required. A non-negative integer representing how much to charge in - * the smallest currency - * unit. - */ - public Builder setValue(Long value) { - this.value = value; - return this; - } - } - } } @Getter @@ -6068,9 +5962,7 @@ public AccountTokenCreateParams.Identity.BusinessDetails.MonthlyEstimatedRevenue } /** A non-negative integer representing the amount in the smallest currency unit. */ - public Builder setAmount( - AccountTokenCreateParams.Identity.BusinessDetails.MonthlyEstimatedRevenue.Amount - amount) { + public Builder setAmount(Amount amount) { this.amount = amount; return this; } @@ -6105,113 +5997,6 @@ public Builder putAllExtraParam(Map map) { return this; } } - - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Amount { - /** - * Required. Three-letter ISO currency code, in - * lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - String currency; - - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field - * (serialized) name in this param object. Effectively, this map is flattened to its - * parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - - /** - * Required. A non-negative integer representing how much to charge in - * the smallest currency - * unit. - */ - @SerializedName("value") - Long value; - - private Amount(String currency, Map extraParams, Long value) { - this.currency = currency; - this.extraParams = extraParams; - this.value = value; - } - - public static Builder builder() { - return new Builder(); - } - - public static class Builder { - private String currency; - - private Map extraParams; - - private Long value; - - /** Finalize and obtain parameter instance from this builder. */ - public AccountTokenCreateParams.Identity.BusinessDetails.MonthlyEstimatedRevenue.Amount - build() { - return new AccountTokenCreateParams.Identity.BusinessDetails.MonthlyEstimatedRevenue - .Amount(this.currency, this.extraParams, this.value); - } - - /** - * Required. Three-letter ISO currency code, in - * lowercase. Must be a supported - * currency. - */ - public Builder setCurrency(String currency) { - this.currency = currency; - return this; - } - - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the - * original map. See {@link - * AccountTokenCreateParams.Identity.BusinessDetails.MonthlyEstimatedRevenue.Amount#extraParams} - * for the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } - - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the - * original map. See {@link - * AccountTokenCreateParams.Identity.BusinessDetails.MonthlyEstimatedRevenue.Amount#extraParams} - * for the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } - - /** - * Required. A non-negative integer representing how much to charge in - * the smallest currency - * unit. - */ - public Builder setValue(Long value) { - this.value = value; - return this; - } - } - } } @Getter diff --git a/src/main/java/com/stripe/param/v2/core/AccountUpdateParams.java b/src/main/java/com/stripe/param/v2/core/AccountUpdateParams.java index b6cd8950893..bf6cd172f97 100644 --- a/src/main/java/com/stripe/param/v2/core/AccountUpdateParams.java +++ b/src/main/java/com/stripe/param/v2/core/AccountUpdateParams.java @@ -4,6 +4,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.net.ApiRequestParams; import com.stripe.param.common.EmptyParam; +import com.stripe.v2.Amount; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -24480,8 +24481,7 @@ public AccountUpdateParams.Identity.BusinessDetails.AnnualRevenue build() { } /** A non-negative integer representing the amount in the smallest currency unit. */ - public Builder setAmount( - AccountUpdateParams.Identity.BusinessDetails.AnnualRevenue.Amount amount) { + public Builder setAmount(Amount amount) { this.amount = amount; return this; } @@ -24532,123 +24532,6 @@ public Builder setFiscalYearEnd(EmptyParam fiscalYearEnd) { return this; } } - - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Amount { - /** - * Required. Three-letter ISO currency code, in - * lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - Object currency; - - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field - * (serialized) name in this param object. Effectively, this map is flattened to its - * parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - - /** - * Required. A non-negative integer representing how much to charge in - * the smallest currency - * unit. - */ - @SerializedName("value") - Long value; - - private Amount(Object currency, Map extraParams, Long value) { - this.currency = currency; - this.extraParams = extraParams; - this.value = value; - } - - public static Builder builder() { - return new Builder(); - } - - public static class Builder { - private Object currency; - - private Map extraParams; - - private Long value; - - /** Finalize and obtain parameter instance from this builder. */ - public AccountUpdateParams.Identity.BusinessDetails.AnnualRevenue.Amount build() { - return new AccountUpdateParams.Identity.BusinessDetails.AnnualRevenue.Amount( - this.currency, this.extraParams, this.value); - } - - /** - * Required. Three-letter ISO currency code, in - * lowercase. Must be a supported - * currency. - */ - public Builder setCurrency(String currency) { - this.currency = currency; - return this; - } - - /** - * Required. Three-letter ISO currency code, in - * lowercase. Must be a supported - * currency. - */ - public Builder setCurrency(EmptyParam currency) { - this.currency = currency; - return this; - } - - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the - * original map. See {@link - * AccountUpdateParams.Identity.BusinessDetails.AnnualRevenue.Amount#extraParams} for - * the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } - - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the - * original map. See {@link - * AccountUpdateParams.Identity.BusinessDetails.AnnualRevenue.Amount#extraParams} for - * the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } - - /** - * Required. A non-negative integer representing how much to charge in - * the smallest currency - * unit. - */ - public Builder setValue(Long value) { - this.value = value; - return this; - } - } - } } @Getter @@ -26898,8 +26781,7 @@ public AccountUpdateParams.Identity.BusinessDetails.MonthlyEstimatedRevenue buil } /** A non-negative integer representing the amount in the smallest currency unit. */ - public Builder setAmount( - AccountUpdateParams.Identity.BusinessDetails.MonthlyEstimatedRevenue.Amount amount) { + public Builder setAmount(Amount amount) { this.amount = amount; return this; } @@ -26934,124 +26816,6 @@ public Builder putAllExtraParam(Map map) { return this; } } - - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Amount { - /** - * Required. Three-letter ISO currency code, in - * lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - Object currency; - - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field - * (serialized) name in this param object. Effectively, this map is flattened to its - * parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - - /** - * Required. A non-negative integer representing how much to charge in - * the smallest currency - * unit. - */ - @SerializedName("value") - Long value; - - private Amount(Object currency, Map extraParams, Long value) { - this.currency = currency; - this.extraParams = extraParams; - this.value = value; - } - - public static Builder builder() { - return new Builder(); - } - - public static class Builder { - private Object currency; - - private Map extraParams; - - private Long value; - - /** Finalize and obtain parameter instance from this builder. */ - public AccountUpdateParams.Identity.BusinessDetails.MonthlyEstimatedRevenue.Amount - build() { - return new AccountUpdateParams.Identity.BusinessDetails.MonthlyEstimatedRevenue - .Amount(this.currency, this.extraParams, this.value); - } - - /** - * Required. Three-letter ISO currency code, in - * lowercase. Must be a supported - * currency. - */ - public Builder setCurrency(String currency) { - this.currency = currency; - return this; - } - - /** - * Required. Three-letter ISO currency code, in - * lowercase. Must be a supported - * currency. - */ - public Builder setCurrency(EmptyParam currency) { - this.currency = currency; - return this; - } - - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the - * original map. See {@link - * AccountUpdateParams.Identity.BusinessDetails.MonthlyEstimatedRevenue.Amount#extraParams} - * for the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } - - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the - * original map. See {@link - * AccountUpdateParams.Identity.BusinessDetails.MonthlyEstimatedRevenue.Amount#extraParams} - * for the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } - - /** - * Required. A non-negative integer representing how much to charge in - * the smallest currency - * unit. - */ - public Builder setValue(Long value) { - this.value = value; - return this; - } - } - } } @Getter diff --git a/src/main/java/com/stripe/param/v2/moneymanagement/CurrencyConversionCreateParams.java b/src/main/java/com/stripe/param/v2/moneymanagement/CurrencyConversionCreateParams.java index 712020d691f..b09290b3fb8 100644 --- a/src/main/java/com/stripe/param/v2/moneymanagement/CurrencyConversionCreateParams.java +++ b/src/main/java/com/stripe/param/v2/moneymanagement/CurrencyConversionCreateParams.java @@ -3,6 +3,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.net.ApiRequestParams; +import com.stripe.v2.Amount; import java.util.HashMap; import java.util.Map; import lombok.EqualsAndHashCode; @@ -155,7 +156,7 @@ public CurrencyConversionCreateParams.From build() { } /** Amount object. */ - public Builder setAmount(CurrencyConversionCreateParams.From.Amount amount) { + public Builder setAmount(Amount amount) { this.amount = amount; return this; } @@ -192,105 +193,6 @@ public Builder putAllExtraParam(Map map) { return this; } } - - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Amount { - /** - * Required. Three-letter ISO currency code, in - * lowercase. Must be a supported currency. - */ - @SerializedName("currency") - String currency; - - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - - /** - * Required. A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - - private Amount(String currency, Map extraParams, Long value) { - this.currency = currency; - this.extraParams = extraParams; - this.value = value; - } - - public static Builder builder() { - return new Builder(); - } - - public static class Builder { - private String currency; - - private Map extraParams; - - private Long value; - - /** Finalize and obtain parameter instance from this builder. */ - public CurrencyConversionCreateParams.From.Amount build() { - return new CurrencyConversionCreateParams.From.Amount( - this.currency, this.extraParams, this.value); - } - - /** - * Required. Three-letter ISO currency code, in - * lowercase. Must be a supported currency. - */ - public Builder setCurrency(String currency) { - this.currency = currency; - return this; - } - - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link CurrencyConversionCreateParams.From.Amount#extraParams} for the field - * documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } - - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link CurrencyConversionCreateParams.From.Amount#extraParams} for the field - * documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } - - /** - * Required. A non-negative integer representing how much to charge in the - * smallest currency unit. - */ - public Builder setValue(Long value) { - this.value = value; - return this; - } - } - } } @Getter @@ -336,7 +238,7 @@ public CurrencyConversionCreateParams.To build() { } /** Amount object. */ - public Builder setAmount(CurrencyConversionCreateParams.To.Amount amount) { + public Builder setAmount(Amount amount) { this.amount = amount; return this; } @@ -373,104 +275,5 @@ public Builder putAllExtraParam(Map map) { return this; } } - - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Amount { - /** - * Required. Three-letter ISO currency code, in - * lowercase. Must be a supported currency. - */ - @SerializedName("currency") - String currency; - - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - - /** - * Required. A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - - private Amount(String currency, Map extraParams, Long value) { - this.currency = currency; - this.extraParams = extraParams; - this.value = value; - } - - public static Builder builder() { - return new Builder(); - } - - public static class Builder { - private String currency; - - private Map extraParams; - - private Long value; - - /** Finalize and obtain parameter instance from this builder. */ - public CurrencyConversionCreateParams.To.Amount build() { - return new CurrencyConversionCreateParams.To.Amount( - this.currency, this.extraParams, this.value); - } - - /** - * Required. Three-letter ISO currency code, in - * lowercase. Must be a supported currency. - */ - public Builder setCurrency(String currency) { - this.currency = currency; - return this; - } - - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link CurrencyConversionCreateParams.To.Amount#extraParams} for the field - * documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } - - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link CurrencyConversionCreateParams.To.Amount#extraParams} for the field - * documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } - - /** - * Required. A non-negative integer representing how much to charge in the - * smallest currency unit. - */ - public Builder setValue(Long value) { - this.value = value; - return this; - } - } - } } } diff --git a/src/main/java/com/stripe/param/v2/moneymanagement/InboundTransferCreateParams.java b/src/main/java/com/stripe/param/v2/moneymanagement/InboundTransferCreateParams.java index 15f5d5937f6..9be96532c88 100644 --- a/src/main/java/com/stripe/param/v2/moneymanagement/InboundTransferCreateParams.java +++ b/src/main/java/com/stripe/param/v2/moneymanagement/InboundTransferCreateParams.java @@ -3,6 +3,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.net.ApiRequestParams; +import com.stripe.v2.Amount; import java.util.HashMap; import java.util.Map; import lombok.EqualsAndHashCode; @@ -75,7 +76,7 @@ public InboundTransferCreateParams build() { * Required. The amount, in specified currency, by which the FinancialAccount * balance will increase due to the InboundTransfer. */ - public Builder setAmount(InboundTransferCreateParams.Amount amount) { + public Builder setAmount(Amount amount) { this.amount = amount; return this; } @@ -128,102 +129,6 @@ public Builder setTo(InboundTransferCreateParams.To to) { } } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Amount { - /** - * Required. Three-letter ISO currency code, in lowercase. - * Must be a supported currency. - */ - @SerializedName("currency") - String currency; - - /** - * Map of extra parameters for custom features not available in this client library. The content - * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each - * key/value pair is serialized as if the key is a root-level field (serialized) name in this - * param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - - /** - * Required. A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - - private Amount(String currency, Map extraParams, Long value) { - this.currency = currency; - this.extraParams = extraParams; - this.value = value; - } - - public static Builder builder() { - return new Builder(); - } - - public static class Builder { - private String currency; - - private Map extraParams; - - private Long value; - - /** Finalize and obtain parameter instance from this builder. */ - public InboundTransferCreateParams.Amount build() { - return new InboundTransferCreateParams.Amount(this.currency, this.extraParams, this.value); - } - - /** - * Required. Three-letter ISO currency code, in - * lowercase. Must be a supported currency. - */ - public Builder setCurrency(String currency) { - this.currency = currency; - return this; - } - - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` - * call, and subsequent calls add additional key/value pairs to the original map. See {@link - * InboundTransferCreateParams.Amount#extraParams} for the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } - - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. - * See {@link InboundTransferCreateParams.Amount#extraParams} for the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } - - /** - * Required. A non-negative integer representing how much to charge in the smallest currency unit. - */ - public Builder setValue(Long value) { - this.value = value; - return this; - } - } - } - @Getter @EqualsAndHashCode(callSuper = false) public static class From { diff --git a/src/main/java/com/stripe/param/v2/moneymanagement/OutboundPaymentCreateParams.java b/src/main/java/com/stripe/param/v2/moneymanagement/OutboundPaymentCreateParams.java index 7d54dbea75d..f18ec62fcb8 100644 --- a/src/main/java/com/stripe/param/v2/moneymanagement/OutboundPaymentCreateParams.java +++ b/src/main/java/com/stripe/param/v2/moneymanagement/OutboundPaymentCreateParams.java @@ -3,6 +3,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.net.ApiRequestParams; +import com.stripe.v2.Amount; import java.util.HashMap; import java.util.Map; import lombok.EqualsAndHashCode; @@ -140,7 +141,7 @@ public OutboundPaymentCreateParams build() { /** * Required. The "presentment amount" to be sent to the recipient. */ - public Builder setAmount(OutboundPaymentCreateParams.Amount amount) { + public Builder setAmount(Amount amount) { this.amount = amount; return this; } @@ -257,102 +258,6 @@ public Builder setTo(OutboundPaymentCreateParams.To to) { } } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Amount { - /** - * Required. Three-letter ISO currency code, in lowercase. - * Must be a supported currency. - */ - @SerializedName("currency") - String currency; - - /** - * Map of extra parameters for custom features not available in this client library. The content - * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each - * key/value pair is serialized as if the key is a root-level field (serialized) name in this - * param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - - /** - * Required. A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - - private Amount(String currency, Map extraParams, Long value) { - this.currency = currency; - this.extraParams = extraParams; - this.value = value; - } - - public static Builder builder() { - return new Builder(); - } - - public static class Builder { - private String currency; - - private Map extraParams; - - private Long value; - - /** Finalize and obtain parameter instance from this builder. */ - public OutboundPaymentCreateParams.Amount build() { - return new OutboundPaymentCreateParams.Amount(this.currency, this.extraParams, this.value); - } - - /** - * Required. Three-letter ISO currency code, in - * lowercase. Must be a supported currency. - */ - public Builder setCurrency(String currency) { - this.currency = currency; - return this; - } - - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` - * call, and subsequent calls add additional key/value pairs to the original map. See {@link - * OutboundPaymentCreateParams.Amount#extraParams} for the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } - - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. - * See {@link OutboundPaymentCreateParams.Amount#extraParams} for the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } - - /** - * Required. A non-negative integer representing how much to charge in the smallest currency unit. - */ - public Builder setValue(Long value) { - this.value = value; - return this; - } - } - } - @Getter @EqualsAndHashCode(callSuper = false) public static class DeliveryOptions { diff --git a/src/main/java/com/stripe/param/v2/moneymanagement/OutboundPaymentQuoteCreateParams.java b/src/main/java/com/stripe/param/v2/moneymanagement/OutboundPaymentQuoteCreateParams.java index 775729fc241..23ddfb84112 100644 --- a/src/main/java/com/stripe/param/v2/moneymanagement/OutboundPaymentQuoteCreateParams.java +++ b/src/main/java/com/stripe/param/v2/moneymanagement/OutboundPaymentQuoteCreateParams.java @@ -3,6 +3,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.net.ApiRequestParams; +import com.stripe.v2.Amount; import java.util.HashMap; import java.util.Map; import lombok.EqualsAndHashCode; @@ -73,7 +74,7 @@ public OutboundPaymentQuoteCreateParams build() { /** * Required. The "presentment amount" to be sent to the recipient. */ - public Builder setAmount(OutboundPaymentQuoteCreateParams.Amount amount) { + public Builder setAmount(Amount amount) { this.amount = amount; return this; } @@ -126,104 +127,6 @@ public Builder setTo(OutboundPaymentQuoteCreateParams.To to) { } } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Amount { - /** - * Required. Three-letter ISO currency code, in lowercase. - * Must be a supported currency. - */ - @SerializedName("currency") - String currency; - - /** - * Map of extra parameters for custom features not available in this client library. The content - * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each - * key/value pair is serialized as if the key is a root-level field (serialized) name in this - * param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - - /** - * Required. A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - - private Amount(String currency, Map extraParams, Long value) { - this.currency = currency; - this.extraParams = extraParams; - this.value = value; - } - - public static Builder builder() { - return new Builder(); - } - - public static class Builder { - private String currency; - - private Map extraParams; - - private Long value; - - /** Finalize and obtain parameter instance from this builder. */ - public OutboundPaymentQuoteCreateParams.Amount build() { - return new OutboundPaymentQuoteCreateParams.Amount( - this.currency, this.extraParams, this.value); - } - - /** - * Required. Three-letter ISO currency code, in - * lowercase. Must be a supported currency. - */ - public Builder setCurrency(String currency) { - this.currency = currency; - return this; - } - - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` - * call, and subsequent calls add additional key/value pairs to the original map. See {@link - * OutboundPaymentQuoteCreateParams.Amount#extraParams} for the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } - - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. - * See {@link OutboundPaymentQuoteCreateParams.Amount#extraParams} for the field - * documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } - - /** - * Required. A non-negative integer representing how much to charge in the smallest currency unit. - */ - public Builder setValue(Long value) { - this.value = value; - return this; - } - } - } - @Getter @EqualsAndHashCode(callSuper = false) public static class DeliveryOptions { diff --git a/src/main/java/com/stripe/param/v2/moneymanagement/OutboundTransferCreateParams.java b/src/main/java/com/stripe/param/v2/moneymanagement/OutboundTransferCreateParams.java index d62fa6e4232..b738831fc9b 100644 --- a/src/main/java/com/stripe/param/v2/moneymanagement/OutboundTransferCreateParams.java +++ b/src/main/java/com/stripe/param/v2/moneymanagement/OutboundTransferCreateParams.java @@ -3,6 +3,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.net.ApiRequestParams; +import com.stripe.v2.Amount; import java.util.HashMap; import java.util.Map; import lombok.EqualsAndHashCode; @@ -108,7 +109,7 @@ public OutboundTransferCreateParams build() { } /** Required. The "presentment amount" for the OutboundPayment. */ - public Builder setAmount(OutboundTransferCreateParams.Amount amount) { + public Builder setAmount(Amount amount) { this.amount = amount; return this; } @@ -202,102 +203,6 @@ public Builder setTo(OutboundTransferCreateParams.To to) { } } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Amount { - /** - * Required. Three-letter ISO currency code, in lowercase. - * Must be a supported currency. - */ - @SerializedName("currency") - String currency; - - /** - * Map of extra parameters for custom features not available in this client library. The content - * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each - * key/value pair is serialized as if the key is a root-level field (serialized) name in this - * param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - - /** - * Required. A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - - private Amount(String currency, Map extraParams, Long value) { - this.currency = currency; - this.extraParams = extraParams; - this.value = value; - } - - public static Builder builder() { - return new Builder(); - } - - public static class Builder { - private String currency; - - private Map extraParams; - - private Long value; - - /** Finalize and obtain parameter instance from this builder. */ - public OutboundTransferCreateParams.Amount build() { - return new OutboundTransferCreateParams.Amount(this.currency, this.extraParams, this.value); - } - - /** - * Required. Three-letter ISO currency code, in - * lowercase. Must be a supported currency. - */ - public Builder setCurrency(String currency) { - this.currency = currency; - return this; - } - - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` - * call, and subsequent calls add additional key/value pairs to the original map. See {@link - * OutboundTransferCreateParams.Amount#extraParams} for the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } - - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. - * See {@link OutboundTransferCreateParams.Amount#extraParams} for the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } - - /** - * Required. A non-negative integer representing how much to charge in the smallest currency unit. - */ - public Builder setValue(Long value) { - this.value = value; - return this; - } - } - } - @Getter @EqualsAndHashCode(callSuper = false) public static class DeliveryOptions { diff --git a/src/main/java/com/stripe/param/v2/payments/OffSessionPaymentCreateParams.java b/src/main/java/com/stripe/param/v2/payments/OffSessionPaymentCreateParams.java index 1cbb2ac66be..e256020de47 100644 --- a/src/main/java/com/stripe/param/v2/payments/OffSessionPaymentCreateParams.java +++ b/src/main/java/com/stripe/param/v2/payments/OffSessionPaymentCreateParams.java @@ -3,6 +3,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.net.ApiRequestParams; +import com.stripe.v2.Amount; import java.util.HashMap; import java.util.Map; import lombok.EqualsAndHashCode; @@ -198,7 +199,7 @@ public OffSessionPaymentCreateParams build() { } /** Required. The “presentment amount” to be collected from the customer. */ - public Builder setAmount(OffSessionPaymentCreateParams.Amount amount) { + public Builder setAmount(Amount amount) { this.amount = amount; return this; } @@ -355,103 +356,6 @@ public Builder setTransferData(OffSessionPaymentCreateParams.TransferData transf } } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Amount { - /** - * Required. Three-letter ISO currency code, in lowercase. - * Must be a supported currency. - */ - @SerializedName("currency") - String currency; - - /** - * Map of extra parameters for custom features not available in this client library. The content - * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each - * key/value pair is serialized as if the key is a root-level field (serialized) name in this - * param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - - /** - * Required. A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - - private Amount(String currency, Map extraParams, Long value) { - this.currency = currency; - this.extraParams = extraParams; - this.value = value; - } - - public static Builder builder() { - return new Builder(); - } - - public static class Builder { - private String currency; - - private Map extraParams; - - private Long value; - - /** Finalize and obtain parameter instance from this builder. */ - public OffSessionPaymentCreateParams.Amount build() { - return new OffSessionPaymentCreateParams.Amount( - this.currency, this.extraParams, this.value); - } - - /** - * Required. Three-letter ISO currency code, in - * lowercase. Must be a supported currency. - */ - public Builder setCurrency(String currency) { - this.currency = currency; - return this; - } - - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` - * call, and subsequent calls add additional key/value pairs to the original map. See {@link - * OffSessionPaymentCreateParams.Amount#extraParams} for the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } - - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. - * See {@link OffSessionPaymentCreateParams.Amount#extraParams} for the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } - - /** - * Required. A non-negative integer representing how much to charge in the smallest currency unit. - */ - public Builder setValue(Long value) { - this.value = value; - return this; - } - } - } - @Getter @EqualsAndHashCode(callSuper = false) public static class Capture { diff --git a/src/main/java/com/stripe/param/v2/payments/SettlementAllocationIntentCreateParams.java b/src/main/java/com/stripe/param/v2/payments/SettlementAllocationIntentCreateParams.java index 0ae7e7e422f..b5fd65d7115 100644 --- a/src/main/java/com/stripe/param/v2/payments/SettlementAllocationIntentCreateParams.java +++ b/src/main/java/com/stripe/param/v2/payments/SettlementAllocationIntentCreateParams.java @@ -3,6 +3,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.net.ApiRequestParams; +import com.stripe.v2.Amount; import java.time.Instant; import java.util.HashMap; import java.util.Map; @@ -100,7 +101,7 @@ public SettlementAllocationIntentCreateParams build() { * Required. The amount and currency of the SettlementAllocationIntent. Allowed * Currencies are {@code gbp} | {@code eur}. */ - public Builder setAmount(SettlementAllocationIntentCreateParams.Amount amount) { + public Builder setAmount(Amount amount) { this.amount = amount; return this; } @@ -184,102 +185,4 @@ public Builder setReference(String reference) { return this; } } - - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Amount { - /** - * Required. Three-letter ISO currency code, in lowercase. - * Must be a supported currency. - */ - @SerializedName("currency") - String currency; - - /** - * Map of extra parameters for custom features not available in this client library. The content - * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each - * key/value pair is serialized as if the key is a root-level field (serialized) name in this - * param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - - /** - * Required. A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - - private Amount(String currency, Map extraParams, Long value) { - this.currency = currency; - this.extraParams = extraParams; - this.value = value; - } - - public static Builder builder() { - return new Builder(); - } - - public static class Builder { - private String currency; - - private Map extraParams; - - private Long value; - - /** Finalize and obtain parameter instance from this builder. */ - public SettlementAllocationIntentCreateParams.Amount build() { - return new SettlementAllocationIntentCreateParams.Amount( - this.currency, this.extraParams, this.value); - } - - /** - * Required. Three-letter ISO currency code, in - * lowercase. Must be a supported currency. - */ - public Builder setCurrency(String currency) { - this.currency = currency; - return this; - } - - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` - * call, and subsequent calls add additional key/value pairs to the original map. See {@link - * SettlementAllocationIntentCreateParams.Amount#extraParams} for the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } - - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. - * See {@link SettlementAllocationIntentCreateParams.Amount#extraParams} for the field - * documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } - - /** - * Required. A non-negative integer representing how much to charge in the smallest currency unit. - */ - public Builder setValue(Long value) { - this.value = value; - return this; - } - } - } } diff --git a/src/main/java/com/stripe/param/v2/payments/SettlementAllocationIntentUpdateParams.java b/src/main/java/com/stripe/param/v2/payments/SettlementAllocationIntentUpdateParams.java index 8c4e36e300f..d95661afe71 100644 --- a/src/main/java/com/stripe/param/v2/payments/SettlementAllocationIntentUpdateParams.java +++ b/src/main/java/com/stripe/param/v2/payments/SettlementAllocationIntentUpdateParams.java @@ -4,6 +4,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.net.ApiRequestParams; import com.stripe.param.common.EmptyParam; +import com.stripe.v2.Amount; import java.util.HashMap; import java.util.Map; import lombok.EqualsAndHashCode; @@ -60,7 +61,7 @@ public SettlementAllocationIntentUpdateParams build() { * The new amount for the SettlementAllocationIntent. Only amount.value can be updated and * currency must remain same. */ - public Builder setAmount(SettlementAllocationIntentUpdateParams.Amount amount) { + public Builder setAmount(Amount amount) { this.amount = amount; return this; } @@ -103,112 +104,4 @@ public Builder setReference(EmptyParam reference) { return this; } } - - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Amount { - /** - * Required. Three-letter ISO currency code, in lowercase. - * Must be a supported currency. - */ - @SerializedName("currency") - Object currency; - - /** - * Map of extra parameters for custom features not available in this client library. The content - * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each - * key/value pair is serialized as if the key is a root-level field (serialized) name in this - * param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - - /** - * Required. A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - - private Amount(Object currency, Map extraParams, Long value) { - this.currency = currency; - this.extraParams = extraParams; - this.value = value; - } - - public static Builder builder() { - return new Builder(); - } - - public static class Builder { - private Object currency; - - private Map extraParams; - - private Long value; - - /** Finalize and obtain parameter instance from this builder. */ - public SettlementAllocationIntentUpdateParams.Amount build() { - return new SettlementAllocationIntentUpdateParams.Amount( - this.currency, this.extraParams, this.value); - } - - /** - * Required. Three-letter ISO currency code, in - * lowercase. Must be a supported currency. - */ - public Builder setCurrency(String currency) { - this.currency = currency; - return this; - } - - /** - * Required. Three-letter ISO currency code, in - * lowercase. Must be a supported currency. - */ - public Builder setCurrency(EmptyParam currency) { - this.currency = currency; - return this; - } - - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` - * call, and subsequent calls add additional key/value pairs to the original map. See {@link - * SettlementAllocationIntentUpdateParams.Amount#extraParams} for the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } - - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. - * See {@link SettlementAllocationIntentUpdateParams.Amount#extraParams} for the field - * documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } - - /** - * Required. A non-negative integer representing how much to charge in the smallest currency unit. - */ - public Builder setValue(Long value) { - this.value = value; - return this; - } - } - } } diff --git a/src/main/java/com/stripe/param/v2/payments/settlementallocationintents/SplitCreateParams.java b/src/main/java/com/stripe/param/v2/payments/settlementallocationintents/SplitCreateParams.java index aa73d91058e..79850a22743 100644 --- a/src/main/java/com/stripe/param/v2/payments/settlementallocationintents/SplitCreateParams.java +++ b/src/main/java/com/stripe/param/v2/payments/settlementallocationintents/SplitCreateParams.java @@ -3,6 +3,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.net.ApiRequestParams; +import com.stripe.v2.Amount; import java.util.HashMap; import java.util.Map; import lombok.EqualsAndHashCode; @@ -84,7 +85,7 @@ public Builder setAccount(String account) { /** * Required. The amount and currency of the SettlementAllocationIntentSplit. */ - public Builder setAmount(SplitCreateParams.Amount amount) { + public Builder setAmount(Amount amount) { this.amount = amount; return this; } @@ -148,102 +149,6 @@ public Builder setType(SplitCreateParams.Type type) { } } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Amount { - /** - * Required. Three-letter ISO currency code, in lowercase. - * Must be a supported currency. - */ - @SerializedName("currency") - String currency; - - /** - * Map of extra parameters for custom features not available in this client library. The content - * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each - * key/value pair is serialized as if the key is a root-level field (serialized) name in this - * param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - - /** - * Required. A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - - private Amount(String currency, Map extraParams, Long value) { - this.currency = currency; - this.extraParams = extraParams; - this.value = value; - } - - public static Builder builder() { - return new Builder(); - } - - public static class Builder { - private String currency; - - private Map extraParams; - - private Long value; - - /** Finalize and obtain parameter instance from this builder. */ - public SplitCreateParams.Amount build() { - return new SplitCreateParams.Amount(this.currency, this.extraParams, this.value); - } - - /** - * Required. Three-letter ISO currency code, in - * lowercase. Must be a supported currency. - */ - public Builder setCurrency(String currency) { - this.currency = currency; - return this; - } - - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` - * call, and subsequent calls add additional key/value pairs to the original map. See {@link - * SplitCreateParams.Amount#extraParams} for the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } - - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. - * See {@link SplitCreateParams.Amount#extraParams} for the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } - - /** - * Required. A non-negative integer representing how much to charge in the smallest currency unit. - */ - public Builder setValue(Long value) { - this.value = value; - return this; - } - } - } - public enum Type implements ApiRequestParams.EnumParam { @SerializedName("credit") CREDIT("credit"), diff --git a/src/main/java/com/stripe/param/v2/testhelpers/FinancialAddressCreditParams.java b/src/main/java/com/stripe/param/v2/testhelpers/FinancialAddressCreditParams.java index ec5e7780f91..b76549eb9e0 100644 --- a/src/main/java/com/stripe/param/v2/testhelpers/FinancialAddressCreditParams.java +++ b/src/main/java/com/stripe/param/v2/testhelpers/FinancialAddressCreditParams.java @@ -3,6 +3,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.net.ApiRequestParams; +import com.stripe.v2.Amount; import java.util.HashMap; import java.util.Map; import lombok.EqualsAndHashCode; @@ -66,7 +67,7 @@ public FinancialAddressCreditParams build() { } /** Required. Object containing the amount value and currency to credit. */ - public Builder setAmount(FinancialAddressCreditParams.Amount amount) { + public Builder setAmount(Amount amount) { this.amount = amount; return this; } @@ -116,102 +117,6 @@ public Builder setStatementDescriptor(String statementDescriptor) { } } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Amount { - /** - * Required. Three-letter ISO currency code, in lowercase. - * Must be a supported currency. - */ - @SerializedName("currency") - String currency; - - /** - * Map of extra parameters for custom features not available in this client library. The content - * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each - * key/value pair is serialized as if the key is a root-level field (serialized) name in this - * param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - - /** - * Required. A non-negative integer representing how much to charge in the smallest currency unit. - */ - @SerializedName("value") - Long value; - - private Amount(String currency, Map extraParams, Long value) { - this.currency = currency; - this.extraParams = extraParams; - this.value = value; - } - - public static Builder builder() { - return new Builder(); - } - - public static class Builder { - private String currency; - - private Map extraParams; - - private Long value; - - /** Finalize and obtain parameter instance from this builder. */ - public FinancialAddressCreditParams.Amount build() { - return new FinancialAddressCreditParams.Amount(this.currency, this.extraParams, this.value); - } - - /** - * Required. Three-letter ISO currency code, in - * lowercase. Must be a supported currency. - */ - public Builder setCurrency(String currency) { - this.currency = currency; - return this; - } - - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` - * call, and subsequent calls add additional key/value pairs to the original map. See {@link - * FinancialAddressCreditParams.Amount#extraParams} for the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } - - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. - * See {@link FinancialAddressCreditParams.Amount#extraParams} for the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } - - /** - * Required. A non-negative integer representing how much to charge in the smallest currency unit. - */ - public Builder setValue(Long value) { - this.value = value; - return this; - } - } - } - public enum Network implements ApiRequestParams.EnumParam { @SerializedName("ach") ACH("ach"), diff --git a/src/test/java/com/stripe/functional/GeneratedExamples.java b/src/test/java/com/stripe/functional/GeneratedExamples.java index 20e759cbbe2..585d6e83941 100644 --- a/src/test/java/com/stripe/functional/GeneratedExamples.java +++ b/src/test/java/com/stripe/functional/GeneratedExamples.java @@ -28590,7 +28590,7 @@ public void testV2MoneyManagementAdjustmentGetServices() throws StripeException new TypeToken< com.stripe.model.v2.StripeCollection< com.stripe.model.v2.moneymanagement.Adjustment>>() {}.getType(), - "{\"data\":[{\"amount\":{\"value\":111972721,\"currency\":\"usd\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"object\":\"v2.money_management.adjustment\",\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"object\":\"v2.money_management.adjustment\",\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.moneymanagement.AdjustmentListParams params = @@ -28616,7 +28616,7 @@ public void testV2MoneyManagementAdjustmentGet2Services() throws StripeException null, null, com.stripe.model.v2.moneymanagement.Adjustment.class, - "{\"amount\":{\"value\":111972721,\"currency\":\"usd\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"object\":\"v2.money_management.adjustment\",\"livemode\":true}"); + "{\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"object\":\"v2.money_management.adjustment\",\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.model.v2.moneymanagement.Adjustment adjustment = @@ -28641,7 +28641,7 @@ public void testV2MoneyManagementCurrencyConversionGetServices() throws StripeEx new TypeToken< com.stripe.model.v2.StripeCollection< com.stripe.model.v2.moneymanagement.CurrencyConversion>>() {}.getType(), - "{\"data\":[{\"created\":\"1970-01-12T21:42:34.472Z\",\"exchange_rate\":\"exchange_rate\",\"financial_account\":\"financial_account\",\"from\":{\"amount\":{\"value\":111972721,\"currency\":\"usd\"}},\"id\":\"obj_123\",\"livemode\":true,\"object\":\"v2.money_management.currency_conversion\",\"to\":{\"amount\":{\"value\":111972721,\"currency\":\"usd\"}}}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"created\":\"1970-01-12T21:42:34.472Z\",\"exchange_rate\":\"exchange_rate\",\"financial_account\":\"financial_account\",\"from\":{\"amount\":{\"currency\":\"USD\",\"value\":96}},\"id\":\"obj_123\",\"livemode\":true,\"object\":\"v2.money_management.currency_conversion\",\"to\":{\"amount\":{\"currency\":\"USD\",\"value\":96}}}],\"next_page_url\":null,\"previous_page_url\":null}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.moneymanagement.CurrencyConversionListParams params = @@ -28667,7 +28667,7 @@ public void testV2MoneyManagementCurrencyConversionPostServices() throws StripeE null, null, com.stripe.model.v2.moneymanagement.CurrencyConversion.class, - "{\"created\":\"1970-01-12T21:42:34.472Z\",\"exchange_rate\":\"exchange_rate\",\"financial_account\":\"financial_account\",\"from\":{\"amount\":{\"value\":111972721,\"currency\":\"usd\"}},\"id\":\"obj_123\",\"livemode\":true,\"object\":\"v2.money_management.currency_conversion\",\"to\":{\"amount\":{\"value\":111972721,\"currency\":\"usd\"}}}"); + "{\"created\":\"1970-01-12T21:42:34.472Z\",\"exchange_rate\":\"exchange_rate\",\"financial_account\":\"financial_account\",\"from\":{\"amount\":{\"currency\":\"USD\",\"value\":96}},\"id\":\"obj_123\",\"livemode\":true,\"object\":\"v2.money_management.currency_conversion\",\"to\":{\"amount\":{\"currency\":\"USD\",\"value\":96}}}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.moneymanagement.CurrencyConversionCreateParams params = @@ -28675,22 +28675,12 @@ public void testV2MoneyManagementCurrencyConversionPostServices() throws StripeE .setFinancialAccount("financial_account") .setFrom( com.stripe.param.v2.moneymanagement.CurrencyConversionCreateParams.From.builder() - .setAmount( - com.stripe.param.v2.moneymanagement.CurrencyConversionCreateParams.From - .Amount.builder() - .setValue(111972721L) - .setCurrency("usd") - .build()) + .setAmount(new com.stripe.v2.Amount(96, "USD")) .setCurrency("usd") .build()) .setTo( com.stripe.param.v2.moneymanagement.CurrencyConversionCreateParams.To.builder() - .setAmount( - com.stripe.param.v2.moneymanagement.CurrencyConversionCreateParams.To.Amount - .builder() - .setValue(111972721L) - .setCurrency("usd") - .build()) + .setAmount(new com.stripe.v2.Amount(96, "USD")) .setCurrency("usd") .build()) .build(); @@ -28715,7 +28705,7 @@ public void testV2MoneyManagementCurrencyConversionGet2Services() throws StripeE null, null, com.stripe.model.v2.moneymanagement.CurrencyConversion.class, - "{\"created\":\"1970-01-12T21:42:34.472Z\",\"exchange_rate\":\"exchange_rate\",\"financial_account\":\"financial_account\",\"from\":{\"amount\":{\"value\":111972721,\"currency\":\"usd\"}},\"id\":\"obj_123\",\"livemode\":true,\"object\":\"v2.money_management.currency_conversion\",\"to\":{\"amount\":{\"value\":111972721,\"currency\":\"usd\"}}}"); + "{\"created\":\"1970-01-12T21:42:34.472Z\",\"exchange_rate\":\"exchange_rate\",\"financial_account\":\"financial_account\",\"from\":{\"amount\":{\"currency\":\"USD\",\"value\":96}},\"id\":\"obj_123\",\"livemode\":true,\"object\":\"v2.money_management.currency_conversion\",\"to\":{\"amount\":{\"currency\":\"USD\",\"value\":96}}}"); StripeClient client = new StripeClient(networkSpy); com.stripe.model.v2.moneymanagement.CurrencyConversion currencyConversion = @@ -28740,7 +28730,7 @@ public void testV2MoneyManagementFinancialAccountGetServices() throws StripeExce new TypeToken< com.stripe.model.v2.StripeCollection< com.stripe.model.v2.moneymanagement.FinancialAccount>>() {}.getType(), - "{\"data\":[{\"balance\":{\"available\":{\"key\":{\"value\":111972721,\"currency\":\"usd\"}},\"inbound_pending\":{\"key\":{\"value\":111972721,\"currency\":\"usd\"}},\"outbound_pending\":{\"key\":{\"value\":111972721,\"currency\":\"usd\"}}},\"country\":\"country\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.money_management.financial_account\",\"status\":\"closed\",\"type\":\"payments\",\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"balance\":{\"available\":{\"key\":{\"currency\":\"USD\",\"value\":35}},\"inbound_pending\":{\"key\":{\"currency\":\"USD\",\"value\":11}},\"outbound_pending\":{\"key\":{\"currency\":\"USD\",\"value\":60}}},\"country\":\"country\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.money_management.financial_account\",\"status\":\"closed\",\"type\":\"payments\",\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.moneymanagement.FinancialAccountListParams params = @@ -28766,7 +28756,7 @@ public void testV2MoneyManagementFinancialAccountPostServices() throws StripeExc null, null, com.stripe.model.v2.moneymanagement.FinancialAccount.class, - "{\"balance\":{\"available\":{\"key\":{\"value\":111972721,\"currency\":\"usd\"}},\"inbound_pending\":{\"key\":{\"value\":111972721,\"currency\":\"usd\"}},\"outbound_pending\":{\"key\":{\"value\":111972721,\"currency\":\"usd\"}}},\"country\":\"country\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.money_management.financial_account\",\"status\":\"closed\",\"type\":\"payments\",\"livemode\":true}"); + "{\"balance\":{\"available\":{\"key\":{\"currency\":\"USD\",\"value\":35}},\"inbound_pending\":{\"key\":{\"currency\":\"USD\",\"value\":11}},\"outbound_pending\":{\"key\":{\"currency\":\"USD\",\"value\":60}}},\"country\":\"country\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.money_management.financial_account\",\"status\":\"closed\",\"type\":\"payments\",\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.moneymanagement.FinancialAccountCreateParams params = @@ -28794,7 +28784,7 @@ public void testV2MoneyManagementFinancialAccountGet2Services() throws StripeExc null, null, com.stripe.model.v2.moneymanagement.FinancialAccount.class, - "{\"balance\":{\"available\":{\"key\":{\"value\":111972721,\"currency\":\"usd\"}},\"inbound_pending\":{\"key\":{\"value\":111972721,\"currency\":\"usd\"}},\"outbound_pending\":{\"key\":{\"value\":111972721,\"currency\":\"usd\"}}},\"country\":\"country\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.money_management.financial_account\",\"status\":\"closed\",\"type\":\"payments\",\"livemode\":true}"); + "{\"balance\":{\"available\":{\"key\":{\"currency\":\"USD\",\"value\":35}},\"inbound_pending\":{\"key\":{\"currency\":\"USD\",\"value\":11}},\"outbound_pending\":{\"key\":{\"currency\":\"USD\",\"value\":60}}},\"country\":\"country\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.money_management.financial_account\",\"status\":\"closed\",\"type\":\"payments\",\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.model.v2.moneymanagement.FinancialAccount financialAccount = @@ -28817,7 +28807,7 @@ public void testV2MoneyManagementFinancialAccountPost2Services() throws StripeEx null, null, com.stripe.model.v2.moneymanagement.FinancialAccount.class, - "{\"balance\":{\"available\":{\"key\":{\"value\":111972721,\"currency\":\"usd\"}},\"inbound_pending\":{\"key\":{\"value\":111972721,\"currency\":\"usd\"}},\"outbound_pending\":{\"key\":{\"value\":111972721,\"currency\":\"usd\"}}},\"country\":\"country\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.money_management.financial_account\",\"status\":\"closed\",\"type\":\"payments\",\"livemode\":true}"); + "{\"balance\":{\"available\":{\"key\":{\"currency\":\"USD\",\"value\":35}},\"inbound_pending\":{\"key\":{\"currency\":\"USD\",\"value\":11}},\"outbound_pending\":{\"key\":{\"currency\":\"USD\",\"value\":60}}},\"country\":\"country\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.money_management.financial_account\",\"status\":\"closed\",\"type\":\"payments\",\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.moneymanagement.FinancialAccountUpdateParams params = @@ -28843,7 +28833,7 @@ public void testV2MoneyManagementFinancialAccountPost3Services() throws StripeEx null, null, com.stripe.model.v2.moneymanagement.FinancialAccount.class, - "{\"balance\":{\"available\":{\"key\":{\"value\":111972721,\"currency\":\"usd\"}},\"inbound_pending\":{\"key\":{\"value\":111972721,\"currency\":\"usd\"}},\"outbound_pending\":{\"key\":{\"value\":111972721,\"currency\":\"usd\"}}},\"country\":\"country\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.money_management.financial_account\",\"status\":\"closed\",\"type\":\"payments\",\"livemode\":true}"); + "{\"balance\":{\"available\":{\"key\":{\"currency\":\"USD\",\"value\":35}},\"inbound_pending\":{\"key\":{\"currency\":\"USD\",\"value\":11}},\"outbound_pending\":{\"key\":{\"currency\":\"USD\",\"value\":60}}},\"country\":\"country\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.money_management.financial_account\",\"status\":\"closed\",\"type\":\"payments\",\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.moneymanagement.FinancialAccountCloseParams params = @@ -28956,7 +28946,7 @@ public void testV2MoneyManagementInboundTransferGetServices() throws StripeExcep new TypeToken< com.stripe.model.v2.StripeCollection< com.stripe.model.v2.moneymanagement.InboundTransfer>>() {}.getType(), - "{\"data\":[{\"amount\":{\"value\":111972721,\"currency\":\"usd\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"from\":{\"debited\":{\"value\":111972721,\"currency\":\"usd\"},\"payment_method\":{\"type\":\"type\"}},\"id\":\"obj_123\",\"object\":\"v2.money_management.inbound_transfer\",\"to\":{\"credited\":{\"value\":111972721,\"currency\":\"usd\"},\"financial_account\":\"financial_account\"},\"transfer_history\":[{\"created\":\"1970-01-12T21:42:34.472Z\",\"effective_at\":\"1970-01-03T20:38:28.043Z\",\"id\":\"obj_123\",\"level\":\"canonical\",\"type\":\"bank_debit_failed\"}],\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"payment_method\":{\"type\":\"type\"}},\"id\":\"obj_123\",\"object\":\"v2.money_management.inbound_transfer\",\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"financial_account\":\"financial_account\"},\"transfer_history\":[{\"created\":\"1970-01-12T21:42:34.472Z\",\"effective_at\":\"1970-01-03T20:38:28.043Z\",\"id\":\"obj_123\",\"level\":\"canonical\",\"type\":\"bank_debit_failed\"}],\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.moneymanagement.InboundTransferListParams params = @@ -28982,16 +28972,12 @@ public void testV2MoneyManagementInboundTransferPostServices() throws StripeExce null, null, com.stripe.model.v2.moneymanagement.InboundTransfer.class, - "{\"amount\":{\"value\":111972721,\"currency\":\"usd\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"from\":{\"debited\":{\"value\":111972721,\"currency\":\"usd\"},\"payment_method\":{\"type\":\"type\"}},\"id\":\"obj_123\",\"object\":\"v2.money_management.inbound_transfer\",\"to\":{\"credited\":{\"value\":111972721,\"currency\":\"usd\"},\"financial_account\":\"financial_account\"},\"transfer_history\":[{\"created\":\"1970-01-12T21:42:34.472Z\",\"effective_at\":\"1970-01-03T20:38:28.043Z\",\"id\":\"obj_123\",\"level\":\"canonical\",\"type\":\"bank_debit_failed\"}],\"livemode\":true}"); + "{\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"payment_method\":{\"type\":\"type\"}},\"id\":\"obj_123\",\"object\":\"v2.money_management.inbound_transfer\",\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"financial_account\":\"financial_account\"},\"transfer_history\":[{\"created\":\"1970-01-12T21:42:34.472Z\",\"effective_at\":\"1970-01-03T20:38:28.043Z\",\"id\":\"obj_123\",\"level\":\"canonical\",\"type\":\"bank_debit_failed\"}],\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.moneymanagement.InboundTransferCreateParams params = com.stripe.param.v2.moneymanagement.InboundTransferCreateParams.builder() - .setAmount( - com.stripe.param.v2.moneymanagement.InboundTransferCreateParams.Amount.builder() - .setValue(111972721L) - .setCurrency("usd") - .build()) + .setAmount(new com.stripe.v2.Amount(96, "USD")) .setFrom( com.stripe.param.v2.moneymanagement.InboundTransferCreateParams.From.builder() .setCurrency("usd") @@ -29024,7 +29010,7 @@ public void testV2MoneyManagementInboundTransferGet2Services() throws StripeExce null, null, com.stripe.model.v2.moneymanagement.InboundTransfer.class, - "{\"amount\":{\"value\":111972721,\"currency\":\"usd\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"from\":{\"debited\":{\"value\":111972721,\"currency\":\"usd\"},\"payment_method\":{\"type\":\"type\"}},\"id\":\"obj_123\",\"object\":\"v2.money_management.inbound_transfer\",\"to\":{\"credited\":{\"value\":111972721,\"currency\":\"usd\"},\"financial_account\":\"financial_account\"},\"transfer_history\":[{\"created\":\"1970-01-12T21:42:34.472Z\",\"effective_at\":\"1970-01-03T20:38:28.043Z\",\"id\":\"obj_123\",\"level\":\"canonical\",\"type\":\"bank_debit_failed\"}],\"livemode\":true}"); + "{\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"payment_method\":{\"type\":\"type\"}},\"id\":\"obj_123\",\"object\":\"v2.money_management.inbound_transfer\",\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"financial_account\":\"financial_account\"},\"transfer_history\":[{\"created\":\"1970-01-12T21:42:34.472Z\",\"effective_at\":\"1970-01-03T20:38:28.043Z\",\"id\":\"obj_123\",\"level\":\"canonical\",\"type\":\"bank_debit_failed\"}],\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.model.v2.moneymanagement.InboundTransfer inboundTransfer = @@ -29049,7 +29035,7 @@ public void testV2MoneyManagementOutboundPaymentGetServices() throws StripeExcep new TypeToken< com.stripe.model.v2.StripeCollection< com.stripe.model.v2.moneymanagement.OutboundPayment>>() {}.getType(), - "{\"data\":[{\"amount\":{\"value\":111972721,\"currency\":\"usd\"},\"cancelable\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"from\":{\"debited\":{\"value\":111972721,\"currency\":\"usd\"},\"financial_account\":\"financial_account\"},\"id\":\"obj_123\",\"object\":\"v2.money_management.outbound_payment\",\"recipient_notification\":{\"setting\":\"configured\"},\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"to\":{\"credited\":{\"value\":111972721,\"currency\":\"usd\"},\"payout_method\":\"payout_method\",\"recipient\":\"recipient\"},\"trace_id\":{\"status\":\"pending\"},\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"amount\":{\"currency\":\"USD\",\"value\":96},\"cancelable\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"financial_account\":\"financial_account\"},\"id\":\"obj_123\",\"object\":\"v2.money_management.outbound_payment\",\"recipient_notification\":{\"setting\":\"configured\"},\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"payout_method\":\"payout_method\",\"recipient\":\"recipient\"},\"trace_id\":{\"status\":\"pending\"},\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.moneymanagement.OutboundPaymentListParams params = @@ -29075,16 +29061,12 @@ public void testV2MoneyManagementOutboundPaymentPostServices() throws StripeExce null, null, com.stripe.model.v2.moneymanagement.OutboundPayment.class, - "{\"amount\":{\"value\":111972721,\"currency\":\"usd\"},\"cancelable\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"from\":{\"debited\":{\"value\":111972721,\"currency\":\"usd\"},\"financial_account\":\"financial_account\"},\"id\":\"obj_123\",\"object\":\"v2.money_management.outbound_payment\",\"recipient_notification\":{\"setting\":\"configured\"},\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"to\":{\"credited\":{\"value\":111972721,\"currency\":\"usd\"},\"payout_method\":\"payout_method\",\"recipient\":\"recipient\"},\"trace_id\":{\"status\":\"pending\"},\"livemode\":true}"); + "{\"amount\":{\"currency\":\"USD\",\"value\":96},\"cancelable\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"financial_account\":\"financial_account\"},\"id\":\"obj_123\",\"object\":\"v2.money_management.outbound_payment\",\"recipient_notification\":{\"setting\":\"configured\"},\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"payout_method\":\"payout_method\",\"recipient\":\"recipient\"},\"trace_id\":{\"status\":\"pending\"},\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.moneymanagement.OutboundPaymentCreateParams params = com.stripe.param.v2.moneymanagement.OutboundPaymentCreateParams.builder() - .setAmount( - com.stripe.param.v2.moneymanagement.OutboundPaymentCreateParams.Amount.builder() - .setValue(111972721L) - .setCurrency("usd") - .build()) + .setAmount(new com.stripe.v2.Amount(96, "USD")) .setFrom( com.stripe.param.v2.moneymanagement.OutboundPaymentCreateParams.From.builder() .setCurrency("usd") @@ -29118,7 +29100,7 @@ public void testV2MoneyManagementOutboundPaymentGet2Services() throws StripeExce null, null, com.stripe.model.v2.moneymanagement.OutboundPayment.class, - "{\"amount\":{\"value\":111972721,\"currency\":\"usd\"},\"cancelable\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"from\":{\"debited\":{\"value\":111972721,\"currency\":\"usd\"},\"financial_account\":\"financial_account\"},\"id\":\"obj_123\",\"object\":\"v2.money_management.outbound_payment\",\"recipient_notification\":{\"setting\":\"configured\"},\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"to\":{\"credited\":{\"value\":111972721,\"currency\":\"usd\"},\"payout_method\":\"payout_method\",\"recipient\":\"recipient\"},\"trace_id\":{\"status\":\"pending\"},\"livemode\":true}"); + "{\"amount\":{\"currency\":\"USD\",\"value\":96},\"cancelable\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"financial_account\":\"financial_account\"},\"id\":\"obj_123\",\"object\":\"v2.money_management.outbound_payment\",\"recipient_notification\":{\"setting\":\"configured\"},\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"payout_method\":\"payout_method\",\"recipient\":\"recipient\"},\"trace_id\":{\"status\":\"pending\"},\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.model.v2.moneymanagement.OutboundPayment outboundPayment = @@ -29141,7 +29123,7 @@ public void testV2MoneyManagementOutboundPaymentPost2Services() throws StripeExc null, null, com.stripe.model.v2.moneymanagement.OutboundPayment.class, - "{\"amount\":{\"value\":111972721,\"currency\":\"usd\"},\"cancelable\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"from\":{\"debited\":{\"value\":111972721,\"currency\":\"usd\"},\"financial_account\":\"financial_account\"},\"id\":\"obj_123\",\"object\":\"v2.money_management.outbound_payment\",\"recipient_notification\":{\"setting\":\"configured\"},\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"to\":{\"credited\":{\"value\":111972721,\"currency\":\"usd\"},\"payout_method\":\"payout_method\",\"recipient\":\"recipient\"},\"trace_id\":{\"status\":\"pending\"},\"livemode\":true}"); + "{\"amount\":{\"currency\":\"USD\",\"value\":96},\"cancelable\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"financial_account\":\"financial_account\"},\"id\":\"obj_123\",\"object\":\"v2.money_management.outbound_payment\",\"recipient_notification\":{\"setting\":\"configured\"},\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"payout_method\":\"payout_method\",\"recipient\":\"recipient\"},\"trace_id\":{\"status\":\"pending\"},\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.model.v2.moneymanagement.OutboundPayment outboundPayment = @@ -29164,17 +29146,12 @@ public void testV2MoneyManagementOutboundPaymentQuotePostServices() throws Strip null, null, com.stripe.model.v2.moneymanagement.OutboundPaymentQuote.class, - "{\"amount\":{\"value\":111972721,\"currency\":\"usd\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"estimated_fees\":[{\"amount\":{\"value\":111972721,\"currency\":\"usd\"},\"type\":\"cross_border_payout_fee\"}],\"from\":{\"debited\":{\"value\":111972721,\"currency\":\"usd\"},\"financial_account\":\"financial_account\"},\"fx_quote\":{\"lock_duration\":\"five_minutes\",\"lock_status\":\"active\",\"rates\":{\"key\":{\"exchange_rate\":\"exchange_rate\"}},\"to_currency\":\"usd\"},\"id\":\"obj_123\",\"object\":\"v2.money_management.outbound_payment_quote\",\"to\":{\"credited\":{\"value\":111972721,\"currency\":\"usd\"},\"payout_method\":\"payout_method\",\"recipient\":\"recipient\"},\"livemode\":true}"); + "{\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"estimated_fees\":[{\"amount\":{\"currency\":\"USD\",\"value\":96},\"type\":\"cross_border_payout_fee\"}],\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"financial_account\":\"financial_account\"},\"fx_quote\":{\"lock_duration\":\"five_minutes\",\"lock_status\":\"active\",\"rates\":{\"key\":{\"exchange_rate\":\"exchange_rate\"}},\"to_currency\":\"usd\"},\"id\":\"obj_123\",\"object\":\"v2.money_management.outbound_payment_quote\",\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"payout_method\":\"payout_method\",\"recipient\":\"recipient\"},\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.moneymanagement.OutboundPaymentQuoteCreateParams params = com.stripe.param.v2.moneymanagement.OutboundPaymentQuoteCreateParams.builder() - .setAmount( - com.stripe.param.v2.moneymanagement.OutboundPaymentQuoteCreateParams.Amount - .builder() - .setValue(111972721L) - .setCurrency("usd") - .build()) + .setAmount(new com.stripe.v2.Amount(96, "USD")) .setFrom( com.stripe.param.v2.moneymanagement.OutboundPaymentQuoteCreateParams.From.builder() .setCurrency("usd") @@ -29208,7 +29185,7 @@ public void testV2MoneyManagementOutboundPaymentQuoteGetServices() throws Stripe null, null, com.stripe.model.v2.moneymanagement.OutboundPaymentQuote.class, - "{\"amount\":{\"value\":111972721,\"currency\":\"usd\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"estimated_fees\":[{\"amount\":{\"value\":111972721,\"currency\":\"usd\"},\"type\":\"cross_border_payout_fee\"}],\"from\":{\"debited\":{\"value\":111972721,\"currency\":\"usd\"},\"financial_account\":\"financial_account\"},\"fx_quote\":{\"lock_duration\":\"five_minutes\",\"lock_status\":\"active\",\"rates\":{\"key\":{\"exchange_rate\":\"exchange_rate\"}},\"to_currency\":\"usd\"},\"id\":\"obj_123\",\"object\":\"v2.money_management.outbound_payment_quote\",\"to\":{\"credited\":{\"value\":111972721,\"currency\":\"usd\"},\"payout_method\":\"payout_method\",\"recipient\":\"recipient\"},\"livemode\":true}"); + "{\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"estimated_fees\":[{\"amount\":{\"currency\":\"USD\",\"value\":96},\"type\":\"cross_border_payout_fee\"}],\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"financial_account\":\"financial_account\"},\"fx_quote\":{\"lock_duration\":\"five_minutes\",\"lock_status\":\"active\",\"rates\":{\"key\":{\"exchange_rate\":\"exchange_rate\"}},\"to_currency\":\"usd\"},\"id\":\"obj_123\",\"object\":\"v2.money_management.outbound_payment_quote\",\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"payout_method\":\"payout_method\",\"recipient\":\"recipient\"},\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.model.v2.moneymanagement.OutboundPaymentQuote outboundPaymentQuote = @@ -29359,7 +29336,7 @@ public void testV2MoneyManagementOutboundTransferGetServices() throws StripeExce new TypeToken< com.stripe.model.v2.StripeCollection< com.stripe.model.v2.moneymanagement.OutboundTransfer>>() {}.getType(), - "{\"data\":[{\"amount\":{\"value\":111972721,\"currency\":\"usd\"},\"cancelable\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"from\":{\"debited\":{\"value\":111972721,\"currency\":\"usd\"},\"financial_account\":\"financial_account\"},\"id\":\"obj_123\",\"object\":\"v2.money_management.outbound_transfer\",\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"to\":{\"credited\":{\"value\":111972721,\"currency\":\"usd\"},\"payout_method\":\"payout_method\"},\"trace_id\":{\"status\":\"pending\"},\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"amount\":{\"currency\":\"USD\",\"value\":96},\"cancelable\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"financial_account\":\"financial_account\"},\"id\":\"obj_123\",\"object\":\"v2.money_management.outbound_transfer\",\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"payout_method\":\"payout_method\"},\"trace_id\":{\"status\":\"pending\"},\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.moneymanagement.OutboundTransferListParams params = @@ -29385,16 +29362,12 @@ public void testV2MoneyManagementOutboundTransferPostServices() throws StripeExc null, null, com.stripe.model.v2.moneymanagement.OutboundTransfer.class, - "{\"amount\":{\"value\":111972721,\"currency\":\"usd\"},\"cancelable\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"from\":{\"debited\":{\"value\":111972721,\"currency\":\"usd\"},\"financial_account\":\"financial_account\"},\"id\":\"obj_123\",\"object\":\"v2.money_management.outbound_transfer\",\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"to\":{\"credited\":{\"value\":111972721,\"currency\":\"usd\"},\"payout_method\":\"payout_method\"},\"trace_id\":{\"status\":\"pending\"},\"livemode\":true}"); + "{\"amount\":{\"currency\":\"USD\",\"value\":96},\"cancelable\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"financial_account\":\"financial_account\"},\"id\":\"obj_123\",\"object\":\"v2.money_management.outbound_transfer\",\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"payout_method\":\"payout_method\"},\"trace_id\":{\"status\":\"pending\"},\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.moneymanagement.OutboundTransferCreateParams params = com.stripe.param.v2.moneymanagement.OutboundTransferCreateParams.builder() - .setAmount( - com.stripe.param.v2.moneymanagement.OutboundTransferCreateParams.Amount.builder() - .setValue(111972721L) - .setCurrency("usd") - .build()) + .setAmount(new com.stripe.v2.Amount(96, "USD")) .setFrom( com.stripe.param.v2.moneymanagement.OutboundTransferCreateParams.From.builder() .setCurrency("usd") @@ -29427,7 +29400,7 @@ public void testV2MoneyManagementOutboundTransferGet2Services() throws StripeExc null, null, com.stripe.model.v2.moneymanagement.OutboundTransfer.class, - "{\"amount\":{\"value\":111972721,\"currency\":\"usd\"},\"cancelable\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"from\":{\"debited\":{\"value\":111972721,\"currency\":\"usd\"},\"financial_account\":\"financial_account\"},\"id\":\"obj_123\",\"object\":\"v2.money_management.outbound_transfer\",\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"to\":{\"credited\":{\"value\":111972721,\"currency\":\"usd\"},\"payout_method\":\"payout_method\"},\"trace_id\":{\"status\":\"pending\"},\"livemode\":true}"); + "{\"amount\":{\"currency\":\"USD\",\"value\":96},\"cancelable\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"financial_account\":\"financial_account\"},\"id\":\"obj_123\",\"object\":\"v2.money_management.outbound_transfer\",\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"payout_method\":\"payout_method\"},\"trace_id\":{\"status\":\"pending\"},\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.model.v2.moneymanagement.OutboundTransfer outboundTransfer = @@ -29450,7 +29423,7 @@ public void testV2MoneyManagementOutboundTransferPost2Services() throws StripeEx null, null, com.stripe.model.v2.moneymanagement.OutboundTransfer.class, - "{\"amount\":{\"value\":111972721,\"currency\":\"usd\"},\"cancelable\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"from\":{\"debited\":{\"value\":111972721,\"currency\":\"usd\"},\"financial_account\":\"financial_account\"},\"id\":\"obj_123\",\"object\":\"v2.money_management.outbound_transfer\",\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"to\":{\"credited\":{\"value\":111972721,\"currency\":\"usd\"},\"payout_method\":\"payout_method\"},\"trace_id\":{\"status\":\"pending\"},\"livemode\":true}"); + "{\"amount\":{\"currency\":\"USD\",\"value\":96},\"cancelable\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"financial_account\":\"financial_account\"},\"id\":\"obj_123\",\"object\":\"v2.money_management.outbound_transfer\",\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"payout_method\":\"payout_method\"},\"trace_id\":{\"status\":\"pending\"},\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.model.v2.moneymanagement.OutboundTransfer outboundTransfer = @@ -29600,7 +29573,7 @@ public void testV2MoneyManagementReceivedCreditGetServices() throws StripeExcept new TypeToken< com.stripe.model.v2.StripeCollection< com.stripe.model.v2.moneymanagement.ReceivedCredit>>() {}.getType(), - "{\"data\":[{\"amount\":{\"value\":111972721,\"currency\":\"usd\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"object\":\"v2.money_management.received_credit\",\"status\":\"returned\",\"type\":\"balance_transfer\",\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"object\":\"v2.money_management.received_credit\",\"status\":\"returned\",\"type\":\"balance_transfer\",\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.moneymanagement.ReceivedCreditListParams params = @@ -29626,7 +29599,7 @@ public void testV2MoneyManagementReceivedCreditGet2Services() throws StripeExcep null, null, com.stripe.model.v2.moneymanagement.ReceivedCredit.class, - "{\"amount\":{\"value\":111972721,\"currency\":\"usd\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"object\":\"v2.money_management.received_credit\",\"status\":\"returned\",\"type\":\"balance_transfer\",\"livemode\":true}"); + "{\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"object\":\"v2.money_management.received_credit\",\"status\":\"returned\",\"type\":\"balance_transfer\",\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.model.v2.moneymanagement.ReceivedCredit receivedCredit = @@ -29651,7 +29624,7 @@ public void testV2MoneyManagementReceivedDebitGetServices() throws StripeExcepti new TypeToken< com.stripe.model.v2.StripeCollection< com.stripe.model.v2.moneymanagement.ReceivedDebit>>() {}.getType(), - "{\"data\":[{\"amount\":{\"value\":111972721,\"currency\":\"usd\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"object\":\"v2.money_management.received_debit\",\"status\":\"canceled\",\"type\":\"balance_transfer\",\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"object\":\"v2.money_management.received_debit\",\"status\":\"canceled\",\"type\":\"balance_transfer\",\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.moneymanagement.ReceivedDebitListParams params = @@ -29677,7 +29650,7 @@ public void testV2MoneyManagementReceivedDebitGet2Services() throws StripeExcept null, null, com.stripe.model.v2.moneymanagement.ReceivedDebit.class, - "{\"amount\":{\"value\":111972721,\"currency\":\"usd\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"object\":\"v2.money_management.received_debit\",\"status\":\"canceled\",\"type\":\"balance_transfer\",\"livemode\":true}"); + "{\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"object\":\"v2.money_management.received_debit\",\"status\":\"canceled\",\"type\":\"balance_transfer\",\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.model.v2.moneymanagement.ReceivedDebit receivedDebit = @@ -29776,7 +29749,7 @@ public void testV2MoneyManagementTransactionGetServices() throws StripeException new TypeToken< com.stripe.model.v2.StripeCollection< com.stripe.model.v2.moneymanagement.Transaction>>() {}.getType(), - "{\"data\":[{\"amount\":{\"value\":111972721,\"currency\":\"usd\"},\"balance_impact\":{\"available\":{\"value\":111972721,\"currency\":\"usd\"},\"inbound_pending\":{\"value\":111972721,\"currency\":\"usd\"},\"outbound_pending\":{\"value\":111972721,\"currency\":\"usd\"}},\"category\":\"received_debit_reversal\",\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"object\":\"v2.money_management.transaction\",\"status\":\"pending\",\"status_transitions\":{},\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"amount\":{\"currency\":\"USD\",\"value\":96},\"balance_impact\":{\"available\":{\"currency\":\"USD\",\"value\":35},\"inbound_pending\":{\"currency\":\"USD\",\"value\":11},\"outbound_pending\":{\"currency\":\"USD\",\"value\":60}},\"category\":\"received_debit_reversal\",\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"object\":\"v2.money_management.transaction\",\"status\":\"pending\",\"status_transitions\":{},\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.moneymanagement.TransactionListParams params = @@ -29802,7 +29775,7 @@ public void testV2MoneyManagementTransactionGet2Services() throws StripeExceptio null, null, com.stripe.model.v2.moneymanagement.Transaction.class, - "{\"amount\":{\"value\":111972721,\"currency\":\"usd\"},\"balance_impact\":{\"available\":{\"value\":111972721,\"currency\":\"usd\"},\"inbound_pending\":{\"value\":111972721,\"currency\":\"usd\"},\"outbound_pending\":{\"value\":111972721,\"currency\":\"usd\"}},\"category\":\"received_debit_reversal\",\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"object\":\"v2.money_management.transaction\",\"status\":\"pending\",\"status_transitions\":{},\"livemode\":true}"); + "{\"amount\":{\"currency\":\"USD\",\"value\":96},\"balance_impact\":{\"available\":{\"currency\":\"USD\",\"value\":35},\"inbound_pending\":{\"currency\":\"USD\",\"value\":11},\"outbound_pending\":{\"currency\":\"USD\",\"value\":60}},\"category\":\"received_debit_reversal\",\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"object\":\"v2.money_management.transaction\",\"status\":\"pending\",\"status_transitions\":{},\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.model.v2.moneymanagement.Transaction transaction = @@ -29827,7 +29800,7 @@ public void testV2MoneyManagementTransactionEntryGetServices() throws StripeExce new TypeToken< com.stripe.model.v2.StripeCollection< com.stripe.model.v2.moneymanagement.TransactionEntry>>() {}.getType(), - "{\"data\":[{\"balance_impact\":{\"available\":{\"value\":111972721,\"currency\":\"usd\"},\"inbound_pending\":{\"value\":111972721,\"currency\":\"usd\"},\"outbound_pending\":{\"value\":111972721,\"currency\":\"usd\"}},\"created\":\"1970-01-12T21:42:34.472Z\",\"effective_at\":\"1970-01-03T20:38:28.043Z\",\"id\":\"obj_123\",\"object\":\"v2.money_management.transaction_entry\",\"transaction\":\"transaction\",\"transaction_details\":{\"category\":\"received_debit_reversal\",\"financial_account\":\"financial_account\"},\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"balance_impact\":{\"available\":{\"currency\":\"USD\",\"value\":35},\"inbound_pending\":{\"currency\":\"USD\",\"value\":11},\"outbound_pending\":{\"currency\":\"USD\",\"value\":60}},\"created\":\"1970-01-12T21:42:34.472Z\",\"effective_at\":\"1970-01-03T20:38:28.043Z\",\"id\":\"obj_123\",\"object\":\"v2.money_management.transaction_entry\",\"transaction\":\"transaction\",\"transaction_details\":{\"category\":\"received_debit_reversal\",\"financial_account\":\"financial_account\"},\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.moneymanagement.TransactionEntryListParams params = @@ -29853,7 +29826,7 @@ public void testV2MoneyManagementTransactionEntryGet2Services() throws StripeExc null, null, com.stripe.model.v2.moneymanagement.TransactionEntry.class, - "{\"balance_impact\":{\"available\":{\"value\":111972721,\"currency\":\"usd\"},\"inbound_pending\":{\"value\":111972721,\"currency\":\"usd\"},\"outbound_pending\":{\"value\":111972721,\"currency\":\"usd\"}},\"created\":\"1970-01-12T21:42:34.472Z\",\"effective_at\":\"1970-01-03T20:38:28.043Z\",\"id\":\"obj_123\",\"object\":\"v2.money_management.transaction_entry\",\"transaction\":\"transaction\",\"transaction_details\":{\"category\":\"received_debit_reversal\",\"financial_account\":\"financial_account\"},\"livemode\":true}"); + "{\"balance_impact\":{\"available\":{\"currency\":\"USD\",\"value\":35},\"inbound_pending\":{\"currency\":\"USD\",\"value\":11},\"outbound_pending\":{\"currency\":\"USD\",\"value\":60}},\"created\":\"1970-01-12T21:42:34.472Z\",\"effective_at\":\"1970-01-03T20:38:28.043Z\",\"id\":\"obj_123\",\"object\":\"v2.money_management.transaction_entry\",\"transaction\":\"transaction\",\"transaction_details\":{\"category\":\"received_debit_reversal\",\"financial_account\":\"financial_account\"},\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.model.v2.moneymanagement.TransactionEntry transactionEntry = @@ -29878,7 +29851,7 @@ public void testV2PaymentsOffSessionPaymentGetServices() throws StripeException new TypeToken< com.stripe.model.v2.StripeCollection< com.stripe.model.v2.payments.OffSessionPayment>>() {}.getType(), - "{\"data\":[{\"amount_requested\":{\"value\":111972721,\"currency\":\"usd\"},\"cadence\":\"unscheduled\",\"compartment_id\":\"compartment_id\",\"created\":\"1970-01-12T21:42:34.472Z\",\"customer\":\"customer\",\"id\":\"obj_123\",\"livemode\":true,\"metadata\":{\"key\":\"metadata\"},\"object\":\"v2.payments.off_session_payment\",\"payment_method\":\"payment_method\",\"payments_orchestration\":{\"enabled\":true},\"retry_details\":{\"attempts\":542738246,\"retry_strategy\":\"scheduled\"},\"status\":\"pending\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"amount_requested\":{\"currency\":\"USD\",\"value\":47},\"cadence\":\"unscheduled\",\"compartment_id\":\"compartment_id\",\"created\":\"1970-01-12T21:42:34.472Z\",\"customer\":\"customer\",\"id\":\"obj_123\",\"livemode\":true,\"metadata\":{\"key\":\"metadata\"},\"object\":\"v2.payments.off_session_payment\",\"payment_method\":\"payment_method\",\"payments_orchestration\":{\"enabled\":true},\"retry_details\":{\"attempts\":542738246,\"retry_strategy\":\"scheduled\"},\"status\":\"pending\"}],\"next_page_url\":null,\"previous_page_url\":null}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.payments.OffSessionPaymentListParams params = @@ -29904,16 +29877,12 @@ public void testV2PaymentsOffSessionPaymentPostServices() throws StripeException null, null, com.stripe.model.v2.payments.OffSessionPayment.class, - "{\"amount_requested\":{\"value\":111972721,\"currency\":\"usd\"},\"cadence\":\"unscheduled\",\"compartment_id\":\"compartment_id\",\"created\":\"1970-01-12T21:42:34.472Z\",\"customer\":\"customer\",\"id\":\"obj_123\",\"livemode\":true,\"metadata\":{\"key\":\"metadata\"},\"object\":\"v2.payments.off_session_payment\",\"payment_method\":\"payment_method\",\"payments_orchestration\":{\"enabled\":true},\"retry_details\":{\"attempts\":542738246,\"retry_strategy\":\"scheduled\"},\"status\":\"pending\"}"); + "{\"amount_requested\":{\"currency\":\"USD\",\"value\":47},\"cadence\":\"unscheduled\",\"compartment_id\":\"compartment_id\",\"created\":\"1970-01-12T21:42:34.472Z\",\"customer\":\"customer\",\"id\":\"obj_123\",\"livemode\":true,\"metadata\":{\"key\":\"metadata\"},\"object\":\"v2.payments.off_session_payment\",\"payment_method\":\"payment_method\",\"payments_orchestration\":{\"enabled\":true},\"retry_details\":{\"attempts\":542738246,\"retry_strategy\":\"scheduled\"},\"status\":\"pending\"}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.payments.OffSessionPaymentCreateParams params = com.stripe.param.v2.payments.OffSessionPaymentCreateParams.builder() - .setAmount( - com.stripe.param.v2.payments.OffSessionPaymentCreateParams.Amount.builder() - .setValue(111972721L) - .setCurrency("usd") - .build()) + .setAmount(new com.stripe.v2.Amount(96, "USD")) .setCadence( com.stripe.param.v2.payments.OffSessionPaymentCreateParams.Cadence.UNSCHEDULED) .setCustomer("customer") @@ -29940,7 +29909,7 @@ public void testV2PaymentsOffSessionPaymentGet2Services() throws StripeException null, null, com.stripe.model.v2.payments.OffSessionPayment.class, - "{\"amount_requested\":{\"value\":111972721,\"currency\":\"usd\"},\"cadence\":\"unscheduled\",\"compartment_id\":\"compartment_id\",\"created\":\"1970-01-12T21:42:34.472Z\",\"customer\":\"customer\",\"id\":\"obj_123\",\"livemode\":true,\"metadata\":{\"key\":\"metadata\"},\"object\":\"v2.payments.off_session_payment\",\"payment_method\":\"payment_method\",\"payments_orchestration\":{\"enabled\":true},\"retry_details\":{\"attempts\":542738246,\"retry_strategy\":\"scheduled\"},\"status\":\"pending\"}"); + "{\"amount_requested\":{\"currency\":\"USD\",\"value\":47},\"cadence\":\"unscheduled\",\"compartment_id\":\"compartment_id\",\"created\":\"1970-01-12T21:42:34.472Z\",\"customer\":\"customer\",\"id\":\"obj_123\",\"livemode\":true,\"metadata\":{\"key\":\"metadata\"},\"object\":\"v2.payments.off_session_payment\",\"payment_method\":\"payment_method\",\"payments_orchestration\":{\"enabled\":true},\"retry_details\":{\"attempts\":542738246,\"retry_strategy\":\"scheduled\"},\"status\":\"pending\"}"); StripeClient client = new StripeClient(networkSpy); com.stripe.model.v2.payments.OffSessionPayment offSessionPayment = @@ -29963,7 +29932,7 @@ public void testV2PaymentsOffSessionPaymentPost2Services() throws StripeExceptio null, null, com.stripe.model.v2.payments.OffSessionPayment.class, - "{\"amount_requested\":{\"value\":111972721,\"currency\":\"usd\"},\"cadence\":\"unscheduled\",\"compartment_id\":\"compartment_id\",\"created\":\"1970-01-12T21:42:34.472Z\",\"customer\":\"customer\",\"id\":\"obj_123\",\"livemode\":true,\"metadata\":{\"key\":\"metadata\"},\"object\":\"v2.payments.off_session_payment\",\"payment_method\":\"payment_method\",\"payments_orchestration\":{\"enabled\":true},\"retry_details\":{\"attempts\":542738246,\"retry_strategy\":\"scheduled\"},\"status\":\"pending\"}"); + "{\"amount_requested\":{\"currency\":\"USD\",\"value\":47},\"cadence\":\"unscheduled\",\"compartment_id\":\"compartment_id\",\"created\":\"1970-01-12T21:42:34.472Z\",\"customer\":\"customer\",\"id\":\"obj_123\",\"livemode\":true,\"metadata\":{\"key\":\"metadata\"},\"object\":\"v2.payments.off_session_payment\",\"payment_method\":\"payment_method\",\"payments_orchestration\":{\"enabled\":true},\"retry_details\":{\"attempts\":542738246,\"retry_strategy\":\"scheduled\"},\"status\":\"pending\"}"); StripeClient client = new StripeClient(networkSpy); com.stripe.model.v2.payments.OffSessionPayment offSessionPayment = @@ -29986,7 +29955,7 @@ public void testV2PaymentsOffSessionPaymentPost3Services() throws StripeExceptio null, null, com.stripe.model.v2.payments.OffSessionPayment.class, - "{\"amount_requested\":{\"value\":111972721,\"currency\":\"usd\"},\"cadence\":\"unscheduled\",\"compartment_id\":\"compartment_id\",\"created\":\"1970-01-12T21:42:34.472Z\",\"customer\":\"customer\",\"id\":\"obj_123\",\"livemode\":true,\"metadata\":{\"key\":\"metadata\"},\"object\":\"v2.payments.off_session_payment\",\"payment_method\":\"payment_method\",\"payments_orchestration\":{\"enabled\":true},\"retry_details\":{\"attempts\":542738246,\"retry_strategy\":\"scheduled\"},\"status\":\"pending\"}"); + "{\"amount_requested\":{\"currency\":\"USD\",\"value\":47},\"cadence\":\"unscheduled\",\"compartment_id\":\"compartment_id\",\"created\":\"1970-01-12T21:42:34.472Z\",\"customer\":\"customer\",\"id\":\"obj_123\",\"livemode\":true,\"metadata\":{\"key\":\"metadata\"},\"object\":\"v2.payments.off_session_payment\",\"payment_method\":\"payment_method\",\"payments_orchestration\":{\"enabled\":true},\"retry_details\":{\"attempts\":542738246,\"retry_strategy\":\"scheduled\"},\"status\":\"pending\"}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.payments.OffSessionPaymentCaptureParams params = @@ -30016,7 +29985,7 @@ public void testV2PaymentsSettlementAllocationIntentGetServices() throws StripeE new TypeToken< com.stripe.model.v2.StripeCollection< com.stripe.model.v2.payments.SettlementAllocationIntent>>() {}.getType(), - "{\"data\":[{\"amount\":{\"value\":111972721,\"currency\":\"usd\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"expected_settlement_date\":\"1970-01-22T14:14:13.629Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"linked_credits\":[\"linked_credits\"],\"object\":\"v2.payments.settlement_allocation_intent\",\"reference\":\"reference\",\"status\":\"canceled\",\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"expected_settlement_date\":\"1970-01-22T14:14:13.629Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"linked_credits\":[\"linked_credits\"],\"object\":\"v2.payments.settlement_allocation_intent\",\"reference\":\"reference\",\"status\":\"canceled\",\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.payments.SettlementAllocationIntentListParams params = @@ -30042,16 +30011,12 @@ public void testV2PaymentsSettlementAllocationIntentPostServices() throws Stripe null, null, com.stripe.model.v2.payments.SettlementAllocationIntent.class, - "{\"amount\":{\"value\":111972721,\"currency\":\"usd\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"expected_settlement_date\":\"1970-01-22T14:14:13.629Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"linked_credits\":[\"linked_credits\"],\"object\":\"v2.payments.settlement_allocation_intent\",\"reference\":\"reference\",\"status\":\"canceled\",\"livemode\":true}"); + "{\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"expected_settlement_date\":\"1970-01-22T14:14:13.629Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"linked_credits\":[\"linked_credits\"],\"object\":\"v2.payments.settlement_allocation_intent\",\"reference\":\"reference\",\"status\":\"canceled\",\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.payments.SettlementAllocationIntentCreateParams params = com.stripe.param.v2.payments.SettlementAllocationIntentCreateParams.builder() - .setAmount( - com.stripe.param.v2.payments.SettlementAllocationIntentCreateParams.Amount.builder() - .setValue(111972721L) - .setCurrency("usd") - .build()) + .setAmount(new com.stripe.v2.Amount(96, "USD")) .setExpectedSettlementDate(Instant.parse("1970-01-22T14:14:13.629Z")) .setFinancialAccount("financial_account") .setReference("reference") @@ -30077,7 +30042,7 @@ public void testV2PaymentsSettlementAllocationIntentGet2Services() throws Stripe null, null, com.stripe.model.v2.payments.SettlementAllocationIntent.class, - "{\"amount\":{\"value\":111972721,\"currency\":\"usd\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"expected_settlement_date\":\"1970-01-22T14:14:13.629Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"linked_credits\":[\"linked_credits\"],\"object\":\"v2.payments.settlement_allocation_intent\",\"reference\":\"reference\",\"status\":\"canceled\",\"livemode\":true}"); + "{\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"expected_settlement_date\":\"1970-01-22T14:14:13.629Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"linked_credits\":[\"linked_credits\"],\"object\":\"v2.payments.settlement_allocation_intent\",\"reference\":\"reference\",\"status\":\"canceled\",\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.model.v2.payments.SettlementAllocationIntent settlementAllocationIntent = @@ -30100,7 +30065,7 @@ public void testV2PaymentsSettlementAllocationIntentPost2Services() throws Strip null, null, com.stripe.model.v2.payments.SettlementAllocationIntent.class, - "{\"amount\":{\"value\":111972721,\"currency\":\"usd\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"expected_settlement_date\":\"1970-01-22T14:14:13.629Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"linked_credits\":[\"linked_credits\"],\"object\":\"v2.payments.settlement_allocation_intent\",\"reference\":\"reference\",\"status\":\"canceled\",\"livemode\":true}"); + "{\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"expected_settlement_date\":\"1970-01-22T14:14:13.629Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"linked_credits\":[\"linked_credits\"],\"object\":\"v2.payments.settlement_allocation_intent\",\"reference\":\"reference\",\"status\":\"canceled\",\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.payments.SettlementAllocationIntentUpdateParams params = @@ -30126,7 +30091,7 @@ public void testV2PaymentsSettlementAllocationIntentPost3Services() throws Strip null, null, com.stripe.model.v2.payments.SettlementAllocationIntent.class, - "{\"amount\":{\"value\":111972721,\"currency\":\"usd\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"expected_settlement_date\":\"1970-01-22T14:14:13.629Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"linked_credits\":[\"linked_credits\"],\"object\":\"v2.payments.settlement_allocation_intent\",\"reference\":\"reference\",\"status\":\"canceled\",\"livemode\":true}"); + "{\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"expected_settlement_date\":\"1970-01-22T14:14:13.629Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"linked_credits\":[\"linked_credits\"],\"object\":\"v2.payments.settlement_allocation_intent\",\"reference\":\"reference\",\"status\":\"canceled\",\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.model.v2.payments.SettlementAllocationIntent settlementAllocationIntent = @@ -30149,7 +30114,7 @@ public void testV2PaymentsSettlementAllocationIntentPost4Services() throws Strip null, null, com.stripe.model.v2.payments.SettlementAllocationIntent.class, - "{\"amount\":{\"value\":111972721,\"currency\":\"usd\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"expected_settlement_date\":\"1970-01-22T14:14:13.629Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"linked_credits\":[\"linked_credits\"],\"object\":\"v2.payments.settlement_allocation_intent\",\"reference\":\"reference\",\"status\":\"canceled\",\"livemode\":true}"); + "{\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"expected_settlement_date\":\"1970-01-22T14:14:13.629Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"linked_credits\":[\"linked_credits\"],\"object\":\"v2.payments.settlement_allocation_intent\",\"reference\":\"reference\",\"status\":\"canceled\",\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.model.v2.payments.SettlementAllocationIntent settlementAllocationIntent = @@ -30174,7 +30139,7 @@ public void testV2PaymentsSettlementAllocationIntentsSplitGetServices() throws S new TypeToken< com.stripe.model.v2.StripeCollection< com.stripe.model.v2.payments.SettlementAllocationIntentSplit>>() {}.getType(), - "{\"data\":[{\"account\":\"account\",\"amount\":{\"value\":111972721,\"currency\":\"usd\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.payments.settlement_allocation_intent_split\",\"settlement_allocation_intent\":\"settlement_allocation_intent\",\"status\":\"canceled\",\"type\":\"credit\",\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"account\":\"account\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.payments.settlement_allocation_intent_split\",\"settlement_allocation_intent\":\"settlement_allocation_intent\",\"status\":\"canceled\",\"type\":\"credit\",\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.payments.settlementallocationintents.SplitListParams params = @@ -30207,18 +30172,13 @@ public void testV2PaymentsSettlementAllocationIntentsSplitPostServices() throws null, null, com.stripe.model.v2.payments.SettlementAllocationIntentSplit.class, - "{\"account\":\"account\",\"amount\":{\"value\":111972721,\"currency\":\"usd\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.payments.settlement_allocation_intent_split\",\"settlement_allocation_intent\":\"settlement_allocation_intent\",\"status\":\"canceled\",\"type\":\"credit\",\"livemode\":true}"); + "{\"account\":\"account\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.payments.settlement_allocation_intent_split\",\"settlement_allocation_intent\":\"settlement_allocation_intent\",\"status\":\"canceled\",\"type\":\"credit\",\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.payments.settlementallocationintents.SplitCreateParams params = com.stripe.param.v2.payments.settlementallocationintents.SplitCreateParams.builder() .setAccount("account") - .setAmount( - com.stripe.param.v2.payments.settlementallocationintents.SplitCreateParams.Amount - .builder() - .setValue(111972721L) - .setCurrency("usd") - .build()) + .setAmount(new com.stripe.v2.Amount(96, "USD")) .setType( com.stripe.param.v2.payments.settlementallocationintents.SplitCreateParams.Type .CREDIT) @@ -30249,7 +30209,7 @@ public void testV2PaymentsSettlementAllocationIntentsSplitGet2Services() throws null, null, com.stripe.model.v2.payments.SettlementAllocationIntentSplit.class, - "{\"account\":\"account\",\"amount\":{\"value\":111972721,\"currency\":\"usd\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.payments.settlement_allocation_intent_split\",\"settlement_allocation_intent\":\"settlement_allocation_intent\",\"status\":\"canceled\",\"type\":\"credit\",\"livemode\":true}"); + "{\"account\":\"account\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.payments.settlement_allocation_intent_split\",\"settlement_allocation_intent\":\"settlement_allocation_intent\",\"status\":\"canceled\",\"type\":\"credit\",\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.model.v2.payments.SettlementAllocationIntentSplit settlementAllocationIntentSplit = @@ -30277,7 +30237,7 @@ public void testV2PaymentsSettlementAllocationIntentsSplitPost2Services() throws null, null, com.stripe.model.v2.payments.SettlementAllocationIntentSplit.class, - "{\"account\":\"account\",\"amount\":{\"value\":111972721,\"currency\":\"usd\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.payments.settlement_allocation_intent_split\",\"settlement_allocation_intent\":\"settlement_allocation_intent\",\"status\":\"canceled\",\"type\":\"credit\",\"livemode\":true}"); + "{\"account\":\"account\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.payments.settlement_allocation_intent_split\",\"settlement_allocation_intent\":\"settlement_allocation_intent\",\"status\":\"canceled\",\"type\":\"credit\",\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.model.v2.payments.SettlementAllocationIntentSplit settlementAllocationIntentSplit = @@ -30547,11 +30507,7 @@ public void testV2TestHelpersFinancialAddressPostServices() throws StripeExcepti com.stripe.param.v2.testhelpers.FinancialAddressCreditParams params = com.stripe.param.v2.testhelpers.FinancialAddressCreditParams.builder() - .setAmount( - com.stripe.param.v2.testhelpers.FinancialAddressCreditParams.Amount.builder() - .setValue(111972721L) - .setCurrency("usd") - .build()) + .setAmount(new com.stripe.v2.Amount(96, "USD")) .setNetwork(com.stripe.param.v2.testhelpers.FinancialAddressCreditParams.Network.ACH) .build(); @@ -30575,7 +30531,7 @@ public void testV2TestHelpersFinancialAddressPost2Services() throws StripeExcept null, null, com.stripe.model.v2.FinancialAddressGeneratedMicrodeposits.class, - "{\"amounts\":[{\"value\":111972721,\"currency\":\"usd\"}],\"object\":\"financial_address_generated_microdeposits\",\"status\":\"accepted\",\"livemode\":true}"); + "{\"amounts\":[{\"currency\":\"USD\",\"value\":1}],\"object\":\"financial_address_generated_microdeposits\",\"status\":\"accepted\",\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.model.v2.FinancialAddressGeneratedMicrodeposits @@ -30849,11 +30805,7 @@ public void testInsufficientFundsErrorServices() throws StripeException { com.stripe.param.v2.moneymanagement.OutboundPaymentCreateParams params = com.stripe.param.v2.moneymanagement.OutboundPaymentCreateParams.builder() - .setAmount( - com.stripe.param.v2.moneymanagement.OutboundPaymentCreateParams.Amount.builder() - .setValue(111972721L) - .setCurrency("usd") - .build()) + .setAmount(new com.stripe.v2.Amount(96, "USD")) .setFrom( com.stripe.param.v2.moneymanagement.OutboundPaymentCreateParams.From.builder() .setCurrency("usd") @@ -31064,11 +31016,7 @@ public void testRecipientNotNotifiableErrorServices() throws StripeException { com.stripe.param.v2.moneymanagement.OutboundPaymentCreateParams params = com.stripe.param.v2.moneymanagement.OutboundPaymentCreateParams.builder() - .setAmount( - com.stripe.param.v2.moneymanagement.OutboundPaymentCreateParams.Amount.builder() - .setValue(111972721L) - .setCurrency("usd") - .build()) + .setAmount(new com.stripe.v2.Amount(96, "USD")) .setFrom( com.stripe.param.v2.moneymanagement.OutboundPaymentCreateParams.From.builder() .setCurrency("usd") From 4793d56a3919dd00eff5713201444a517cf079e7 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Mon, 16 Mar 2026 21:24:54 +0000 Subject: [PATCH 12/13] Update generated code for v2202 and --- CODEGEN_VERSION | 2 +- .../java/com/stripe/model/v2/moneymanagement/ReceivedDebit.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CODEGEN_VERSION b/CODEGEN_VERSION index 86c9b57e800..7d70d83a9ad 100644 --- a/CODEGEN_VERSION +++ b/CODEGEN_VERSION @@ -1 +1 @@ -f504fb42951e8181250357c8af0cab513111e480 \ No newline at end of file +44f4fb009787de75f25092f4b710660223afa5c2 \ No newline at end of file diff --git a/src/main/java/com/stripe/model/v2/moneymanagement/ReceivedDebit.java b/src/main/java/com/stripe/model/v2/moneymanagement/ReceivedDebit.java index e763a4168e4..a0596113084 100644 --- a/src/main/java/com/stripe/model/v2/moneymanagement/ReceivedDebit.java +++ b/src/main/java/com/stripe/model/v2/moneymanagement/ReceivedDebit.java @@ -109,7 +109,7 @@ public class ReceivedDebit extends StripeObject implements HasId { StripeBalancePayment stripeBalancePayment; /** - * Open enum, the type of the received debit. + * Open Enum. The type of the ReceivedDebit. * *

One of {@code balance_transfer}, {@code bank_transfer}, {@code card_spend}, {@code * external_debit}, or {@code stripe_balance_payment}. From dd07538939c849850e6831fca6661dec99e7fbfd Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Mon, 16 Mar 2026 22:30:52 +0000 Subject: [PATCH 13/13] Update generated code for v2202 and --- CODEGEN_VERSION | 2 +- .../V2CoreHealthFraudRateIncreasedEvent.java | 19 +- ...AuthorizationRequestErrorsFiringEvent.java | 37 ++- ...thorizationRequestErrorsResolvedEvent.java | 37 ++- ...uthorizationRequestTimeoutFiringEvent.java | 37 ++- ...horizationRequestTimeoutResolvedEvent.java | 37 ++- ...inancialAddressGeneratedMicrodeposits.java | 27 +- .../model/v2/billing/ServiceAction.java | 50 +++- .../com/stripe/model/v2/core/Account.java | 46 +++- .../model/v2/moneymanagement/Adjustment.java | 22 +- .../moneymanagement/CurrencyConversion.java | 43 +++- .../v2/moneymanagement/FinancialAccount.java | 105 +++++++- .../v2/moneymanagement/InboundTransfer.java | 68 ++++- .../v2/moneymanagement/OutboundPayment.java | 68 ++++- .../moneymanagement/OutboundPaymentQuote.java | 89 ++++++- .../v2/moneymanagement/OutboundTransfer.java | 68 ++++- .../v2/moneymanagement/ReceivedCredit.java | 45 +++- .../v2/moneymanagement/ReceivedDebit.java | 87 ++++++- .../model/v2/moneymanagement/Transaction.java | 91 ++++++- .../v2/moneymanagement/TransactionEntry.java | 70 ++++- .../model/v2/payments/OffSessionPayment.java | 47 +++- .../payments/SettlementAllocationIntent.java | 22 +- .../SettlementAllocationIntentSplit.java | 22 +- .../v2/billing/ActionServiceCreateParams.java | 236 +++++++++++++++-- .../param/v2/core/AccountCreateParams.java | 220 +++++++++++++++- .../v2/core/AccountTokenCreateParams.java | 221 +++++++++++++++- .../param/v2/core/AccountUpdateParams.java | 242 +++++++++++++++++- .../CurrencyConversionCreateParams.java | 203 ++++++++++++++- .../InboundTransferCreateParams.java | 99 ++++++- .../OutboundPaymentCreateParams.java | 99 ++++++- .../OutboundPaymentQuoteCreateParams.java | 101 +++++++- .../OutboundTransferCreateParams.java | 99 ++++++- .../OffSessionPaymentCreateParams.java | 100 +++++++- ...ettlementAllocationIntentCreateParams.java | 101 +++++++- ...ettlementAllocationIntentUpdateParams.java | 111 +++++++- .../SplitCreateParams.java | 99 ++++++- .../FinancialAddressCreditParams.java | 99 ++++++- .../stripe/functional/GeneratedExamples.java | 170 +++++++----- 38 files changed, 3177 insertions(+), 162 deletions(-) diff --git a/CODEGEN_VERSION b/CODEGEN_VERSION index 7d70d83a9ad..8576feb6a93 100644 --- a/CODEGEN_VERSION +++ b/CODEGEN_VERSION @@ -1 +1 @@ -44f4fb009787de75f25092f4b710660223afa5c2 \ No newline at end of file +9e950cbf7b5a814a98f27d1a94b72cd6f1df2078 \ No newline at end of file diff --git a/src/main/java/com/stripe/events/V2CoreHealthFraudRateIncreasedEvent.java b/src/main/java/com/stripe/events/V2CoreHealthFraudRateIncreasedEvent.java index 6ba5b5249b2..85696a900e3 100644 --- a/src/main/java/com/stripe/events/V2CoreHealthFraudRateIncreasedEvent.java +++ b/src/main/java/com/stripe/events/V2CoreHealthFraudRateIncreasedEvent.java @@ -3,7 +3,6 @@ import com.google.gson.annotations.SerializedName; import com.stripe.model.v2.core.Event; -import com.stripe.v2.Amount; import java.time.Instant; import lombok.Getter; import lombok.Setter; @@ -49,7 +48,23 @@ public static final class Impact { Long impactedRequests; /** Estimated aggregated amount for the impacted requests. */ @SerializedName("realized_fraud_amount") - Amount realizedFraudAmount; + RealizedFraudAmount realizedFraudAmount; + + public static final class RealizedFraudAmount { + /** + * Three-letter ISO currency + * code, in lowercase. Must be a supported + * currency. + */ + @SerializedName("currency") + String currency; + /** + * A non-negative integer representing how much to charge in the smallest currency unit. + */ + @SerializedName("value") + Long value; + } } } } diff --git a/src/main/java/com/stripe/events/V2CoreHealthIssuingAuthorizationRequestErrorsFiringEvent.java b/src/main/java/com/stripe/events/V2CoreHealthIssuingAuthorizationRequestErrorsFiringEvent.java index 3bc15bf47d6..90ae8a47990 100644 --- a/src/main/java/com/stripe/events/V2CoreHealthIssuingAuthorizationRequestErrorsFiringEvent.java +++ b/src/main/java/com/stripe/events/V2CoreHealthIssuingAuthorizationRequestErrorsFiringEvent.java @@ -3,7 +3,6 @@ import com.google.gson.annotations.SerializedName; import com.stripe.model.v2.core.Event; -import com.stripe.v2.Amount; import java.time.Instant; import lombok.Getter; import lombok.Setter; @@ -33,16 +32,48 @@ public static final class EventData { public static final class Impact { /** Estimated aggregated amount for the approved requests. */ @SerializedName("approved_amount") - Amount approvedAmount; + ApprovedAmount approvedAmount; /** The number of approved requests which are impacted. */ @SerializedName("approved_impacted_requests") Long approvedImpactedRequests; /** Estimated aggregated amount for the declined requests. */ @SerializedName("declined_amount") - Amount declinedAmount; + DeclinedAmount declinedAmount; /** The number of declined requests which are impacted. */ @SerializedName("declined_impacted_requests") Long declinedImpactedRequests; + + public static final class ApprovedAmount { + /** + * Three-letter ISO currency + * code, in lowercase. Must be a supported + * currency. + */ + @SerializedName("currency") + String currency; + /** + * A non-negative integer representing how much to charge in the smallest currency unit. + */ + @SerializedName("value") + Long value; + } + + public static final class DeclinedAmount { + /** + * Three-letter ISO currency + * code, in lowercase. Must be a supported + * currency. + */ + @SerializedName("currency") + String currency; + /** + * A non-negative integer representing how much to charge in the smallest currency unit. + */ + @SerializedName("value") + Long value; + } } } } diff --git a/src/main/java/com/stripe/events/V2CoreHealthIssuingAuthorizationRequestErrorsResolvedEvent.java b/src/main/java/com/stripe/events/V2CoreHealthIssuingAuthorizationRequestErrorsResolvedEvent.java index fce01ca74c9..1f1464a4738 100644 --- a/src/main/java/com/stripe/events/V2CoreHealthIssuingAuthorizationRequestErrorsResolvedEvent.java +++ b/src/main/java/com/stripe/events/V2CoreHealthIssuingAuthorizationRequestErrorsResolvedEvent.java @@ -3,7 +3,6 @@ import com.google.gson.annotations.SerializedName; import com.stripe.model.v2.core.Event; -import com.stripe.v2.Amount; import java.time.Instant; import lombok.Getter; import lombok.Setter; @@ -36,16 +35,48 @@ public static final class EventData { public static final class Impact { /** Estimated aggregated amount for the approved requests. */ @SerializedName("approved_amount") - Amount approvedAmount; + ApprovedAmount approvedAmount; /** The number of approved requests which are impacted. */ @SerializedName("approved_impacted_requests") Long approvedImpactedRequests; /** Estimated aggregated amount for the declined requests. */ @SerializedName("declined_amount") - Amount declinedAmount; + DeclinedAmount declinedAmount; /** The number of declined requests which are impacted. */ @SerializedName("declined_impacted_requests") Long declinedImpactedRequests; + + public static final class ApprovedAmount { + /** + * Three-letter ISO currency + * code, in lowercase. Must be a supported + * currency. + */ + @SerializedName("currency") + String currency; + /** + * A non-negative integer representing how much to charge in the smallest currency unit. + */ + @SerializedName("value") + Long value; + } + + public static final class DeclinedAmount { + /** + * Three-letter ISO currency + * code, in lowercase. Must be a supported + * currency. + */ + @SerializedName("currency") + String currency; + /** + * A non-negative integer representing how much to charge in the smallest currency unit. + */ + @SerializedName("value") + Long value; + } } } } diff --git a/src/main/java/com/stripe/events/V2CoreHealthIssuingAuthorizationRequestTimeoutFiringEvent.java b/src/main/java/com/stripe/events/V2CoreHealthIssuingAuthorizationRequestTimeoutFiringEvent.java index 3817a4b835d..c135ce92f45 100644 --- a/src/main/java/com/stripe/events/V2CoreHealthIssuingAuthorizationRequestTimeoutFiringEvent.java +++ b/src/main/java/com/stripe/events/V2CoreHealthIssuingAuthorizationRequestTimeoutFiringEvent.java @@ -3,7 +3,6 @@ import com.google.gson.annotations.SerializedName; import com.stripe.model.v2.core.Event; -import com.stripe.v2.Amount; import java.time.Instant; import lombok.Getter; import lombok.Setter; @@ -36,16 +35,48 @@ public static final class EventData { public static final class Impact { /** Estimated aggregated amount for the approved requests. */ @SerializedName("approved_amount") - Amount approvedAmount; + ApprovedAmount approvedAmount; /** The number of approved requests which are impacted. */ @SerializedName("approved_impacted_requests") Long approvedImpactedRequests; /** Estimated aggregated amount for the declined requests. */ @SerializedName("declined_amount") - Amount declinedAmount; + DeclinedAmount declinedAmount; /** The number of declined requests which are impacted. */ @SerializedName("declined_impacted_requests") Long declinedImpactedRequests; + + public static final class ApprovedAmount { + /** + * Three-letter ISO currency + * code, in lowercase. Must be a supported + * currency. + */ + @SerializedName("currency") + String currency; + /** + * A non-negative integer representing how much to charge in the smallest currency unit. + */ + @SerializedName("value") + Long value; + } + + public static final class DeclinedAmount { + /** + * Three-letter ISO currency + * code, in lowercase. Must be a supported + * currency. + */ + @SerializedName("currency") + String currency; + /** + * A non-negative integer representing how much to charge in the smallest currency unit. + */ + @SerializedName("value") + Long value; + } } } } diff --git a/src/main/java/com/stripe/events/V2CoreHealthIssuingAuthorizationRequestTimeoutResolvedEvent.java b/src/main/java/com/stripe/events/V2CoreHealthIssuingAuthorizationRequestTimeoutResolvedEvent.java index f374cedcf01..339af97079b 100644 --- a/src/main/java/com/stripe/events/V2CoreHealthIssuingAuthorizationRequestTimeoutResolvedEvent.java +++ b/src/main/java/com/stripe/events/V2CoreHealthIssuingAuthorizationRequestTimeoutResolvedEvent.java @@ -3,7 +3,6 @@ import com.google.gson.annotations.SerializedName; import com.stripe.model.v2.core.Event; -import com.stripe.v2.Amount; import java.time.Instant; import lombok.Getter; import lombok.Setter; @@ -36,16 +35,48 @@ public static final class EventData { public static final class Impact { /** Estimated aggregated amount for the approved requests. */ @SerializedName("approved_amount") - Amount approvedAmount; + ApprovedAmount approvedAmount; /** The number of approved requests which are impacted. */ @SerializedName("approved_impacted_requests") Long approvedImpactedRequests; /** Estimated aggregated amount for the declined requests. */ @SerializedName("declined_amount") - Amount declinedAmount; + DeclinedAmount declinedAmount; /** The number of declined requests which are impacted. */ @SerializedName("declined_impacted_requests") Long declinedImpactedRequests; + + public static final class ApprovedAmount { + /** + * Three-letter ISO currency + * code, in lowercase. Must be a supported + * currency. + */ + @SerializedName("currency") + String currency; + /** + * A non-negative integer representing how much to charge in the smallest currency unit. + */ + @SerializedName("value") + Long value; + } + + public static final class DeclinedAmount { + /** + * Three-letter ISO currency + * code, in lowercase. Must be a supported + * currency. + */ + @SerializedName("currency") + String currency; + /** + * A non-negative integer representing how much to charge in the smallest currency unit. + */ + @SerializedName("value") + Long value; + } } } } diff --git a/src/main/java/com/stripe/model/v2/FinancialAddressGeneratedMicrodeposits.java b/src/main/java/com/stripe/model/v2/FinancialAddressGeneratedMicrodeposits.java index 1405406e3ee..621a62e20f3 100644 --- a/src/main/java/com/stripe/model/v2/FinancialAddressGeneratedMicrodeposits.java +++ b/src/main/java/com/stripe/model/v2/FinancialAddressGeneratedMicrodeposits.java @@ -3,7 +3,6 @@ import com.google.gson.annotations.SerializedName; import com.stripe.model.StripeObject; -import com.stripe.v2.Amount; import java.util.List; import lombok.EqualsAndHashCode; import lombok.Getter; @@ -19,7 +18,7 @@ public class FinancialAddressGeneratedMicrodeposits extends StripeObject { /** The amounts of the microdeposits that were generated. */ @SerializedName("amounts") - List amounts; + List amounts; /** * Has the value {@code true} if the object exists in live mode or the value {@code false} if the @@ -44,4 +43,28 @@ public class FinancialAddressGeneratedMicrodeposits extends StripeObject { */ @SerializedName("status") String status; + + /** + * For more details about Amount, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Amount extends StripeObject { + /** + * Three-letter ISO currency + * code, in lowercase. Must be a supported + * currency. + */ + @SerializedName("currency") + String currency; + + /** + * A non-negative integer representing how much to charge in the smallest currency unit. + */ + @SerializedName("value") + Long value; + } } diff --git a/src/main/java/com/stripe/model/v2/billing/ServiceAction.java b/src/main/java/com/stripe/model/v2/billing/ServiceAction.java index 4b818462a64..5c1d212d7b8 100644 --- a/src/main/java/com/stripe/model/v2/billing/ServiceAction.java +++ b/src/main/java/com/stripe/model/v2/billing/ServiceAction.java @@ -85,7 +85,7 @@ public class ServiceAction extends StripeObject implements HasId { public static class CreditGrant extends StripeObject { /** The amount of the credit grant. */ @SerializedName("amount") - com.stripe.model.v2.billing.ServiceAction.CreditGrant.Amount amount; + Amount amount; /** Defines the scope where the credit grant is applicable. */ @SerializedName("applicability_config") @@ -129,7 +129,7 @@ public static class Amount extends StripeObject { /** The monetary amount of the credit grant. Required if {@code type} is {@code monetary}. */ @SerializedName("monetary") - com.stripe.v2.Amount monetary; + Monetary monetary; /** * The type of the credit grant amount. We currently support {@code monetary} and {@code @@ -161,6 +161,27 @@ public static class CustomPricingUnit extends StripeObject implements HasId { @SerializedName("value") String value; } + + /** The monetary amount of the credit grant. Required if {@code type} is {@code monetary}. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Monetary extends StripeObject { + /** + * Three-letter ISO currency + * code, in lowercase. Must be a supported + * currency. + */ + @SerializedName("currency") + String currency; + + /** + * A non-negative integer representing how much to charge in the smallest currency unit. + */ + @SerializedName("value") + Long value; + } } /** Defines the scope where the credit grant is applicable. */ @@ -218,7 +239,7 @@ public static class ExpiryConfig extends StripeObject { public static class CreditGrantPerTenant extends StripeObject { /** The amount of the credit grant. */ @SerializedName("amount") - com.stripe.model.v2.billing.ServiceAction.CreditGrantPerTenant.Amount amount; + Amount amount; /** Defines the scope where the credit grant is applicable. */ @SerializedName("applicability_config") @@ -262,7 +283,7 @@ public static class Amount extends StripeObject { /** The monetary amount of the credit grant. Required if {@code type} is {@code monetary}. */ @SerializedName("monetary") - com.stripe.v2.Amount monetary; + Monetary monetary; /** * The type of the credit grant amount. We currently support {@code monetary} and {@code @@ -294,6 +315,27 @@ public static class CustomPricingUnit extends StripeObject implements HasId { @SerializedName("value") String value; } + + /** The monetary amount of the credit grant. Required if {@code type} is {@code monetary}. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Monetary extends StripeObject { + /** + * Three-letter ISO currency + * code, in lowercase. Must be a supported + * currency. + */ + @SerializedName("currency") + String currency; + + /** + * A non-negative integer representing how much to charge in the smallest currency unit. + */ + @SerializedName("value") + Long value; + } } /** Defines the scope where the credit grant is applicable. */ diff --git a/src/main/java/com/stripe/model/v2/core/Account.java b/src/main/java/com/stripe/model/v2/core/Account.java index 47bc3ff8fdf..150007c9f63 100644 --- a/src/main/java/com/stripe/model/v2/core/Account.java +++ b/src/main/java/com/stripe/model/v2/core/Account.java @@ -4,7 +4,6 @@ import com.google.gson.annotations.SerializedName; import com.stripe.model.HasId; import com.stripe.model.StripeObject; -import com.stripe.v2.Amount; import java.util.List; import java.util.Map; import lombok.EqualsAndHashCode; @@ -8345,6 +8344,27 @@ public static class AnnualRevenue extends StripeObject { */ @SerializedName("fiscal_year_end") String fiscalYearEnd; + + /** Annual revenue amount in minor currency units (for example, '123' for 1.23 USD). */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Amount extends StripeObject { + /** + * Three-letter ISO currency + * code, in lowercase. Must be a supported currency. + */ + @SerializedName("currency") + String currency; + + /** + * A non-negative integer representing how much to charge in the smallest currency unit. + */ + @SerializedName("value") + Long value; + } } /** Documents that may be submitted to satisfy various informational requests. */ @@ -8723,6 +8743,30 @@ public static class MonthlyEstimatedRevenue extends StripeObject { */ @SerializedName("amount") Amount amount; + + /** + * Estimated monthly revenue amount in minor currency units (for example, '123' for 1.23 + * USD). + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Amount extends StripeObject { + /** + * Three-letter ISO currency + * code, in lowercase. Must be a supported currency. + */ + @SerializedName("currency") + String currency; + + /** + * A non-negative integer representing how much to charge in the smallest currency unit. + */ + @SerializedName("value") + Long value; + } } /** When the business was incorporated or registered. */ diff --git a/src/main/java/com/stripe/model/v2/moneymanagement/Adjustment.java b/src/main/java/com/stripe/model/v2/moneymanagement/Adjustment.java index f66d9526216..9c271edb4bd 100644 --- a/src/main/java/com/stripe/model/v2/moneymanagement/Adjustment.java +++ b/src/main/java/com/stripe/model/v2/moneymanagement/Adjustment.java @@ -4,7 +4,6 @@ import com.google.gson.annotations.SerializedName; import com.stripe.model.HasId; import com.stripe.model.StripeObject; -import com.stripe.v2.Amount; import java.time.Instant; import lombok.EqualsAndHashCode; import lombok.Getter; @@ -115,4 +114,25 @@ public static class AdjustedFlow extends StripeObject { @SerializedName("type") String type; } + + /** The amount of the Adjustment. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Amount extends StripeObject { + /** + * Three-letter ISO currency + * code, in lowercase. Must be a supported + * currency. + */ + @SerializedName("currency") + String currency; + + /** + * A non-negative integer representing how much to charge in the smallest currency unit. + */ + @SerializedName("value") + Long value; + } } diff --git a/src/main/java/com/stripe/model/v2/moneymanagement/CurrencyConversion.java b/src/main/java/com/stripe/model/v2/moneymanagement/CurrencyConversion.java index 4fe82ec58ed..1e97ae3b232 100644 --- a/src/main/java/com/stripe/model/v2/moneymanagement/CurrencyConversion.java +++ b/src/main/java/com/stripe/model/v2/moneymanagement/CurrencyConversion.java @@ -4,7 +4,6 @@ import com.google.gson.annotations.SerializedName; import com.stripe.model.HasId; import com.stripe.model.StripeObject; -import com.stripe.v2.Amount; import java.time.Instant; import lombok.EqualsAndHashCode; import lombok.Getter; @@ -64,6 +63,27 @@ public static class From extends StripeObject { /** Amount object. */ @SerializedName("amount") Amount amount; + + /** Amount object. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Amount extends StripeObject { + /** + * Three-letter ISO currency + * code, in lowercase. Must be a supported + * currency. + */ + @SerializedName("currency") + String currency; + + /** + * A non-negative integer representing how much to charge in the smallest currency unit. + */ + @SerializedName("value") + Long value; + } } /** The to block containing what was credited. */ @@ -74,5 +94,26 @@ public static class To extends StripeObject { /** Amount object. */ @SerializedName("amount") Amount amount; + + /** Amount object. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Amount extends StripeObject { + /** + * Three-letter ISO currency + * code, in lowercase. Must be a supported + * currency. + */ + @SerializedName("currency") + String currency; + + /** + * A non-negative integer representing how much to charge in the smallest currency unit. + */ + @SerializedName("value") + Long value; + } } } diff --git a/src/main/java/com/stripe/model/v2/moneymanagement/FinancialAccount.java b/src/main/java/com/stripe/model/v2/moneymanagement/FinancialAccount.java index a723675d246..54fe5b06a1f 100644 --- a/src/main/java/com/stripe/model/v2/moneymanagement/FinancialAccount.java +++ b/src/main/java/com/stripe/model/v2/moneymanagement/FinancialAccount.java @@ -4,7 +4,6 @@ import com.google.gson.annotations.SerializedName; import com.stripe.model.HasId; import com.stripe.model.StripeObject; -import com.stripe.v2.Amount; import java.time.Instant; import java.util.List; import java.util.Map; @@ -161,15 +160,87 @@ public static class AccruedFees extends StripeObject { public static class Balance extends StripeObject { /** Balance that can be used for money movement. */ @SerializedName("available") - Map available; + Map available; /** Balance of inbound funds that will later transition to the {@code available} balance. */ @SerializedName("inbound_pending") - Map inboundPending; + Map inboundPending; /** Balance of funds that are being used for a pending outbound money movement. */ @SerializedName("outbound_pending") - Map outboundPending; + Map outboundPending; + + /** + * For more details about Available, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Available extends StripeObject { + /** + * Three-letter ISO currency + * code, in lowercase. Must be a supported + * currency. + */ + @SerializedName("currency") + String currency; + + /** + * A non-negative integer representing how much to charge in the smallest currency unit. + */ + @SerializedName("value") + Long value; + } + + /** + * For more details about InboundPending, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class InboundPending extends StripeObject { + /** + * Three-letter ISO currency + * code, in lowercase. Must be a supported + * currency. + */ + @SerializedName("currency") + String currency; + + /** + * A non-negative integer representing how much to charge in the smallest currency unit. + */ + @SerializedName("value") + Long value; + } + + /** + * For more details about OutboundPending, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class OutboundPending extends StripeObject { + /** + * Three-letter ISO currency + * code, in lowercase. Must be a supported + * currency. + */ + @SerializedName("currency") + String currency; + + /** + * A non-negative integer representing how much to charge in the smallest currency unit. + */ + @SerializedName("value") + Long value; + } } /** @@ -240,7 +311,31 @@ public static class StartingBalance extends StripeObject { /** The available balance at the time when the balance was projected. */ @SerializedName("available") - Map available; + Map available; + + /** + * For more details about Available, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Available extends StripeObject { + /** + * Three-letter ISO currency + * code, in lowercase. Must be a supported + * currency. + */ + @SerializedName("currency") + String currency; + + /** + * A non-negative integer representing how much to charge in the smallest currency unit. + */ + @SerializedName("value") + Long value; + } } } diff --git a/src/main/java/com/stripe/model/v2/moneymanagement/InboundTransfer.java b/src/main/java/com/stripe/model/v2/moneymanagement/InboundTransfer.java index 4816f0ba479..56e054e8aa0 100644 --- a/src/main/java/com/stripe/model/v2/moneymanagement/InboundTransfer.java +++ b/src/main/java/com/stripe/model/v2/moneymanagement/InboundTransfer.java @@ -4,7 +4,6 @@ import com.google.gson.annotations.SerializedName; import com.stripe.model.HasId; import com.stripe.model.StripeObject; -import com.stripe.v2.Amount; import java.time.Instant; import java.util.List; import java.util.Map; @@ -75,6 +74,27 @@ public class InboundTransfer extends StripeObject implements HasId { @SerializedName("transfer_history") List transferHistory; + /** The amount in specified currency that will land in the FinancialAccount balance. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Amount extends StripeObject { + /** + * Three-letter ISO currency + * code, in lowercase. Must be a supported + * currency. + */ + @SerializedName("currency") + String currency; + + /** + * A non-negative integer representing how much to charge in the smallest currency unit. + */ + @SerializedName("value") + Long value; + } + /** A nested object containing information about the origin of the InboundTransfer. */ @Getter @Setter @@ -82,12 +102,33 @@ public class InboundTransfer extends StripeObject implements HasId { public static class From extends StripeObject { /** The amount in specified currency that was debited from the Payment Method. */ @SerializedName("debited") - Amount debited; + Debited debited; /** The Payment Method object used to create the InboundTransfer. */ @SerializedName("payment_method") PaymentMethod paymentMethod; + /** The amount in specified currency that was debited from the Payment Method. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Debited extends StripeObject { + /** + * Three-letter ISO currency + * code, in lowercase. Must be a supported + * currency. + */ + @SerializedName("currency") + String currency; + + /** + * A non-negative integer representing how much to charge in the smallest currency unit. + */ + @SerializedName("value") + Long value; + } + /** The Payment Method object used to create the InboundTransfer. */ @Getter @Setter @@ -113,11 +154,32 @@ public static class PaymentMethod extends StripeObject { public static class To extends StripeObject { /** The amount by which the FinancialAccount balance is credited. */ @SerializedName("credited") - Amount credited; + Credited credited; /** The FinancialAccount that funds will land in. */ @SerializedName("financial_account") String financialAccount; + + /** The amount by which the FinancialAccount balance is credited. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Credited extends StripeObject { + /** + * Three-letter ISO currency + * code, in lowercase. Must be a supported + * currency. + */ + @SerializedName("currency") + String currency; + + /** + * A non-negative integer representing how much to charge in the smallest currency unit. + */ + @SerializedName("value") + Long value; + } } /** diff --git a/src/main/java/com/stripe/model/v2/moneymanagement/OutboundPayment.java b/src/main/java/com/stripe/model/v2/moneymanagement/OutboundPayment.java index f028a1da013..a5375d64a02 100644 --- a/src/main/java/com/stripe/model/v2/moneymanagement/OutboundPayment.java +++ b/src/main/java/com/stripe/model/v2/moneymanagement/OutboundPayment.java @@ -4,7 +4,6 @@ import com.google.gson.annotations.SerializedName; import com.stripe.model.HasId; import com.stripe.model.StripeObject; -import com.stripe.v2.Amount; import java.time.Instant; import java.util.Map; import lombok.EqualsAndHashCode; @@ -162,6 +161,27 @@ public class OutboundPayment extends StripeObject implements HasId { @SerializedName("tracking_details") TrackingDetails trackingDetails; + /** The "presentment amount" for the OutboundPayment. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Amount extends StripeObject { + /** + * Three-letter ISO currency + * code, in lowercase. Must be a supported + * currency. + */ + @SerializedName("currency") + String currency; + + /** + * A non-negative integer representing how much to charge in the smallest currency unit. + */ + @SerializedName("value") + Long value; + } + /** Delivery options to be used to send the OutboundPayment. */ @Getter @Setter @@ -217,11 +237,32 @@ public static class PaperCheck extends StripeObject { public static class From extends StripeObject { /** The monetary amount debited from the sender, only set on responses. */ @SerializedName("debited") - Amount debited; + Debited debited; /** The FinancialAccount that funds were pulled from. */ @SerializedName("financial_account") String financialAccount; + + /** The monetary amount debited from the sender, only set on responses. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Debited extends StripeObject { + /** + * Three-letter ISO currency + * code, in lowercase. Must be a supported + * currency. + */ + @SerializedName("currency") + String currency; + + /** + * A non-negative integer representing how much to charge in the smallest currency unit. + */ + @SerializedName("value") + Long value; + } } /** Details about the OutboundPayment notification settings for recipient. */ @@ -333,7 +374,7 @@ public static class StatusTransitions extends StripeObject { public static class To extends StripeObject { /** The monetary amount being credited to the destination. */ @SerializedName("credited") - Amount credited; + Credited credited; /** The payout method which the OutboundPayment uses to send payout. */ @SerializedName("payout_method") @@ -342,6 +383,27 @@ public static class To extends StripeObject { /** To which account the OutboundPayment is sent. */ @SerializedName("recipient") String recipient; + + /** The monetary amount being credited to the destination. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Credited extends StripeObject { + /** + * Three-letter ISO currency + * code, in lowercase. Must be a supported + * currency. + */ + @SerializedName("currency") + String currency; + + /** + * A non-negative integer representing how much to charge in the smallest currency unit. + */ + @SerializedName("value") + Long value; + } } /** diff --git a/src/main/java/com/stripe/model/v2/moneymanagement/OutboundPaymentQuote.java b/src/main/java/com/stripe/model/v2/moneymanagement/OutboundPaymentQuote.java index e90feb2965e..a9602b89124 100644 --- a/src/main/java/com/stripe/model/v2/moneymanagement/OutboundPaymentQuote.java +++ b/src/main/java/com/stripe/model/v2/moneymanagement/OutboundPaymentQuote.java @@ -4,7 +4,6 @@ import com.google.gson.annotations.SerializedName; import com.stripe.model.HasId; import com.stripe.model.StripeObject; -import com.stripe.v2.Amount; import java.time.Instant; import java.util.List; import java.util.Map; @@ -72,6 +71,27 @@ public class OutboundPaymentQuote extends StripeObject implements HasId { @SerializedName("to") To to; + /** The "presentment amount" for the OutboundPaymentQuote. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Amount extends StripeObject { + /** + * Three-letter ISO currency + * code, in lowercase. Must be a supported + * currency. + */ + @SerializedName("currency") + String currency; + + /** + * A non-negative integer representing how much to charge in the smallest currency unit. + */ + @SerializedName("value") + Long value; + } + /** Delivery options to be used to send the OutboundPayment. */ @Getter @Setter @@ -115,6 +135,27 @@ public static class EstimatedFee extends StripeObject { */ @SerializedName("type") String type; + + /** The fee amount for corresponding fee type. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Amount extends StripeObject { + /** + * Three-letter ISO currency + * code, in lowercase. Must be a supported + * currency. + */ + @SerializedName("currency") + String currency; + + /** + * A non-negative integer representing how much to charge in the smallest currency unit. + */ + @SerializedName("value") + Long value; + } } /** Details about the sender of an OutboundPaymentQuote. */ @@ -124,11 +165,32 @@ public static class EstimatedFee extends StripeObject { public static class From extends StripeObject { /** The monetary amount debited from the sender, only set on responses. */ @SerializedName("debited") - Amount debited; + Debited debited; /** The FinancialAccount that funds were pulled from. */ @SerializedName("financial_account") String financialAccount; + + /** The monetary amount debited from the sender, only set on responses. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Debited extends StripeObject { + /** + * Three-letter ISO currency + * code, in lowercase. Must be a supported + * currency. + */ + @SerializedName("currency") + String currency; + + /** + * A non-negative integer representing how much to charge in the smallest currency unit. + */ + @SerializedName("value") + Long value; + } } /** The underlying FXQuote details for the OutboundPaymentQuote. */ @@ -190,7 +252,7 @@ public static class Rate extends StripeObject { public static class To extends StripeObject { /** The monetary amount being credited to the destination. */ @SerializedName("credited") - Amount credited; + Credited credited; /** The payout method which the OutboundPayment uses to send payout. */ @SerializedName("payout_method") @@ -199,5 +261,26 @@ public static class To extends StripeObject { /** To which account the OutboundPayment is sent. */ @SerializedName("recipient") String recipient; + + /** The monetary amount being credited to the destination. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Credited extends StripeObject { + /** + * Three-letter ISO currency + * code, in lowercase. Must be a supported + * currency. + */ + @SerializedName("currency") + String currency; + + /** + * A non-negative integer representing how much to charge in the smallest currency unit. + */ + @SerializedName("value") + Long value; + } } } diff --git a/src/main/java/com/stripe/model/v2/moneymanagement/OutboundTransfer.java b/src/main/java/com/stripe/model/v2/moneymanagement/OutboundTransfer.java index 8f9db4c7129..a93728b73f5 100644 --- a/src/main/java/com/stripe/model/v2/moneymanagement/OutboundTransfer.java +++ b/src/main/java/com/stripe/model/v2/moneymanagement/OutboundTransfer.java @@ -4,7 +4,6 @@ import com.google.gson.annotations.SerializedName; import com.stripe.model.HasId; import com.stripe.model.StripeObject; -import com.stripe.v2.Amount; import java.time.Instant; import java.util.Map; import lombok.EqualsAndHashCode; @@ -139,6 +138,27 @@ public class OutboundTransfer extends StripeObject implements HasId { @SerializedName("trace_id") TraceId traceId; + /** The "presentment amount" for the OutboundTransfer. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Amount extends StripeObject { + /** + * Three-letter ISO currency + * code, in lowercase. Must be a supported + * currency. + */ + @SerializedName("currency") + String currency; + + /** + * A non-negative integer representing how much to charge in the smallest currency unit. + */ + @SerializedName("value") + Long value; + } + /** Delivery options to be used to send the OutboundTransfer. */ @Getter @Setter @@ -160,11 +180,32 @@ public static class DeliveryOptions extends StripeObject { public static class From extends StripeObject { /** The monetary amount debited from the sender, only set on responses. */ @SerializedName("debited") - Amount debited; + Debited debited; /** The FinancialAccount that funds were pulled from. */ @SerializedName("financial_account") String financialAccount; + + /** The monetary amount debited from the sender, only set on responses. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Debited extends StripeObject { + /** + * Three-letter ISO currency + * code, in lowercase. Must be a supported + * currency. + */ + @SerializedName("currency") + String currency; + + /** + * A non-negative integer representing how much to charge in the smallest currency unit. + */ + @SerializedName("value") + Long value; + } } /** Status details for an OutboundTransfer in a {@code failed} or {@code returned} state. */ @@ -260,11 +301,32 @@ public static class StatusTransitions extends StripeObject { public static class To extends StripeObject { /** The monetary amount being credited to the destination. */ @SerializedName("credited") - Amount credited; + Credited credited; /** The payout method which the OutboundTransfer uses to send payout. */ @SerializedName("payout_method") String payoutMethod; + + /** The monetary amount being credited to the destination. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Credited extends StripeObject { + /** + * Three-letter ISO currency + * code, in lowercase. Must be a supported + * currency. + */ + @SerializedName("currency") + String currency; + + /** + * A non-negative integer representing how much to charge in the smallest currency unit. + */ + @SerializedName("value") + Long value; + } } /** diff --git a/src/main/java/com/stripe/model/v2/moneymanagement/ReceivedCredit.java b/src/main/java/com/stripe/model/v2/moneymanagement/ReceivedCredit.java index 3c541808fbe..f98a4962840 100644 --- a/src/main/java/com/stripe/model/v2/moneymanagement/ReceivedCredit.java +++ b/src/main/java/com/stripe/model/v2/moneymanagement/ReceivedCredit.java @@ -4,7 +4,6 @@ import com.google.gson.annotations.SerializedName; import com.stripe.model.HasId; import com.stripe.model.StripeObject; -import com.stripe.v2.Amount; import java.time.Instant; import lombok.EqualsAndHashCode; import lombok.Getter; @@ -56,7 +55,7 @@ public class ReceivedCredit extends StripeObject implements HasId { /** The amount and currency of the original/external credit request. */ @SerializedName("external_amount") - Amount externalAmount; + ExternalAmount externalAmount; /** Financial Account ID on which funds for ReceivedCredit were received. */ @SerializedName("financial_account") @@ -125,6 +124,27 @@ public class ReceivedCredit extends StripeObject implements HasId { @SerializedName("type") String type; + /** The amount and currency of the ReceivedCredit. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Amount extends StripeObject { + /** + * Three-letter ISO currency + * code, in lowercase. Must be a supported + * currency. + */ + @SerializedName("currency") + String currency; + + /** + * A non-negative integer representing how much to charge in the smallest currency unit. + */ + @SerializedName("value") + Long value; + } + /** * This object stores details about the originating Stripe transaction that resulted in the * ReceivedCredit. Present if {@code type} field value is {@code balance_transfer}. @@ -349,6 +369,27 @@ public static class Refund extends StripeObject { } } + /** The amount and currency of the original/external credit request. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class ExternalAmount extends StripeObject { + /** + * Three-letter ISO currency + * code, in lowercase. Must be a supported + * currency. + */ + @SerializedName("currency") + String currency; + + /** + * A non-negative integer representing how much to charge in the smallest currency unit. + */ + @SerializedName("value") + Long value; + } + /** * This hash contains detailed information that elaborates on the specific status of the * ReceivedCredit. e.g the reason behind a failure if the status is marked as {@code failed}. diff --git a/src/main/java/com/stripe/model/v2/moneymanagement/ReceivedDebit.java b/src/main/java/com/stripe/model/v2/moneymanagement/ReceivedDebit.java index a0596113084..0024fda7cac 100644 --- a/src/main/java/com/stripe/model/v2/moneymanagement/ReceivedDebit.java +++ b/src/main/java/com/stripe/model/v2/moneymanagement/ReceivedDebit.java @@ -4,7 +4,6 @@ import com.google.gson.annotations.SerializedName; import com.stripe.model.HasId; import com.stripe.model.StripeObject; -import com.stripe.v2.Amount; import java.time.Instant; import java.util.List; import lombok.EqualsAndHashCode; @@ -54,7 +53,7 @@ public class ReceivedDebit extends StripeObject implements HasId { /** The amount and currency of the original/external debit request. */ @SerializedName("external_amount") - Amount externalAmount; + ExternalAmount externalAmount; /** Financial Account on which funds for ReceivedDebit were debited. */ @SerializedName("financial_account") @@ -117,6 +116,27 @@ public class ReceivedDebit extends StripeObject implements HasId { @SerializedName("type") String type; + /** Amount and currency of the ReceivedDebit. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Amount extends StripeObject { + /** + * Three-letter ISO currency + * code, in lowercase. Must be a supported + * currency. + */ + @SerializedName("currency") + String currency; + + /** + * A non-negative integer representing how much to charge in the smallest currency unit. + */ + @SerializedName("value") + Long value; + } + /** * This object stores details about the balance transfer object that resulted in the * ReceivedDebit. @@ -232,6 +252,27 @@ public static class Authorization extends StripeObject { /** The reference to the v1 issuing authorization ID. */ @SerializedName("issuing_authorization_v1") String issuingAuthorizationV1; + + /** Amount associated with this issuing authorization. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Amount extends StripeObject { + /** + * Three-letter ISO currency + * code, in lowercase. Must be a supported + * currency. + */ + @SerializedName("currency") + String currency; + + /** + * A non-negative integer representing how much to charge in the smallest currency unit. + */ + @SerializedName("value") + Long value; + } } /** @@ -249,9 +290,51 @@ public static class CardTransaction extends StripeObject { /** The reference to the v1 issuing transaction ID. */ @SerializedName("issuing_transaction_v1") String issuingTransactionV1; + + /** Amount associated with this issuing transaction. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Amount extends StripeObject { + /** + * Three-letter ISO currency + * code, in lowercase. Must be a supported + * currency. + */ + @SerializedName("currency") + String currency; + + /** + * A non-negative integer representing how much to charge in the smallest currency unit. + */ + @SerializedName("value") + Long value; + } } } + /** The amount and currency of the original/external debit request. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class ExternalAmount extends StripeObject { + /** + * Three-letter ISO currency + * code, in lowercase. Must be a supported + * currency. + */ + @SerializedName("currency") + String currency; + + /** + * A non-negative integer representing how much to charge in the smallest currency unit. + */ + @SerializedName("value") + Long value; + } + /** Detailed information about the status of the ReceivedDebit. */ @Getter @Setter diff --git a/src/main/java/com/stripe/model/v2/moneymanagement/Transaction.java b/src/main/java/com/stripe/model/v2/moneymanagement/Transaction.java index f5eeaadb119..4a42d26653e 100644 --- a/src/main/java/com/stripe/model/v2/moneymanagement/Transaction.java +++ b/src/main/java/com/stripe/model/v2/moneymanagement/Transaction.java @@ -4,7 +4,6 @@ import com.google.gson.annotations.SerializedName; import com.stripe.model.HasId; import com.stripe.model.StripeObject; -import com.stripe.v2.Amount; import java.time.Instant; import lombok.EqualsAndHashCode; import lombok.Getter; @@ -109,6 +108,27 @@ public class Transaction extends StripeObject implements HasId { @SerializedName("status_transitions") StatusTransitions statusTransitions; + /** The amount of the Transaction. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Amount extends StripeObject { + /** + * Three-letter ISO currency + * code, in lowercase. Must be a supported + * currency. + */ + @SerializedName("currency") + String currency; + + /** + * A non-negative integer representing how much to charge in the smallest currency unit. + */ + @SerializedName("value") + Long value; + } + /** * The delta to the FinancialAccount's balance. The balance_impact for the Transaction is equal to * sum of its TransactionEntries that have {@code effective_at}s in the past. @@ -119,15 +139,78 @@ public class Transaction extends StripeObject implements HasId { public static class BalanceImpact extends StripeObject { /** Impact to the available balance. */ @SerializedName("available") - Amount available; + Available available; /** Impact to the inbound_pending balance. */ @SerializedName("inbound_pending") - Amount inboundPending; + InboundPending inboundPending; /** Impact to the outbound_pending balance. */ @SerializedName("outbound_pending") - Amount outboundPending; + OutboundPending outboundPending; + + /** Impact to the available balance. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Available extends StripeObject { + /** + * Three-letter ISO currency + * code, in lowercase. Must be a supported + * currency. + */ + @SerializedName("currency") + String currency; + + /** + * A non-negative integer representing how much to charge in the smallest currency unit. + */ + @SerializedName("value") + Long value; + } + + /** Impact to the inbound_pending balance. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class InboundPending extends StripeObject { + /** + * Three-letter ISO currency + * code, in lowercase. Must be a supported + * currency. + */ + @SerializedName("currency") + String currency; + + /** + * A non-negative integer representing how much to charge in the smallest currency unit. + */ + @SerializedName("value") + Long value; + } + + /** Impact to the outbound_pending balance. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class OutboundPending extends StripeObject { + /** + * Three-letter ISO currency + * code, in lowercase. Must be a supported + * currency. + */ + @SerializedName("currency") + String currency; + + /** + * A non-negative integer representing how much to charge in the smallest currency unit. + */ + @SerializedName("value") + Long value; + } } /** Details about the Flow object that created the Transaction. */ diff --git a/src/main/java/com/stripe/model/v2/moneymanagement/TransactionEntry.java b/src/main/java/com/stripe/model/v2/moneymanagement/TransactionEntry.java index 976e1c09cae..de8bb601070 100644 --- a/src/main/java/com/stripe/model/v2/moneymanagement/TransactionEntry.java +++ b/src/main/java/com/stripe/model/v2/moneymanagement/TransactionEntry.java @@ -4,7 +4,6 @@ import com.google.gson.annotations.SerializedName; import com.stripe.model.HasId; import com.stripe.model.StripeObject; -import com.stripe.v2.Amount; import java.time.Instant; import lombok.EqualsAndHashCode; import lombok.Getter; @@ -69,15 +68,78 @@ public class TransactionEntry extends StripeObject implements HasId { public static class BalanceImpact extends StripeObject { /** Impact to the available balance. */ @SerializedName("available") - Amount available; + Available available; /** Impact to the inbound_pending balance. */ @SerializedName("inbound_pending") - Amount inboundPending; + InboundPending inboundPending; /** Impact to the outbound_pending balance. */ @SerializedName("outbound_pending") - Amount outboundPending; + OutboundPending outboundPending; + + /** Impact to the available balance. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Available extends StripeObject { + /** + * Three-letter ISO currency + * code, in lowercase. Must be a supported + * currency. + */ + @SerializedName("currency") + String currency; + + /** + * A non-negative integer representing how much to charge in the smallest currency unit. + */ + @SerializedName("value") + Long value; + } + + /** Impact to the inbound_pending balance. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class InboundPending extends StripeObject { + /** + * Three-letter ISO currency + * code, in lowercase. Must be a supported + * currency. + */ + @SerializedName("currency") + String currency; + + /** + * A non-negative integer representing how much to charge in the smallest currency unit. + */ + @SerializedName("value") + Long value; + } + + /** Impact to the outbound_pending balance. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class OutboundPending extends StripeObject { + /** + * Three-letter ISO currency + * code, in lowercase. Must be a supported + * currency. + */ + @SerializedName("currency") + String currency; + + /** + * A non-negative integer representing how much to charge in the smallest currency unit. + */ + @SerializedName("value") + Long value; + } } /** Details copied from the transaction that this TransactionEntry belongs to. */ diff --git a/src/main/java/com/stripe/model/v2/payments/OffSessionPayment.java b/src/main/java/com/stripe/model/v2/payments/OffSessionPayment.java index da3766cedc3..f1ae51a7129 100644 --- a/src/main/java/com/stripe/model/v2/payments/OffSessionPayment.java +++ b/src/main/java/com/stripe/model/v2/payments/OffSessionPayment.java @@ -4,7 +4,6 @@ import com.google.gson.annotations.SerializedName; import com.stripe.model.HasId; import com.stripe.model.StripeObject; -import com.stripe.v2.Amount; import java.time.Instant; import java.util.Map; import lombok.EqualsAndHashCode; @@ -27,11 +26,11 @@ public class OffSessionPayment extends StripeObject implements HasId { /** The amount available to be captured. */ @SerializedName("amount_capturable") - Amount amountCapturable; + AmountCapturable amountCapturable; /** The “presentment amount” to be collected from the customer. */ @SerializedName("amount_requested") - Amount amountRequested; + AmountRequested amountRequested; /** * The frequency of the underlying payment. @@ -166,6 +165,48 @@ public class OffSessionPayment extends StripeObject implements HasId { @SerializedName("transfer_data") TransferData transferData; + /** The amount available to be captured. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class AmountCapturable extends StripeObject { + /** + * Three-letter ISO currency + * code, in lowercase. Must be a supported + * currency. + */ + @SerializedName("currency") + String currency; + + /** + * A non-negative integer representing how much to charge in the smallest currency unit. + */ + @SerializedName("value") + Long value; + } + + /** The “presentment amount” to be collected from the customer. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class AmountRequested extends StripeObject { + /** + * Three-letter ISO currency + * code, in lowercase. Must be a supported + * currency. + */ + @SerializedName("currency") + String currency; + + /** + * A non-negative integer representing how much to charge in the smallest currency unit. + */ + @SerializedName("value") + Long value; + } + /** Details about the capture configuration for the OffSessionPayment. */ @Getter @Setter diff --git a/src/main/java/com/stripe/model/v2/payments/SettlementAllocationIntent.java b/src/main/java/com/stripe/model/v2/payments/SettlementAllocationIntent.java index 803ee95936a..a57c6f217d1 100644 --- a/src/main/java/com/stripe/model/v2/payments/SettlementAllocationIntent.java +++ b/src/main/java/com/stripe/model/v2/payments/SettlementAllocationIntent.java @@ -4,7 +4,6 @@ import com.google.gson.annotations.SerializedName; import com.stripe.model.HasId; import com.stripe.model.StripeObject; -import com.stripe.v2.Amount; import java.time.Instant; import java.util.List; import java.util.Map; @@ -82,6 +81,27 @@ public class SettlementAllocationIntent extends StripeObject implements HasId { @SerializedName("status_details") StatusDetails statusDetails; + /** The amount and currency of the SettlementAllocationIntent. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Amount extends StripeObject { + /** + * Three-letter ISO currency + * code, in lowercase. Must be a supported + * currency. + */ + @SerializedName("currency") + String currency; + + /** + * A non-negative integer representing how much to charge in the smallest currency unit. + */ + @SerializedName("value") + Long value; + } + /** Status details for a SettlementAllocationIntent in {@code errored} state. */ @Getter @Setter diff --git a/src/main/java/com/stripe/model/v2/payments/SettlementAllocationIntentSplit.java b/src/main/java/com/stripe/model/v2/payments/SettlementAllocationIntentSplit.java index 06677de52b7..c870e9150e6 100644 --- a/src/main/java/com/stripe/model/v2/payments/SettlementAllocationIntentSplit.java +++ b/src/main/java/com/stripe/model/v2/payments/SettlementAllocationIntentSplit.java @@ -4,7 +4,6 @@ import com.google.gson.annotations.SerializedName; import com.stripe.model.HasId; import com.stripe.model.StripeObject; -import com.stripe.v2.Amount; import java.time.Instant; import lombok.EqualsAndHashCode; import lombok.Getter; @@ -72,6 +71,27 @@ public class SettlementAllocationIntentSplit extends StripeObject implements Has @SerializedName("type") String type; + /** The amount and currency of the SettlementAllocationIntentSplit. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Amount extends StripeObject { + /** + * Three-letter ISO currency + * code, in lowercase. Must be a supported + * currency. + */ + @SerializedName("currency") + String currency; + + /** + * A non-negative integer representing how much to charge in the smallest currency unit. + */ + @SerializedName("value") + Long value; + } + /** Details about the Flow object that settled the split. */ @Getter @Setter diff --git a/src/main/java/com/stripe/param/v2/billing/ActionServiceCreateParams.java b/src/main/java/com/stripe/param/v2/billing/ActionServiceCreateParams.java index 2e7c2e2e600..1be8e11f0fc 100644 --- a/src/main/java/com/stripe/param/v2/billing/ActionServiceCreateParams.java +++ b/src/main/java/com/stripe/param/v2/billing/ActionServiceCreateParams.java @@ -175,7 +175,7 @@ public Builder setType(ActionServiceCreateParams.Type type) { public static class CreditGrant { /** Required. The amount of the credit grant. */ @SerializedName("amount") - com.stripe.param.v2.billing.ActionServiceCreateParams.CreditGrant.Amount amount; + Amount amount; /** Required. Defines the scope where the credit grant is applicable. */ @SerializedName("applicability_config") @@ -210,7 +210,7 @@ public static class CreditGrant { Long priority; private CreditGrant( - com.stripe.param.v2.billing.ActionServiceCreateParams.CreditGrant.Amount amount, + Amount amount, ApplicabilityConfig applicabilityConfig, Category category, ExpiryConfig expiryConfig, @@ -231,7 +231,7 @@ public static Builder builder() { } public static class Builder { - private com.stripe.param.v2.billing.ActionServiceCreateParams.CreditGrant.Amount amount; + private Amount amount; private ApplicabilityConfig applicabilityConfig; @@ -346,7 +346,7 @@ public static class Amount { /** The monetary amount of the credit grant. Required if {@code type} is {@code monetary}. */ @SerializedName("monetary") - com.stripe.v2.Amount monetary; + Monetary monetary; /** * Required. The type of the credit grant amount. We currently support {@code @@ -358,7 +358,7 @@ public static class Amount { private Amount( CustomPricingUnit customPricingUnit, Map extraParams, - com.stripe.v2.Amount monetary, + Monetary monetary, Type type) { this.customPricingUnit = customPricingUnit; this.extraParams = extraParams; @@ -375,7 +375,7 @@ public static class Builder { private Map extraParams; - private com.stripe.v2.Amount monetary; + private Monetary monetary; private Type type; @@ -426,7 +426,7 @@ public Builder putAllExtraParam(Map map) { /** * The monetary amount of the credit grant. Required if {@code type} is {@code monetary}. */ - public Builder setMonetary(com.stripe.v2.Amount monetary) { + public Builder setMonetary(ActionServiceCreateParams.CreditGrant.Amount.Monetary monetary) { this.monetary = monetary; return this; } @@ -535,6 +535,108 @@ public Builder setValue(String value) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Monetary { + /** + * Required. Three-letter ISO currency code, in + * lowercase. Must be a supported currency. + */ + @SerializedName("currency") + String currency; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. A non-negative integer representing how much to charge in the + * smallest currency unit. + */ + @SerializedName("value") + Long value; + + private Monetary(String currency, Map extraParams, Long value) { + this.currency = currency; + this.extraParams = extraParams; + this.value = value; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String currency; + + private Map extraParams; + + private Long value; + + /** Finalize and obtain parameter instance from this builder. */ + public ActionServiceCreateParams.CreditGrant.Amount.Monetary build() { + return new ActionServiceCreateParams.CreditGrant.Amount.Monetary( + this.currency, this.extraParams, this.value); + } + + /** + * Required. Three-letter ISO currency code, in + * lowercase. Must be a supported + * currency. + */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link ActionServiceCreateParams.CreditGrant.Amount.Monetary#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link ActionServiceCreateParams.CreditGrant.Amount.Monetary#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. A non-negative integer representing how much to charge in + * the smallest currency + * unit. + */ + public Builder setValue(Long value) { + this.value = value; + return this; + } + } + } + public enum Type implements ApiRequestParams.EnumParam { @SerializedName("custom_pricing_unit") CUSTOM_PRICING_UNIT("custom_pricing_unit"), @@ -869,7 +971,7 @@ public enum Category implements ApiRequestParams.EnumParam { public static class CreditGrantPerTenant { /** Required. The amount of the credit grant. */ @SerializedName("amount") - com.stripe.param.v2.billing.ActionServiceCreateParams.CreditGrantPerTenant.Amount amount; + Amount amount; /** Required. Defines the scope where the credit grant is applicable. */ @SerializedName("applicability_config") @@ -908,7 +1010,7 @@ public static class CreditGrantPerTenant { Long priority; private CreditGrantPerTenant( - com.stripe.param.v2.billing.ActionServiceCreateParams.CreditGrantPerTenant.Amount amount, + Amount amount, ApplicabilityConfig applicabilityConfig, Category category, ExpiryConfig expiryConfig, @@ -931,8 +1033,7 @@ public static Builder builder() { } public static class Builder { - private com.stripe.param.v2.billing.ActionServiceCreateParams.CreditGrantPerTenant.Amount - amount; + private Amount amount; private ApplicabilityConfig applicabilityConfig; @@ -1058,7 +1159,7 @@ public static class Amount { /** The monetary amount of the credit grant. Required if {@code type} is {@code monetary}. */ @SerializedName("monetary") - com.stripe.v2.Amount monetary; + Monetary monetary; /** * Required. The type of the credit grant amount. We currently support {@code @@ -1070,7 +1171,7 @@ public static class Amount { private Amount( CustomPricingUnit customPricingUnit, Map extraParams, - com.stripe.v2.Amount monetary, + Monetary monetary, Type type) { this.customPricingUnit = customPricingUnit; this.extraParams = extraParams; @@ -1087,7 +1188,7 @@ public static class Builder { private Map extraParams; - private com.stripe.v2.Amount monetary; + private Monetary monetary; private Type type; @@ -1139,7 +1240,8 @@ public Builder putAllExtraParam(Map map) { /** * The monetary amount of the credit grant. Required if {@code type} is {@code monetary}. */ - public Builder setMonetary(com.stripe.v2.Amount monetary) { + public Builder setMonetary( + ActionServiceCreateParams.CreditGrantPerTenant.Amount.Monetary monetary) { this.monetary = monetary; return this; } @@ -1248,6 +1350,110 @@ public Builder setValue(String value) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Monetary { + /** + * Required. Three-letter ISO currency code, in + * lowercase. Must be a supported currency. + */ + @SerializedName("currency") + String currency; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. A non-negative integer representing how much to charge in the + * smallest currency unit. + */ + @SerializedName("value") + Long value; + + private Monetary(String currency, Map extraParams, Long value) { + this.currency = currency; + this.extraParams = extraParams; + this.value = value; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String currency; + + private Map extraParams; + + private Long value; + + /** Finalize and obtain parameter instance from this builder. */ + public ActionServiceCreateParams.CreditGrantPerTenant.Amount.Monetary build() { + return new ActionServiceCreateParams.CreditGrantPerTenant.Amount.Monetary( + this.currency, this.extraParams, this.value); + } + + /** + * Required. Three-letter ISO currency code, in + * lowercase. Must be a supported + * currency. + */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * ActionServiceCreateParams.CreditGrantPerTenant.Amount.Monetary#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * ActionServiceCreateParams.CreditGrantPerTenant.Amount.Monetary#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. A non-negative integer representing how much to charge in + * the smallest currency + * unit. + */ + public Builder setValue(Long value) { + this.value = value; + return this; + } + } + } + public enum Type implements ApiRequestParams.EnumParam { @SerializedName("custom_pricing_unit") CUSTOM_PRICING_UNIT("custom_pricing_unit"), diff --git a/src/main/java/com/stripe/param/v2/core/AccountCreateParams.java b/src/main/java/com/stripe/param/v2/core/AccountCreateParams.java index 4e8f38f6247..698cbe234e6 100644 --- a/src/main/java/com/stripe/param/v2/core/AccountCreateParams.java +++ b/src/main/java/com/stripe/param/v2/core/AccountCreateParams.java @@ -3,7 +3,6 @@ import com.google.gson.annotations.SerializedName; import com.stripe.net.ApiRequestParams; -import com.stripe.v2.Amount; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -23003,7 +23002,8 @@ public AccountCreateParams.Identity.BusinessDetails.AnnualRevenue build() { } /** A non-negative integer representing the amount in the smallest currency unit. */ - public Builder setAmount(Amount amount) { + public Builder setAmount( + AccountCreateParams.Identity.BusinessDetails.AnnualRevenue.Amount amount) { this.amount = amount; return this; } @@ -23045,6 +23045,112 @@ public Builder setFiscalYearEnd(String fiscalYearEnd) { return this; } } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Amount { + /** + * Required. Three-letter ISO currency code, in + * lowercase. Must be a supported + * currency. + */ + @SerializedName("currency") + String currency; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. A non-negative integer representing how much to charge in + * the smallest currency + * unit. + */ + @SerializedName("value") + Long value; + + private Amount(String currency, Map extraParams, Long value) { + this.currency = currency; + this.extraParams = extraParams; + this.value = value; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String currency; + + private Map extraParams; + + private Long value; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Identity.BusinessDetails.AnnualRevenue.Amount build() { + return new AccountCreateParams.Identity.BusinessDetails.AnnualRevenue.Amount( + this.currency, this.extraParams, this.value); + } + + /** + * Required. Three-letter ISO currency code, in + * lowercase. Must be a supported + * currency. + */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Identity.BusinessDetails.AnnualRevenue.Amount#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Identity.BusinessDetails.AnnualRevenue.Amount#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. A non-negative integer representing how much to charge in + * the smallest currency + * unit. + */ + public Builder setValue(Long value) { + this.value = value; + return this; + } + } + } } @Getter @@ -25259,7 +25365,8 @@ public AccountCreateParams.Identity.BusinessDetails.MonthlyEstimatedRevenue buil } /** A non-negative integer representing the amount in the smallest currency unit. */ - public Builder setAmount(Amount amount) { + public Builder setAmount( + AccountCreateParams.Identity.BusinessDetails.MonthlyEstimatedRevenue.Amount amount) { this.amount = amount; return this; } @@ -25294,6 +25401,113 @@ public Builder putAllExtraParam(Map map) { return this; } } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Amount { + /** + * Required. Three-letter ISO currency code, in + * lowercase. Must be a supported + * currency. + */ + @SerializedName("currency") + String currency; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. A non-negative integer representing how much to charge in + * the smallest currency + * unit. + */ + @SerializedName("value") + Long value; + + private Amount(String currency, Map extraParams, Long value) { + this.currency = currency; + this.extraParams = extraParams; + this.value = value; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String currency; + + private Map extraParams; + + private Long value; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Identity.BusinessDetails.MonthlyEstimatedRevenue.Amount + build() { + return new AccountCreateParams.Identity.BusinessDetails.MonthlyEstimatedRevenue + .Amount(this.currency, this.extraParams, this.value); + } + + /** + * Required. Three-letter ISO currency code, in + * lowercase. Must be a supported + * currency. + */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Identity.BusinessDetails.MonthlyEstimatedRevenue.Amount#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Identity.BusinessDetails.MonthlyEstimatedRevenue.Amount#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. A non-negative integer representing how much to charge in + * the smallest currency + * unit. + */ + public Builder setValue(Long value) { + this.value = value; + return this; + } + } + } } @Getter diff --git a/src/main/java/com/stripe/param/v2/core/AccountTokenCreateParams.java b/src/main/java/com/stripe/param/v2/core/AccountTokenCreateParams.java index ad8400a2a74..9485d08657b 100644 --- a/src/main/java/com/stripe/param/v2/core/AccountTokenCreateParams.java +++ b/src/main/java/com/stripe/param/v2/core/AccountTokenCreateParams.java @@ -4,7 +4,6 @@ import com.google.gson.annotations.SerializedName; import com.stripe.net.ApiRequestParams; import com.stripe.param.common.EmptyParam; -import com.stripe.v2.Amount; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -3691,7 +3690,8 @@ public AccountTokenCreateParams.Identity.BusinessDetails.AnnualRevenue build() { } /** A non-negative integer representing the amount in the smallest currency unit. */ - public Builder setAmount(Amount amount) { + public Builder setAmount( + AccountTokenCreateParams.Identity.BusinessDetails.AnnualRevenue.Amount amount) { this.amount = amount; return this; } @@ -3735,6 +3735,112 @@ public Builder setFiscalYearEnd(String fiscalYearEnd) { return this; } } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Amount { + /** + * Required. Three-letter ISO currency code, in + * lowercase. Must be a supported + * currency. + */ + @SerializedName("currency") + String currency; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. A non-negative integer representing how much to charge in + * the smallest currency + * unit. + */ + @SerializedName("value") + Long value; + + private Amount(String currency, Map extraParams, Long value) { + this.currency = currency; + this.extraParams = extraParams; + this.value = value; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String currency; + + private Map extraParams; + + private Long value; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.BusinessDetails.AnnualRevenue.Amount build() { + return new AccountTokenCreateParams.Identity.BusinessDetails.AnnualRevenue.Amount( + this.currency, this.extraParams, this.value); + } + + /** + * Required. Three-letter ISO currency code, in + * lowercase. Must be a supported + * currency. + */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.AnnualRevenue.Amount#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.AnnualRevenue.Amount#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. A non-negative integer representing how much to charge in + * the smallest currency + * unit. + */ + public Builder setValue(Long value) { + this.value = value; + return this; + } + } + } } @Getter @@ -5962,7 +6068,9 @@ public AccountTokenCreateParams.Identity.BusinessDetails.MonthlyEstimatedRevenue } /** A non-negative integer representing the amount in the smallest currency unit. */ - public Builder setAmount(Amount amount) { + public Builder setAmount( + AccountTokenCreateParams.Identity.BusinessDetails.MonthlyEstimatedRevenue.Amount + amount) { this.amount = amount; return this; } @@ -5997,6 +6105,113 @@ public Builder putAllExtraParam(Map map) { return this; } } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Amount { + /** + * Required. Three-letter ISO currency code, in + * lowercase. Must be a supported + * currency. + */ + @SerializedName("currency") + String currency; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. A non-negative integer representing how much to charge in + * the smallest currency + * unit. + */ + @SerializedName("value") + Long value; + + private Amount(String currency, Map extraParams, Long value) { + this.currency = currency; + this.extraParams = extraParams; + this.value = value; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String currency; + + private Map extraParams; + + private Long value; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.BusinessDetails.MonthlyEstimatedRevenue.Amount + build() { + return new AccountTokenCreateParams.Identity.BusinessDetails.MonthlyEstimatedRevenue + .Amount(this.currency, this.extraParams, this.value); + } + + /** + * Required. Three-letter ISO currency code, in + * lowercase. Must be a supported + * currency. + */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.MonthlyEstimatedRevenue.Amount#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.MonthlyEstimatedRevenue.Amount#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. A non-negative integer representing how much to charge in + * the smallest currency + * unit. + */ + public Builder setValue(Long value) { + this.value = value; + return this; + } + } + } } @Getter diff --git a/src/main/java/com/stripe/param/v2/core/AccountUpdateParams.java b/src/main/java/com/stripe/param/v2/core/AccountUpdateParams.java index bf6cd172f97..b6cd8950893 100644 --- a/src/main/java/com/stripe/param/v2/core/AccountUpdateParams.java +++ b/src/main/java/com/stripe/param/v2/core/AccountUpdateParams.java @@ -4,7 +4,6 @@ import com.google.gson.annotations.SerializedName; import com.stripe.net.ApiRequestParams; import com.stripe.param.common.EmptyParam; -import com.stripe.v2.Amount; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -24481,7 +24480,8 @@ public AccountUpdateParams.Identity.BusinessDetails.AnnualRevenue build() { } /** A non-negative integer representing the amount in the smallest currency unit. */ - public Builder setAmount(Amount amount) { + public Builder setAmount( + AccountUpdateParams.Identity.BusinessDetails.AnnualRevenue.Amount amount) { this.amount = amount; return this; } @@ -24532,6 +24532,123 @@ public Builder setFiscalYearEnd(EmptyParam fiscalYearEnd) { return this; } } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Amount { + /** + * Required. Three-letter ISO currency code, in + * lowercase. Must be a supported + * currency. + */ + @SerializedName("currency") + Object currency; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. A non-negative integer representing how much to charge in + * the smallest currency + * unit. + */ + @SerializedName("value") + Long value; + + private Amount(Object currency, Map extraParams, Long value) { + this.currency = currency; + this.extraParams = extraParams; + this.value = value; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object currency; + + private Map extraParams; + + private Long value; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Identity.BusinessDetails.AnnualRevenue.Amount build() { + return new AccountUpdateParams.Identity.BusinessDetails.AnnualRevenue.Amount( + this.currency, this.extraParams, this.value); + } + + /** + * Required. Three-letter ISO currency code, in + * lowercase. Must be a supported + * currency. + */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } + + /** + * Required. Three-letter ISO currency code, in + * lowercase. Must be a supported + * currency. + */ + public Builder setCurrency(EmptyParam currency) { + this.currency = currency; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Identity.BusinessDetails.AnnualRevenue.Amount#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Identity.BusinessDetails.AnnualRevenue.Amount#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. A non-negative integer representing how much to charge in + * the smallest currency + * unit. + */ + public Builder setValue(Long value) { + this.value = value; + return this; + } + } + } } @Getter @@ -26781,7 +26898,8 @@ public AccountUpdateParams.Identity.BusinessDetails.MonthlyEstimatedRevenue buil } /** A non-negative integer representing the amount in the smallest currency unit. */ - public Builder setAmount(Amount amount) { + public Builder setAmount( + AccountUpdateParams.Identity.BusinessDetails.MonthlyEstimatedRevenue.Amount amount) { this.amount = amount; return this; } @@ -26816,6 +26934,124 @@ public Builder putAllExtraParam(Map map) { return this; } } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Amount { + /** + * Required. Three-letter ISO currency code, in + * lowercase. Must be a supported + * currency. + */ + @SerializedName("currency") + Object currency; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. A non-negative integer representing how much to charge in + * the smallest currency + * unit. + */ + @SerializedName("value") + Long value; + + private Amount(Object currency, Map extraParams, Long value) { + this.currency = currency; + this.extraParams = extraParams; + this.value = value; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object currency; + + private Map extraParams; + + private Long value; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Identity.BusinessDetails.MonthlyEstimatedRevenue.Amount + build() { + return new AccountUpdateParams.Identity.BusinessDetails.MonthlyEstimatedRevenue + .Amount(this.currency, this.extraParams, this.value); + } + + /** + * Required. Three-letter ISO currency code, in + * lowercase. Must be a supported + * currency. + */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } + + /** + * Required. Three-letter ISO currency code, in + * lowercase. Must be a supported + * currency. + */ + public Builder setCurrency(EmptyParam currency) { + this.currency = currency; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Identity.BusinessDetails.MonthlyEstimatedRevenue.Amount#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Identity.BusinessDetails.MonthlyEstimatedRevenue.Amount#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. A non-negative integer representing how much to charge in + * the smallest currency + * unit. + */ + public Builder setValue(Long value) { + this.value = value; + return this; + } + } + } } @Getter diff --git a/src/main/java/com/stripe/param/v2/moneymanagement/CurrencyConversionCreateParams.java b/src/main/java/com/stripe/param/v2/moneymanagement/CurrencyConversionCreateParams.java index b09290b3fb8..712020d691f 100644 --- a/src/main/java/com/stripe/param/v2/moneymanagement/CurrencyConversionCreateParams.java +++ b/src/main/java/com/stripe/param/v2/moneymanagement/CurrencyConversionCreateParams.java @@ -3,7 +3,6 @@ import com.google.gson.annotations.SerializedName; import com.stripe.net.ApiRequestParams; -import com.stripe.v2.Amount; import java.util.HashMap; import java.util.Map; import lombok.EqualsAndHashCode; @@ -156,7 +155,7 @@ public CurrencyConversionCreateParams.From build() { } /** Amount object. */ - public Builder setAmount(Amount amount) { + public Builder setAmount(CurrencyConversionCreateParams.From.Amount amount) { this.amount = amount; return this; } @@ -193,6 +192,105 @@ public Builder putAllExtraParam(Map map) { return this; } } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Amount { + /** + * Required. Three-letter ISO currency code, in + * lowercase. Must be a supported currency. + */ + @SerializedName("currency") + String currency; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. A non-negative integer representing how much to charge in the smallest currency unit. + */ + @SerializedName("value") + Long value; + + private Amount(String currency, Map extraParams, Long value) { + this.currency = currency; + this.extraParams = extraParams; + this.value = value; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String currency; + + private Map extraParams; + + private Long value; + + /** Finalize and obtain parameter instance from this builder. */ + public CurrencyConversionCreateParams.From.Amount build() { + return new CurrencyConversionCreateParams.From.Amount( + this.currency, this.extraParams, this.value); + } + + /** + * Required. Three-letter ISO currency code, in + * lowercase. Must be a supported currency. + */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link CurrencyConversionCreateParams.From.Amount#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link CurrencyConversionCreateParams.From.Amount#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. A non-negative integer representing how much to charge in the + * smallest currency unit. + */ + public Builder setValue(Long value) { + this.value = value; + return this; + } + } + } } @Getter @@ -238,7 +336,7 @@ public CurrencyConversionCreateParams.To build() { } /** Amount object. */ - public Builder setAmount(Amount amount) { + public Builder setAmount(CurrencyConversionCreateParams.To.Amount amount) { this.amount = amount; return this; } @@ -275,5 +373,104 @@ public Builder putAllExtraParam(Map map) { return this; } } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Amount { + /** + * Required. Three-letter ISO currency code, in + * lowercase. Must be a supported currency. + */ + @SerializedName("currency") + String currency; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. A non-negative integer representing how much to charge in the smallest currency unit. + */ + @SerializedName("value") + Long value; + + private Amount(String currency, Map extraParams, Long value) { + this.currency = currency; + this.extraParams = extraParams; + this.value = value; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String currency; + + private Map extraParams; + + private Long value; + + /** Finalize and obtain parameter instance from this builder. */ + public CurrencyConversionCreateParams.To.Amount build() { + return new CurrencyConversionCreateParams.To.Amount( + this.currency, this.extraParams, this.value); + } + + /** + * Required. Three-letter ISO currency code, in + * lowercase. Must be a supported currency. + */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link CurrencyConversionCreateParams.To.Amount#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link CurrencyConversionCreateParams.To.Amount#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. A non-negative integer representing how much to charge in the + * smallest currency unit. + */ + public Builder setValue(Long value) { + this.value = value; + return this; + } + } + } } } diff --git a/src/main/java/com/stripe/param/v2/moneymanagement/InboundTransferCreateParams.java b/src/main/java/com/stripe/param/v2/moneymanagement/InboundTransferCreateParams.java index 9be96532c88..15f5d5937f6 100644 --- a/src/main/java/com/stripe/param/v2/moneymanagement/InboundTransferCreateParams.java +++ b/src/main/java/com/stripe/param/v2/moneymanagement/InboundTransferCreateParams.java @@ -3,7 +3,6 @@ import com.google.gson.annotations.SerializedName; import com.stripe.net.ApiRequestParams; -import com.stripe.v2.Amount; import java.util.HashMap; import java.util.Map; import lombok.EqualsAndHashCode; @@ -76,7 +75,7 @@ public InboundTransferCreateParams build() { * Required. The amount, in specified currency, by which the FinancialAccount * balance will increase due to the InboundTransfer. */ - public Builder setAmount(Amount amount) { + public Builder setAmount(InboundTransferCreateParams.Amount amount) { this.amount = amount; return this; } @@ -129,6 +128,102 @@ public Builder setTo(InboundTransferCreateParams.To to) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Amount { + /** + * Required. Three-letter ISO currency code, in lowercase. + * Must be a supported currency. + */ + @SerializedName("currency") + String currency; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. A non-negative integer representing how much to charge in the smallest currency unit. + */ + @SerializedName("value") + Long value; + + private Amount(String currency, Map extraParams, Long value) { + this.currency = currency; + this.extraParams = extraParams; + this.value = value; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String currency; + + private Map extraParams; + + private Long value; + + /** Finalize and obtain parameter instance from this builder. */ + public InboundTransferCreateParams.Amount build() { + return new InboundTransferCreateParams.Amount(this.currency, this.extraParams, this.value); + } + + /** + * Required. Three-letter ISO currency code, in + * lowercase. Must be a supported currency. + */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * InboundTransferCreateParams.Amount#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link InboundTransferCreateParams.Amount#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. A non-negative integer representing how much to charge in the smallest currency unit. + */ + public Builder setValue(Long value) { + this.value = value; + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class From { diff --git a/src/main/java/com/stripe/param/v2/moneymanagement/OutboundPaymentCreateParams.java b/src/main/java/com/stripe/param/v2/moneymanagement/OutboundPaymentCreateParams.java index f18ec62fcb8..7d54dbea75d 100644 --- a/src/main/java/com/stripe/param/v2/moneymanagement/OutboundPaymentCreateParams.java +++ b/src/main/java/com/stripe/param/v2/moneymanagement/OutboundPaymentCreateParams.java @@ -3,7 +3,6 @@ import com.google.gson.annotations.SerializedName; import com.stripe.net.ApiRequestParams; -import com.stripe.v2.Amount; import java.util.HashMap; import java.util.Map; import lombok.EqualsAndHashCode; @@ -141,7 +140,7 @@ public OutboundPaymentCreateParams build() { /** * Required. The "presentment amount" to be sent to the recipient. */ - public Builder setAmount(Amount amount) { + public Builder setAmount(OutboundPaymentCreateParams.Amount amount) { this.amount = amount; return this; } @@ -258,6 +257,102 @@ public Builder setTo(OutboundPaymentCreateParams.To to) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Amount { + /** + * Required. Three-letter ISO currency code, in lowercase. + * Must be a supported currency. + */ + @SerializedName("currency") + String currency; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. A non-negative integer representing how much to charge in the smallest currency unit. + */ + @SerializedName("value") + Long value; + + private Amount(String currency, Map extraParams, Long value) { + this.currency = currency; + this.extraParams = extraParams; + this.value = value; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String currency; + + private Map extraParams; + + private Long value; + + /** Finalize and obtain parameter instance from this builder. */ + public OutboundPaymentCreateParams.Amount build() { + return new OutboundPaymentCreateParams.Amount(this.currency, this.extraParams, this.value); + } + + /** + * Required. Three-letter ISO currency code, in + * lowercase. Must be a supported currency. + */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * OutboundPaymentCreateParams.Amount#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link OutboundPaymentCreateParams.Amount#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. A non-negative integer representing how much to charge in the smallest currency unit. + */ + public Builder setValue(Long value) { + this.value = value; + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class DeliveryOptions { diff --git a/src/main/java/com/stripe/param/v2/moneymanagement/OutboundPaymentQuoteCreateParams.java b/src/main/java/com/stripe/param/v2/moneymanagement/OutboundPaymentQuoteCreateParams.java index 23ddfb84112..775729fc241 100644 --- a/src/main/java/com/stripe/param/v2/moneymanagement/OutboundPaymentQuoteCreateParams.java +++ b/src/main/java/com/stripe/param/v2/moneymanagement/OutboundPaymentQuoteCreateParams.java @@ -3,7 +3,6 @@ import com.google.gson.annotations.SerializedName; import com.stripe.net.ApiRequestParams; -import com.stripe.v2.Amount; import java.util.HashMap; import java.util.Map; import lombok.EqualsAndHashCode; @@ -74,7 +73,7 @@ public OutboundPaymentQuoteCreateParams build() { /** * Required. The "presentment amount" to be sent to the recipient. */ - public Builder setAmount(Amount amount) { + public Builder setAmount(OutboundPaymentQuoteCreateParams.Amount amount) { this.amount = amount; return this; } @@ -127,6 +126,104 @@ public Builder setTo(OutboundPaymentQuoteCreateParams.To to) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Amount { + /** + * Required. Three-letter ISO currency code, in lowercase. + * Must be a supported currency. + */ + @SerializedName("currency") + String currency; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. A non-negative integer representing how much to charge in the smallest currency unit. + */ + @SerializedName("value") + Long value; + + private Amount(String currency, Map extraParams, Long value) { + this.currency = currency; + this.extraParams = extraParams; + this.value = value; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String currency; + + private Map extraParams; + + private Long value; + + /** Finalize and obtain parameter instance from this builder. */ + public OutboundPaymentQuoteCreateParams.Amount build() { + return new OutboundPaymentQuoteCreateParams.Amount( + this.currency, this.extraParams, this.value); + } + + /** + * Required. Three-letter ISO currency code, in + * lowercase. Must be a supported currency. + */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * OutboundPaymentQuoteCreateParams.Amount#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link OutboundPaymentQuoteCreateParams.Amount#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. A non-negative integer representing how much to charge in the smallest currency unit. + */ + public Builder setValue(Long value) { + this.value = value; + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class DeliveryOptions { diff --git a/src/main/java/com/stripe/param/v2/moneymanagement/OutboundTransferCreateParams.java b/src/main/java/com/stripe/param/v2/moneymanagement/OutboundTransferCreateParams.java index b738831fc9b..d62fa6e4232 100644 --- a/src/main/java/com/stripe/param/v2/moneymanagement/OutboundTransferCreateParams.java +++ b/src/main/java/com/stripe/param/v2/moneymanagement/OutboundTransferCreateParams.java @@ -3,7 +3,6 @@ import com.google.gson.annotations.SerializedName; import com.stripe.net.ApiRequestParams; -import com.stripe.v2.Amount; import java.util.HashMap; import java.util.Map; import lombok.EqualsAndHashCode; @@ -109,7 +108,7 @@ public OutboundTransferCreateParams build() { } /** Required. The "presentment amount" for the OutboundPayment. */ - public Builder setAmount(Amount amount) { + public Builder setAmount(OutboundTransferCreateParams.Amount amount) { this.amount = amount; return this; } @@ -203,6 +202,102 @@ public Builder setTo(OutboundTransferCreateParams.To to) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Amount { + /** + * Required. Three-letter ISO currency code, in lowercase. + * Must be a supported currency. + */ + @SerializedName("currency") + String currency; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. A non-negative integer representing how much to charge in the smallest currency unit. + */ + @SerializedName("value") + Long value; + + private Amount(String currency, Map extraParams, Long value) { + this.currency = currency; + this.extraParams = extraParams; + this.value = value; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String currency; + + private Map extraParams; + + private Long value; + + /** Finalize and obtain parameter instance from this builder. */ + public OutboundTransferCreateParams.Amount build() { + return new OutboundTransferCreateParams.Amount(this.currency, this.extraParams, this.value); + } + + /** + * Required. Three-letter ISO currency code, in + * lowercase. Must be a supported currency. + */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * OutboundTransferCreateParams.Amount#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link OutboundTransferCreateParams.Amount#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. A non-negative integer representing how much to charge in the smallest currency unit. + */ + public Builder setValue(Long value) { + this.value = value; + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class DeliveryOptions { diff --git a/src/main/java/com/stripe/param/v2/payments/OffSessionPaymentCreateParams.java b/src/main/java/com/stripe/param/v2/payments/OffSessionPaymentCreateParams.java index e256020de47..1cbb2ac66be 100644 --- a/src/main/java/com/stripe/param/v2/payments/OffSessionPaymentCreateParams.java +++ b/src/main/java/com/stripe/param/v2/payments/OffSessionPaymentCreateParams.java @@ -3,7 +3,6 @@ import com.google.gson.annotations.SerializedName; import com.stripe.net.ApiRequestParams; -import com.stripe.v2.Amount; import java.util.HashMap; import java.util.Map; import lombok.EqualsAndHashCode; @@ -199,7 +198,7 @@ public OffSessionPaymentCreateParams build() { } /** Required. The “presentment amount” to be collected from the customer. */ - public Builder setAmount(Amount amount) { + public Builder setAmount(OffSessionPaymentCreateParams.Amount amount) { this.amount = amount; return this; } @@ -356,6 +355,103 @@ public Builder setTransferData(OffSessionPaymentCreateParams.TransferData transf } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Amount { + /** + * Required. Three-letter ISO currency code, in lowercase. + * Must be a supported currency. + */ + @SerializedName("currency") + String currency; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. A non-negative integer representing how much to charge in the smallest currency unit. + */ + @SerializedName("value") + Long value; + + private Amount(String currency, Map extraParams, Long value) { + this.currency = currency; + this.extraParams = extraParams; + this.value = value; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String currency; + + private Map extraParams; + + private Long value; + + /** Finalize and obtain parameter instance from this builder. */ + public OffSessionPaymentCreateParams.Amount build() { + return new OffSessionPaymentCreateParams.Amount( + this.currency, this.extraParams, this.value); + } + + /** + * Required. Three-letter ISO currency code, in + * lowercase. Must be a supported currency. + */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * OffSessionPaymentCreateParams.Amount#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link OffSessionPaymentCreateParams.Amount#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. A non-negative integer representing how much to charge in the smallest currency unit. + */ + public Builder setValue(Long value) { + this.value = value; + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Capture { diff --git a/src/main/java/com/stripe/param/v2/payments/SettlementAllocationIntentCreateParams.java b/src/main/java/com/stripe/param/v2/payments/SettlementAllocationIntentCreateParams.java index b5fd65d7115..0ae7e7e422f 100644 --- a/src/main/java/com/stripe/param/v2/payments/SettlementAllocationIntentCreateParams.java +++ b/src/main/java/com/stripe/param/v2/payments/SettlementAllocationIntentCreateParams.java @@ -3,7 +3,6 @@ import com.google.gson.annotations.SerializedName; import com.stripe.net.ApiRequestParams; -import com.stripe.v2.Amount; import java.time.Instant; import java.util.HashMap; import java.util.Map; @@ -101,7 +100,7 @@ public SettlementAllocationIntentCreateParams build() { * Required. The amount and currency of the SettlementAllocationIntent. Allowed * Currencies are {@code gbp} | {@code eur}. */ - public Builder setAmount(Amount amount) { + public Builder setAmount(SettlementAllocationIntentCreateParams.Amount amount) { this.amount = amount; return this; } @@ -185,4 +184,102 @@ public Builder setReference(String reference) { return this; } } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Amount { + /** + * Required. Three-letter ISO currency code, in lowercase. + * Must be a supported currency. + */ + @SerializedName("currency") + String currency; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. A non-negative integer representing how much to charge in the smallest currency unit. + */ + @SerializedName("value") + Long value; + + private Amount(String currency, Map extraParams, Long value) { + this.currency = currency; + this.extraParams = extraParams; + this.value = value; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String currency; + + private Map extraParams; + + private Long value; + + /** Finalize and obtain parameter instance from this builder. */ + public SettlementAllocationIntentCreateParams.Amount build() { + return new SettlementAllocationIntentCreateParams.Amount( + this.currency, this.extraParams, this.value); + } + + /** + * Required. Three-letter ISO currency code, in + * lowercase. Must be a supported currency. + */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * SettlementAllocationIntentCreateParams.Amount#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link SettlementAllocationIntentCreateParams.Amount#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. A non-negative integer representing how much to charge in the smallest currency unit. + */ + public Builder setValue(Long value) { + this.value = value; + return this; + } + } + } } diff --git a/src/main/java/com/stripe/param/v2/payments/SettlementAllocationIntentUpdateParams.java b/src/main/java/com/stripe/param/v2/payments/SettlementAllocationIntentUpdateParams.java index d95661afe71..8c4e36e300f 100644 --- a/src/main/java/com/stripe/param/v2/payments/SettlementAllocationIntentUpdateParams.java +++ b/src/main/java/com/stripe/param/v2/payments/SettlementAllocationIntentUpdateParams.java @@ -4,7 +4,6 @@ import com.google.gson.annotations.SerializedName; import com.stripe.net.ApiRequestParams; import com.stripe.param.common.EmptyParam; -import com.stripe.v2.Amount; import java.util.HashMap; import java.util.Map; import lombok.EqualsAndHashCode; @@ -61,7 +60,7 @@ public SettlementAllocationIntentUpdateParams build() { * The new amount for the SettlementAllocationIntent. Only amount.value can be updated and * currency must remain same. */ - public Builder setAmount(Amount amount) { + public Builder setAmount(SettlementAllocationIntentUpdateParams.Amount amount) { this.amount = amount; return this; } @@ -104,4 +103,112 @@ public Builder setReference(EmptyParam reference) { return this; } } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Amount { + /** + * Required. Three-letter ISO currency code, in lowercase. + * Must be a supported currency. + */ + @SerializedName("currency") + Object currency; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. A non-negative integer representing how much to charge in the smallest currency unit. + */ + @SerializedName("value") + Long value; + + private Amount(Object currency, Map extraParams, Long value) { + this.currency = currency; + this.extraParams = extraParams; + this.value = value; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object currency; + + private Map extraParams; + + private Long value; + + /** Finalize and obtain parameter instance from this builder. */ + public SettlementAllocationIntentUpdateParams.Amount build() { + return new SettlementAllocationIntentUpdateParams.Amount( + this.currency, this.extraParams, this.value); + } + + /** + * Required. Three-letter ISO currency code, in + * lowercase. Must be a supported currency. + */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } + + /** + * Required. Three-letter ISO currency code, in + * lowercase. Must be a supported currency. + */ + public Builder setCurrency(EmptyParam currency) { + this.currency = currency; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * SettlementAllocationIntentUpdateParams.Amount#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link SettlementAllocationIntentUpdateParams.Amount#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. A non-negative integer representing how much to charge in the smallest currency unit. + */ + public Builder setValue(Long value) { + this.value = value; + return this; + } + } + } } diff --git a/src/main/java/com/stripe/param/v2/payments/settlementallocationintents/SplitCreateParams.java b/src/main/java/com/stripe/param/v2/payments/settlementallocationintents/SplitCreateParams.java index 79850a22743..aa73d91058e 100644 --- a/src/main/java/com/stripe/param/v2/payments/settlementallocationintents/SplitCreateParams.java +++ b/src/main/java/com/stripe/param/v2/payments/settlementallocationintents/SplitCreateParams.java @@ -3,7 +3,6 @@ import com.google.gson.annotations.SerializedName; import com.stripe.net.ApiRequestParams; -import com.stripe.v2.Amount; import java.util.HashMap; import java.util.Map; import lombok.EqualsAndHashCode; @@ -85,7 +84,7 @@ public Builder setAccount(String account) { /** * Required. The amount and currency of the SettlementAllocationIntentSplit. */ - public Builder setAmount(Amount amount) { + public Builder setAmount(SplitCreateParams.Amount amount) { this.amount = amount; return this; } @@ -149,6 +148,102 @@ public Builder setType(SplitCreateParams.Type type) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Amount { + /** + * Required. Three-letter ISO currency code, in lowercase. + * Must be a supported currency. + */ + @SerializedName("currency") + String currency; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. A non-negative integer representing how much to charge in the smallest currency unit. + */ + @SerializedName("value") + Long value; + + private Amount(String currency, Map extraParams, Long value) { + this.currency = currency; + this.extraParams = extraParams; + this.value = value; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String currency; + + private Map extraParams; + + private Long value; + + /** Finalize and obtain parameter instance from this builder. */ + public SplitCreateParams.Amount build() { + return new SplitCreateParams.Amount(this.currency, this.extraParams, this.value); + } + + /** + * Required. Three-letter ISO currency code, in + * lowercase. Must be a supported currency. + */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * SplitCreateParams.Amount#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link SplitCreateParams.Amount#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. A non-negative integer representing how much to charge in the smallest currency unit. + */ + public Builder setValue(Long value) { + this.value = value; + return this; + } + } + } + public enum Type implements ApiRequestParams.EnumParam { @SerializedName("credit") CREDIT("credit"), diff --git a/src/main/java/com/stripe/param/v2/testhelpers/FinancialAddressCreditParams.java b/src/main/java/com/stripe/param/v2/testhelpers/FinancialAddressCreditParams.java index b76549eb9e0..ec5e7780f91 100644 --- a/src/main/java/com/stripe/param/v2/testhelpers/FinancialAddressCreditParams.java +++ b/src/main/java/com/stripe/param/v2/testhelpers/FinancialAddressCreditParams.java @@ -3,7 +3,6 @@ import com.google.gson.annotations.SerializedName; import com.stripe.net.ApiRequestParams; -import com.stripe.v2.Amount; import java.util.HashMap; import java.util.Map; import lombok.EqualsAndHashCode; @@ -67,7 +66,7 @@ public FinancialAddressCreditParams build() { } /** Required. Object containing the amount value and currency to credit. */ - public Builder setAmount(Amount amount) { + public Builder setAmount(FinancialAddressCreditParams.Amount amount) { this.amount = amount; return this; } @@ -117,6 +116,102 @@ public Builder setStatementDescriptor(String statementDescriptor) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Amount { + /** + * Required. Three-letter ISO currency code, in lowercase. + * Must be a supported currency. + */ + @SerializedName("currency") + String currency; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. A non-negative integer representing how much to charge in the smallest currency unit. + */ + @SerializedName("value") + Long value; + + private Amount(String currency, Map extraParams, Long value) { + this.currency = currency; + this.extraParams = extraParams; + this.value = value; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String currency; + + private Map extraParams; + + private Long value; + + /** Finalize and obtain parameter instance from this builder. */ + public FinancialAddressCreditParams.Amount build() { + return new FinancialAddressCreditParams.Amount(this.currency, this.extraParams, this.value); + } + + /** + * Required. Three-letter ISO currency code, in + * lowercase. Must be a supported currency. + */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * FinancialAddressCreditParams.Amount#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link FinancialAddressCreditParams.Amount#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. A non-negative integer representing how much to charge in the smallest currency unit. + */ + public Builder setValue(Long value) { + this.value = value; + return this; + } + } + } + public enum Network implements ApiRequestParams.EnumParam { @SerializedName("ach") ACH("ach"), diff --git a/src/test/java/com/stripe/functional/GeneratedExamples.java b/src/test/java/com/stripe/functional/GeneratedExamples.java index 585d6e83941..20e759cbbe2 100644 --- a/src/test/java/com/stripe/functional/GeneratedExamples.java +++ b/src/test/java/com/stripe/functional/GeneratedExamples.java @@ -28590,7 +28590,7 @@ public void testV2MoneyManagementAdjustmentGetServices() throws StripeException new TypeToken< com.stripe.model.v2.StripeCollection< com.stripe.model.v2.moneymanagement.Adjustment>>() {}.getType(), - "{\"data\":[{\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"object\":\"v2.money_management.adjustment\",\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"amount\":{\"value\":111972721,\"currency\":\"usd\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"object\":\"v2.money_management.adjustment\",\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.moneymanagement.AdjustmentListParams params = @@ -28616,7 +28616,7 @@ public void testV2MoneyManagementAdjustmentGet2Services() throws StripeException null, null, com.stripe.model.v2.moneymanagement.Adjustment.class, - "{\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"object\":\"v2.money_management.adjustment\",\"livemode\":true}"); + "{\"amount\":{\"value\":111972721,\"currency\":\"usd\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"object\":\"v2.money_management.adjustment\",\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.model.v2.moneymanagement.Adjustment adjustment = @@ -28641,7 +28641,7 @@ public void testV2MoneyManagementCurrencyConversionGetServices() throws StripeEx new TypeToken< com.stripe.model.v2.StripeCollection< com.stripe.model.v2.moneymanagement.CurrencyConversion>>() {}.getType(), - "{\"data\":[{\"created\":\"1970-01-12T21:42:34.472Z\",\"exchange_rate\":\"exchange_rate\",\"financial_account\":\"financial_account\",\"from\":{\"amount\":{\"currency\":\"USD\",\"value\":96}},\"id\":\"obj_123\",\"livemode\":true,\"object\":\"v2.money_management.currency_conversion\",\"to\":{\"amount\":{\"currency\":\"USD\",\"value\":96}}}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"created\":\"1970-01-12T21:42:34.472Z\",\"exchange_rate\":\"exchange_rate\",\"financial_account\":\"financial_account\",\"from\":{\"amount\":{\"value\":111972721,\"currency\":\"usd\"}},\"id\":\"obj_123\",\"livemode\":true,\"object\":\"v2.money_management.currency_conversion\",\"to\":{\"amount\":{\"value\":111972721,\"currency\":\"usd\"}}}],\"next_page_url\":null,\"previous_page_url\":null}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.moneymanagement.CurrencyConversionListParams params = @@ -28667,7 +28667,7 @@ public void testV2MoneyManagementCurrencyConversionPostServices() throws StripeE null, null, com.stripe.model.v2.moneymanagement.CurrencyConversion.class, - "{\"created\":\"1970-01-12T21:42:34.472Z\",\"exchange_rate\":\"exchange_rate\",\"financial_account\":\"financial_account\",\"from\":{\"amount\":{\"currency\":\"USD\",\"value\":96}},\"id\":\"obj_123\",\"livemode\":true,\"object\":\"v2.money_management.currency_conversion\",\"to\":{\"amount\":{\"currency\":\"USD\",\"value\":96}}}"); + "{\"created\":\"1970-01-12T21:42:34.472Z\",\"exchange_rate\":\"exchange_rate\",\"financial_account\":\"financial_account\",\"from\":{\"amount\":{\"value\":111972721,\"currency\":\"usd\"}},\"id\":\"obj_123\",\"livemode\":true,\"object\":\"v2.money_management.currency_conversion\",\"to\":{\"amount\":{\"value\":111972721,\"currency\":\"usd\"}}}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.moneymanagement.CurrencyConversionCreateParams params = @@ -28675,12 +28675,22 @@ public void testV2MoneyManagementCurrencyConversionPostServices() throws StripeE .setFinancialAccount("financial_account") .setFrom( com.stripe.param.v2.moneymanagement.CurrencyConversionCreateParams.From.builder() - .setAmount(new com.stripe.v2.Amount(96, "USD")) + .setAmount( + com.stripe.param.v2.moneymanagement.CurrencyConversionCreateParams.From + .Amount.builder() + .setValue(111972721L) + .setCurrency("usd") + .build()) .setCurrency("usd") .build()) .setTo( com.stripe.param.v2.moneymanagement.CurrencyConversionCreateParams.To.builder() - .setAmount(new com.stripe.v2.Amount(96, "USD")) + .setAmount( + com.stripe.param.v2.moneymanagement.CurrencyConversionCreateParams.To.Amount + .builder() + .setValue(111972721L) + .setCurrency("usd") + .build()) .setCurrency("usd") .build()) .build(); @@ -28705,7 +28715,7 @@ public void testV2MoneyManagementCurrencyConversionGet2Services() throws StripeE null, null, com.stripe.model.v2.moneymanagement.CurrencyConversion.class, - "{\"created\":\"1970-01-12T21:42:34.472Z\",\"exchange_rate\":\"exchange_rate\",\"financial_account\":\"financial_account\",\"from\":{\"amount\":{\"currency\":\"USD\",\"value\":96}},\"id\":\"obj_123\",\"livemode\":true,\"object\":\"v2.money_management.currency_conversion\",\"to\":{\"amount\":{\"currency\":\"USD\",\"value\":96}}}"); + "{\"created\":\"1970-01-12T21:42:34.472Z\",\"exchange_rate\":\"exchange_rate\",\"financial_account\":\"financial_account\",\"from\":{\"amount\":{\"value\":111972721,\"currency\":\"usd\"}},\"id\":\"obj_123\",\"livemode\":true,\"object\":\"v2.money_management.currency_conversion\",\"to\":{\"amount\":{\"value\":111972721,\"currency\":\"usd\"}}}"); StripeClient client = new StripeClient(networkSpy); com.stripe.model.v2.moneymanagement.CurrencyConversion currencyConversion = @@ -28730,7 +28740,7 @@ public void testV2MoneyManagementFinancialAccountGetServices() throws StripeExce new TypeToken< com.stripe.model.v2.StripeCollection< com.stripe.model.v2.moneymanagement.FinancialAccount>>() {}.getType(), - "{\"data\":[{\"balance\":{\"available\":{\"key\":{\"currency\":\"USD\",\"value\":35}},\"inbound_pending\":{\"key\":{\"currency\":\"USD\",\"value\":11}},\"outbound_pending\":{\"key\":{\"currency\":\"USD\",\"value\":60}}},\"country\":\"country\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.money_management.financial_account\",\"status\":\"closed\",\"type\":\"payments\",\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"balance\":{\"available\":{\"key\":{\"value\":111972721,\"currency\":\"usd\"}},\"inbound_pending\":{\"key\":{\"value\":111972721,\"currency\":\"usd\"}},\"outbound_pending\":{\"key\":{\"value\":111972721,\"currency\":\"usd\"}}},\"country\":\"country\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.money_management.financial_account\",\"status\":\"closed\",\"type\":\"payments\",\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.moneymanagement.FinancialAccountListParams params = @@ -28756,7 +28766,7 @@ public void testV2MoneyManagementFinancialAccountPostServices() throws StripeExc null, null, com.stripe.model.v2.moneymanagement.FinancialAccount.class, - "{\"balance\":{\"available\":{\"key\":{\"currency\":\"USD\",\"value\":35}},\"inbound_pending\":{\"key\":{\"currency\":\"USD\",\"value\":11}},\"outbound_pending\":{\"key\":{\"currency\":\"USD\",\"value\":60}}},\"country\":\"country\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.money_management.financial_account\",\"status\":\"closed\",\"type\":\"payments\",\"livemode\":true}"); + "{\"balance\":{\"available\":{\"key\":{\"value\":111972721,\"currency\":\"usd\"}},\"inbound_pending\":{\"key\":{\"value\":111972721,\"currency\":\"usd\"}},\"outbound_pending\":{\"key\":{\"value\":111972721,\"currency\":\"usd\"}}},\"country\":\"country\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.money_management.financial_account\",\"status\":\"closed\",\"type\":\"payments\",\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.moneymanagement.FinancialAccountCreateParams params = @@ -28784,7 +28794,7 @@ public void testV2MoneyManagementFinancialAccountGet2Services() throws StripeExc null, null, com.stripe.model.v2.moneymanagement.FinancialAccount.class, - "{\"balance\":{\"available\":{\"key\":{\"currency\":\"USD\",\"value\":35}},\"inbound_pending\":{\"key\":{\"currency\":\"USD\",\"value\":11}},\"outbound_pending\":{\"key\":{\"currency\":\"USD\",\"value\":60}}},\"country\":\"country\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.money_management.financial_account\",\"status\":\"closed\",\"type\":\"payments\",\"livemode\":true}"); + "{\"balance\":{\"available\":{\"key\":{\"value\":111972721,\"currency\":\"usd\"}},\"inbound_pending\":{\"key\":{\"value\":111972721,\"currency\":\"usd\"}},\"outbound_pending\":{\"key\":{\"value\":111972721,\"currency\":\"usd\"}}},\"country\":\"country\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.money_management.financial_account\",\"status\":\"closed\",\"type\":\"payments\",\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.model.v2.moneymanagement.FinancialAccount financialAccount = @@ -28807,7 +28817,7 @@ public void testV2MoneyManagementFinancialAccountPost2Services() throws StripeEx null, null, com.stripe.model.v2.moneymanagement.FinancialAccount.class, - "{\"balance\":{\"available\":{\"key\":{\"currency\":\"USD\",\"value\":35}},\"inbound_pending\":{\"key\":{\"currency\":\"USD\",\"value\":11}},\"outbound_pending\":{\"key\":{\"currency\":\"USD\",\"value\":60}}},\"country\":\"country\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.money_management.financial_account\",\"status\":\"closed\",\"type\":\"payments\",\"livemode\":true}"); + "{\"balance\":{\"available\":{\"key\":{\"value\":111972721,\"currency\":\"usd\"}},\"inbound_pending\":{\"key\":{\"value\":111972721,\"currency\":\"usd\"}},\"outbound_pending\":{\"key\":{\"value\":111972721,\"currency\":\"usd\"}}},\"country\":\"country\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.money_management.financial_account\",\"status\":\"closed\",\"type\":\"payments\",\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.moneymanagement.FinancialAccountUpdateParams params = @@ -28833,7 +28843,7 @@ public void testV2MoneyManagementFinancialAccountPost3Services() throws StripeEx null, null, com.stripe.model.v2.moneymanagement.FinancialAccount.class, - "{\"balance\":{\"available\":{\"key\":{\"currency\":\"USD\",\"value\":35}},\"inbound_pending\":{\"key\":{\"currency\":\"USD\",\"value\":11}},\"outbound_pending\":{\"key\":{\"currency\":\"USD\",\"value\":60}}},\"country\":\"country\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.money_management.financial_account\",\"status\":\"closed\",\"type\":\"payments\",\"livemode\":true}"); + "{\"balance\":{\"available\":{\"key\":{\"value\":111972721,\"currency\":\"usd\"}},\"inbound_pending\":{\"key\":{\"value\":111972721,\"currency\":\"usd\"}},\"outbound_pending\":{\"key\":{\"value\":111972721,\"currency\":\"usd\"}}},\"country\":\"country\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.money_management.financial_account\",\"status\":\"closed\",\"type\":\"payments\",\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.moneymanagement.FinancialAccountCloseParams params = @@ -28946,7 +28956,7 @@ public void testV2MoneyManagementInboundTransferGetServices() throws StripeExcep new TypeToken< com.stripe.model.v2.StripeCollection< com.stripe.model.v2.moneymanagement.InboundTransfer>>() {}.getType(), - "{\"data\":[{\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"payment_method\":{\"type\":\"type\"}},\"id\":\"obj_123\",\"object\":\"v2.money_management.inbound_transfer\",\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"financial_account\":\"financial_account\"},\"transfer_history\":[{\"created\":\"1970-01-12T21:42:34.472Z\",\"effective_at\":\"1970-01-03T20:38:28.043Z\",\"id\":\"obj_123\",\"level\":\"canonical\",\"type\":\"bank_debit_failed\"}],\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"amount\":{\"value\":111972721,\"currency\":\"usd\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"from\":{\"debited\":{\"value\":111972721,\"currency\":\"usd\"},\"payment_method\":{\"type\":\"type\"}},\"id\":\"obj_123\",\"object\":\"v2.money_management.inbound_transfer\",\"to\":{\"credited\":{\"value\":111972721,\"currency\":\"usd\"},\"financial_account\":\"financial_account\"},\"transfer_history\":[{\"created\":\"1970-01-12T21:42:34.472Z\",\"effective_at\":\"1970-01-03T20:38:28.043Z\",\"id\":\"obj_123\",\"level\":\"canonical\",\"type\":\"bank_debit_failed\"}],\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.moneymanagement.InboundTransferListParams params = @@ -28972,12 +28982,16 @@ public void testV2MoneyManagementInboundTransferPostServices() throws StripeExce null, null, com.stripe.model.v2.moneymanagement.InboundTransfer.class, - "{\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"payment_method\":{\"type\":\"type\"}},\"id\":\"obj_123\",\"object\":\"v2.money_management.inbound_transfer\",\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"financial_account\":\"financial_account\"},\"transfer_history\":[{\"created\":\"1970-01-12T21:42:34.472Z\",\"effective_at\":\"1970-01-03T20:38:28.043Z\",\"id\":\"obj_123\",\"level\":\"canonical\",\"type\":\"bank_debit_failed\"}],\"livemode\":true}"); + "{\"amount\":{\"value\":111972721,\"currency\":\"usd\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"from\":{\"debited\":{\"value\":111972721,\"currency\":\"usd\"},\"payment_method\":{\"type\":\"type\"}},\"id\":\"obj_123\",\"object\":\"v2.money_management.inbound_transfer\",\"to\":{\"credited\":{\"value\":111972721,\"currency\":\"usd\"},\"financial_account\":\"financial_account\"},\"transfer_history\":[{\"created\":\"1970-01-12T21:42:34.472Z\",\"effective_at\":\"1970-01-03T20:38:28.043Z\",\"id\":\"obj_123\",\"level\":\"canonical\",\"type\":\"bank_debit_failed\"}],\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.moneymanagement.InboundTransferCreateParams params = com.stripe.param.v2.moneymanagement.InboundTransferCreateParams.builder() - .setAmount(new com.stripe.v2.Amount(96, "USD")) + .setAmount( + com.stripe.param.v2.moneymanagement.InboundTransferCreateParams.Amount.builder() + .setValue(111972721L) + .setCurrency("usd") + .build()) .setFrom( com.stripe.param.v2.moneymanagement.InboundTransferCreateParams.From.builder() .setCurrency("usd") @@ -29010,7 +29024,7 @@ public void testV2MoneyManagementInboundTransferGet2Services() throws StripeExce null, null, com.stripe.model.v2.moneymanagement.InboundTransfer.class, - "{\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"payment_method\":{\"type\":\"type\"}},\"id\":\"obj_123\",\"object\":\"v2.money_management.inbound_transfer\",\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"financial_account\":\"financial_account\"},\"transfer_history\":[{\"created\":\"1970-01-12T21:42:34.472Z\",\"effective_at\":\"1970-01-03T20:38:28.043Z\",\"id\":\"obj_123\",\"level\":\"canonical\",\"type\":\"bank_debit_failed\"}],\"livemode\":true}"); + "{\"amount\":{\"value\":111972721,\"currency\":\"usd\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"from\":{\"debited\":{\"value\":111972721,\"currency\":\"usd\"},\"payment_method\":{\"type\":\"type\"}},\"id\":\"obj_123\",\"object\":\"v2.money_management.inbound_transfer\",\"to\":{\"credited\":{\"value\":111972721,\"currency\":\"usd\"},\"financial_account\":\"financial_account\"},\"transfer_history\":[{\"created\":\"1970-01-12T21:42:34.472Z\",\"effective_at\":\"1970-01-03T20:38:28.043Z\",\"id\":\"obj_123\",\"level\":\"canonical\",\"type\":\"bank_debit_failed\"}],\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.model.v2.moneymanagement.InboundTransfer inboundTransfer = @@ -29035,7 +29049,7 @@ public void testV2MoneyManagementOutboundPaymentGetServices() throws StripeExcep new TypeToken< com.stripe.model.v2.StripeCollection< com.stripe.model.v2.moneymanagement.OutboundPayment>>() {}.getType(), - "{\"data\":[{\"amount\":{\"currency\":\"USD\",\"value\":96},\"cancelable\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"financial_account\":\"financial_account\"},\"id\":\"obj_123\",\"object\":\"v2.money_management.outbound_payment\",\"recipient_notification\":{\"setting\":\"configured\"},\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"payout_method\":\"payout_method\",\"recipient\":\"recipient\"},\"trace_id\":{\"status\":\"pending\"},\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"amount\":{\"value\":111972721,\"currency\":\"usd\"},\"cancelable\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"from\":{\"debited\":{\"value\":111972721,\"currency\":\"usd\"},\"financial_account\":\"financial_account\"},\"id\":\"obj_123\",\"object\":\"v2.money_management.outbound_payment\",\"recipient_notification\":{\"setting\":\"configured\"},\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"to\":{\"credited\":{\"value\":111972721,\"currency\":\"usd\"},\"payout_method\":\"payout_method\",\"recipient\":\"recipient\"},\"trace_id\":{\"status\":\"pending\"},\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.moneymanagement.OutboundPaymentListParams params = @@ -29061,12 +29075,16 @@ public void testV2MoneyManagementOutboundPaymentPostServices() throws StripeExce null, null, com.stripe.model.v2.moneymanagement.OutboundPayment.class, - "{\"amount\":{\"currency\":\"USD\",\"value\":96},\"cancelable\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"financial_account\":\"financial_account\"},\"id\":\"obj_123\",\"object\":\"v2.money_management.outbound_payment\",\"recipient_notification\":{\"setting\":\"configured\"},\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"payout_method\":\"payout_method\",\"recipient\":\"recipient\"},\"trace_id\":{\"status\":\"pending\"},\"livemode\":true}"); + "{\"amount\":{\"value\":111972721,\"currency\":\"usd\"},\"cancelable\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"from\":{\"debited\":{\"value\":111972721,\"currency\":\"usd\"},\"financial_account\":\"financial_account\"},\"id\":\"obj_123\",\"object\":\"v2.money_management.outbound_payment\",\"recipient_notification\":{\"setting\":\"configured\"},\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"to\":{\"credited\":{\"value\":111972721,\"currency\":\"usd\"},\"payout_method\":\"payout_method\",\"recipient\":\"recipient\"},\"trace_id\":{\"status\":\"pending\"},\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.moneymanagement.OutboundPaymentCreateParams params = com.stripe.param.v2.moneymanagement.OutboundPaymentCreateParams.builder() - .setAmount(new com.stripe.v2.Amount(96, "USD")) + .setAmount( + com.stripe.param.v2.moneymanagement.OutboundPaymentCreateParams.Amount.builder() + .setValue(111972721L) + .setCurrency("usd") + .build()) .setFrom( com.stripe.param.v2.moneymanagement.OutboundPaymentCreateParams.From.builder() .setCurrency("usd") @@ -29100,7 +29118,7 @@ public void testV2MoneyManagementOutboundPaymentGet2Services() throws StripeExce null, null, com.stripe.model.v2.moneymanagement.OutboundPayment.class, - "{\"amount\":{\"currency\":\"USD\",\"value\":96},\"cancelable\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"financial_account\":\"financial_account\"},\"id\":\"obj_123\",\"object\":\"v2.money_management.outbound_payment\",\"recipient_notification\":{\"setting\":\"configured\"},\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"payout_method\":\"payout_method\",\"recipient\":\"recipient\"},\"trace_id\":{\"status\":\"pending\"},\"livemode\":true}"); + "{\"amount\":{\"value\":111972721,\"currency\":\"usd\"},\"cancelable\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"from\":{\"debited\":{\"value\":111972721,\"currency\":\"usd\"},\"financial_account\":\"financial_account\"},\"id\":\"obj_123\",\"object\":\"v2.money_management.outbound_payment\",\"recipient_notification\":{\"setting\":\"configured\"},\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"to\":{\"credited\":{\"value\":111972721,\"currency\":\"usd\"},\"payout_method\":\"payout_method\",\"recipient\":\"recipient\"},\"trace_id\":{\"status\":\"pending\"},\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.model.v2.moneymanagement.OutboundPayment outboundPayment = @@ -29123,7 +29141,7 @@ public void testV2MoneyManagementOutboundPaymentPost2Services() throws StripeExc null, null, com.stripe.model.v2.moneymanagement.OutboundPayment.class, - "{\"amount\":{\"currency\":\"USD\",\"value\":96},\"cancelable\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"financial_account\":\"financial_account\"},\"id\":\"obj_123\",\"object\":\"v2.money_management.outbound_payment\",\"recipient_notification\":{\"setting\":\"configured\"},\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"payout_method\":\"payout_method\",\"recipient\":\"recipient\"},\"trace_id\":{\"status\":\"pending\"},\"livemode\":true}"); + "{\"amount\":{\"value\":111972721,\"currency\":\"usd\"},\"cancelable\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"from\":{\"debited\":{\"value\":111972721,\"currency\":\"usd\"},\"financial_account\":\"financial_account\"},\"id\":\"obj_123\",\"object\":\"v2.money_management.outbound_payment\",\"recipient_notification\":{\"setting\":\"configured\"},\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"to\":{\"credited\":{\"value\":111972721,\"currency\":\"usd\"},\"payout_method\":\"payout_method\",\"recipient\":\"recipient\"},\"trace_id\":{\"status\":\"pending\"},\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.model.v2.moneymanagement.OutboundPayment outboundPayment = @@ -29146,12 +29164,17 @@ public void testV2MoneyManagementOutboundPaymentQuotePostServices() throws Strip null, null, com.stripe.model.v2.moneymanagement.OutboundPaymentQuote.class, - "{\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"estimated_fees\":[{\"amount\":{\"currency\":\"USD\",\"value\":96},\"type\":\"cross_border_payout_fee\"}],\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"financial_account\":\"financial_account\"},\"fx_quote\":{\"lock_duration\":\"five_minutes\",\"lock_status\":\"active\",\"rates\":{\"key\":{\"exchange_rate\":\"exchange_rate\"}},\"to_currency\":\"usd\"},\"id\":\"obj_123\",\"object\":\"v2.money_management.outbound_payment_quote\",\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"payout_method\":\"payout_method\",\"recipient\":\"recipient\"},\"livemode\":true}"); + "{\"amount\":{\"value\":111972721,\"currency\":\"usd\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"estimated_fees\":[{\"amount\":{\"value\":111972721,\"currency\":\"usd\"},\"type\":\"cross_border_payout_fee\"}],\"from\":{\"debited\":{\"value\":111972721,\"currency\":\"usd\"},\"financial_account\":\"financial_account\"},\"fx_quote\":{\"lock_duration\":\"five_minutes\",\"lock_status\":\"active\",\"rates\":{\"key\":{\"exchange_rate\":\"exchange_rate\"}},\"to_currency\":\"usd\"},\"id\":\"obj_123\",\"object\":\"v2.money_management.outbound_payment_quote\",\"to\":{\"credited\":{\"value\":111972721,\"currency\":\"usd\"},\"payout_method\":\"payout_method\",\"recipient\":\"recipient\"},\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.moneymanagement.OutboundPaymentQuoteCreateParams params = com.stripe.param.v2.moneymanagement.OutboundPaymentQuoteCreateParams.builder() - .setAmount(new com.stripe.v2.Amount(96, "USD")) + .setAmount( + com.stripe.param.v2.moneymanagement.OutboundPaymentQuoteCreateParams.Amount + .builder() + .setValue(111972721L) + .setCurrency("usd") + .build()) .setFrom( com.stripe.param.v2.moneymanagement.OutboundPaymentQuoteCreateParams.From.builder() .setCurrency("usd") @@ -29185,7 +29208,7 @@ public void testV2MoneyManagementOutboundPaymentQuoteGetServices() throws Stripe null, null, com.stripe.model.v2.moneymanagement.OutboundPaymentQuote.class, - "{\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"estimated_fees\":[{\"amount\":{\"currency\":\"USD\",\"value\":96},\"type\":\"cross_border_payout_fee\"}],\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"financial_account\":\"financial_account\"},\"fx_quote\":{\"lock_duration\":\"five_minutes\",\"lock_status\":\"active\",\"rates\":{\"key\":{\"exchange_rate\":\"exchange_rate\"}},\"to_currency\":\"usd\"},\"id\":\"obj_123\",\"object\":\"v2.money_management.outbound_payment_quote\",\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"payout_method\":\"payout_method\",\"recipient\":\"recipient\"},\"livemode\":true}"); + "{\"amount\":{\"value\":111972721,\"currency\":\"usd\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"estimated_fees\":[{\"amount\":{\"value\":111972721,\"currency\":\"usd\"},\"type\":\"cross_border_payout_fee\"}],\"from\":{\"debited\":{\"value\":111972721,\"currency\":\"usd\"},\"financial_account\":\"financial_account\"},\"fx_quote\":{\"lock_duration\":\"five_minutes\",\"lock_status\":\"active\",\"rates\":{\"key\":{\"exchange_rate\":\"exchange_rate\"}},\"to_currency\":\"usd\"},\"id\":\"obj_123\",\"object\":\"v2.money_management.outbound_payment_quote\",\"to\":{\"credited\":{\"value\":111972721,\"currency\":\"usd\"},\"payout_method\":\"payout_method\",\"recipient\":\"recipient\"},\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.model.v2.moneymanagement.OutboundPaymentQuote outboundPaymentQuote = @@ -29336,7 +29359,7 @@ public void testV2MoneyManagementOutboundTransferGetServices() throws StripeExce new TypeToken< com.stripe.model.v2.StripeCollection< com.stripe.model.v2.moneymanagement.OutboundTransfer>>() {}.getType(), - "{\"data\":[{\"amount\":{\"currency\":\"USD\",\"value\":96},\"cancelable\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"financial_account\":\"financial_account\"},\"id\":\"obj_123\",\"object\":\"v2.money_management.outbound_transfer\",\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"payout_method\":\"payout_method\"},\"trace_id\":{\"status\":\"pending\"},\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"amount\":{\"value\":111972721,\"currency\":\"usd\"},\"cancelable\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"from\":{\"debited\":{\"value\":111972721,\"currency\":\"usd\"},\"financial_account\":\"financial_account\"},\"id\":\"obj_123\",\"object\":\"v2.money_management.outbound_transfer\",\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"to\":{\"credited\":{\"value\":111972721,\"currency\":\"usd\"},\"payout_method\":\"payout_method\"},\"trace_id\":{\"status\":\"pending\"},\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.moneymanagement.OutboundTransferListParams params = @@ -29362,12 +29385,16 @@ public void testV2MoneyManagementOutboundTransferPostServices() throws StripeExc null, null, com.stripe.model.v2.moneymanagement.OutboundTransfer.class, - "{\"amount\":{\"currency\":\"USD\",\"value\":96},\"cancelable\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"financial_account\":\"financial_account\"},\"id\":\"obj_123\",\"object\":\"v2.money_management.outbound_transfer\",\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"payout_method\":\"payout_method\"},\"trace_id\":{\"status\":\"pending\"},\"livemode\":true}"); + "{\"amount\":{\"value\":111972721,\"currency\":\"usd\"},\"cancelable\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"from\":{\"debited\":{\"value\":111972721,\"currency\":\"usd\"},\"financial_account\":\"financial_account\"},\"id\":\"obj_123\",\"object\":\"v2.money_management.outbound_transfer\",\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"to\":{\"credited\":{\"value\":111972721,\"currency\":\"usd\"},\"payout_method\":\"payout_method\"},\"trace_id\":{\"status\":\"pending\"},\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.moneymanagement.OutboundTransferCreateParams params = com.stripe.param.v2.moneymanagement.OutboundTransferCreateParams.builder() - .setAmount(new com.stripe.v2.Amount(96, "USD")) + .setAmount( + com.stripe.param.v2.moneymanagement.OutboundTransferCreateParams.Amount.builder() + .setValue(111972721L) + .setCurrency("usd") + .build()) .setFrom( com.stripe.param.v2.moneymanagement.OutboundTransferCreateParams.From.builder() .setCurrency("usd") @@ -29400,7 +29427,7 @@ public void testV2MoneyManagementOutboundTransferGet2Services() throws StripeExc null, null, com.stripe.model.v2.moneymanagement.OutboundTransfer.class, - "{\"amount\":{\"currency\":\"USD\",\"value\":96},\"cancelable\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"financial_account\":\"financial_account\"},\"id\":\"obj_123\",\"object\":\"v2.money_management.outbound_transfer\",\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"payout_method\":\"payout_method\"},\"trace_id\":{\"status\":\"pending\"},\"livemode\":true}"); + "{\"amount\":{\"value\":111972721,\"currency\":\"usd\"},\"cancelable\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"from\":{\"debited\":{\"value\":111972721,\"currency\":\"usd\"},\"financial_account\":\"financial_account\"},\"id\":\"obj_123\",\"object\":\"v2.money_management.outbound_transfer\",\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"to\":{\"credited\":{\"value\":111972721,\"currency\":\"usd\"},\"payout_method\":\"payout_method\"},\"trace_id\":{\"status\":\"pending\"},\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.model.v2.moneymanagement.OutboundTransfer outboundTransfer = @@ -29423,7 +29450,7 @@ public void testV2MoneyManagementOutboundTransferPost2Services() throws StripeEx null, null, com.stripe.model.v2.moneymanagement.OutboundTransfer.class, - "{\"amount\":{\"currency\":\"USD\",\"value\":96},\"cancelable\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"financial_account\":\"financial_account\"},\"id\":\"obj_123\",\"object\":\"v2.money_management.outbound_transfer\",\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"payout_method\":\"payout_method\"},\"trace_id\":{\"status\":\"pending\"},\"livemode\":true}"); + "{\"amount\":{\"value\":111972721,\"currency\":\"usd\"},\"cancelable\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"from\":{\"debited\":{\"value\":111972721,\"currency\":\"usd\"},\"financial_account\":\"financial_account\"},\"id\":\"obj_123\",\"object\":\"v2.money_management.outbound_transfer\",\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"to\":{\"credited\":{\"value\":111972721,\"currency\":\"usd\"},\"payout_method\":\"payout_method\"},\"trace_id\":{\"status\":\"pending\"},\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.model.v2.moneymanagement.OutboundTransfer outboundTransfer = @@ -29573,7 +29600,7 @@ public void testV2MoneyManagementReceivedCreditGetServices() throws StripeExcept new TypeToken< com.stripe.model.v2.StripeCollection< com.stripe.model.v2.moneymanagement.ReceivedCredit>>() {}.getType(), - "{\"data\":[{\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"object\":\"v2.money_management.received_credit\",\"status\":\"returned\",\"type\":\"balance_transfer\",\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"amount\":{\"value\":111972721,\"currency\":\"usd\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"object\":\"v2.money_management.received_credit\",\"status\":\"returned\",\"type\":\"balance_transfer\",\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.moneymanagement.ReceivedCreditListParams params = @@ -29599,7 +29626,7 @@ public void testV2MoneyManagementReceivedCreditGet2Services() throws StripeExcep null, null, com.stripe.model.v2.moneymanagement.ReceivedCredit.class, - "{\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"object\":\"v2.money_management.received_credit\",\"status\":\"returned\",\"type\":\"balance_transfer\",\"livemode\":true}"); + "{\"amount\":{\"value\":111972721,\"currency\":\"usd\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"object\":\"v2.money_management.received_credit\",\"status\":\"returned\",\"type\":\"balance_transfer\",\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.model.v2.moneymanagement.ReceivedCredit receivedCredit = @@ -29624,7 +29651,7 @@ public void testV2MoneyManagementReceivedDebitGetServices() throws StripeExcepti new TypeToken< com.stripe.model.v2.StripeCollection< com.stripe.model.v2.moneymanagement.ReceivedDebit>>() {}.getType(), - "{\"data\":[{\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"object\":\"v2.money_management.received_debit\",\"status\":\"canceled\",\"type\":\"balance_transfer\",\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"amount\":{\"value\":111972721,\"currency\":\"usd\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"object\":\"v2.money_management.received_debit\",\"status\":\"canceled\",\"type\":\"balance_transfer\",\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.moneymanagement.ReceivedDebitListParams params = @@ -29650,7 +29677,7 @@ public void testV2MoneyManagementReceivedDebitGet2Services() throws StripeExcept null, null, com.stripe.model.v2.moneymanagement.ReceivedDebit.class, - "{\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"object\":\"v2.money_management.received_debit\",\"status\":\"canceled\",\"type\":\"balance_transfer\",\"livemode\":true}"); + "{\"amount\":{\"value\":111972721,\"currency\":\"usd\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"object\":\"v2.money_management.received_debit\",\"status\":\"canceled\",\"type\":\"balance_transfer\",\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.model.v2.moneymanagement.ReceivedDebit receivedDebit = @@ -29749,7 +29776,7 @@ public void testV2MoneyManagementTransactionGetServices() throws StripeException new TypeToken< com.stripe.model.v2.StripeCollection< com.stripe.model.v2.moneymanagement.Transaction>>() {}.getType(), - "{\"data\":[{\"amount\":{\"currency\":\"USD\",\"value\":96},\"balance_impact\":{\"available\":{\"currency\":\"USD\",\"value\":35},\"inbound_pending\":{\"currency\":\"USD\",\"value\":11},\"outbound_pending\":{\"currency\":\"USD\",\"value\":60}},\"category\":\"received_debit_reversal\",\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"object\":\"v2.money_management.transaction\",\"status\":\"pending\",\"status_transitions\":{},\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"amount\":{\"value\":111972721,\"currency\":\"usd\"},\"balance_impact\":{\"available\":{\"value\":111972721,\"currency\":\"usd\"},\"inbound_pending\":{\"value\":111972721,\"currency\":\"usd\"},\"outbound_pending\":{\"value\":111972721,\"currency\":\"usd\"}},\"category\":\"received_debit_reversal\",\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"object\":\"v2.money_management.transaction\",\"status\":\"pending\",\"status_transitions\":{},\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.moneymanagement.TransactionListParams params = @@ -29775,7 +29802,7 @@ public void testV2MoneyManagementTransactionGet2Services() throws StripeExceptio null, null, com.stripe.model.v2.moneymanagement.Transaction.class, - "{\"amount\":{\"currency\":\"USD\",\"value\":96},\"balance_impact\":{\"available\":{\"currency\":\"USD\",\"value\":35},\"inbound_pending\":{\"currency\":\"USD\",\"value\":11},\"outbound_pending\":{\"currency\":\"USD\",\"value\":60}},\"category\":\"received_debit_reversal\",\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"object\":\"v2.money_management.transaction\",\"status\":\"pending\",\"status_transitions\":{},\"livemode\":true}"); + "{\"amount\":{\"value\":111972721,\"currency\":\"usd\"},\"balance_impact\":{\"available\":{\"value\":111972721,\"currency\":\"usd\"},\"inbound_pending\":{\"value\":111972721,\"currency\":\"usd\"},\"outbound_pending\":{\"value\":111972721,\"currency\":\"usd\"}},\"category\":\"received_debit_reversal\",\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"object\":\"v2.money_management.transaction\",\"status\":\"pending\",\"status_transitions\":{},\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.model.v2.moneymanagement.Transaction transaction = @@ -29800,7 +29827,7 @@ public void testV2MoneyManagementTransactionEntryGetServices() throws StripeExce new TypeToken< com.stripe.model.v2.StripeCollection< com.stripe.model.v2.moneymanagement.TransactionEntry>>() {}.getType(), - "{\"data\":[{\"balance_impact\":{\"available\":{\"currency\":\"USD\",\"value\":35},\"inbound_pending\":{\"currency\":\"USD\",\"value\":11},\"outbound_pending\":{\"currency\":\"USD\",\"value\":60}},\"created\":\"1970-01-12T21:42:34.472Z\",\"effective_at\":\"1970-01-03T20:38:28.043Z\",\"id\":\"obj_123\",\"object\":\"v2.money_management.transaction_entry\",\"transaction\":\"transaction\",\"transaction_details\":{\"category\":\"received_debit_reversal\",\"financial_account\":\"financial_account\"},\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"balance_impact\":{\"available\":{\"value\":111972721,\"currency\":\"usd\"},\"inbound_pending\":{\"value\":111972721,\"currency\":\"usd\"},\"outbound_pending\":{\"value\":111972721,\"currency\":\"usd\"}},\"created\":\"1970-01-12T21:42:34.472Z\",\"effective_at\":\"1970-01-03T20:38:28.043Z\",\"id\":\"obj_123\",\"object\":\"v2.money_management.transaction_entry\",\"transaction\":\"transaction\",\"transaction_details\":{\"category\":\"received_debit_reversal\",\"financial_account\":\"financial_account\"},\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.moneymanagement.TransactionEntryListParams params = @@ -29826,7 +29853,7 @@ public void testV2MoneyManagementTransactionEntryGet2Services() throws StripeExc null, null, com.stripe.model.v2.moneymanagement.TransactionEntry.class, - "{\"balance_impact\":{\"available\":{\"currency\":\"USD\",\"value\":35},\"inbound_pending\":{\"currency\":\"USD\",\"value\":11},\"outbound_pending\":{\"currency\":\"USD\",\"value\":60}},\"created\":\"1970-01-12T21:42:34.472Z\",\"effective_at\":\"1970-01-03T20:38:28.043Z\",\"id\":\"obj_123\",\"object\":\"v2.money_management.transaction_entry\",\"transaction\":\"transaction\",\"transaction_details\":{\"category\":\"received_debit_reversal\",\"financial_account\":\"financial_account\"},\"livemode\":true}"); + "{\"balance_impact\":{\"available\":{\"value\":111972721,\"currency\":\"usd\"},\"inbound_pending\":{\"value\":111972721,\"currency\":\"usd\"},\"outbound_pending\":{\"value\":111972721,\"currency\":\"usd\"}},\"created\":\"1970-01-12T21:42:34.472Z\",\"effective_at\":\"1970-01-03T20:38:28.043Z\",\"id\":\"obj_123\",\"object\":\"v2.money_management.transaction_entry\",\"transaction\":\"transaction\",\"transaction_details\":{\"category\":\"received_debit_reversal\",\"financial_account\":\"financial_account\"},\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.model.v2.moneymanagement.TransactionEntry transactionEntry = @@ -29851,7 +29878,7 @@ public void testV2PaymentsOffSessionPaymentGetServices() throws StripeException new TypeToken< com.stripe.model.v2.StripeCollection< com.stripe.model.v2.payments.OffSessionPayment>>() {}.getType(), - "{\"data\":[{\"amount_requested\":{\"currency\":\"USD\",\"value\":47},\"cadence\":\"unscheduled\",\"compartment_id\":\"compartment_id\",\"created\":\"1970-01-12T21:42:34.472Z\",\"customer\":\"customer\",\"id\":\"obj_123\",\"livemode\":true,\"metadata\":{\"key\":\"metadata\"},\"object\":\"v2.payments.off_session_payment\",\"payment_method\":\"payment_method\",\"payments_orchestration\":{\"enabled\":true},\"retry_details\":{\"attempts\":542738246,\"retry_strategy\":\"scheduled\"},\"status\":\"pending\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"amount_requested\":{\"value\":111972721,\"currency\":\"usd\"},\"cadence\":\"unscheduled\",\"compartment_id\":\"compartment_id\",\"created\":\"1970-01-12T21:42:34.472Z\",\"customer\":\"customer\",\"id\":\"obj_123\",\"livemode\":true,\"metadata\":{\"key\":\"metadata\"},\"object\":\"v2.payments.off_session_payment\",\"payment_method\":\"payment_method\",\"payments_orchestration\":{\"enabled\":true},\"retry_details\":{\"attempts\":542738246,\"retry_strategy\":\"scheduled\"},\"status\":\"pending\"}],\"next_page_url\":null,\"previous_page_url\":null}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.payments.OffSessionPaymentListParams params = @@ -29877,12 +29904,16 @@ public void testV2PaymentsOffSessionPaymentPostServices() throws StripeException null, null, com.stripe.model.v2.payments.OffSessionPayment.class, - "{\"amount_requested\":{\"currency\":\"USD\",\"value\":47},\"cadence\":\"unscheduled\",\"compartment_id\":\"compartment_id\",\"created\":\"1970-01-12T21:42:34.472Z\",\"customer\":\"customer\",\"id\":\"obj_123\",\"livemode\":true,\"metadata\":{\"key\":\"metadata\"},\"object\":\"v2.payments.off_session_payment\",\"payment_method\":\"payment_method\",\"payments_orchestration\":{\"enabled\":true},\"retry_details\":{\"attempts\":542738246,\"retry_strategy\":\"scheduled\"},\"status\":\"pending\"}"); + "{\"amount_requested\":{\"value\":111972721,\"currency\":\"usd\"},\"cadence\":\"unscheduled\",\"compartment_id\":\"compartment_id\",\"created\":\"1970-01-12T21:42:34.472Z\",\"customer\":\"customer\",\"id\":\"obj_123\",\"livemode\":true,\"metadata\":{\"key\":\"metadata\"},\"object\":\"v2.payments.off_session_payment\",\"payment_method\":\"payment_method\",\"payments_orchestration\":{\"enabled\":true},\"retry_details\":{\"attempts\":542738246,\"retry_strategy\":\"scheduled\"},\"status\":\"pending\"}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.payments.OffSessionPaymentCreateParams params = com.stripe.param.v2.payments.OffSessionPaymentCreateParams.builder() - .setAmount(new com.stripe.v2.Amount(96, "USD")) + .setAmount( + com.stripe.param.v2.payments.OffSessionPaymentCreateParams.Amount.builder() + .setValue(111972721L) + .setCurrency("usd") + .build()) .setCadence( com.stripe.param.v2.payments.OffSessionPaymentCreateParams.Cadence.UNSCHEDULED) .setCustomer("customer") @@ -29909,7 +29940,7 @@ public void testV2PaymentsOffSessionPaymentGet2Services() throws StripeException null, null, com.stripe.model.v2.payments.OffSessionPayment.class, - "{\"amount_requested\":{\"currency\":\"USD\",\"value\":47},\"cadence\":\"unscheduled\",\"compartment_id\":\"compartment_id\",\"created\":\"1970-01-12T21:42:34.472Z\",\"customer\":\"customer\",\"id\":\"obj_123\",\"livemode\":true,\"metadata\":{\"key\":\"metadata\"},\"object\":\"v2.payments.off_session_payment\",\"payment_method\":\"payment_method\",\"payments_orchestration\":{\"enabled\":true},\"retry_details\":{\"attempts\":542738246,\"retry_strategy\":\"scheduled\"},\"status\":\"pending\"}"); + "{\"amount_requested\":{\"value\":111972721,\"currency\":\"usd\"},\"cadence\":\"unscheduled\",\"compartment_id\":\"compartment_id\",\"created\":\"1970-01-12T21:42:34.472Z\",\"customer\":\"customer\",\"id\":\"obj_123\",\"livemode\":true,\"metadata\":{\"key\":\"metadata\"},\"object\":\"v2.payments.off_session_payment\",\"payment_method\":\"payment_method\",\"payments_orchestration\":{\"enabled\":true},\"retry_details\":{\"attempts\":542738246,\"retry_strategy\":\"scheduled\"},\"status\":\"pending\"}"); StripeClient client = new StripeClient(networkSpy); com.stripe.model.v2.payments.OffSessionPayment offSessionPayment = @@ -29932,7 +29963,7 @@ public void testV2PaymentsOffSessionPaymentPost2Services() throws StripeExceptio null, null, com.stripe.model.v2.payments.OffSessionPayment.class, - "{\"amount_requested\":{\"currency\":\"USD\",\"value\":47},\"cadence\":\"unscheduled\",\"compartment_id\":\"compartment_id\",\"created\":\"1970-01-12T21:42:34.472Z\",\"customer\":\"customer\",\"id\":\"obj_123\",\"livemode\":true,\"metadata\":{\"key\":\"metadata\"},\"object\":\"v2.payments.off_session_payment\",\"payment_method\":\"payment_method\",\"payments_orchestration\":{\"enabled\":true},\"retry_details\":{\"attempts\":542738246,\"retry_strategy\":\"scheduled\"},\"status\":\"pending\"}"); + "{\"amount_requested\":{\"value\":111972721,\"currency\":\"usd\"},\"cadence\":\"unscheduled\",\"compartment_id\":\"compartment_id\",\"created\":\"1970-01-12T21:42:34.472Z\",\"customer\":\"customer\",\"id\":\"obj_123\",\"livemode\":true,\"metadata\":{\"key\":\"metadata\"},\"object\":\"v2.payments.off_session_payment\",\"payment_method\":\"payment_method\",\"payments_orchestration\":{\"enabled\":true},\"retry_details\":{\"attempts\":542738246,\"retry_strategy\":\"scheduled\"},\"status\":\"pending\"}"); StripeClient client = new StripeClient(networkSpy); com.stripe.model.v2.payments.OffSessionPayment offSessionPayment = @@ -29955,7 +29986,7 @@ public void testV2PaymentsOffSessionPaymentPost3Services() throws StripeExceptio null, null, com.stripe.model.v2.payments.OffSessionPayment.class, - "{\"amount_requested\":{\"currency\":\"USD\",\"value\":47},\"cadence\":\"unscheduled\",\"compartment_id\":\"compartment_id\",\"created\":\"1970-01-12T21:42:34.472Z\",\"customer\":\"customer\",\"id\":\"obj_123\",\"livemode\":true,\"metadata\":{\"key\":\"metadata\"},\"object\":\"v2.payments.off_session_payment\",\"payment_method\":\"payment_method\",\"payments_orchestration\":{\"enabled\":true},\"retry_details\":{\"attempts\":542738246,\"retry_strategy\":\"scheduled\"},\"status\":\"pending\"}"); + "{\"amount_requested\":{\"value\":111972721,\"currency\":\"usd\"},\"cadence\":\"unscheduled\",\"compartment_id\":\"compartment_id\",\"created\":\"1970-01-12T21:42:34.472Z\",\"customer\":\"customer\",\"id\":\"obj_123\",\"livemode\":true,\"metadata\":{\"key\":\"metadata\"},\"object\":\"v2.payments.off_session_payment\",\"payment_method\":\"payment_method\",\"payments_orchestration\":{\"enabled\":true},\"retry_details\":{\"attempts\":542738246,\"retry_strategy\":\"scheduled\"},\"status\":\"pending\"}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.payments.OffSessionPaymentCaptureParams params = @@ -29985,7 +30016,7 @@ public void testV2PaymentsSettlementAllocationIntentGetServices() throws StripeE new TypeToken< com.stripe.model.v2.StripeCollection< com.stripe.model.v2.payments.SettlementAllocationIntent>>() {}.getType(), - "{\"data\":[{\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"expected_settlement_date\":\"1970-01-22T14:14:13.629Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"linked_credits\":[\"linked_credits\"],\"object\":\"v2.payments.settlement_allocation_intent\",\"reference\":\"reference\",\"status\":\"canceled\",\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"amount\":{\"value\":111972721,\"currency\":\"usd\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"expected_settlement_date\":\"1970-01-22T14:14:13.629Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"linked_credits\":[\"linked_credits\"],\"object\":\"v2.payments.settlement_allocation_intent\",\"reference\":\"reference\",\"status\":\"canceled\",\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.payments.SettlementAllocationIntentListParams params = @@ -30011,12 +30042,16 @@ public void testV2PaymentsSettlementAllocationIntentPostServices() throws Stripe null, null, com.stripe.model.v2.payments.SettlementAllocationIntent.class, - "{\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"expected_settlement_date\":\"1970-01-22T14:14:13.629Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"linked_credits\":[\"linked_credits\"],\"object\":\"v2.payments.settlement_allocation_intent\",\"reference\":\"reference\",\"status\":\"canceled\",\"livemode\":true}"); + "{\"amount\":{\"value\":111972721,\"currency\":\"usd\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"expected_settlement_date\":\"1970-01-22T14:14:13.629Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"linked_credits\":[\"linked_credits\"],\"object\":\"v2.payments.settlement_allocation_intent\",\"reference\":\"reference\",\"status\":\"canceled\",\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.payments.SettlementAllocationIntentCreateParams params = com.stripe.param.v2.payments.SettlementAllocationIntentCreateParams.builder() - .setAmount(new com.stripe.v2.Amount(96, "USD")) + .setAmount( + com.stripe.param.v2.payments.SettlementAllocationIntentCreateParams.Amount.builder() + .setValue(111972721L) + .setCurrency("usd") + .build()) .setExpectedSettlementDate(Instant.parse("1970-01-22T14:14:13.629Z")) .setFinancialAccount("financial_account") .setReference("reference") @@ -30042,7 +30077,7 @@ public void testV2PaymentsSettlementAllocationIntentGet2Services() throws Stripe null, null, com.stripe.model.v2.payments.SettlementAllocationIntent.class, - "{\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"expected_settlement_date\":\"1970-01-22T14:14:13.629Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"linked_credits\":[\"linked_credits\"],\"object\":\"v2.payments.settlement_allocation_intent\",\"reference\":\"reference\",\"status\":\"canceled\",\"livemode\":true}"); + "{\"amount\":{\"value\":111972721,\"currency\":\"usd\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"expected_settlement_date\":\"1970-01-22T14:14:13.629Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"linked_credits\":[\"linked_credits\"],\"object\":\"v2.payments.settlement_allocation_intent\",\"reference\":\"reference\",\"status\":\"canceled\",\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.model.v2.payments.SettlementAllocationIntent settlementAllocationIntent = @@ -30065,7 +30100,7 @@ public void testV2PaymentsSettlementAllocationIntentPost2Services() throws Strip null, null, com.stripe.model.v2.payments.SettlementAllocationIntent.class, - "{\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"expected_settlement_date\":\"1970-01-22T14:14:13.629Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"linked_credits\":[\"linked_credits\"],\"object\":\"v2.payments.settlement_allocation_intent\",\"reference\":\"reference\",\"status\":\"canceled\",\"livemode\":true}"); + "{\"amount\":{\"value\":111972721,\"currency\":\"usd\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"expected_settlement_date\":\"1970-01-22T14:14:13.629Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"linked_credits\":[\"linked_credits\"],\"object\":\"v2.payments.settlement_allocation_intent\",\"reference\":\"reference\",\"status\":\"canceled\",\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.payments.SettlementAllocationIntentUpdateParams params = @@ -30091,7 +30126,7 @@ public void testV2PaymentsSettlementAllocationIntentPost3Services() throws Strip null, null, com.stripe.model.v2.payments.SettlementAllocationIntent.class, - "{\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"expected_settlement_date\":\"1970-01-22T14:14:13.629Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"linked_credits\":[\"linked_credits\"],\"object\":\"v2.payments.settlement_allocation_intent\",\"reference\":\"reference\",\"status\":\"canceled\",\"livemode\":true}"); + "{\"amount\":{\"value\":111972721,\"currency\":\"usd\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"expected_settlement_date\":\"1970-01-22T14:14:13.629Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"linked_credits\":[\"linked_credits\"],\"object\":\"v2.payments.settlement_allocation_intent\",\"reference\":\"reference\",\"status\":\"canceled\",\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.model.v2.payments.SettlementAllocationIntent settlementAllocationIntent = @@ -30114,7 +30149,7 @@ public void testV2PaymentsSettlementAllocationIntentPost4Services() throws Strip null, null, com.stripe.model.v2.payments.SettlementAllocationIntent.class, - "{\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"expected_settlement_date\":\"1970-01-22T14:14:13.629Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"linked_credits\":[\"linked_credits\"],\"object\":\"v2.payments.settlement_allocation_intent\",\"reference\":\"reference\",\"status\":\"canceled\",\"livemode\":true}"); + "{\"amount\":{\"value\":111972721,\"currency\":\"usd\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"expected_settlement_date\":\"1970-01-22T14:14:13.629Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"linked_credits\":[\"linked_credits\"],\"object\":\"v2.payments.settlement_allocation_intent\",\"reference\":\"reference\",\"status\":\"canceled\",\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.model.v2.payments.SettlementAllocationIntent settlementAllocationIntent = @@ -30139,7 +30174,7 @@ public void testV2PaymentsSettlementAllocationIntentsSplitGetServices() throws S new TypeToken< com.stripe.model.v2.StripeCollection< com.stripe.model.v2.payments.SettlementAllocationIntentSplit>>() {}.getType(), - "{\"data\":[{\"account\":\"account\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.payments.settlement_allocation_intent_split\",\"settlement_allocation_intent\":\"settlement_allocation_intent\",\"status\":\"canceled\",\"type\":\"credit\",\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"account\":\"account\",\"amount\":{\"value\":111972721,\"currency\":\"usd\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.payments.settlement_allocation_intent_split\",\"settlement_allocation_intent\":\"settlement_allocation_intent\",\"status\":\"canceled\",\"type\":\"credit\",\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.payments.settlementallocationintents.SplitListParams params = @@ -30172,13 +30207,18 @@ public void testV2PaymentsSettlementAllocationIntentsSplitPostServices() throws null, null, com.stripe.model.v2.payments.SettlementAllocationIntentSplit.class, - "{\"account\":\"account\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.payments.settlement_allocation_intent_split\",\"settlement_allocation_intent\":\"settlement_allocation_intent\",\"status\":\"canceled\",\"type\":\"credit\",\"livemode\":true}"); + "{\"account\":\"account\",\"amount\":{\"value\":111972721,\"currency\":\"usd\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.payments.settlement_allocation_intent_split\",\"settlement_allocation_intent\":\"settlement_allocation_intent\",\"status\":\"canceled\",\"type\":\"credit\",\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.payments.settlementallocationintents.SplitCreateParams params = com.stripe.param.v2.payments.settlementallocationintents.SplitCreateParams.builder() .setAccount("account") - .setAmount(new com.stripe.v2.Amount(96, "USD")) + .setAmount( + com.stripe.param.v2.payments.settlementallocationintents.SplitCreateParams.Amount + .builder() + .setValue(111972721L) + .setCurrency("usd") + .build()) .setType( com.stripe.param.v2.payments.settlementallocationintents.SplitCreateParams.Type .CREDIT) @@ -30209,7 +30249,7 @@ public void testV2PaymentsSettlementAllocationIntentsSplitGet2Services() throws null, null, com.stripe.model.v2.payments.SettlementAllocationIntentSplit.class, - "{\"account\":\"account\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.payments.settlement_allocation_intent_split\",\"settlement_allocation_intent\":\"settlement_allocation_intent\",\"status\":\"canceled\",\"type\":\"credit\",\"livemode\":true}"); + "{\"account\":\"account\",\"amount\":{\"value\":111972721,\"currency\":\"usd\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.payments.settlement_allocation_intent_split\",\"settlement_allocation_intent\":\"settlement_allocation_intent\",\"status\":\"canceled\",\"type\":\"credit\",\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.model.v2.payments.SettlementAllocationIntentSplit settlementAllocationIntentSplit = @@ -30237,7 +30277,7 @@ public void testV2PaymentsSettlementAllocationIntentsSplitPost2Services() throws null, null, com.stripe.model.v2.payments.SettlementAllocationIntentSplit.class, - "{\"account\":\"account\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.payments.settlement_allocation_intent_split\",\"settlement_allocation_intent\":\"settlement_allocation_intent\",\"status\":\"canceled\",\"type\":\"credit\",\"livemode\":true}"); + "{\"account\":\"account\",\"amount\":{\"value\":111972721,\"currency\":\"usd\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.payments.settlement_allocation_intent_split\",\"settlement_allocation_intent\":\"settlement_allocation_intent\",\"status\":\"canceled\",\"type\":\"credit\",\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.model.v2.payments.SettlementAllocationIntentSplit settlementAllocationIntentSplit = @@ -30507,7 +30547,11 @@ public void testV2TestHelpersFinancialAddressPostServices() throws StripeExcepti com.stripe.param.v2.testhelpers.FinancialAddressCreditParams params = com.stripe.param.v2.testhelpers.FinancialAddressCreditParams.builder() - .setAmount(new com.stripe.v2.Amount(96, "USD")) + .setAmount( + com.stripe.param.v2.testhelpers.FinancialAddressCreditParams.Amount.builder() + .setValue(111972721L) + .setCurrency("usd") + .build()) .setNetwork(com.stripe.param.v2.testhelpers.FinancialAddressCreditParams.Network.ACH) .build(); @@ -30531,7 +30575,7 @@ public void testV2TestHelpersFinancialAddressPost2Services() throws StripeExcept null, null, com.stripe.model.v2.FinancialAddressGeneratedMicrodeposits.class, - "{\"amounts\":[{\"currency\":\"USD\",\"value\":1}],\"object\":\"financial_address_generated_microdeposits\",\"status\":\"accepted\",\"livemode\":true}"); + "{\"amounts\":[{\"value\":111972721,\"currency\":\"usd\"}],\"object\":\"financial_address_generated_microdeposits\",\"status\":\"accepted\",\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.model.v2.FinancialAddressGeneratedMicrodeposits @@ -30805,7 +30849,11 @@ public void testInsufficientFundsErrorServices() throws StripeException { com.stripe.param.v2.moneymanagement.OutboundPaymentCreateParams params = com.stripe.param.v2.moneymanagement.OutboundPaymentCreateParams.builder() - .setAmount(new com.stripe.v2.Amount(96, "USD")) + .setAmount( + com.stripe.param.v2.moneymanagement.OutboundPaymentCreateParams.Amount.builder() + .setValue(111972721L) + .setCurrency("usd") + .build()) .setFrom( com.stripe.param.v2.moneymanagement.OutboundPaymentCreateParams.From.builder() .setCurrency("usd") @@ -31016,7 +31064,11 @@ public void testRecipientNotNotifiableErrorServices() throws StripeException { com.stripe.param.v2.moneymanagement.OutboundPaymentCreateParams params = com.stripe.param.v2.moneymanagement.OutboundPaymentCreateParams.builder() - .setAmount(new com.stripe.v2.Amount(96, "USD")) + .setAmount( + com.stripe.param.v2.moneymanagement.OutboundPaymentCreateParams.Amount.builder() + .setValue(111972721L) + .setCurrency("usd") + .build()) .setFrom( com.stripe.param.v2.moneymanagement.OutboundPaymentCreateParams.From.builder() .setCurrency("usd")