params, RequestOptions options) throws StripeException {
String path = String.format("/v1/invoices/%s", ApiResource.urlEncodeId(this.getId()));
@@ -1975,14 +1975,14 @@ public Invoice updateLines(InvoiceUpdateLinesParams params, RequestOptions optio
/**
* Mark a finalized invoice as void. This cannot be undone. Voiding an invoice is similar to deletion, however it only applies to
+ * href="https://stripe.com/api/invoices/delete">deletion, however it only applies to
* finalized invoices and maintains a papertrail where the invoice can still be found.
*
* Consult with local regulations to determine whether and how an invoice might be amended,
* canceled, or voided in the jurisdiction you’re doing business in. You might need to issue another invoice or credit note instead. Stripe
- * recommends that you consult with your legal counsel for advice specific to your business.
+ * href="https://stripe.com/api/invoices/create">issue another invoice or credit note instead. Stripe recommends
+ * that you consult with your legal counsel for advice specific to your business.
*/
public Invoice voidInvoice() throws StripeException {
return voidInvoice((Map) null, (RequestOptions) null);
@@ -1990,14 +1990,14 @@ public Invoice voidInvoice() throws StripeException {
/**
* Mark a finalized invoice as void. This cannot be undone. Voiding an invoice is similar to deletion, however it only applies to
+ * href="https://stripe.com/api/invoices/delete">deletion, however it only applies to
* finalized invoices and maintains a papertrail where the invoice can still be found.
*
* Consult with local regulations to determine whether and how an invoice might be amended,
* canceled, or voided in the jurisdiction you’re doing business in. You might need to issue another invoice or credit note instead. Stripe
- * recommends that you consult with your legal counsel for advice specific to your business.
+ * href="https://stripe.com/api/invoices/create">issue another invoice or credit note instead. Stripe recommends
+ * that you consult with your legal counsel for advice specific to your business.
*/
public Invoice voidInvoice(RequestOptions options) throws StripeException {
return voidInvoice((Map) null, options);
@@ -2005,14 +2005,14 @@ public Invoice voidInvoice(RequestOptions options) throws StripeException {
/**
* Mark a finalized invoice as void. This cannot be undone. Voiding an invoice is similar to deletion, however it only applies to
+ * href="https://stripe.com/api/invoices/delete">deletion, however it only applies to
* finalized invoices and maintains a papertrail where the invoice can still be found.
*
* Consult with local regulations to determine whether and how an invoice might be amended,
* canceled, or voided in the jurisdiction you’re doing business in. You might need to issue another invoice or credit note instead. Stripe
- * recommends that you consult with your legal counsel for advice specific to your business.
+ * href="https://stripe.com/api/invoices/create">issue another invoice or credit note instead. Stripe recommends
+ * that you consult with your legal counsel for advice specific to your business.
*/
public Invoice voidInvoice(Map params) throws StripeException {
return voidInvoice(params, (RequestOptions) null);
@@ -2020,14 +2020,14 @@ public Invoice voidInvoice(Map params) throws StripeException {
/**
* Mark a finalized invoice as void. This cannot be undone. Voiding an invoice is similar to deletion, however it only applies to
+ * href="https://stripe.com/api/invoices/delete">deletion, however it only applies to
* finalized invoices and maintains a papertrail where the invoice can still be found.
*
* Consult with local regulations to determine whether and how an invoice might be amended,
* canceled, or voided in the jurisdiction you’re doing business in. You might need to issue another invoice or credit note instead. Stripe
- * recommends that you consult with your legal counsel for advice specific to your business.
+ * href="https://stripe.com/api/invoices/create">issue another invoice or credit note instead. Stripe recommends
+ * that you consult with your legal counsel for advice specific to your business.
*/
public Invoice voidInvoice(Map params, RequestOptions options)
throws StripeException {
@@ -2039,14 +2039,14 @@ public Invoice voidInvoice(Map params, RequestOptions options)
/**
* Mark a finalized invoice as void. This cannot be undone. Voiding an invoice is similar to deletion, however it only applies to
+ * href="https://stripe.com/api/invoices/delete">deletion, however it only applies to
* finalized invoices and maintains a papertrail where the invoice can still be found.
*
* Consult with local regulations to determine whether and how an invoice might be amended,
* canceled, or voided in the jurisdiction you’re doing business in. You might need to issue another invoice or credit note instead. Stripe
- * recommends that you consult with your legal counsel for advice specific to your business.
+ * href="https://stripe.com/api/invoices/create">issue another invoice or credit note instead. Stripe recommends
+ * that you consult with your legal counsel for advice specific to your business.
*/
public Invoice voidInvoice(InvoiceVoidInvoiceParams params) throws StripeException {
return voidInvoice(params, (RequestOptions) null);
@@ -2054,14 +2054,14 @@ public Invoice voidInvoice(InvoiceVoidInvoiceParams params) throws StripeExcepti
/**
* Mark a finalized invoice as void. This cannot be undone. Voiding an invoice is similar to deletion, however it only applies to
+ * href="https://stripe.com/api/invoices/delete">deletion, however it only applies to
* finalized invoices and maintains a papertrail where the invoice can still be found.
*
*
Consult with local regulations to determine whether and how an invoice might be amended,
* canceled, or voided in the jurisdiction you’re doing business in. You might need to issue another invoice or credit note instead. Stripe
- * recommends that you consult with your legal counsel for advice specific to your business.
+ * href="https://stripe.com/api/invoices/create">issue another invoice or credit note instead. Stripe recommends
+ * that you consult with your legal counsel for advice specific to your business.
*/
public Invoice voidInvoice(InvoiceVoidInvoiceParams params, RequestOptions options)
throws StripeException {
@@ -2466,8 +2466,9 @@ public void setSubscriptionObject(Subscription expandableObject) {
@EqualsAndHashCode(callSuper = false)
public static class PauseCollection extends StripeObject {
/**
- * The payment collection behavior for this subscription while paused. One of {@code
- * keep_as_draft}, {@code mark_uncollectible}, or {@code void}.
+ * The payment collection behavior for this subscription while paused.
+ *
+ *
One of {@code keep_as_draft}, {@code mark_uncollectible}, or {@code void}.
*/
@SerializedName("behavior")
String behavior;
@@ -2605,7 +2606,7 @@ public static class AcssDebit extends StripeObject {
MandateOptions mandateOptions;
/**
- * Bank account verification method.
+ * Bank account verification method. The default value is {@code automatic}.
*
*
One of {@code automatic}, {@code instant}, or {@code microdeposits}.
*/
@@ -2827,6 +2828,13 @@ public static class Pix extends StripeObject {
*/
@SerializedName("amount_includes_iof")
String amountIncludesIof;
+
+ /**
+ * The number of seconds (between 10 and 1209600) after which Pix payment will expire.
+ * Defaults to 86400 seconds.
+ */
+ @SerializedName("expires_after_seconds")
+ Long expiresAfterSeconds;
}
/**
@@ -2894,7 +2902,7 @@ public static class UsBankAccount extends StripeObject {
FinancialConnections financialConnections;
/**
- * Bank account verification method.
+ * Bank account verification method. The default value is {@code automatic}.
*
*
One of {@code automatic}, {@code instant}, or {@code microdeposits}.
*/
diff --git a/src/main/java/com/stripe/model/InvoiceItem.java b/src/main/java/com/stripe/model/InvoiceItem.java
index be8a5a97fc2..46d123f002d 100644
--- a/src/main/java/com/stripe/model/InvoiceItem.java
+++ b/src/main/java/com/stripe/model/InvoiceItem.java
@@ -104,8 +104,8 @@ public class InvoiceItem extends ApiResource implements HasId, MetadataStore invoice;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
@@ -163,12 +163,21 @@ public class InvoiceItem extends ApiResource implements HasId, MetadataStoreAPI
+ * Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Upi extends StripeObject {
+ /** Amount to be charged for future payments. */
+ @SerializedName("amount")
+ Long amount;
+
+ /**
+ * One of {@code fixed} or {@code maximum}. If {@code fixed}, the {@code amount} param refers
+ * to the exact amount to be charged in future payments. If {@code maximum}, the amount
+ * charged can be up to the value passed for the {@code amount} param.
+ */
+ @SerializedName("amount_type")
+ String amountType;
+
+ /**
+ * A description of the mandate or subscription that is meant to be displayed to the customer.
+ */
+ @SerializedName("description")
+ String description;
+
+ /** End date of the mandate or subscription. */
+ @SerializedName("end_date")
+ Long endDate;
+ }
+
/**
* For more details about UsBankAccount, please refer to the API Reference.
diff --git a/src/main/java/com/stripe/model/Margin.java b/src/main/java/com/stripe/model/Margin.java
index ef61b44fe6f..17897bbb0ab 100644
--- a/src/main/java/com/stripe/model/Margin.java
+++ b/src/main/java/com/stripe/model/Margin.java
@@ -43,8 +43,8 @@ public class Margin extends ApiResource implements HasId, MetadataStore
String id;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/Order.java b/src/main/java/com/stripe/model/Order.java
index 697bfc8e578..28370921721 100644
--- a/src/main/java/com/stripe/model/Order.java
+++ b/src/main/java/com/stripe/model/Order.java
@@ -120,8 +120,8 @@ public class Order extends ApiResource implements HasId, MetadataStore {
LineItemCollection lineItems;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
@@ -742,7 +742,7 @@ public static class AcssDebit extends StripeObject {
String targetDate;
/**
- * Bank account verification method.
+ * Bank account verification method. The default value is {@code automatic}.
*
* One of {@code automatic}, {@code instant}, or {@code microdeposits}.
*/
diff --git a/src/main/java/com/stripe/model/PaymentAttemptRecord.java b/src/main/java/com/stripe/model/PaymentAttemptRecord.java
index 77bbfeed573..ec56f61a6e0 100644
--- a/src/main/java/com/stripe/model/PaymentAttemptRecord.java
+++ b/src/main/java/com/stripe/model/PaymentAttemptRecord.java
@@ -85,8 +85,8 @@ public class PaymentAttemptRecord extends ApiResource implements HasId {
String id;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
@@ -591,6 +591,9 @@ public static class PaymentMethodDetails extends StripeObject {
@SerializedName("type")
String type;
+ @SerializedName("upi")
+ Upi upi;
+
@SerializedName("us_bank_account")
UsBankAccount usBankAccount;
@@ -1394,6 +1397,38 @@ public static class ThreeDSecure extends StripeObject {
@SerializedName("authentication_flow")
String authenticationFlow;
+ /**
+ * The 3D Secure cryptogram, also known as the "authentication value" (AAV, CAVV
+ * or AEVV).
+ */
+ @SerializedName("cryptogram")
+ String cryptogram;
+
+ /**
+ * The Electronic Commerce Indicator (ECI). A protocol-level field indicating what degree of
+ * authentication was performed.
+ *
+ *
One of {@code 01}, {@code 02}, {@code 03}, {@code 04}, {@code 05}, {@code 06}, or
+ * {@code 07}.
+ */
+ @SerializedName("electronic_commerce_indicator")
+ String electronicCommerceIndicator;
+
+ /**
+ * The exemption requested via 3DS and accepted by the issuer at authentication time.
+ *
+ *
One of {@code low_risk}, or {@code none}.
+ */
+ @SerializedName("exemption_indicator")
+ String exemptionIndicator;
+
+ /**
+ * Whether Stripe requested the value of {@code exemption_indicator} in the transaction.
+ * This will depend on the outcome of Stripe's internal risk assessment.
+ */
+ @SerializedName("exemption_indicator_applied")
+ Boolean exemptionIndicatorApplied;
+
/**
* Indicates the outcome of 3D Secure authentication.
*
@@ -1809,7 +1844,8 @@ public static class Crypto extends StripeObject {
/**
* The blockchain network that the transaction was sent on.
*
- *
One of {@code base}, {@code ethereum}, {@code polygon}, or {@code solana}.
+ *
One of {@code base}, {@code ethereum}, {@code polygon}, {@code solana}, or {@code
+ * tempo}.
*/
@SerializedName("network")
String network;
@@ -3209,16 +3245,6 @@ public static class StripeBalance extends StripeObject {
/** The connected account ID whose Stripe balance to use as the source of payment. */
@SerializedName("account")
String account;
-
- /**
- * The source_type
- * of the balance
- *
- *
One of {@code bank_account}, {@code card}, or {@code fpx}.
- */
- @SerializedName("source_type")
- String sourceType;
}
/**
@@ -3254,6 +3280,19 @@ public static class Swish extends StripeObject {
@EqualsAndHashCode(callSuper = false)
public static class Twint extends StripeObject {}
+ /**
+ * For more details about Upi, please refer to the API
+ * Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Upi extends StripeObject {
+ /** Customer's unique Virtual Payment Address. */
+ @SerializedName("vpa")
+ String vpa;
+ }
+
/**
* For more details about UsBankAccount, please refer to the API Reference.
diff --git a/src/main/java/com/stripe/model/PaymentIntent.java b/src/main/java/com/stripe/model/PaymentIntent.java
index e4f25675a60..590e4249a49 100644
--- a/src/main/java/com/stripe/model/PaymentIntent.java
+++ b/src/main/java/com/stripe/model/PaymentIntent.java
@@ -231,8 +231,8 @@ public class PaymentIntent extends ApiResource implements HasId, MetadataStore
latestCharge;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
@@ -609,9 +609,9 @@ public PaymentIntent applyCustomerBalance(
* on the PaymentIntent fail with an error. For PaymentIntents with a {@code status} of {@code
* requires_capture}, the remaining {@code amount_capturable} is automatically refunded.
*
- *
You can’t cancel the PaymentIntent for a Checkout Session. Expire the Checkout Session
- * instead.
+ *
You can directly cancel the PaymentIntent for a Checkout Session only when the PaymentIntent
+ * has a status of {@code requires_capture}. Otherwise, you must expire the Checkout Session.
*/
public PaymentIntent cancel() throws StripeException {
return cancel((Map) null, (RequestOptions) null);
@@ -627,9 +627,9 @@ public PaymentIntent cancel() throws StripeException {
* on the PaymentIntent fail with an error. For PaymentIntents with a {@code status} of {@code
* requires_capture}, the remaining {@code amount_capturable} is automatically refunded.
*
- * You can’t cancel the PaymentIntent for a Checkout Session. Expire the Checkout Session
- * instead.
+ *
You can directly cancel the PaymentIntent for a Checkout Session only when the PaymentIntent
+ * has a status of {@code requires_capture}. Otherwise, you must expire the Checkout Session.
*/
public PaymentIntent cancel(RequestOptions options) throws StripeException {
return cancel((Map) null, options);
@@ -645,9 +645,9 @@ public PaymentIntent cancel(RequestOptions options) throws StripeException {
* on the PaymentIntent fail with an error. For PaymentIntents with a {@code status} of {@code
* requires_capture}, the remaining {@code amount_capturable} is automatically refunded.
*
- * You can’t cancel the PaymentIntent for a Checkout Session. Expire the Checkout Session
- * instead.
+ *
You can directly cancel the PaymentIntent for a Checkout Session only when the PaymentIntent
+ * has a status of {@code requires_capture}. Otherwise, you must expire the Checkout Session.
*/
public PaymentIntent cancel(Map params) throws StripeException {
return cancel(params, (RequestOptions) null);
@@ -663,9 +663,9 @@ public PaymentIntent cancel(Map params) throws StripeException {
* on the PaymentIntent fail with an error. For PaymentIntents with a {@code status} of {@code
* requires_capture}, the remaining {@code amount_capturable} is automatically refunded.
*
- * You can’t cancel the PaymentIntent for a Checkout Session. Expire the Checkout Session
- * instead.
+ *
You can directly cancel the PaymentIntent for a Checkout Session only when the PaymentIntent
+ * has a status of {@code requires_capture}. Otherwise, you must expire the Checkout Session.
*/
public PaymentIntent cancel(Map params, RequestOptions options)
throws StripeException {
@@ -686,9 +686,9 @@ public PaymentIntent cancel(Map params, RequestOptions options)
* on the PaymentIntent fail with an error. For PaymentIntents with a {@code status} of {@code
* requires_capture}, the remaining {@code amount_capturable} is automatically refunded.
*
- * You can’t cancel the PaymentIntent for a Checkout Session. Expire the Checkout Session
- * instead.
+ *
You can directly cancel the PaymentIntent for a Checkout Session only when the PaymentIntent
+ * has a status of {@code requires_capture}. Otherwise, you must expire the Checkout Session.
*/
public PaymentIntent cancel(PaymentIntentCancelParams params) throws StripeException {
return cancel(params, (RequestOptions) null);
@@ -704,9 +704,9 @@ public PaymentIntent cancel(PaymentIntentCancelParams params) throws StripeExcep
* on the PaymentIntent fail with an error. For PaymentIntents with a {@code status} of {@code
* requires_capture}, the remaining {@code amount_capturable} is automatically refunded.
*
- *
You can’t cancel the PaymentIntent for a Checkout Session. Expire the Checkout Session
- * instead.
+ *
You can directly cancel the PaymentIntent for a Checkout Session only when the PaymentIntent
+ * has a status of {@code requires_capture}. Otherwise, you must expire the Checkout Session.
*/
public PaymentIntent cancel(PaymentIntentCancelParams params, RequestOptions options)
throws StripeException {
@@ -1741,6 +1741,9 @@ public static class AmountDetails extends StripeObject {
@SerializedName("shipping")
Shipping shipping;
+ @SerializedName("surcharge")
+ Surcharge surcharge;
+
@SerializedName("tax")
Tax tax;
@@ -1800,6 +1803,35 @@ public static class Shipping extends StripeObject {
String toPostalCode;
}
+ /**
+ * For more details about Surcharge, please refer to the API Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Surcharge extends StripeObject {
+ /** Portion of the amount that corresponds to a surcharge. */
+ @SerializedName("amount")
+ Long amount;
+
+ /**
+ * Indicate whether to enforce validations on the surcharge amount.
+ *
+ *
One of {@code automatic}, {@code disabled}, or {@code enabled}.
+ */
+ @SerializedName("enforce_validation")
+ String enforceValidation;
+
+ /** The maximum amount allowed for the surcharge. */
+ @SerializedName("maximum_amount")
+ Long maximumAmount;
+
+ /** The status of the surcharge. */
+ @SerializedName("status")
+ String status;
+ }
+
/**
* For more details about Tax, please refer to the API
* Reference.
@@ -2008,6 +2040,9 @@ public static class NextAction extends StripeObject {
@SerializedName("type")
String type;
+ @SerializedName("upi_handle_redirect_or_display_qr_code")
+ UpiHandleRedirectOrDisplayQrCode upiHandleRedirectOrDisplayQrCode;
+
/**
* When confirming a PaymentIntent with Stripe.js, Stripe.js depends on the contents of this
* dictionary to invoke authentication flows. The shape of the contents is subject to change and
@@ -2767,6 +2802,45 @@ public static class QrCode extends StripeObject {
}
}
+ /**
+ * For more details about UpiHandleRedirectOrDisplayQrCode, please refer to the API Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class UpiHandleRedirectOrDisplayQrCode extends StripeObject {
+ /**
+ * The URL to the hosted UPI instructions page, which allows customers to view the QR code.
+ */
+ @SerializedName("hosted_instructions_url")
+ String hostedInstructionsUrl;
+
+ @SerializedName("qr_code")
+ QrCode qrCode;
+
+ /**
+ * For more details about QrCode, please refer to the API Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class QrCode extends StripeObject {
+ /** The date (unix timestamp) when the QR code expires. */
+ @SerializedName("expires_at")
+ Long expiresAt;
+
+ /** The image_url_png string used to render QR code. */
+ @SerializedName("image_url_png")
+ String imageUrlPng;
+
+ /** The image_url_svg string used to render QR code. */
+ @SerializedName("image_url_svg")
+ String imageUrlSvg;
+ }
+ }
+
/**
* For more details about VerifyWithMicrodeposits, please refer to the API Reference.
@@ -2925,10 +2999,6 @@ public static class PaymentDetails extends StripeObject {
* A unique value assigned by the business to identify the transaction. Required for L2 and L3
* rates.
*
- *
Required when the Payment Method Types array contains {@code card}, including when automatic_payment_methods.enabled
- * is set to {@code true}.
- *
*
For Cards, this field is truncated to 25 alphanumeric characters, excluding spaces, before
* being sent to card networks. For Klarna, this field is truncated to 255 characters and is
* visible to customers when they view the order in the Klarna app.
@@ -4543,6 +4613,9 @@ public static class PaymentMethodOptions extends StripeObject {
@SerializedName("twint")
Twint twint;
+ @SerializedName("upi")
+ Upi upi;
+
@SerializedName("us_bank_account")
UsBankAccount usBankAccount;
@@ -4596,7 +4669,7 @@ public static class AcssDebit extends StripeObject {
String targetDate;
/**
- * Bank account verification method.
+ * Bank account verification method. The default value is {@code automatic}.
*
*
One of {@code automatic}, {@code instant}, or {@code microdeposits}.
*/
@@ -5310,7 +5383,7 @@ public static class Plan extends StripeObject {
@Setter
@EqualsAndHashCode(callSuper = false)
public static class MandateOptions extends StripeObject {
- /** Amount to be charged for future payments. */
+ /** Amount to be charged for future payments, specified in the presentment currency. */
@SerializedName("amount")
Long amount;
@@ -7119,6 +7192,9 @@ public static class Sofort extends StripeObject {
@Setter
@EqualsAndHashCode(callSuper = false)
public static class StripeBalance extends StripeObject {
+ @SerializedName("mandate_options")
+ MandateOptions mandateOptions;
+
/**
* Indicates that you intend to make future payments with this PaymentIntent's payment method.
*
@@ -7142,6 +7218,19 @@ public static class StripeBalance extends StripeObject {
*/
@SerializedName("setup_future_usage")
String setupFutureUsage;
+
+ /**
+ * For more details about MandateOptions, please refer to the API Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class MandateOptions extends StripeObject {
+ /** The ID of the Stripe Balance Debit Agreement used for this mandate. */
+ @SerializedName("stripe_balance_debit_agreement")
+ String stripeBalanceDebitAgreement;
+ }
}
/**
@@ -7214,6 +7303,39 @@ public static class Twint extends StripeObject {
String setupFutureUsage;
}
+ /**
+ * For more details about Upi, please refer to the API
+ * Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Upi extends StripeObject {
+ /**
+ * Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ *
+ *
If you provide a Customer with the PaymentIntent, you can use this parameter to attach the payment method to the
+ * Customer after the PaymentIntent is confirmed and the customer completes any required
+ * actions. If you don't provide a Customer, you can still attach the payment method to a
+ * Customer after the transaction completes.
+ *
+ *
If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
+ * and attaches a generated_card
+ * payment method representing the card to the Customer instead.
+ *
+ *
When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
+ * with regional legislation and network rules, such as SCA.
+ *
+ *
One of {@code off_session}, or {@code on_session}.
+ */
+ @SerializedName("setup_future_usage")
+ String setupFutureUsage;
+ }
+
/**
* For more details about UsBankAccount, please refer to the API Reference.
@@ -7228,14 +7350,6 @@ public static class UsBankAccount extends StripeObject {
@SerializedName("mandate_options")
MandateOptions mandateOptions;
- /**
- * Preferred transaction settlement speed
- *
- *
One of {@code fastest}, or {@code standard}.
- */
- @SerializedName("preferred_settlement_speed")
- String preferredSettlementSpeed;
-
/**
* Indicates that you intend to make future payments with this PaymentIntent's payment method.
*
@@ -7277,7 +7391,7 @@ public static class UsBankAccount extends StripeObject {
String transactionPurpose;
/**
- * Bank account verification method.
+ * Bank account verification method. The default value is {@code automatic}.
*
*
One of {@code automatic}, {@code instant}, or {@code microdeposits}.
*/
diff --git a/src/main/java/com/stripe/model/PaymentLink.java b/src/main/java/com/stripe/model/PaymentLink.java
index d6282f9987d..0128d02b34a 100644
--- a/src/main/java/com/stripe/model/PaymentLink.java
+++ b/src/main/java/com/stripe/model/PaymentLink.java
@@ -130,12 +130,22 @@ public class PaymentLink extends ApiResource implements HasId, MetadataStoreCheckoutSessions, PaymentIntents, Invoices, and Subscriptions.
+ */
+ @SerializedName("managed_payments")
+ ManagedPayments managedPayments;
+
/**
* 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
@@ -1043,6 +1053,23 @@ public static class RenderingOptions extends StripeObject {
}
}
+ /**
+ * For more details about ManagedPayments, please refer to the API Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class ManagedPayments extends StripeObject {
+ /**
+ * Set to {@code true} to enable Managed Payments, Stripe's
+ * merchant of record solution, for this session.
+ */
+ @SerializedName("enabled")
+ Boolean enabled;
+ }
+
/**
* For more details about NameCollection, please refer to the API Reference.
@@ -1491,6 +1518,7 @@ public void setResponseGetter(StripeResponseGetter responseGetter) {
trySetResponseGetter(customText, responseGetter);
trySetResponseGetter(invoiceCreation, responseGetter);
trySetResponseGetter(lineItems, responseGetter);
+ trySetResponseGetter(managedPayments, responseGetter);
trySetResponseGetter(nameCollection, responseGetter);
trySetResponseGetter(onBehalfOf, responseGetter);
trySetResponseGetter(paymentIntentData, responseGetter);
diff --git a/src/main/java/com/stripe/model/PaymentMethod.java b/src/main/java/com/stripe/model/PaymentMethod.java
index 64813a63582..19fd1e33b53 100644
--- a/src/main/java/com/stripe/model/PaymentMethod.java
+++ b/src/main/java/com/stripe/model/PaymentMethod.java
@@ -168,8 +168,8 @@ public class PaymentMethod extends ApiResource implements HasId, MetadataStoresource_type
- * of the balance
- *
- *
One of {@code bank_account}, {@code card}, or {@code fpx}.
- */
- @SerializedName("source_type")
- String sourceType;
}
/**
@@ -2717,6 +2710,19 @@ public static class Swish extends StripeObject {}
@EqualsAndHashCode(callSuper = false)
public static class Twint extends StripeObject {}
+ /**
+ * For more details about Upi, please refer to the API
+ * Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Upi extends StripeObject {
+ /** Customer's unique Virtual Payment Address. */
+ @SerializedName("vpa")
+ String vpa;
+ }
+
/**
* For more details about UsBankAccount, please refer to the API Reference.
@@ -2917,6 +2923,7 @@ public void setResponseGetter(StripeResponseGetter responseGetter) {
trySetResponseGetter(stripeBalance, responseGetter);
trySetResponseGetter(swish, responseGetter);
trySetResponseGetter(twint, responseGetter);
+ trySetResponseGetter(upi, responseGetter);
trySetResponseGetter(usBankAccount, responseGetter);
trySetResponseGetter(wechatPay, responseGetter);
trySetResponseGetter(zip, responseGetter);
diff --git a/src/main/java/com/stripe/model/PaymentMethodConfiguration.java b/src/main/java/com/stripe/model/PaymentMethodConfiguration.java
index 0da6fc839cc..664a2223199 100644
--- a/src/main/java/com/stripe/model/PaymentMethodConfiguration.java
+++ b/src/main/java/com/stripe/model/PaymentMethodConfiguration.java
@@ -166,8 +166,8 @@ public class PaymentMethodConfiguration extends ApiResource implements HasId {
Link link;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
@@ -260,6 +260,9 @@ public class PaymentMethodConfiguration extends ApiResource implements HasId {
@SerializedName("twint")
Twint twint;
+ @SerializedName("upi")
+ Upi upi;
+
@SerializedName("us_bank_account")
UsBankAccount usBankAccount;
@@ -3279,6 +3282,57 @@ public static class DisplayPreference extends StripeObject {
}
}
+ /**
+ * For more details about Upi, please refer to the API
+ * Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Upi extends StripeObject {
+ /**
+ * Whether this payment method may be offered at checkout. True if {@code display_preference} is
+ * {@code on} and the payment method's capability is active.
+ */
+ @SerializedName("available")
+ Boolean available;
+
+ @SerializedName("display_preference")
+ DisplayPreference displayPreference;
+
+ /**
+ * For more details about DisplayPreference, please refer to the API Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class DisplayPreference extends StripeObject {
+ /**
+ * For child configs, whether or not the account's preference will be observed. If {@code
+ * false}, the parent configuration's default is used.
+ */
+ @SerializedName("overridable")
+ Boolean overridable;
+
+ /**
+ * The account's display preference.
+ *
+ *
One of {@code none}, {@code off}, or {@code on}.
+ */
+ @SerializedName("preference")
+ String preference;
+
+ /**
+ * The effective display preference value.
+ *
+ *
One of {@code off}, or {@code on}.
+ */
+ @SerializedName("value")
+ String value;
+ }
+ }
+
/**
* For more details about UsBankAccount, please refer to the API Reference.
@@ -3491,6 +3545,7 @@ public void setResponseGetter(StripeResponseGetter responseGetter) {
trySetResponseGetter(sofort, responseGetter);
trySetResponseGetter(swish, responseGetter);
trySetResponseGetter(twint, responseGetter);
+ trySetResponseGetter(upi, responseGetter);
trySetResponseGetter(usBankAccount, responseGetter);
trySetResponseGetter(wechatPay, responseGetter);
trySetResponseGetter(zip, responseGetter);
diff --git a/src/main/java/com/stripe/model/PaymentMethodDomain.java b/src/main/java/com/stripe/model/PaymentMethodDomain.java
index 9343eb0023a..cd7a01b69b1 100644
--- a/src/main/java/com/stripe/model/PaymentMethodDomain.java
+++ b/src/main/java/com/stripe/model/PaymentMethodDomain.java
@@ -73,8 +73,8 @@ public class PaymentMethodDomain extends ApiResource implements HasId {
Link link;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/PaymentRecord.java b/src/main/java/com/stripe/model/PaymentRecord.java
index eaf85f30009..d8300894e48 100644
--- a/src/main/java/com/stripe/model/PaymentRecord.java
+++ b/src/main/java/com/stripe/model/PaymentRecord.java
@@ -96,8 +96,8 @@ public class PaymentRecord extends ApiResource implements HasId {
String latestPaymentAttemptRecord;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
@@ -893,6 +893,9 @@ public static class PaymentMethodDetails extends StripeObject {
@SerializedName("type")
String type;
+ @SerializedName("upi")
+ Upi upi;
+
@SerializedName("us_bank_account")
UsBankAccount usBankAccount;
@@ -1696,6 +1699,38 @@ public static class ThreeDSecure extends StripeObject {
@SerializedName("authentication_flow")
String authenticationFlow;
+ /**
+ * The 3D Secure cryptogram, also known as the "authentication value" (AAV, CAVV
+ * or AEVV).
+ */
+ @SerializedName("cryptogram")
+ String cryptogram;
+
+ /**
+ * The Electronic Commerce Indicator (ECI). A protocol-level field indicating what degree of
+ * authentication was performed.
+ *
+ *
One of {@code 01}, {@code 02}, {@code 03}, {@code 04}, {@code 05}, {@code 06}, or
+ * {@code 07}.
+ */
+ @SerializedName("electronic_commerce_indicator")
+ String electronicCommerceIndicator;
+
+ /**
+ * The exemption requested via 3DS and accepted by the issuer at authentication time.
+ *
+ *
One of {@code low_risk}, or {@code none}.
+ */
+ @SerializedName("exemption_indicator")
+ String exemptionIndicator;
+
+ /**
+ * Whether Stripe requested the value of {@code exemption_indicator} in the transaction.
+ * This will depend on the outcome of Stripe's internal risk assessment.
+ */
+ @SerializedName("exemption_indicator_applied")
+ Boolean exemptionIndicatorApplied;
+
/**
* Indicates the outcome of 3D Secure authentication.
*
@@ -2111,7 +2146,8 @@ public static class Crypto extends StripeObject {
/**
* The blockchain network that the transaction was sent on.
*
- *
One of {@code base}, {@code ethereum}, {@code polygon}, or {@code solana}.
+ *
One of {@code base}, {@code ethereum}, {@code polygon}, {@code solana}, or {@code
+ * tempo}.
*/
@SerializedName("network")
String network;
@@ -3510,16 +3546,6 @@ public static class StripeBalance extends StripeObject {
/** The connected account ID whose Stripe balance to use as the source of payment. */
@SerializedName("account")
String account;
-
- /**
- * The source_type
- * of the balance
- *
- *
One of {@code bank_account}, {@code card}, or {@code fpx}.
- */
- @SerializedName("source_type")
- String sourceType;
}
/**
@@ -3555,6 +3581,19 @@ public static class Swish extends StripeObject {
@EqualsAndHashCode(callSuper = false)
public static class Twint extends StripeObject {}
+ /**
+ * For more details about Upi, please refer to the API
+ * Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Upi extends StripeObject {
+ /** Customer's unique Virtual Payment Address. */
+ @SerializedName("vpa")
+ String vpa;
+ }
+
/**
* For more details about UsBankAccount, please refer to the API Reference.
diff --git a/src/main/java/com/stripe/model/PaymentSourceCollection.java b/src/main/java/com/stripe/model/PaymentSourceCollection.java
index 7976909856a..f651147d3ae 100644
--- a/src/main/java/com/stripe/model/PaymentSourceCollection.java
+++ b/src/main/java/com/stripe/model/PaymentSourceCollection.java
@@ -19,8 +19,8 @@ public class PaymentSourceCollection extends StripeCollection {
*
* If the card’s owner has no default card, then the new card will become the default. However,
* if the owner already has a default, then it will not change. To change the default, you should
- * update the customer to have a new
- * {@code default_source}.
+ * update the customer to have a new {@code
+ * default_source}.
*/
public PaymentSource create(Map params) throws StripeException {
return create(params, (RequestOptions) null);
@@ -32,8 +32,8 @@ public PaymentSource create(Map params) throws StripeException {
*
* If the card’s owner has no default card, then the new card will become the default. However,
* if the owner already has a default, then it will not change. To change the default, you should
- * update the customer to have a new
- * {@code default_source}.
+ * update the customer to have a new {@code
+ * default_source}.
*/
public PaymentSource create(Map params, RequestOptions options)
throws StripeException {
@@ -49,8 +49,8 @@ public PaymentSource create(Map params, RequestOptions options)
*
* If the card’s owner has no default card, then the new card will become the default. However,
* if the owner already has a default, then it will not change. To change the default, you should
- * update the customer to have a new
- * {@code default_source}.
+ * update the customer to have a new {@code
+ * default_source}.
*/
public PaymentSource create(PaymentSourceCollectionCreateParams params) throws StripeException {
return create(params, (RequestOptions) null);
@@ -62,8 +62,8 @@ public PaymentSource create(PaymentSourceCollectionCreateParams params) throws S
*
*
If the card’s owner has no default card, then the new card will become the default. However,
* if the owner already has a default, then it will not change. To change the default, you should
- * update the customer to have a new
- * {@code default_source}.
+ * update the customer to have a new {@code
+ * default_source}.
*/
public PaymentSource create(PaymentSourceCollectionCreateParams params, RequestOptions options)
throws StripeException {
diff --git a/src/main/java/com/stripe/model/Payout.java b/src/main/java/com/stripe/model/Payout.java
index a7015e9eefc..9aded0baefb 100644
--- a/src/main/java/com/stripe/model/Payout.java
+++ b/src/main/java/com/stripe/model/Payout.java
@@ -128,8 +128,8 @@ public class Payout extends ApiResource implements MetadataStore, Balanc
String id;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
@@ -403,8 +403,8 @@ public Payout cancel(PayoutCancelParams params, RequestOptions options) throws S
*
* If you create a manual payout on a Stripe account that uses multiple payment source types,
* you need to specify the source type balance that the payout draws from. The balance object details available and
- * pending amounts by source type.
+ * href="https://stripe.com/api/balances/object">balance object details available and pending
+ * amounts by source type.
*/
public static Payout create(Map params) throws StripeException {
return create(params, (RequestOptions) null);
@@ -420,8 +420,8 @@ public static Payout create(Map params) throws StripeException {
*
* If you create a manual payout on a Stripe account that uses multiple payment source types,
* you need to specify the source type balance that the payout draws from. The balance object details available and
- * pending amounts by source type.
+ * href="https://stripe.com/api/balances/object">balance object details available and pending
+ * amounts by source type.
*/
public static Payout create(Map params, RequestOptions options)
throws StripeException {
@@ -441,8 +441,8 @@ public static Payout create(Map params, RequestOptions options)
*
* If you create a manual payout on a Stripe account that uses multiple payment source types,
* you need to specify the source type balance that the payout draws from. The balance object details available and
- * pending amounts by source type.
+ * href="https://stripe.com/api/balances/object">balance object details available and pending
+ * amounts by source type.
*/
public static Payout create(PayoutCreateParams params) throws StripeException {
return create(params, (RequestOptions) null);
@@ -458,8 +458,8 @@ public static Payout create(PayoutCreateParams params) throws StripeException {
*
*
If you create a manual payout on a Stripe account that uses multiple payment source types,
* you need to specify the source type balance that the payout draws from. The balance object details available and
- * pending amounts by source type.
+ * href="https://stripe.com/api/balances/object">balance object details available and pending
+ * amounts by source type.
*/
public static Payout create(PayoutCreateParams params, RequestOptions options)
throws StripeException {
diff --git a/src/main/java/com/stripe/model/Plan.java b/src/main/java/com/stripe/model/Plan.java
index 99a23a59c21..3276b347c69 100644
--- a/src/main/java/com/stripe/model/Plan.java
+++ b/src/main/java/com/stripe/model/Plan.java
@@ -110,8 +110,8 @@ public class Plan extends ApiResource implements HasId, MetadataStore {
Long intervalCount;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/Price.java b/src/main/java/com/stripe/model/Price.java
index 3441e837841..93179bbd85e 100644
--- a/src/main/java/com/stripe/model/Price.java
+++ b/src/main/java/com/stripe/model/Price.java
@@ -95,8 +95,8 @@ public class Price extends ApiResource implements HasId, MetadataStore {
String id;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/Product.java b/src/main/java/com/stripe/model/Product.java
index 62d297b6471..1981d9a2989 100644
--- a/src/main/java/com/stripe/model/Product.java
+++ b/src/main/java/com/stripe/model/Product.java
@@ -78,8 +78,8 @@ public class Product extends ApiResource implements HasId, MetadataStore images;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/ProductFeature.java b/src/main/java/com/stripe/model/ProductFeature.java
index 5a28860688b..25e208389ce 100644
--- a/src/main/java/com/stripe/model/ProductFeature.java
+++ b/src/main/java/com/stripe/model/ProductFeature.java
@@ -45,8 +45,8 @@ public class ProductFeature extends ApiResource implements HasId {
String id;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/PromotionCode.java b/src/main/java/com/stripe/model/PromotionCode.java
index 07257537e10..1dc8bc05a09 100644
--- a/src/main/java/com/stripe/model/PromotionCode.java
+++ b/src/main/java/com/stripe/model/PromotionCode.java
@@ -71,8 +71,8 @@ public class PromotionCode extends ApiResource implements HasId, MetadataStore {
List lines;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/QuoteLine.java b/src/main/java/com/stripe/model/QuoteLine.java
index 371937fbd56..6425e8e4b11 100644
--- a/src/main/java/com/stripe/model/QuoteLine.java
+++ b/src/main/java/com/stripe/model/QuoteLine.java
@@ -308,6 +308,10 @@ public static class AddItem extends StripeObject {
@SerializedName("trial")
Trial trial;
+ /** The ID of the trial offer to apply to the configuration item. */
+ @SerializedName("trial_offer")
+ String trialOffer;
+
/** Get ID of expandable {@code price} object. */
public String getPrice() {
return (this.price != null) ? this.price.getId() : null;
@@ -755,6 +759,10 @@ public static class SetItem extends StripeObject {
@SerializedName("trial")
Trial trial;
+ /** The ID of the trial offer to apply to the configuration item. */
+ @SerializedName("trial_offer")
+ String trialOffer;
+
/** Get ID of expandable {@code price} object. */
public String getPrice() {
return (this.price != null) ? this.price.getId() : null;
@@ -1077,8 +1085,9 @@ public static class SetPauseCollection extends StripeObject {
@EqualsAndHashCode(callSuper = false)
public static class Set extends StripeObject {
/**
- * The payment collection behavior for this subscription while paused. One of {@code
- * keep_as_draft}, {@code mark_uncollectible}, or {@code void}.
+ * The payment collection behavior for this subscription while paused.
+ *
+ * One of {@code keep_as_draft}, {@code mark_uncollectible}, or {@code void}.
*/
@SerializedName("behavior")
String behavior;
diff --git a/src/main/java/com/stripe/model/QuotePreviewInvoice.java b/src/main/java/com/stripe/model/QuotePreviewInvoice.java
index 5d211ea36ca..6e4b93cd64d 100644
--- a/src/main/java/com/stripe/model/QuotePreviewInvoice.java
+++ b/src/main/java/com/stripe/model/QuotePreviewInvoice.java
@@ -374,8 +374,8 @@ public class QuotePreviewInvoice extends ApiResource implements HasId {
InvoiceLineItemCollection lines;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
@@ -1287,8 +1287,9 @@ public void setSubscriptionObject(Subscription expandableObject) {
@EqualsAndHashCode(callSuper = false)
public static class PauseCollection extends StripeObject {
/**
- * The payment collection behavior for this subscription while paused. One of {@code
- * keep_as_draft}, {@code mark_uncollectible}, or {@code void}.
+ * The payment collection behavior for this subscription while paused.
+ *
+ *
One of {@code keep_as_draft}, {@code mark_uncollectible}, or {@code void}.
*/
@SerializedName("behavior")
String behavior;
@@ -1426,7 +1427,7 @@ public static class AcssDebit extends StripeObject {
MandateOptions mandateOptions;
/**
- * Bank account verification method.
+ * Bank account verification method. The default value is {@code automatic}.
*
*
One of {@code automatic}, {@code instant}, or {@code microdeposits}.
*/
@@ -1648,6 +1649,13 @@ public static class Pix extends StripeObject {
*/
@SerializedName("amount_includes_iof")
String amountIncludesIof;
+
+ /**
+ * The number of seconds (between 10 and 1209600) after which Pix payment will expire.
+ * Defaults to 86400 seconds.
+ */
+ @SerializedName("expires_after_seconds")
+ Long expiresAfterSeconds;
}
/**
@@ -1715,7 +1723,7 @@ public static class UsBankAccount extends StripeObject {
FinancialConnections financialConnections;
/**
- * Bank account verification method.
+ * Bank account verification method. The default value is {@code automatic}.
*
*
One of {@code automatic}, {@code instant}, or {@code microdeposits}.
*/
diff --git a/src/main/java/com/stripe/model/QuotePreviewSubscriptionSchedule.java b/src/main/java/com/stripe/model/QuotePreviewSubscriptionSchedule.java
index 07c337d4798..2e948fb2913 100644
--- a/src/main/java/com/stripe/model/QuotePreviewSubscriptionSchedule.java
+++ b/src/main/java/com/stripe/model/QuotePreviewSubscriptionSchedule.java
@@ -106,8 +106,8 @@ public class QuotePreviewSubscriptionSchedule extends ApiResource implements Has
LastPriceMigrationError lastPriceMigrationError;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
@@ -1599,6 +1599,10 @@ public static class Item extends StripeObject {
@SerializedName("trial")
Trial trial;
+ /** The ID of the trial offer to apply to the configuration item. */
+ @SerializedName("trial_offer")
+ String trialOffer;
+
/** Get ID of expandable {@code plan} object. */
public String getPlan() {
return (this.plan != null) ? this.plan.getId() : null;
@@ -1791,8 +1795,9 @@ public static class Trial extends StripeObject {
@EqualsAndHashCode(callSuper = false)
public static class PauseCollection extends StripeObject {
/**
- * The payment collection behavior for this subscription while paused. One of {@code
- * keep_as_draft}, {@code mark_uncollectible}, or {@code void}.
+ * The payment collection behavior for this subscription while paused.
+ *
+ *
One of {@code keep_as_draft}, {@code mark_uncollectible}, or {@code void}.
*/
@SerializedName("behavior")
String behavior;
diff --git a/src/main/java/com/stripe/model/Review.java b/src/main/java/com/stripe/model/Review.java
index c3487280d94..ec652c28ac5 100644
--- a/src/main/java/com/stripe/model/Review.java
+++ b/src/main/java/com/stripe/model/Review.java
@@ -68,8 +68,8 @@ public class Review extends ApiResource implements HasId {
IpAddressLocation ipAddressLocation;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/SetupAttempt.java b/src/main/java/com/stripe/model/SetupAttempt.java
index acda61f4b9d..d5e48d50c94 100644
--- a/src/main/java/com/stripe/model/SetupAttempt.java
+++ b/src/main/java/com/stripe/model/SetupAttempt.java
@@ -84,8 +84,8 @@ public class SetupAttempt extends ApiResource implements HasId {
String id;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
@@ -356,6 +356,9 @@ public static class PaymentMethodDetails extends StripeObject {
@SerializedName("type")
String type;
+ @SerializedName("upi")
+ Upi upi;
+
@SerializedName("us_bank_account")
UsBankAccount usBankAccount;
@@ -1142,6 +1145,15 @@ public void setGeneratedSepaDebitMandateObject(Mandate expandableObject) {
@EqualsAndHashCode(callSuper = false)
public static class StripeBalance extends StripeObject {}
+ /**
+ * For more details about Upi, please refer to the API
+ * Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Upi extends StripeObject {}
+
/**
* For more details about UsBankAccount, please refer to the API Reference.
diff --git a/src/main/java/com/stripe/model/SetupIntent.java b/src/main/java/com/stripe/model/SetupIntent.java
index 1d03f94012c..995dcfd7ae9 100644
--- a/src/main/java/com/stripe/model/SetupIntent.java
+++ b/src/main/java/com/stripe/model/SetupIntent.java
@@ -151,8 +151,8 @@ public class SetupIntent extends ApiResource implements HasId, MetadataStore latestAttempt;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
@@ -910,6 +910,9 @@ public static class NextAction extends StripeObject {
@SerializedName("type")
String type;
+ @SerializedName("upi_handle_redirect_or_display_qr_code")
+ UpiHandleRedirectOrDisplayQrCode upiHandleRedirectOrDisplayQrCode;
+
/**
* When confirming a SetupIntent with Stripe.js, Stripe.js depends on the contents of this
* dictionary to invoke authentication flows. The shape of the contents is subject to change and
@@ -1020,6 +1023,45 @@ public static class RedirectToUrl extends StripeObject {
String url;
}
+ /**
+ * For more details about UpiHandleRedirectOrDisplayQrCode, please refer to the API Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class UpiHandleRedirectOrDisplayQrCode extends StripeObject {
+ /**
+ * The URL to the hosted UPI instructions page, which allows customers to view the QR code.
+ */
+ @SerializedName("hosted_instructions_url")
+ String hostedInstructionsUrl;
+
+ @SerializedName("qr_code")
+ QrCode qrCode;
+
+ /**
+ * For more details about QrCode, please refer to the API Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class QrCode extends StripeObject {
+ /** The date (unix timestamp) when the QR code expires. */
+ @SerializedName("expires_at")
+ Long expiresAt;
+
+ /** The image_url_png string used to render QR code. */
+ @SerializedName("image_url_png")
+ String imageUrlPng;
+
+ /** The image_url_svg string used to render QR code. */
+ @SerializedName("image_url_svg")
+ String imageUrlSvg;
+ }
+ }
+
/**
* For more details about VerifyWithMicrodeposits, please refer to the API Reference.
@@ -1109,6 +1151,12 @@ public static class PaymentMethodOptions extends StripeObject {
@SerializedName("sepa_debit")
SepaDebit sepaDebit;
+ @SerializedName("stripe_balance")
+ StripeBalance stripeBalance;
+
+ @SerializedName("upi")
+ Upi upi;
+
@SerializedName("us_bank_account")
UsBankAccount usBankAccount;
@@ -1132,7 +1180,7 @@ public static class AcssDebit extends StripeObject {
MandateOptions mandateOptions;
/**
- * Bank account verification method.
+ * Bank account verification method. The default value is {@code automatic}.
*
* One of {@code automatic}, {@code instant}, or {@code microdeposits}.
*/
@@ -1261,7 +1309,7 @@ public static class Card extends StripeObject {
@Setter
@EqualsAndHashCode(callSuper = false)
public static class MandateOptions extends StripeObject {
- /** Amount to be charged for future payments. */
+ /** Amount to be charged for future payments, specified in the presentment currency. */
@SerializedName("amount")
Long amount;
@@ -1581,6 +1629,75 @@ public static class MandateOptions extends StripeObject {
}
}
+ /**
+ * For more details about StripeBalance, please refer to the API Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class StripeBalance extends StripeObject {
+ @SerializedName("mandate_options")
+ MandateOptions mandateOptions;
+
+ /**
+ * For more details about MandateOptions, please refer to the API Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class MandateOptions extends StripeObject {
+ /** The ID of the Stripe Balance Debit Agreement used for this mandate. */
+ @SerializedName("stripe_balance_debit_agreement")
+ String stripeBalanceDebitAgreement;
+ }
+ }
+
+ /**
+ * For more details about Upi, please refer to the API
+ * Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Upi extends StripeObject {
+ @SerializedName("mandate_options")
+ MandateOptions mandateOptions;
+
+ /**
+ * For more details about MandateOptions, please refer to the API Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class MandateOptions extends StripeObject {
+ /** Amount to be charged for future payments. */
+ @SerializedName("amount")
+ Long amount;
+
+ /**
+ * One of {@code fixed} or {@code maximum}. If {@code fixed}, the {@code amount} param
+ * refers to the exact amount to be charged in future payments. If {@code maximum}, the
+ * amount charged can be up to the value passed for the {@code amount} param.
+ */
+ @SerializedName("amount_type")
+ String amountType;
+
+ /**
+ * A description of the mandate or subscription that is meant to be displayed to the
+ * customer.
+ */
+ @SerializedName("description")
+ String description;
+
+ /** End date of the mandate or subscription. */
+ @SerializedName("end_date")
+ Long endDate;
+ }
+ }
+
/**
* For more details about UsBankAccount, please refer to the API Reference.
@@ -1596,7 +1713,7 @@ public static class UsBankAccount extends StripeObject {
MandateOptions mandateOptions;
/**
- * Bank account verification method.
+ * Bank account verification method. The default value is {@code automatic}.
*
*
One of {@code automatic}, {@code instant}, or {@code microdeposits}.
*/
diff --git a/src/main/java/com/stripe/model/ShippingRate.java b/src/main/java/com/stripe/model/ShippingRate.java
index 4615d03b48a..e3fa070698f 100644
--- a/src/main/java/com/stripe/model/ShippingRate.java
+++ b/src/main/java/com/stripe/model/ShippingRate.java
@@ -58,8 +58,8 @@ public class ShippingRate extends ApiResource implements HasId, MetadataStore, Paymen
Klarna klarna;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/SourceMandateNotification.java b/src/main/java/com/stripe/model/SourceMandateNotification.java
index 6a1c794cbb3..47cf5d94eac 100644
--- a/src/main/java/com/stripe/model/SourceMandateNotification.java
+++ b/src/main/java/com/stripe/model/SourceMandateNotification.java
@@ -39,8 +39,8 @@ public class SourceMandateNotification extends StripeObject implements HasId {
String id;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/SourceTransaction.java b/src/main/java/com/stripe/model/SourceTransaction.java
index 9d6a74069e8..01b1a8dd349 100644
--- a/src/main/java/com/stripe/model/SourceTransaction.java
+++ b/src/main/java/com/stripe/model/SourceTransaction.java
@@ -49,8 +49,8 @@ public class SourceTransaction extends StripeObject implements HasId {
String id;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/StripeError.java b/src/main/java/com/stripe/model/StripeError.java
index a8cb06991f0..e3e7ce268bb 100644
--- a/src/main/java/com/stripe/model/StripeError.java
+++ b/src/main/java/com/stripe/model/StripeError.java
@@ -96,7 +96,8 @@ public class StripeError extends StripeObject {
* refer_to_customer}, {@code refund_disputed_payment}, {@code request_blocked}, {@code
* resource_already_exists}, {@code resource_missing}, {@code return_intent_already_processed},
* {@code routing_number_invalid}, {@code secret_key_required}, {@code
- * sensitive_data_access_expired}, {@code sepa_unsupported_account}, {@code setup_attempt_failed},
+ * sensitive_data_access_expired}, {@code sepa_unsupported_account}, {@code
+ * service_period_coupon_with_metered_tiered_item_unsupported}, {@code setup_attempt_failed},
* {@code setup_intent_authentication_failure}, {@code setup_intent_invalid_parameter}, {@code
* setup_intent_mandate_invalid}, {@code setup_intent_mobile_wallet_unsupported}, {@code
* setup_intent_setup_attempt_expired}, {@code setup_intent_unexpected_state}, {@code
diff --git a/src/main/java/com/stripe/model/Subscription.java b/src/main/java/com/stripe/model/Subscription.java
index f912e581ced..e6c7e18685e 100644
--- a/src/main/java/com/stripe/model/Subscription.java
+++ b/src/main/java/com/stripe/model/Subscription.java
@@ -224,8 +224,8 @@ public class Subscription extends ApiResource implements HasId, MetadataStore latestInvoice;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
@@ -288,8 +288,8 @@ public class Subscription extends ApiResource implements HasId, MetadataStoreCreate an invoice for the
- * given subscription at the specified interval.
+ * calling Create an invoice for the given
+ * subscription at the specified interval.
*/
@SerializedName("pending_invoice_item_interval")
PendingInvoiceItemInterval pendingInvoiceItemInterval;
@@ -319,6 +319,9 @@ public class Subscription extends ApiResource implements HasId, MetadataStore objs) {
* href="https://stripe.com/metadata">metadata.
*
* Any pending invoice items that you’ve created are still charged at the end of the period,
- * unless manually deleted. If you’ve
- * set the subscription to cancel at the end of the period, any pending prorations are also left
- * in place and collected at the end of the period. But if the subscription is set to cancel
+ * unless manually deleted. If you’ve set
+ * the subscription to cancel at the end of the period, any pending prorations are also left in
+ * place and collected at the end of the period. But if the subscription is set to cancel
* immediately, pending prorations are removed if {@code invoice_now} and {@code prorate} are both
* set to true.
*
@@ -632,9 +635,9 @@ public Subscription cancel() throws StripeException {
* href="https://stripe.com/metadata">metadata.
*
*
Any pending invoice items that you’ve created are still charged at the end of the period,
- * unless manually deleted. If you’ve
- * set the subscription to cancel at the end of the period, any pending prorations are also left
- * in place and collected at the end of the period. But if the subscription is set to cancel
+ * unless manually deleted. If you’ve set
+ * the subscription to cancel at the end of the period, any pending prorations are also left in
+ * place and collected at the end of the period. But if the subscription is set to cancel
* immediately, pending prorations are removed if {@code invoice_now} and {@code prorate} are both
* set to true.
*
@@ -654,9 +657,9 @@ public Subscription cancel(Map params) throws StripeException {
* href="https://stripe.com/metadata">metadata.
*
* Any pending invoice items that you’ve created are still charged at the end of the period,
- * unless manually deleted. If you’ve
- * set the subscription to cancel at the end of the period, any pending prorations are also left
- * in place and collected at the end of the period. But if the subscription is set to cancel
+ * unless manually deleted. If you’ve set
+ * the subscription to cancel at the end of the period, any pending prorations are also left in
+ * place and collected at the end of the period. But if the subscription is set to cancel
* immediately, pending prorations are removed if {@code invoice_now} and {@code prorate} are both
* set to true.
*
@@ -680,9 +683,9 @@ public Subscription cancel(Map params, RequestOptions options)
* href="https://stripe.com/metadata">metadata.
*
* Any pending invoice items that you’ve created are still charged at the end of the period,
- * unless manually deleted. If you’ve
- * set the subscription to cancel at the end of the period, any pending prorations are also left
- * in place and collected at the end of the period. But if the subscription is set to cancel
+ * unless manually deleted. If you’ve set
+ * the subscription to cancel at the end of the period, any pending prorations are also left in
+ * place and collected at the end of the period. But if the subscription is set to cancel
* immediately, pending prorations are removed if {@code invoice_now} and {@code prorate} are both
* set to true.
*
@@ -702,9 +705,9 @@ public Subscription cancel(SubscriptionCancelParams params) throws StripeExcepti
* href="https://stripe.com/metadata">metadata.
*
*
Any pending invoice items that you’ve created are still charged at the end of the period,
- * unless manually deleted. If you’ve
- * set the subscription to cancel at the end of the period, any pending prorations are also left
- * in place and collected at the end of the period. But if the subscription is set to cancel
+ * unless manually deleted. If you’ve set
+ * the subscription to cancel at the end of the period, any pending prorations are also left in
+ * place and collected at the end of the period. But if the subscription is set to cancel
* immediately, pending prorations are removed if {@code invoice_now} and {@code prorate} are both
* set to true.
*
@@ -1618,8 +1621,8 @@ public static class CancellationDetails extends StripeObject {
/**
* Why this subscription was canceled.
*
- *
One of {@code cancellation_requested}, {@code payment_disputed}, or {@code
- * payment_failed}.
+ *
One of {@code canceled_by_retention_policy}, {@code cancellation_requested}, {@code
+ * payment_disputed}, or {@code payment_failed}.
*/
@SerializedName("reason")
String reason;
@@ -1797,8 +1800,9 @@ public static class ManagedPayments extends StripeObject {
@EqualsAndHashCode(callSuper = false)
public static class PauseCollection extends StripeObject {
/**
- * The payment collection behavior for this subscription while paused. One of {@code
- * keep_as_draft}, {@code mark_uncollectible}, or {@code void}.
+ * The payment collection behavior for this subscription while paused.
+ *
+ *
One of {@code keep_as_draft}, {@code mark_uncollectible}, or {@code void}.
*/
@SerializedName("behavior")
String behavior;
@@ -1936,7 +1940,7 @@ public static class AcssDebit extends StripeObject {
MandateOptions mandateOptions;
/**
- * Bank account verification method.
+ * Bank account verification method. The default value is {@code automatic}.
*
*
One of {@code automatic}, {@code instant}, or {@code microdeposits}.
*/
@@ -2020,7 +2024,7 @@ public static class Card extends StripeObject {
@Setter
@EqualsAndHashCode(callSuper = false)
public static class MandateOptions extends StripeObject {
- /** Amount to be charged for future payments. */
+ /** Amount to be charged for future payments, specified in the presentment currency. */
@SerializedName("amount")
Long amount;
@@ -2173,6 +2177,13 @@ public static class MandateOptions extends StripeObject {
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Pix extends StripeObject {
+ /**
+ * The number of seconds (between 10 and 1209600) after which Pix payment will expire.
+ * Defaults to 86400 seconds.
+ */
+ @SerializedName("expires_after_seconds")
+ Long expiresAfterSeconds;
+
@SerializedName("mandate_options")
MandateOptions mandateOptions;
@@ -2279,7 +2290,7 @@ public static class UsBankAccount extends StripeObject {
FinancialConnections financialConnections;
/**
- * Bank account verification method.
+ * Bank account verification method. The default value is {@code automatic}.
*
*
One of {@code automatic}, {@code instant}, or {@code microdeposits}.
*/
@@ -2457,6 +2468,19 @@ public void setInvoiceObject(Invoice expandableObject) {
}
}
+ /**
+ * For more details about PresentmentDetails, please refer to the API Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class PresentmentDetails extends StripeObject {
+ /** Currency used for customer payments. */
+ @SerializedName("presentment_currency")
+ String presentmentCurrency;
+ }
+
/**
* For more details about TransferData, please refer to the API Reference.
@@ -2512,6 +2536,15 @@ public static class TrialSettings extends StripeObject {
@Setter
@EqualsAndHashCode(callSuper = false)
public static class EndBehavior extends StripeObject {
+ /**
+ * Indicates how the subscription's billing cycle anchor is reset when a trial ends. If not
+ * set, the default is {@code now}.
+ *
+ *
One of {@code now}, or {@code unchanged}.
+ */
+ @SerializedName("billing_cycle_anchor")
+ String billingCycleAnchor;
+
/**
* Indicates how the subscription should change when the trial ends if the user did not
* provide a payment method.
@@ -2547,6 +2580,7 @@ public void setResponseGetter(StripeResponseGetter responseGetter) {
trySetResponseGetter(pendingSetupIntent, responseGetter);
trySetResponseGetter(pendingUpdate, responseGetter);
trySetResponseGetter(prebilling, responseGetter);
+ trySetResponseGetter(presentmentDetails, responseGetter);
trySetResponseGetter(schedule, responseGetter);
trySetResponseGetter(testClock, responseGetter);
trySetResponseGetter(transferData, responseGetter);
diff --git a/src/main/java/com/stripe/model/SubscriptionItem.java b/src/main/java/com/stripe/model/SubscriptionItem.java
index 93d42eac77e..553863129f2 100644
--- a/src/main/java/com/stripe/model/SubscriptionItem.java
+++ b/src/main/java/com/stripe/model/SubscriptionItem.java
@@ -53,6 +53,10 @@ public class SubscriptionItem extends ApiResource
@SerializedName("current_period_start")
Long currentPeriodStart;
+ /** The current trial that is applied to this subscription item. */
+ @SerializedName("current_trial")
+ CurrentTrial currentTrial;
+
/** Always true for a deleted object. */
@SerializedName("deleted")
Boolean deleted;
@@ -408,6 +412,21 @@ public static class BillingThresholds extends StripeObject {
Long usageGte;
}
+ /** The current trial attached to the subscription item. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class CurrentTrial extends StripeObject {
+ @SerializedName("end_date")
+ Long endDate;
+
+ @SerializedName("start_date")
+ Long startDate;
+
+ @SerializedName("trial_offer")
+ String trialOffer;
+ }
+
/**
* For more details about Trial, please refer to the API
* Reference.
@@ -436,6 +455,7 @@ public static class Trial extends StripeObject {
public void setResponseGetter(StripeResponseGetter responseGetter) {
super.setResponseGetter(responseGetter);
trySetResponseGetter(billingThresholds, responseGetter);
+ trySetResponseGetter(currentTrial, responseGetter);
trySetResponseGetter(plan, responseGetter);
trySetResponseGetter(price, responseGetter);
trySetResponseGetter(trial, responseGetter);
diff --git a/src/main/java/com/stripe/model/SubscriptionSchedule.java b/src/main/java/com/stripe/model/SubscriptionSchedule.java
index 38ef2cbdb2f..5ae0076faf9 100644
--- a/src/main/java/com/stripe/model/SubscriptionSchedule.java
+++ b/src/main/java/com/stripe/model/SubscriptionSchedule.java
@@ -118,8 +118,8 @@ public class SubscriptionSchedule extends ApiResource
LastPriceMigrationError lastPriceMigrationError;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
@@ -1913,6 +1913,10 @@ public static class Item extends StripeObject {
@SerializedName("trial")
Trial trial;
+ /** The ID of the trial offer to apply to the configuration item. */
+ @SerializedName("trial_offer")
+ String trialOffer;
+
/** Get ID of expandable {@code plan} object. */
public String getPlan() {
return (this.plan != null) ? this.plan.getId() : null;
@@ -2105,8 +2109,9 @@ public static class Trial extends StripeObject {
@EqualsAndHashCode(callSuper = false)
public static class PauseCollection extends StripeObject {
/**
- * The payment collection behavior for this subscription while paused. One of {@code
- * keep_as_draft}, {@code mark_uncollectible}, or {@code void}.
+ * The payment collection behavior for this subscription while paused.
+ *
+ *
One of {@code keep_as_draft}, {@code mark_uncollectible}, or {@code void}.
*/
@SerializedName("behavior")
String behavior;
diff --git a/src/main/java/com/stripe/model/TaxCode.java b/src/main/java/com/stripe/model/TaxCode.java
index 0d2f8b945f6..8bd65c97281 100644
--- a/src/main/java/com/stripe/model/TaxCode.java
+++ b/src/main/java/com/stripe/model/TaxCode.java
@@ -8,6 +8,7 @@
import com.stripe.net.ApiResource;
import com.stripe.net.BaseAddress;
import com.stripe.net.RequestOptions;
+import com.stripe.net.StripeResponseGetter;
import com.stripe.param.TaxCodeListParams;
import com.stripe.param.TaxCodeRetrieveParams;
import java.util.Map;
@@ -44,6 +45,14 @@ public class TaxCode extends ApiResource implements HasId {
@SerializedName("object")
String object;
+ /**
+ * An object that describes more information about the tax location required for this tax code.
+ * Some tax
+ * codes require a tax location of type {@code performance} to calculate tax correctly.
+ */
+ @SerializedName("requirements")
+ Requirements requirements;
+
/**
* A list of all tax codes available to
* add to Products in order to allow specific tax calculations.
@@ -135,4 +144,28 @@ public static TaxCode retrieve(String id, TaxCodeRetrieveParams params, RequestO
options);
return getGlobalResponseGetter().request(request, TaxCode.class);
}
+
+ /**
+ * For more details about Requirements, please refer to the API Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Requirements extends StripeObject {
+ /**
+ * Describes whether a performance location is required for a successful tax calculation with a
+ * tax code.
+ *
+ *
One of {@code optional}, or {@code required}.
+ */
+ @SerializedName("performance_location")
+ String performanceLocation;
+ }
+
+ @Override
+ public void setResponseGetter(StripeResponseGetter responseGetter) {
+ super.setResponseGetter(responseGetter);
+ trySetResponseGetter(requirements, responseGetter);
+ }
}
diff --git a/src/main/java/com/stripe/model/TaxId.java b/src/main/java/com/stripe/model/TaxId.java
index 7dbecfd4452..d21285fdced 100644
--- a/src/main/java/com/stripe/model/TaxId.java
+++ b/src/main/java/com/stripe/model/TaxId.java
@@ -58,8 +58,8 @@ public class TaxId extends ApiResource implements HasId {
String id;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/TaxRate.java b/src/main/java/com/stripe/model/TaxRate.java
index af094958079..72799fe33e5 100644
--- a/src/main/java/com/stripe/model/TaxRate.java
+++ b/src/main/java/com/stripe/model/TaxRate.java
@@ -108,8 +108,8 @@ public class TaxRate extends ApiResource implements HasId, MetadataStore, BalanceT
/**
* Error code explaining reason for top-up failure if available (see the errors section for a list of codes).
+ * href="https://stripe.com/api/errors">the errors section for a list of codes).
*/
@SerializedName("failure_code")
String failureCode;
@@ -82,8 +82,8 @@ public class Topup extends ApiResource implements MetadataStore, BalanceT
String id;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/Transfer.java b/src/main/java/com/stripe/model/Transfer.java
index 466c0690a81..5ef61c6eb30 100644
--- a/src/main/java/com/stripe/model/Transfer.java
+++ b/src/main/java/com/stripe/model/Transfer.java
@@ -94,8 +94,8 @@ public class Transfer extends ApiResource
String id;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/WebhookEndpoint.java b/src/main/java/com/stripe/model/WebhookEndpoint.java
index 71157bb11f3..4ae148715a9 100644
--- a/src/main/java/com/stripe/model/WebhookEndpoint.java
+++ b/src/main/java/com/stripe/model/WebhookEndpoint.java
@@ -65,8 +65,8 @@ public class WebhookEndpoint extends ApiResource implements HasId, MetadataStore
String id;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/apps/Secret.java b/src/main/java/com/stripe/model/apps/Secret.java
index 66e91925646..72a3e98dc19 100644
--- a/src/main/java/com/stripe/model/apps/Secret.java
+++ b/src/main/java/com/stripe/model/apps/Secret.java
@@ -60,8 +60,8 @@ public class Secret extends ApiResource implements HasId {
String id;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/billing/Alert.java b/src/main/java/com/stripe/model/billing/Alert.java
index 437bee7c5a4..ec0f04e7b9e 100644
--- a/src/main/java/com/stripe/model/billing/Alert.java
+++ b/src/main/java/com/stripe/model/billing/Alert.java
@@ -48,8 +48,8 @@ public class Alert extends ApiResource implements HasId {
String id;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/billing/AlertTriggered.java b/src/main/java/com/stripe/model/billing/AlertTriggered.java
index b7475411035..a2f4b736a66 100644
--- a/src/main/java/com/stripe/model/billing/AlertTriggered.java
+++ b/src/main/java/com/stripe/model/billing/AlertTriggered.java
@@ -29,8 +29,8 @@ public class AlertTriggered extends StripeObject {
String customer;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/billing/CreditBalanceSummary.java b/src/main/java/com/stripe/model/billing/CreditBalanceSummary.java
index 3a6ba11a814..a4639382c79 100644
--- a/src/main/java/com/stripe/model/billing/CreditBalanceSummary.java
+++ b/src/main/java/com/stripe/model/billing/CreditBalanceSummary.java
@@ -42,8 +42,8 @@ public class CreditBalanceSummary extends ApiResource {
String customerAccount;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/billing/CreditBalanceTransaction.java b/src/main/java/com/stripe/model/billing/CreditBalanceTransaction.java
index 03364483471..dff06b1f5ee 100644
--- a/src/main/java/com/stripe/model/billing/CreditBalanceTransaction.java
+++ b/src/main/java/com/stripe/model/billing/CreditBalanceTransaction.java
@@ -57,8 +57,8 @@ public class CreditBalanceTransaction extends ApiResource implements HasId {
String id;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/billing/CreditGrant.java b/src/main/java/com/stripe/model/billing/CreditGrant.java
index f7475e96231..383ceb6d43c 100644
--- a/src/main/java/com/stripe/model/billing/CreditGrant.java
+++ b/src/main/java/com/stripe/model/billing/CreditGrant.java
@@ -82,8 +82,8 @@ public class CreditGrant extends ApiResource implements HasId, MetadataStoreOne of {@code custom}, {@code embedded}, or {@code hosted}.
+ * One of {@code elements}, {@code embedded_page}, {@code form}, or {@code hosted_page}.
*/
@SerializedName("ui_mode")
String uiMode;
@@ -2170,6 +2177,9 @@ public static class PaymentMethodOptions extends StripeObject {
@SerializedName("twint")
Twint twint;
+ @SerializedName("upi")
+ Upi upi;
+
@SerializedName("us_bank_account")
UsBankAccount usBankAccount;
@@ -2225,7 +2235,7 @@ public static class AcssDebit extends StripeObject {
String targetDate;
/**
- * Bank account verification method.
+ * Bank account verification method. The default value is {@code automatic}.
*
*
One of {@code automatic}, {@code instant}, or {@code microdeposits}.
*/
@@ -4038,6 +4048,74 @@ public static class Twint extends StripeObject {
String setupFutureUsage;
}
+ /**
+ * For more details about Upi, please refer to the API
+ * Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Upi extends StripeObject {
+ @SerializedName("mandate_options")
+ MandateOptions mandateOptions;
+
+ /**
+ * Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ *
+ *
If you provide a Customer with the PaymentIntent, you can use this parameter to attach the payment method to the
+ * Customer after the PaymentIntent is confirmed and the customer completes any required
+ * actions. If you don't provide a Customer, you can still attach the payment method to a
+ * Customer after the transaction completes.
+ *
+ *
If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
+ * and attaches a generated_card
+ * payment method representing the card to the Customer instead.
+ *
+ *
When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
+ * with regional legislation and network rules, such as SCA.
+ *
+ *
One of {@code none}, {@code off_session}, or {@code on_session}.
+ */
+ @SerializedName("setup_future_usage")
+ String setupFutureUsage;
+
+ /**
+ * For more details about MandateOptions, please refer to the API Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class MandateOptions extends StripeObject {
+ /** Amount to be charged for future payments. */
+ @SerializedName("amount")
+ Long amount;
+
+ /**
+ * One of {@code fixed} or {@code maximum}. If {@code fixed}, the {@code amount} param
+ * refers to the exact amount to be charged in future payments. If {@code maximum}, the
+ * amount charged can be up to the value passed for the {@code amount} param.
+ */
+ @SerializedName("amount_type")
+ String amountType;
+
+ /**
+ * A description of the mandate or subscription that is meant to be displayed to the
+ * customer.
+ */
+ @SerializedName("description")
+ String description;
+
+ /** End date of the mandate or subscription. */
+ @SerializedName("end_date")
+ Long endDate;
+ }
+ }
+
/**
* For more details about UsBankAccount, please refer to the API Reference.
@@ -4082,7 +4160,7 @@ public static class UsBankAccount extends StripeObject {
String targetDate;
/**
- * Bank account verification method.
+ * Bank account verification method. The default value is {@code automatic}.
*
*
One of {@code automatic}, or {@code instant}.
*/
diff --git a/src/main/java/com/stripe/model/climate/Supplier.java b/src/main/java/com/stripe/model/climate/Supplier.java
index c83382ccbf1..2403d5ad3ca 100644
--- a/src/main/java/com/stripe/model/climate/Supplier.java
+++ b/src/main/java/com/stripe/model/climate/Supplier.java
@@ -59,8 +59,8 @@ public class Supplier extends ApiResource implements HasId {
/**
* The scientific pathway used for carbon removal.
*
- *
One of {@code biomass_carbon_removal_and_storage}, {@code direct_air_capture}, or {@code
- * enhanced_weathering}.
+ *
One of {@code biomass_carbon_removal_and_storage}, {@code direct_air_capture}, {@code
+ * enhanced_weathering}, or {@code marine_carbon_removal}.
*/
@SerializedName("removal_pathway")
String removalPathway;
diff --git a/src/main/java/com/stripe/model/entitlements/ActiveEntitlement.java b/src/main/java/com/stripe/model/entitlements/ActiveEntitlement.java
index c8a5182648e..818cc808316 100644
--- a/src/main/java/com/stripe/model/entitlements/ActiveEntitlement.java
+++ b/src/main/java/com/stripe/model/entitlements/ActiveEntitlement.java
@@ -38,8 +38,8 @@ public class ActiveEntitlement extends ApiResource implements HasId {
String id;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/entitlements/ActiveEntitlementSummary.java b/src/main/java/com/stripe/model/entitlements/ActiveEntitlementSummary.java
index ea98118e538..111f2efad8b 100644
--- a/src/main/java/com/stripe/model/entitlements/ActiveEntitlementSummary.java
+++ b/src/main/java/com/stripe/model/entitlements/ActiveEntitlementSummary.java
@@ -21,8 +21,8 @@ public class ActiveEntitlementSummary extends StripeObject {
ActiveEntitlementCollection entitlements;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/entitlements/Feature.java b/src/main/java/com/stripe/model/entitlements/Feature.java
index b6caf0e5936..4abcd771a4c 100644
--- a/src/main/java/com/stripe/model/entitlements/Feature.java
+++ b/src/main/java/com/stripe/model/entitlements/Feature.java
@@ -41,8 +41,8 @@ public class Feature extends ApiResource implements HasId, MetadataStoreOne of {@code hosted}, or {@code modal}.
+ */
+ @SerializedName("ui_mode")
+ String uiMode;
+
+ /**
+ * The hosted URL for this Session. Redirect customers to this URL to take them to the hosted
+ * authentication flow. This value is only present when the Session is active and the {@code
+ * ui_mode} is {@code hosted}.
+ */
+ @SerializedName("url")
+ String url;
+
/**
* To launch the Financial Connections authorization flow, create a {@code Session}. The session’s
* {@code client_secret} can be used to launch the flow using Stripe.js.
@@ -284,6 +304,31 @@ public static class Filters extends StripeObject {
String institution;
}
+ /**
+ * For more details about Hosted, please refer to the API
+ * Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Hosted extends StripeObject {
+ /**
+ * How the user enters the hosted flow. You can only use the values {@code email} and {@code
+ * url} if you provide {@code relink_options}.
+ *
+ * One of {@code email}, or {@code url}.
+ */
+ @SerializedName("delivery_method")
+ String deliveryMethod;
+
+ /**
+ * The URL to redirect your customer back to after they link their accounts or cancel this
+ * Session. This parameter is required if {@code ui_mode} is {@code hosted}.
+ */
+ @SerializedName("return_url")
+ String returnUrl;
+ }
+
/**
* For more details about Limits, please refer to the API
* Reference.
@@ -388,6 +433,7 @@ public void setResponseGetter(StripeResponseGetter responseGetter) {
trySetResponseGetter(accountHolder, responseGetter);
trySetResponseGetter(accounts, responseGetter);
trySetResponseGetter(filters, responseGetter);
+ trySetResponseGetter(hosted, responseGetter);
trySetResponseGetter(limits, responseGetter);
trySetResponseGetter(manualEntry, responseGetter);
trySetResponseGetter(relinkOptions, responseGetter);
diff --git a/src/main/java/com/stripe/model/financialconnections/Transaction.java b/src/main/java/com/stripe/model/financialconnections/Transaction.java
index 0a32c7602cf..42003552cc8 100644
--- a/src/main/java/com/stripe/model/financialconnections/Transaction.java
+++ b/src/main/java/com/stripe/model/financialconnections/Transaction.java
@@ -50,8 +50,8 @@ public class Transaction extends ApiResource implements HasId {
String id;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/forwarding/Request.java b/src/main/java/com/stripe/model/forwarding/Request.java
index 383e5b894b3..c11e24fef09 100644
--- a/src/main/java/com/stripe/model/forwarding/Request.java
+++ b/src/main/java/com/stripe/model/forwarding/Request.java
@@ -53,8 +53,8 @@ public class Request extends ApiResource implements HasId {
String id;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/identity/VerificationReport.java b/src/main/java/com/stripe/model/identity/VerificationReport.java
index 229981621fb..d4137fffd35 100644
--- a/src/main/java/com/stripe/model/identity/VerificationReport.java
+++ b/src/main/java/com/stripe/model/identity/VerificationReport.java
@@ -69,8 +69,8 @@ public class VerificationReport extends ApiResource implements HasId {
IdNumber idNumber;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/identity/VerificationSession.java b/src/main/java/com/stripe/model/identity/VerificationSession.java
index c685348a47c..78e04f1cb34 100644
--- a/src/main/java/com/stripe/model/identity/VerificationSession.java
+++ b/src/main/java/com/stripe/model/identity/VerificationSession.java
@@ -91,8 +91,8 @@ public class VerificationSession extends ApiResource
ExpandableField lastVerificationReport;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/issuing/Authorization.java b/src/main/java/com/stripe/model/issuing/Authorization.java
index 80c1efef7f7..de680af9e89 100644
--- a/src/main/java/com/stripe/model/issuing/Authorization.java
+++ b/src/main/java/com/stripe/model/issuing/Authorization.java
@@ -130,8 +130,8 @@ public class Authorization extends ApiResource
String id;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/issuing/Card.java b/src/main/java/com/stripe/model/issuing/Card.java
index 0b4eca67064..e66d781f222 100644
--- a/src/main/java/com/stripe/model/issuing/Card.java
+++ b/src/main/java/com/stripe/model/issuing/Card.java
@@ -112,8 +112,16 @@ public class Card extends ApiResource implements HasId, MetadataStore {
LatestFraudWarning latestFraudWarning;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * Rules that control the lifecycle of this card, such as automatic cancellation. Refer to our documentation for more
+ * details.
+ */
+ @SerializedName("lifecycle_controls")
+ LifecycleControls lifecycleControls;
+
+ /**
+ * 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;
@@ -443,6 +451,35 @@ public static class LatestFraudWarning extends StripeObject {
String type;
}
+ /**
+ * For more details about LifecycleControls, please refer to the API Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class LifecycleControls extends StripeObject {
+ @SerializedName("cancel_after")
+ CancelAfter cancelAfter;
+
+ /**
+ * For more details about CancelAfter, please refer to the API Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class CancelAfter extends StripeObject {
+ /**
+ * The card is automatically cancelled when it makes this number of non-zero payment
+ * authorizations and transactions. The count includes penny authorizations, but doesn't
+ * include non-payment actions, such as authorization advice.
+ */
+ @SerializedName("payment_count")
+ Long paymentCount;
+ }
+ }
+
/**
* For more details about Shipping, please refer to the API
* Reference.
@@ -1073,6 +1110,7 @@ public void setResponseGetter(StripeResponseGetter responseGetter) {
super.setResponseGetter(responseGetter);
trySetResponseGetter(cardholder, responseGetter);
trySetResponseGetter(latestFraudWarning, responseGetter);
+ trySetResponseGetter(lifecycleControls, responseGetter);
trySetResponseGetter(personalizationDesign, responseGetter);
trySetResponseGetter(replacedBy, responseGetter);
trySetResponseGetter(replacementFor, responseGetter);
diff --git a/src/main/java/com/stripe/model/issuing/Cardholder.java b/src/main/java/com/stripe/model/issuing/Cardholder.java
index 6c0c016ee23..d7890fa03ba 100644
--- a/src/main/java/com/stripe/model/issuing/Cardholder.java
+++ b/src/main/java/com/stripe/model/issuing/Cardholder.java
@@ -62,8 +62,8 @@ public class Cardholder extends ApiResource implements HasId, MetadataStore3D Secure flow and one-time password
- * messages sent to the cardholder.
+ * da}, {@code de}, {@code en}, {@code es}, {@code fr}, {@code it}, {@code pl}, or {@code sv}.
+ * This changes the language of the 3D Secure
+ * flow and one-time password messages sent to the cardholder.
*/
@SerializedName("preferred_locales")
List preferredLocales;
diff --git a/src/main/java/com/stripe/model/issuing/CreditUnderwritingRecord.java b/src/main/java/com/stripe/model/issuing/CreditUnderwritingRecord.java
index 7391e4a1c7e..52cc3473e87 100644
--- a/src/main/java/com/stripe/model/issuing/CreditUnderwritingRecord.java
+++ b/src/main/java/com/stripe/model/issuing/CreditUnderwritingRecord.java
@@ -77,8 +77,8 @@ public class CreditUnderwritingRecord extends ApiResource implements HasId {
String id;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/issuing/Dispute.java b/src/main/java/com/stripe/model/issuing/Dispute.java
index bc636afb9f9..af54b62f4d1 100644
--- a/src/main/java/com/stripe/model/issuing/Dispute.java
+++ b/src/main/java/com/stripe/model/issuing/Dispute.java
@@ -67,8 +67,8 @@ public class Dispute extends ApiResource
String id;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/issuing/DisputeSettlementDetail.java b/src/main/java/com/stripe/model/issuing/DisputeSettlementDetail.java
index e4a07cdf8c4..601422aee02 100644
--- a/src/main/java/com/stripe/model/issuing/DisputeSettlementDetail.java
+++ b/src/main/java/com/stripe/model/issuing/DisputeSettlementDetail.java
@@ -69,8 +69,8 @@ public class DisputeSettlementDetail extends ApiResource implements HasId {
String id;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/issuing/FraudLiabilityDebit.java b/src/main/java/com/stripe/model/issuing/FraudLiabilityDebit.java
index f9ecf08114e..3c642e8b52f 100644
--- a/src/main/java/com/stripe/model/issuing/FraudLiabilityDebit.java
+++ b/src/main/java/com/stripe/model/issuing/FraudLiabilityDebit.java
@@ -65,8 +65,8 @@ public class FraudLiabilityDebit extends ApiResource implements HasId {
String id;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/issuing/PersonalizationDesign.java b/src/main/java/com/stripe/model/issuing/PersonalizationDesign.java
index ae1297192a1..a0c46dd064d 100644
--- a/src/main/java/com/stripe/model/issuing/PersonalizationDesign.java
+++ b/src/main/java/com/stripe/model/issuing/PersonalizationDesign.java
@@ -59,8 +59,8 @@ public class PersonalizationDesign extends ApiResource
String id;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/issuing/PhysicalBundle.java b/src/main/java/com/stripe/model/issuing/PhysicalBundle.java
index 221a45dc9cf..3bbc262500b 100644
--- a/src/main/java/com/stripe/model/issuing/PhysicalBundle.java
+++ b/src/main/java/com/stripe/model/issuing/PhysicalBundle.java
@@ -35,8 +35,8 @@ public class PhysicalBundle extends ApiResource implements HasId {
String id;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/issuing/Settlement.java b/src/main/java/com/stripe/model/issuing/Settlement.java
index c08c585ce15..45753911501 100644
--- a/src/main/java/com/stripe/model/issuing/Settlement.java
+++ b/src/main/java/com/stripe/model/issuing/Settlement.java
@@ -47,8 +47,8 @@ public class Settlement extends StripeObject implements HasId {
Long interchangeFeesAmount;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/issuing/Token.java b/src/main/java/com/stripe/model/issuing/Token.java
index 6dee449d600..a81c6e63a62 100644
--- a/src/main/java/com/stripe/model/issuing/Token.java
+++ b/src/main/java/com/stripe/model/issuing/Token.java
@@ -55,8 +55,8 @@ public class Token extends ApiResource implements HasId {
String last4;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/issuing/Transaction.java b/src/main/java/com/stripe/model/issuing/Transaction.java
index f998985c23b..1b0011a27a6 100644
--- a/src/main/java/com/stripe/model/issuing/Transaction.java
+++ b/src/main/java/com/stripe/model/issuing/Transaction.java
@@ -105,8 +105,8 @@ public class Transaction extends ApiResource
String id;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/privacy/RedactionJob.java b/src/main/java/com/stripe/model/privacy/RedactionJob.java
index 3377a36e1c4..d9cfd6f547e 100644
--- a/src/main/java/com/stripe/model/privacy/RedactionJob.java
+++ b/src/main/java/com/stripe/model/privacy/RedactionJob.java
@@ -43,8 +43,8 @@ public class RedactionJob extends ApiResource implements HasId {
String id;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/productcatalog/TrialOffer.java b/src/main/java/com/stripe/model/productcatalog/TrialOffer.java
new file mode 100644
index 00000000000..1c6a9403b53
--- /dev/null
+++ b/src/main/java/com/stripe/model/productcatalog/TrialOffer.java
@@ -0,0 +1,191 @@
+// File generated from our OpenAPI spec
+package com.stripe.model.productcatalog;
+
+import com.google.gson.annotations.SerializedName;
+import com.stripe.exception.StripeException;
+import com.stripe.model.ExpandableField;
+import com.stripe.model.HasId;
+import com.stripe.model.Price;
+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.productcatalog.TrialOfferCreateParams;
+import java.util.Map;
+import lombok.EqualsAndHashCode;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * Resource for the TrialOffer API, used to describe a subscription item's trial period settings.
+ * Renders a TrialOffer object that describes the price, duration, end_behavior of a trial offer.
+ */
+@Getter
+@Setter
+@EqualsAndHashCode(callSuper = false)
+public class TrialOffer extends ApiResource implements HasId {
+ @SerializedName("duration")
+ Duration duration;
+
+ @SerializedName("end_behavior")
+ EndBehavior endBehavior;
+
+ /** 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;
+
+ /** A brief, user-friendly name for the trial offer-for identification purposes. */
+ @SerializedName("name")
+ String name;
+
+ /**
+ * String representing the object's type. Objects of the same type share the same value.
+ *
+ * Equal to {@code product_catalog.trial_offer}.
+ */
+ @SerializedName("object")
+ String object;
+
+ /** The price during the trial offer. */
+ @SerializedName("price")
+ @Getter(lombok.AccessLevel.NONE)
+ @Setter(lombok.AccessLevel.NONE)
+ ExpandableField price;
+
+ /** Get ID of expandable {@code price} object. */
+ public String getPrice() {
+ return (this.price != null) ? this.price.getId() : null;
+ }
+
+ public void setPrice(String id) {
+ this.price = ApiResource.setExpandableFieldId(id, this.price);
+ }
+
+ /** Get expanded {@code price}. */
+ public Price getPriceObject() {
+ return (this.price != null) ? this.price.getExpanded() : null;
+ }
+
+ public void setPriceObject(Price expandableObject) {
+ this.price = new ExpandableField(expandableObject.getId(), expandableObject);
+ }
+
+ /** Creates a trial offer. */
+ public static TrialOffer create(Map params) throws StripeException {
+ return create(params, (RequestOptions) null);
+ }
+
+ /** Creates a trial offer. */
+ public static TrialOffer create(Map params, RequestOptions options)
+ throws StripeException {
+ String path = "/v1/product_catalog/trial_offers";
+ ApiRequest request =
+ new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, params, options);
+ return getGlobalResponseGetter().request(request, TrialOffer.class);
+ }
+
+ /** Creates a trial offer. */
+ public static TrialOffer create(TrialOfferCreateParams params) throws StripeException {
+ return create(params, (RequestOptions) null);
+ }
+
+ /** Creates a trial offer. */
+ public static TrialOffer create(TrialOfferCreateParams params, RequestOptions options)
+ throws StripeException {
+ String path = "/v1/product_catalog/trial_offers";
+ ApiResource.checkNullTypedParams(path, params);
+ ApiRequest request =
+ new ApiRequest(
+ BaseAddress.API,
+ ApiResource.RequestMethod.POST,
+ path,
+ ApiRequestParams.paramsToMap(params),
+ options);
+ return getGlobalResponseGetter().request(request, TrialOffer.class);
+ }
+
+ /**
+ * For more details about Duration, please refer to the API
+ * Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Duration extends StripeObject {
+ @SerializedName("relative")
+ Relative relative;
+
+ /**
+ * The type of trial offer duration.
+ *
+ * One of {@code relative}, or {@code timestamp}.
+ */
+ @SerializedName("type")
+ String type;
+
+ /**
+ * For more details about Relative, please refer to the API Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Relative extends StripeObject {
+ /** The number of iterations of the price's interval for this trial offer. */
+ @SerializedName("iterations")
+ Long iterations;
+ }
+ }
+
+ /**
+ * For more details about EndBehavior, please refer to the API Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class EndBehavior extends StripeObject {
+ @SerializedName("transition")
+ Transition transition;
+
+ /**
+ * The type of behavior when the trial offer ends.
+ *
+ *
Equal to {@code transition}.
+ */
+ @SerializedName("type")
+ String type;
+
+ /**
+ * For more details about Transition, please refer to the API Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Transition extends StripeObject {
+ /** The new price to use at the end of the trial offer period. */
+ @SerializedName("price")
+ String price;
+ }
+ }
+
+ @Override
+ public void setResponseGetter(StripeResponseGetter responseGetter) {
+ super.setResponseGetter(responseGetter);
+ trySetResponseGetter(duration, responseGetter);
+ trySetResponseGetter(endBehavior, responseGetter);
+ trySetResponseGetter(price, responseGetter);
+ }
+}
diff --git a/src/main/java/com/stripe/model/radar/EarlyFraudWarning.java b/src/main/java/com/stripe/model/radar/EarlyFraudWarning.java
index 1ab2f5c3742..97999d7a9ce 100644
--- a/src/main/java/com/stripe/model/radar/EarlyFraudWarning.java
+++ b/src/main/java/com/stripe/model/radar/EarlyFraudWarning.java
@@ -63,8 +63,8 @@ public class EarlyFraudWarning extends ApiResource implements HasId {
String id;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/radar/PaymentEvaluation.java b/src/main/java/com/stripe/model/radar/PaymentEvaluation.java
index a6ce1803aee..bc881239003 100644
--- a/src/main/java/com/stripe/model/radar/PaymentEvaluation.java
+++ b/src/main/java/com/stripe/model/radar/PaymentEvaluation.java
@@ -14,6 +14,7 @@
import com.stripe.net.RequestOptions;
import com.stripe.net.StripeResponseGetter;
import com.stripe.param.radar.PaymentEvaluationCreateParams;
+import java.math.BigDecimal;
import java.util.List;
import java.util.Map;
import lombok.EqualsAndHashCode;
@@ -54,13 +55,9 @@ public class PaymentEvaluation extends ApiResource implements HasId {
@SerializedName("id")
String id;
- /** Collection of scores and insights for this payment evaluation. */
- @SerializedName("insights")
- Insights insights;
-
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
@@ -89,6 +86,19 @@ public class PaymentEvaluation extends ApiResource implements HasId {
@SerializedName("payment_details")
PaymentDetails paymentDetails;
+ /**
+ * Recommended action based on the score of the fraudulent_payment signal. Possible values are
+ * {@code block} and {@code continue}.
+ *
+ *
One of {@code block}, or {@code continue}.
+ */
+ @SerializedName("recommended_action")
+ String recommendedAction;
+
+ /** Collection of signals for this payment evaluation. */
+ @SerializedName("signals")
+ Signals signals;
+
/**
* Request a Radar API fraud risk score from Stripe for a payment before sending it for external
* processor authorization.
@@ -349,42 +359,6 @@ public static class UserInterventionResolved extends StripeObject {
}
}
- /** Collection of scores and insights for this payment evaluation. */
- @Getter
- @Setter
- @EqualsAndHashCode(callSuper = false)
- public static class Insights extends StripeObject {
- /** The timestamp when the evaluation was performed. */
- @SerializedName("evaluated_at")
- Long evaluatedAt;
-
- /** Scores, insights and recommended action for one scorer for this PaymentEvaluation. */
- @SerializedName("fraudulent_dispute")
- FraudulentDispute fraudulentDispute;
-
- /** Scores, insights and recommended action for one scorer for this PaymentEvaluation. */
- @Getter
- @Setter
- @EqualsAndHashCode(callSuper = false)
- public static class FraudulentDispute extends StripeObject {
- /**
- * Recommended action based on the risk score. Possible values are {@code block} and {@code
- * continue}.
- *
- *
One of {@code block}, or {@code continue}.
- */
- @SerializedName("recommended_action")
- String recommendedAction;
-
- /**
- * Stripe Radar’s evaluation of the risk level of the payment. Possible values for evaluated
- * payments are between 0 and 100, with higher scores indicating higher risk.
- */
- @SerializedName("risk_score")
- Long riskScore;
- }
- }
-
/** Outcome details for this payment evaluation. */
@Getter
@Setter
@@ -757,13 +731,49 @@ public static class Address extends StripeObject {
}
}
+ /** Collection of signals for this payment evaluation. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Signals extends StripeObject {
+ /** A payment evaluation signal with evaluated_at, risk_level, and score fields. */
+ @SerializedName("fraudulent_payment")
+ FraudulentPayment fraudulentPayment;
+
+ /** A payment evaluation signal with evaluated_at, risk_level, and score fields. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class FraudulentPayment extends StripeObject {
+ /** The time when this signal was evaluated. */
+ @SerializedName("evaluated_at")
+ Long evaluatedAt;
+
+ /**
+ * Risk level of this signal, based on the score.
+ *
+ *
One of {@code elevated}, {@code highest}, or {@code normal}.
+ */
+ @SerializedName("risk_level")
+ String riskLevel;
+
+ /**
+ * Score for this insight. Possible values for evaluated payments are -1 and any value between
+ * 0 and 100. The value is returned with two decimal places. A score of -1 indicates a test
+ * integration and higher scores indicate a higher likelihood of the signal being true.
+ */
+ @SerializedName("score")
+ BigDecimal score;
+ }
+ }
+
@Override
public void setResponseGetter(StripeResponseGetter responseGetter) {
super.setResponseGetter(responseGetter);
trySetResponseGetter(clientDeviceMetadataDetails, responseGetter);
trySetResponseGetter(customerDetails, responseGetter);
- trySetResponseGetter(insights, responseGetter);
trySetResponseGetter(outcome, responseGetter);
trySetResponseGetter(paymentDetails, responseGetter);
+ trySetResponseGetter(signals, responseGetter);
}
}
diff --git a/src/main/java/com/stripe/model/radar/ValueList.java b/src/main/java/com/stripe/model/radar/ValueList.java
index cc1ad900b1c..0e560494d20 100644
--- a/src/main/java/com/stripe/model/radar/ValueList.java
+++ b/src/main/java/com/stripe/model/radar/ValueList.java
@@ -53,8 +53,9 @@ public class ValueList extends ApiResource implements HasId, MetadataStoresmallest currency unit.
+ * href="https://docs.stripe.com/currencies#minor-units">smallest currency unit.
*/
@SerializedName("amount_total")
Long amountTotal;
@@ -68,8 +68,8 @@ public class Calculation extends ApiResource implements HasId {
CalculationLineItemCollection lineItems;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
@@ -411,7 +411,7 @@ public static class Address extends StripeObject {
@EqualsAndHashCode(callSuper = false)
public static class ShippingCost extends StripeObject {
/**
- * The shipping amount in the smallest
+ * The shipping amount in the smallest
* currency unit. If {@code tax_behavior=inclusive}, then this amount includes taxes.
* Otherwise, taxes were calculated on top of this amount.
*/
@@ -420,7 +420,7 @@ public static class ShippingCost extends StripeObject {
/**
* The amount of tax calculated for shipping, in the smallest currency unit.
+ * href="https://docs.stripe.com/currencies#minor-units">smallest currency unit.
*/
@SerializedName("amount_tax")
Long amountTax;
@@ -460,8 +460,8 @@ public static class ShippingCost extends StripeObject {
@EqualsAndHashCode(callSuper = false)
public static class TaxBreakdown extends StripeObject {
/**
- * The amount of tax, in the smallest currency unit.
+ * The amount of tax, in the smallest
+ * currency unit.
*/
@SerializedName("amount")
Long amount;
@@ -473,7 +473,7 @@ public static class TaxBreakdown extends StripeObject {
* Indicates whether the jurisdiction was determined by the origin (merchant's address) or
* destination (customer's address).
*
- * One of {@code destination}, or {@code origin}.
+ *
One of {@code destination}, {@code origin}, or {@code performance}.
*/
@SerializedName("sourcing")
String sourcing;
@@ -500,7 +500,7 @@ public static class TaxBreakdown extends StripeObject {
/**
* The amount on which tax is calculated, in the smallest currency unit.
+ * href="https://docs.stripe.com/currencies#minor-units">smallest currency unit.
*/
@SerializedName("taxable_amount")
Long taxableAmount;
@@ -566,10 +566,12 @@ public static class TaxRateDetails extends StripeObject {
/**
* The tax type, such as {@code vat} or {@code sales_tax}.
*
- *
One of {@code amusement_tax}, {@code communications_tax}, {@code gst}, {@code hst},
- * {@code igst}, {@code jct}, {@code lease_tax}, {@code pst}, {@code qst}, {@code
- * retail_delivery_fee}, {@code rst}, {@code sales_tax}, {@code service_tax}, or {@code
- * vat}.
+ *
One of {@code admissions_tax}, {@code amusement_tax}, {@code attendance_tax}, {@code
+ * communications_tax}, {@code entertainment_tax}, {@code gross_receipts_tax}, {@code gst},
+ * {@code hospitality_tax}, {@code hst}, {@code igst}, {@code jct}, {@code lease_tax},
+ * {@code luxury_tax}, {@code pst}, {@code qst}, {@code resort_tax}, {@code
+ * retail_delivery_fee}, {@code rst}, {@code sales_tax}, {@code service_tax}, {@code
+ * tourism_tax}, or {@code vat}.
*/
@SerializedName("tax_type")
String taxType;
@@ -586,7 +588,7 @@ public static class TaxRateDetails extends StripeObject {
@EqualsAndHashCode(callSuper = false)
public static class TaxBreakdown extends StripeObject {
/**
- * The amount of tax, in the smallest
+ * The amount of tax, in the smallest
* currency unit.
*/
@SerializedName("amount")
@@ -614,7 +616,7 @@ public static class TaxBreakdown extends StripeObject {
/**
* The amount on which tax is calculated, in the smallest currency unit.
+ * href="https://docs.stripe.com/currencies#minor-units">smallest currency unit.
*/
@SerializedName("taxable_amount")
Long taxableAmount;
@@ -667,9 +669,11 @@ public static class TaxRateDetails extends StripeObject {
/**
* The tax type, such as {@code vat} or {@code sales_tax}.
*
- *
One of {@code amusement_tax}, {@code communications_tax}, {@code gst}, {@code hst},
- * {@code igst}, {@code jct}, {@code lease_tax}, {@code pst}, {@code qst}, {@code
- * retail_delivery_fee}, {@code rst}, {@code sales_tax}, {@code service_tax}, or {@code vat}.
+ *
One of {@code admissions_tax}, {@code amusement_tax}, {@code attendance_tax}, {@code
+ * communications_tax}, {@code entertainment_tax}, {@code gross_receipts_tax}, {@code gst},
+ * {@code hospitality_tax}, {@code hst}, {@code igst}, {@code jct}, {@code lease_tax}, {@code
+ * luxury_tax}, {@code pst}, {@code qst}, {@code resort_tax}, {@code retail_delivery_fee},
+ * {@code rst}, {@code sales_tax}, {@code service_tax}, {@code tourism_tax}, or {@code vat}.
*/
@SerializedName("tax_type")
String taxType;
diff --git a/src/main/java/com/stripe/model/tax/CalculationLineItem.java b/src/main/java/com/stripe/model/tax/CalculationLineItem.java
index fc64b94fa46..16feb83432d 100644
--- a/src/main/java/com/stripe/model/tax/CalculationLineItem.java
+++ b/src/main/java/com/stripe/model/tax/CalculationLineItem.java
@@ -15,7 +15,7 @@
@EqualsAndHashCode(callSuper = false)
public class CalculationLineItem extends StripeObject implements HasId {
/**
- * The line item amount in the smallest
+ * The line item amount in the smallest
* currency unit. If {@code tax_behavior=inclusive}, then this amount includes taxes.
* Otherwise, taxes were calculated on top of this amount.
*/
@@ -24,7 +24,7 @@ public class CalculationLineItem extends StripeObject implements HasId {
/**
* The amount of tax calculated for this line item, in the smallest currency unit.
+ * href="https://docs.stripe.com/currencies#minor-units">smallest currency unit.
*/
@SerializedName("amount_tax")
Long amountTax;
@@ -35,8 +35,8 @@ public class CalculationLineItem extends StripeObject implements HasId {
String id;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
@@ -57,6 +57,15 @@ public class CalculationLineItem extends StripeObject implements HasId {
@SerializedName("object")
String object;
+ /**
+ * Indicates the line item represents a performance where the venue location might determine the
+ * tax, not the customer address. Leave empty if the tax code doesn't require a tax location. If
+ * you provide this value for tax codes with an {@code optional} location requirement, it
+ * overrides the customer address.
+ */
+ @SerializedName("performance_location")
+ String performanceLocation;
+
/** The ID of an existing Product. */
@SerializedName("product")
String product;
@@ -100,7 +109,7 @@ public class CalculationLineItem extends StripeObject implements HasId {
@EqualsAndHashCode(callSuper = false)
public static class TaxBreakdown extends StripeObject {
/**
- * The amount of tax, in the smallest
+ * The amount of tax, in the smallest
* currency unit.
*/
@SerializedName("amount")
@@ -113,7 +122,7 @@ public static class TaxBreakdown extends StripeObject {
* Indicates whether the jurisdiction was determined by the origin (merchant's address) or
* destination (customer's address).
*
- *
One of {@code destination}, or {@code origin}.
+ *
One of {@code destination}, {@code origin}, or {@code performance}.
*/
@SerializedName("sourcing")
String sourcing;
@@ -140,7 +149,7 @@ public static class TaxBreakdown extends StripeObject {
/**
* The amount on which tax is calculated, in the smallest currency unit.
+ * href="https://docs.stripe.com/currencies#minor-units">smallest currency unit.
*/
@SerializedName("taxable_amount")
Long taxableAmount;
@@ -206,9 +215,11 @@ public static class TaxRateDetails extends StripeObject {
/**
* The tax type, such as {@code vat} or {@code sales_tax}.
*
- *
One of {@code amusement_tax}, {@code communications_tax}, {@code gst}, {@code hst},
- * {@code igst}, {@code jct}, {@code lease_tax}, {@code pst}, {@code qst}, {@code
- * retail_delivery_fee}, {@code rst}, {@code sales_tax}, {@code service_tax}, or {@code vat}.
+ *
One of {@code admissions_tax}, {@code amusement_tax}, {@code attendance_tax}, {@code
+ * communications_tax}, {@code entertainment_tax}, {@code gross_receipts_tax}, {@code gst},
+ * {@code hospitality_tax}, {@code hst}, {@code igst}, {@code jct}, {@code lease_tax}, {@code
+ * luxury_tax}, {@code pst}, {@code qst}, {@code resort_tax}, {@code retail_delivery_fee},
+ * {@code rst}, {@code sales_tax}, {@code service_tax}, {@code tourism_tax}, or {@code vat}.
*/
@SerializedName("tax_type")
String taxType;
diff --git a/src/main/java/com/stripe/model/tax/Form.java b/src/main/java/com/stripe/model/tax/Form.java
index b9473a782f7..22a1989149c 100644
--- a/src/main/java/com/stripe/model/tax/Form.java
+++ b/src/main/java/com/stripe/model/tax/Form.java
@@ -69,8 +69,8 @@ public class Form extends ApiResource implements HasId {
String id;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/tax/Location.java b/src/main/java/com/stripe/model/tax/Location.java
new file mode 100644
index 00000000000..e303834a2c9
--- /dev/null
+++ b/src/main/java/com/stripe/model/tax/Location.java
@@ -0,0 +1,240 @@
+// File generated from our OpenAPI spec
+package com.stripe.model.tax;
+
+import com.google.gson.annotations.SerializedName;
+import com.stripe.exception.StripeException;
+import com.stripe.model.Address;
+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.net.StripeResponseGetter;
+import com.stripe.param.tax.LocationCreateParams;
+import com.stripe.param.tax.LocationListParams;
+import com.stripe.param.tax.LocationRetrieveParams;
+import java.util.Map;
+import lombok.EqualsAndHashCode;
+import lombok.Getter;
+import lombok.Setter;
+
+/** Tax locations represent venues for services, tickets, or other product types. */
+@Getter
+@Setter
+@EqualsAndHashCode(callSuper = false)
+public class Location extends ApiResource implements HasId {
+ @SerializedName("address")
+ Address address;
+
+ /**
+ * A descriptive text providing additional context about the tax location. This can include
+ * information about the venue, types of events held, services available, or any relevant details
+ * for better identification (e.g., "A spacious auditorium suitable for large concerts and
+ * events.").
+ */
+ @SerializedName("description")
+ String description;
+
+ /** Unique identifier for the object. */
+ @Getter(onMethod_ = {@Override})
+ @SerializedName("id")
+ String id;
+
+ /**
+ * String representing the object's type. Objects of the same type share the same value.
+ *
+ *
Equal to {@code tax.location}.
+ */
+ @SerializedName("object")
+ String object;
+
+ /**
+ * The type of tax location to be defined. Currently the only option is {@code performance}.
+ *
+ *
Equal to {@code performance}.
+ */
+ @SerializedName("type")
+ String type;
+
+ /**
+ * Create a tax location to use in calculating taxes for a service, ticket, or other type of
+ * product. The resulting object contains the id, address, name, description, and current
+ * operational status of the tax location.
+ */
+ public static Location create(Map params) throws StripeException {
+ return create(params, (RequestOptions) null);
+ }
+
+ /**
+ * Create a tax location to use in calculating taxes for a service, ticket, or other type of
+ * product. The resulting object contains the id, address, name, description, and current
+ * operational status of the tax location.
+ */
+ public static Location create(Map params, RequestOptions options)
+ throws StripeException {
+ String path = "/v1/tax/locations";
+ ApiRequest request =
+ new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, params, options);
+ return getGlobalResponseGetter().request(request, Location.class);
+ }
+
+ /**
+ * Create a tax location to use in calculating taxes for a service, ticket, or other type of
+ * product. The resulting object contains the id, address, name, description, and current
+ * operational status of the tax location.
+ */
+ public static Location create(LocationCreateParams params) throws StripeException {
+ return create(params, (RequestOptions) null);
+ }
+
+ /**
+ * Create a tax location to use in calculating taxes for a service, ticket, or other type of
+ * product. The resulting object contains the id, address, name, description, and current
+ * operational status of the tax location.
+ */
+ public static Location create(LocationCreateParams params, RequestOptions options)
+ throws StripeException {
+ String path = "/v1/tax/locations";
+ ApiResource.checkNullTypedParams(path, params);
+ ApiRequest request =
+ new ApiRequest(
+ BaseAddress.API,
+ ApiResource.RequestMethod.POST,
+ path,
+ ApiRequestParams.paramsToMap(params),
+ options);
+ return getGlobalResponseGetter().request(request, Location.class);
+ }
+
+ /**
+ * Retrieve a list of all tax locations. Tax locations can represent the venues for services,
+ * tickets, or other product types.
+ *
+ * The response includes detailed information for each tax location, such as its address, name,
+ * description, and current operational status.
+ *
+ *
You can paginate through the list by using the {@code limit} parameter to control the number
+ * of results returned in each request.
+ */
+ public static LocationCollection list(Map params) throws StripeException {
+ return list(params, (RequestOptions) null);
+ }
+
+ /**
+ * Retrieve a list of all tax locations. Tax locations can represent the venues for services,
+ * tickets, or other product types.
+ *
+ * The response includes detailed information for each tax location, such as its address, name,
+ * description, and current operational status.
+ *
+ *
You can paginate through the list by using the {@code limit} parameter to control the number
+ * of results returned in each request.
+ */
+ public static LocationCollection list(Map params, RequestOptions options)
+ throws StripeException {
+ String path = "/v1/tax/locations";
+ ApiRequest request =
+ new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.GET, path, params, options);
+ return getGlobalResponseGetter().request(request, LocationCollection.class);
+ }
+
+ /**
+ * Retrieve a list of all tax locations. Tax locations can represent the venues for services,
+ * tickets, or other product types.
+ *
+ * The response includes detailed information for each tax location, such as its address, name,
+ * description, and current operational status.
+ *
+ *
You can paginate through the list by using the {@code limit} parameter to control the number
+ * of results returned in each request.
+ */
+ public static LocationCollection list(LocationListParams params) throws StripeException {
+ return list(params, (RequestOptions) null);
+ }
+
+ /**
+ * Retrieve a list of all tax locations. Tax locations can represent the venues for services,
+ * tickets, or other product types.
+ *
+ *
The response includes detailed information for each tax location, such as its address, name,
+ * description, and current operational status.
+ *
+ *
You can paginate through the list by using the {@code limit} parameter to control the number
+ * of results returned in each request.
+ */
+ public static LocationCollection list(LocationListParams params, RequestOptions options)
+ throws StripeException {
+ String path = "/v1/tax/locations";
+ ApiResource.checkNullTypedParams(path, params);
+ ApiRequest request =
+ new ApiRequest(
+ BaseAddress.API,
+ ApiResource.RequestMethod.GET,
+ path,
+ ApiRequestParams.paramsToMap(params),
+ options);
+ return getGlobalResponseGetter().request(request, LocationCollection.class);
+ }
+
+ /**
+ * Fetch the details of a specific tax location using its unique identifier. Use a tax location to
+ * calculate taxes based on the location of the end product, such as a performance, instead of the
+ * customer address. For more details, check the integration guide.
+ */
+ public static Location retrieve(String location) throws StripeException {
+ return retrieve(location, (Map) null, (RequestOptions) null);
+ }
+
+ /**
+ * Fetch the details of a specific tax location using its unique identifier. Use a tax location to
+ * calculate taxes based on the location of the end product, such as a performance, instead of the
+ * customer address. For more details, check the integration guide.
+ */
+ public static Location retrieve(String location, RequestOptions options) throws StripeException {
+ return retrieve(location, (Map) null, options);
+ }
+
+ /**
+ * Fetch the details of a specific tax location using its unique identifier. Use a tax location to
+ * calculate taxes based on the location of the end product, such as a performance, instead of the
+ * customer address. For more details, check the integration guide.
+ */
+ public static Location retrieve(
+ String location, Map params, RequestOptions options) throws StripeException {
+ String path = String.format("/v1/tax/locations/%s", ApiResource.urlEncodeId(location));
+ ApiRequest request =
+ new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.GET, path, params, options);
+ return getGlobalResponseGetter().request(request, Location.class);
+ }
+
+ /**
+ * Fetch the details of a specific tax location using its unique identifier. Use a tax location to
+ * calculate taxes based on the location of the end product, such as a performance, instead of the
+ * customer address. For more details, check the integration guide.
+ */
+ public static Location retrieve(
+ String location, LocationRetrieveParams params, RequestOptions options)
+ throws StripeException {
+ String path = String.format("/v1/tax/locations/%s", ApiResource.urlEncodeId(location));
+ ApiResource.checkNullTypedParams(path, params);
+ ApiRequest request =
+ new ApiRequest(
+ BaseAddress.API,
+ ApiResource.RequestMethod.GET,
+ path,
+ ApiRequestParams.paramsToMap(params),
+ options);
+ return getGlobalResponseGetter().request(request, Location.class);
+ }
+
+ @Override
+ public void setResponseGetter(StripeResponseGetter responseGetter) {
+ super.setResponseGetter(responseGetter);
+ trySetResponseGetter(address, responseGetter);
+ }
+}
diff --git a/src/main/java/com/stripe/model/tax/LocationCollection.java b/src/main/java/com/stripe/model/tax/LocationCollection.java
new file mode 100644
index 00000000000..ae8112a39fb
--- /dev/null
+++ b/src/main/java/com/stripe/model/tax/LocationCollection.java
@@ -0,0 +1,6 @@
+// File generated from our OpenAPI spec
+package com.stripe.model.tax;
+
+import com.stripe.model.StripeCollection;
+
+public class LocationCollection extends StripeCollection {}
diff --git a/src/main/java/com/stripe/model/tax/Registration.java b/src/main/java/com/stripe/model/tax/Registration.java
index f7056acdd51..8fbdc2444ab 100644
--- a/src/main/java/com/stripe/model/tax/Registration.java
+++ b/src/main/java/com/stripe/model/tax/Registration.java
@@ -68,8 +68,8 @@ public class Registration extends ApiResource implements HasId {
String id;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
@@ -2883,12 +2883,33 @@ public static class Ug extends StripeObject {
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Us extends StripeObject {
+ @SerializedName("admissions_tax")
+ AdmissionsTax admissionsTax;
+
+ @SerializedName("attendance_tax")
+ AttendanceTax attendanceTax;
+
+ @SerializedName("entertainment_tax")
+ EntertainmentTax entertainmentTax;
+
+ @SerializedName("gross_receipts_tax")
+ GrossReceiptsTax grossReceiptsTax;
+
+ @SerializedName("hospitality_tax")
+ HospitalityTax hospitalityTax;
+
@SerializedName("local_amusement_tax")
LocalAmusementTax localAmusementTax;
@SerializedName("local_lease_tax")
LocalLeaseTax localLeaseTax;
+ @SerializedName("luxury_tax")
+ LuxuryTax luxuryTax;
+
+ @SerializedName("resort_tax")
+ ResortTax resortTax;
+
/**
* Two-letter US state code (ISO
* 3166-2).
@@ -2899,15 +2920,105 @@ public static class Us extends StripeObject {
@SerializedName("state_sales_tax")
StateSalesTax stateSalesTax;
+ @SerializedName("tourism_tax")
+ TourismTax tourismTax;
+
/**
* Type of registration in the US.
*
- * One of {@code local_amusement_tax}, {@code local_lease_tax}, {@code
- * state_communications_tax}, {@code state_retail_delivery_fee}, or {@code state_sales_tax}.
+ *
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}.
*/
@SerializedName("type")
String type;
+ /**
+ * For more details about AdmissionsTax, please refer to the API Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class AdmissionsTax extends StripeObject {
+ /**
+ * A jurisdiction
+ * code representing the local jurisdiction.
+ */
+ @SerializedName("jurisdiction")
+ String jurisdiction;
+ }
+
+ /**
+ * For more details about AttendanceTax, please refer to the API Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class AttendanceTax extends StripeObject {
+ /**
+ * A jurisdiction
+ * code representing the local jurisdiction.
+ */
+ @SerializedName("jurisdiction")
+ String jurisdiction;
+ }
+
+ /**
+ * For more details about EntertainmentTax, please refer to the API Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class EntertainmentTax extends StripeObject {
+ /**
+ * A jurisdiction
+ * code representing the local jurisdiction.
+ */
+ @SerializedName("jurisdiction")
+ String jurisdiction;
+ }
+
+ /**
+ * For more details about GrossReceiptsTax, please refer to the API Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class GrossReceiptsTax extends StripeObject {
+ /**
+ * A jurisdiction
+ * code representing the local jurisdiction.
+ */
+ @SerializedName("jurisdiction")
+ String jurisdiction;
+ }
+
+ /**
+ * For more details about HospitalityTax, please refer to the API Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class HospitalityTax extends StripeObject {
+ /**
+ * A jurisdiction
+ * code representing the local jurisdiction.
+ */
+ @SerializedName("jurisdiction")
+ String jurisdiction;
+ }
+
/**
* For more details about LocalAmusementTax, please refer to the API Reference.
@@ -2940,6 +3051,40 @@ public static class LocalLeaseTax extends StripeObject {
String jurisdiction;
}
+ /**
+ * For more details about LuxuryTax, please refer to the API Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class LuxuryTax extends StripeObject {
+ /**
+ * A jurisdiction
+ * code representing the local jurisdiction.
+ */
+ @SerializedName("jurisdiction")
+ String jurisdiction;
+ }
+
+ /**
+ * For more details about ResortTax, please refer to the API Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class ResortTax extends StripeObject {
+ /**
+ * A jurisdiction
+ * code representing the local jurisdiction.
+ */
+ @SerializedName("jurisdiction")
+ String jurisdiction;
+ }
+
/**
* For more details about StateSalesTax, please refer to the API Reference.
@@ -2977,6 +3122,23 @@ public static class Election extends StripeObject {
String type;
}
}
+
+ /**
+ * For more details about TourismTax, please refer to the API Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class TourismTax extends StripeObject {
+ /**
+ * A jurisdiction
+ * code representing the local jurisdiction.
+ */
+ @SerializedName("jurisdiction")
+ String jurisdiction;
+ }
}
/**
diff --git a/src/main/java/com/stripe/model/tax/Settings.java b/src/main/java/com/stripe/model/tax/Settings.java
index 49b8a683e4d..fdca9592eaf 100644
--- a/src/main/java/com/stripe/model/tax/Settings.java
+++ b/src/main/java/com/stripe/model/tax/Settings.java
@@ -36,8 +36,8 @@ public class Settings extends ApiResource {
HeadOffice headOffice;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/tax/Transaction.java b/src/main/java/com/stripe/model/tax/Transaction.java
index b36a3d110f7..97f8e51c840 100644
--- a/src/main/java/com/stripe/model/tax/Transaction.java
+++ b/src/main/java/com/stripe/model/tax/Transaction.java
@@ -62,8 +62,8 @@ public class Transaction extends ApiResource implements HasId {
TransactionLineItemCollection lineItems;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
@@ -469,7 +469,7 @@ public static class Address extends StripeObject {
@EqualsAndHashCode(callSuper = false)
public static class ShippingCost extends StripeObject {
/**
- * The shipping amount in the smallest
+ * The shipping amount in the smallest
* currency unit. If {@code tax_behavior=inclusive}, then this amount includes taxes.
* Otherwise, taxes were calculated on top of this amount.
*/
@@ -478,7 +478,7 @@ public static class ShippingCost extends StripeObject {
/**
* The amount of tax calculated for shipping, in the smallest currency unit.
+ * href="https://docs.stripe.com/currencies#minor-units">smallest currency unit.
*/
@SerializedName("amount_tax")
Long amountTax;
@@ -521,8 +521,8 @@ public static class ShippingCost extends StripeObject {
@EqualsAndHashCode(callSuper = false)
public static class TaxBreakdown extends StripeObject {
/**
- * The amount of tax, in the smallest currency unit.
+ * The amount of tax, in the smallest
+ * currency unit.
*/
@SerializedName("amount")
Long amount;
@@ -534,7 +534,7 @@ public static class TaxBreakdown extends StripeObject {
* Indicates whether the jurisdiction was determined by the origin (merchant's address) or
* destination (customer's address).
*
- *
One of {@code destination}, or {@code origin}.
+ *
One of {@code destination}, {@code origin}, or {@code performance}.
*/
@SerializedName("sourcing")
String sourcing;
@@ -561,7 +561,7 @@ public static class TaxBreakdown extends StripeObject {
/**
* The amount on which tax is calculated, in the smallest currency unit.
+ * href="https://docs.stripe.com/currencies#minor-units">smallest currency unit.
*/
@SerializedName("taxable_amount")
Long taxableAmount;
@@ -627,10 +627,12 @@ public static class TaxRateDetails extends StripeObject {
/**
* The tax type, such as {@code vat} or {@code sales_tax}.
*
- *
One of {@code amusement_tax}, {@code communications_tax}, {@code gst}, {@code hst},
- * {@code igst}, {@code jct}, {@code lease_tax}, {@code pst}, {@code qst}, {@code
- * retail_delivery_fee}, {@code rst}, {@code sales_tax}, {@code service_tax}, or {@code
- * vat}.
+ *
One of {@code admissions_tax}, {@code amusement_tax}, {@code attendance_tax}, {@code
+ * communications_tax}, {@code entertainment_tax}, {@code gross_receipts_tax}, {@code gst},
+ * {@code hospitality_tax}, {@code hst}, {@code igst}, {@code jct}, {@code lease_tax},
+ * {@code luxury_tax}, {@code pst}, {@code qst}, {@code resort_tax}, {@code
+ * retail_delivery_fee}, {@code rst}, {@code sales_tax}, {@code service_tax}, {@code
+ * tourism_tax}, or {@code vat}.
*/
@SerializedName("tax_type")
String taxType;
diff --git a/src/main/java/com/stripe/model/tax/TransactionLineItem.java b/src/main/java/com/stripe/model/tax/TransactionLineItem.java
index a6fb325ff88..8f1bd4781bf 100644
--- a/src/main/java/com/stripe/model/tax/TransactionLineItem.java
+++ b/src/main/java/com/stripe/model/tax/TransactionLineItem.java
@@ -14,7 +14,7 @@
@EqualsAndHashCode(callSuper = false)
public class TransactionLineItem extends StripeObject implements HasId {
/**
- * The line item amount in the smallest
+ * The line item amount in the smallest
* currency unit. If {@code tax_behavior=inclusive}, then this amount includes taxes.
* Otherwise, taxes were calculated on top of this amount.
*/
@@ -23,7 +23,7 @@ public class TransactionLineItem extends StripeObject implements HasId {
/**
* The amount of tax calculated for this line item, in the smallest currency unit.
+ * href="https://docs.stripe.com/currencies#minor-units">smallest currency unit.
*/
@SerializedName("amount_tax")
Long amountTax;
@@ -34,8 +34,8 @@ public class TransactionLineItem extends StripeObject implements HasId {
String id;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/terminal/Configuration.java b/src/main/java/com/stripe/model/terminal/Configuration.java
index ac484af5dd7..ae34fc60f2e 100644
--- a/src/main/java/com/stripe/model/terminal/Configuration.java
+++ b/src/main/java/com/stripe/model/terminal/Configuration.java
@@ -56,8 +56,8 @@ public class Configuration extends ApiResource implements HasId {
Boolean isAccountDefault;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/terminal/Location.java b/src/main/java/com/stripe/model/terminal/Location.java
index d8e2ec39dd6..79964b5d293 100644
--- a/src/main/java/com/stripe/model/terminal/Location.java
+++ b/src/main/java/com/stripe/model/terminal/Location.java
@@ -66,8 +66,8 @@ public class Location extends ApiResource implements HasId, MetadataStore
Long lastSeenAt;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/terminal/ReaderCollectedData.java b/src/main/java/com/stripe/model/terminal/ReaderCollectedData.java
index 6b7fa4a69b7..997c315c9da 100644
--- a/src/main/java/com/stripe/model/terminal/ReaderCollectedData.java
+++ b/src/main/java/com/stripe/model/terminal/ReaderCollectedData.java
@@ -32,8 +32,8 @@ public class ReaderCollectedData extends ApiResource implements HasId {
String id;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/testhelpers/TestClock.java b/src/main/java/com/stripe/model/testhelpers/TestClock.java
index e4648007508..278be69db50 100644
--- a/src/main/java/com/stripe/model/testhelpers/TestClock.java
+++ b/src/main/java/com/stripe/model/testhelpers/TestClock.java
@@ -53,8 +53,8 @@ public class TestClock extends ApiResource implements HasId {
String id;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/treasury/CreditReversal.java b/src/main/java/com/stripe/model/treasury/CreditReversal.java
index 2ce933d3fc0..b39e71e1b68 100644
--- a/src/main/java/com/stripe/model/treasury/CreditReversal.java
+++ b/src/main/java/com/stripe/model/treasury/CreditReversal.java
@@ -62,8 +62,8 @@ public class CreditReversal extends ApiResource implements HasId {
String id;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/treasury/DebitReversal.java b/src/main/java/com/stripe/model/treasury/DebitReversal.java
index f8792d561d6..fc15606863c 100644
--- a/src/main/java/com/stripe/model/treasury/DebitReversal.java
+++ b/src/main/java/com/stripe/model/treasury/DebitReversal.java
@@ -66,8 +66,8 @@ public class DebitReversal extends ApiResource implements HasId {
LinkedFlows linkedFlows;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/treasury/FinancialAccount.java b/src/main/java/com/stripe/model/treasury/FinancialAccount.java
index d32775069d0..663fff6f770 100644
--- a/src/main/java/com/stripe/model/treasury/FinancialAccount.java
+++ b/src/main/java/com/stripe/model/treasury/FinancialAccount.java
@@ -83,8 +83,8 @@ public class FinancialAccount extends ApiResource
Boolean isDefault;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/treasury/InboundTransfer.java b/src/main/java/com/stripe/model/treasury/InboundTransfer.java
index 12823ff7cf0..716e1fc50f3 100644
--- a/src/main/java/com/stripe/model/treasury/InboundTransfer.java
+++ b/src/main/java/com/stripe/model/treasury/InboundTransfer.java
@@ -88,8 +88,8 @@ public class InboundTransfer extends ApiResource implements HasId {
LinkedFlows linkedFlows;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/treasury/OutboundPayment.java b/src/main/java/com/stripe/model/treasury/OutboundPayment.java
index f70ee34eda2..d8ec5fb816c 100644
--- a/src/main/java/com/stripe/model/treasury/OutboundPayment.java
+++ b/src/main/java/com/stripe/model/treasury/OutboundPayment.java
@@ -114,8 +114,8 @@ public class OutboundPayment extends ApiResource implements HasId {
String id;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/treasury/OutboundTransfer.java b/src/main/java/com/stripe/model/treasury/OutboundTransfer.java
index 39e7b4ada5e..31ad82cf774 100644
--- a/src/main/java/com/stripe/model/treasury/OutboundTransfer.java
+++ b/src/main/java/com/stripe/model/treasury/OutboundTransfer.java
@@ -99,8 +99,8 @@ public class OutboundTransfer extends ApiResource implements HasId {
String id;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/treasury/ReceivedCredit.java b/src/main/java/com/stripe/model/treasury/ReceivedCredit.java
index 717ef6341e1..6cacbb911fd 100644
--- a/src/main/java/com/stripe/model/treasury/ReceivedCredit.java
+++ b/src/main/java/com/stripe/model/treasury/ReceivedCredit.java
@@ -84,8 +84,8 @@ public class ReceivedCredit extends ApiResource implements HasId {
LinkedFlows linkedFlows;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/treasury/ReceivedDebit.java b/src/main/java/com/stripe/model/treasury/ReceivedDebit.java
index b603e094ec0..97a258f8044 100644
--- a/src/main/java/com/stripe/model/treasury/ReceivedDebit.java
+++ b/src/main/java/com/stripe/model/treasury/ReceivedDebit.java
@@ -83,8 +83,8 @@ public class ReceivedDebit extends ApiResource implements HasId {
LinkedFlows linkedFlows;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/treasury/Transaction.java b/src/main/java/com/stripe/model/treasury/Transaction.java
index 155204693f2..6d113d57931 100644
--- a/src/main/java/com/stripe/model/treasury/Transaction.java
+++ b/src/main/java/com/stripe/model/treasury/Transaction.java
@@ -85,8 +85,8 @@ public class Transaction extends ApiResource implements HasId {
String id;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/treasury/TransactionEntry.java b/src/main/java/com/stripe/model/treasury/TransactionEntry.java
index aa06ab900fc..64a439da80b 100644
--- a/src/main/java/com/stripe/model/treasury/TransactionEntry.java
+++ b/src/main/java/com/stripe/model/treasury/TransactionEntry.java
@@ -75,8 +75,8 @@ public class TransactionEntry extends ApiResource implements HasId {
String id;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/v2/EventDataClassLookup.java b/src/main/java/com/stripe/model/v2/EventDataClassLookup.java
index 54d186d5969..102f426ca4a 100644
--- a/src/main/java/com/stripe/model/v2/EventDataClassLookup.java
+++ b/src/main/java/com/stripe/model/v2/EventDataClassLookup.java
@@ -49,6 +49,7 @@ public final class EventDataClassLookup {
classLookup.put(
"v2.core.account_person_token", com.stripe.model.v2.core.AccountPersonToken.class);
classLookup.put("v2.core.account_token", com.stripe.model.v2.core.AccountToken.class);
+ classLookup.put("v2.core.batch_job", com.stripe.model.v2.core.BatchJob.class);
classLookup.put("v2.core.event", com.stripe.model.v2.core.Event.class);
classLookup.put("v2.core.event_destination", com.stripe.model.v2.core.EventDestination.class);
@@ -157,6 +158,29 @@ public final class EventDataClassLookup {
"v2.core.account_person.deleted", com.stripe.events.V2CoreAccountPersonDeletedEvent.class);
eventClassLookup.put(
"v2.core.account_person.updated", com.stripe.events.V2CoreAccountPersonUpdatedEvent.class);
+ eventClassLookup.put(
+ "v2.core.batch_job.batch_failed", com.stripe.events.V2CoreBatchJobBatchFailedEvent.class);
+ eventClassLookup.put(
+ "v2.core.batch_job.canceled", com.stripe.events.V2CoreBatchJobCanceledEvent.class);
+ eventClassLookup.put(
+ "v2.core.batch_job.completed", com.stripe.events.V2CoreBatchJobCompletedEvent.class);
+ eventClassLookup.put(
+ "v2.core.batch_job.created", com.stripe.events.V2CoreBatchJobCreatedEvent.class);
+ eventClassLookup.put(
+ "v2.core.batch_job.ready_for_upload",
+ com.stripe.events.V2CoreBatchJobReadyForUploadEvent.class);
+ eventClassLookup.put(
+ "v2.core.batch_job.timeout", com.stripe.events.V2CoreBatchJobTimeoutEvent.class);
+ eventClassLookup.put(
+ "v2.core.batch_job.updated", com.stripe.events.V2CoreBatchJobUpdatedEvent.class);
+ eventClassLookup.put(
+ "v2.core.batch_job.upload_timeout",
+ com.stripe.events.V2CoreBatchJobUploadTimeoutEvent.class);
+ eventClassLookup.put(
+ "v2.core.batch_job.validating", com.stripe.events.V2CoreBatchJobValidatingEvent.class);
+ eventClassLookup.put(
+ "v2.core.batch_job.validation_failed",
+ com.stripe.events.V2CoreBatchJobValidationFailedEvent.class);
eventClassLookup.put(
"v2.core.event_destination.ping", com.stripe.events.V2CoreEventDestinationPingEvent.class);
eventClassLookup.put(
diff --git a/src/main/java/com/stripe/model/v2/EventNotificationClassLookup.java b/src/main/java/com/stripe/model/v2/EventNotificationClassLookup.java
index 88a228d73b3..9100e44b428 100644
--- a/src/main/java/com/stripe/model/v2/EventNotificationClassLookup.java
+++ b/src/main/java/com/stripe/model/v2/EventNotificationClassLookup.java
@@ -87,6 +87,36 @@ public final class EventNotificationClassLookup {
eventClassLookup.put(
"v2.core.account_person.updated",
com.stripe.events.V2CoreAccountPersonUpdatedEventNotification.class);
+ eventClassLookup.put(
+ "v2.core.batch_job.batch_failed",
+ com.stripe.events.V2CoreBatchJobBatchFailedEventNotification.class);
+ eventClassLookup.put(
+ "v2.core.batch_job.canceled",
+ com.stripe.events.V2CoreBatchJobCanceledEventNotification.class);
+ eventClassLookup.put(
+ "v2.core.batch_job.completed",
+ com.stripe.events.V2CoreBatchJobCompletedEventNotification.class);
+ eventClassLookup.put(
+ "v2.core.batch_job.created",
+ com.stripe.events.V2CoreBatchJobCreatedEventNotification.class);
+ eventClassLookup.put(
+ "v2.core.batch_job.ready_for_upload",
+ com.stripe.events.V2CoreBatchJobReadyForUploadEventNotification.class);
+ eventClassLookup.put(
+ "v2.core.batch_job.timeout",
+ com.stripe.events.V2CoreBatchJobTimeoutEventNotification.class);
+ eventClassLookup.put(
+ "v2.core.batch_job.updated",
+ com.stripe.events.V2CoreBatchJobUpdatedEventNotification.class);
+ eventClassLookup.put(
+ "v2.core.batch_job.upload_timeout",
+ com.stripe.events.V2CoreBatchJobUploadTimeoutEventNotification.class);
+ eventClassLookup.put(
+ "v2.core.batch_job.validating",
+ com.stripe.events.V2CoreBatchJobValidatingEventNotification.class);
+ eventClassLookup.put(
+ "v2.core.batch_job.validation_failed",
+ com.stripe.events.V2CoreBatchJobValidationFailedEventNotification.class);
eventClassLookup.put(
"v2.core.event_destination.ping",
com.stripe.events.V2CoreEventDestinationPingEventNotification.class);
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/Cadence.java b/src/main/java/com/stripe/model/v2/billing/Cadence.java
index db207c2b954..99ebfc469d1 100644
--- a/src/main/java/com/stripe/model/v2/billing/Cadence.java
+++ b/src/main/java/com/stripe/model/v2/billing/Cadence.java
@@ -1,8 +1,10 @@
// File generated from our OpenAPI spec
package com.stripe.model.v2.billing;
+import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.stripe.model.HasId;
+import com.stripe.model.StringInt64TypeAdapter;
import com.stripe.model.StripeObject;
import java.time.Instant;
import java.util.List;
@@ -661,6 +663,7 @@ public static class Card extends StripeObject {
public static class MandateOptions extends StripeObject {
/** Amount to be charged for future payments. */
@SerializedName("amount")
+ @JsonAdapter(StringInt64TypeAdapter.class)
Long amount;
/** The AmountType for the mandate. One of {@code fixed} or {@code maximum}. */
diff --git a/src/main/java/com/stripe/model/v2/billing/CollectionSetting.java b/src/main/java/com/stripe/model/v2/billing/CollectionSetting.java
index 4a9be6c5836..146ebdd6e6c 100644
--- a/src/main/java/com/stripe/model/v2/billing/CollectionSetting.java
+++ b/src/main/java/com/stripe/model/v2/billing/CollectionSetting.java
@@ -1,8 +1,10 @@
// File generated from our OpenAPI spec
package com.stripe.model.v2.billing;
+import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.stripe.model.HasId;
+import com.stripe.model.StringInt64TypeAdapter;
import com.stripe.model.StripeObject;
import java.time.Instant;
import java.util.List;
@@ -247,6 +249,7 @@ public static class Card extends StripeObject {
public static class MandateOptions extends StripeObject {
/** Amount to be charged for future payments. */
@SerializedName("amount")
+ @JsonAdapter(StringInt64TypeAdapter.class)
Long amount;
/** The AmountType for the mandate. One of {@code fixed} or {@code maximum}. */
diff --git a/src/main/java/com/stripe/model/v2/billing/CollectionSettingVersion.java b/src/main/java/com/stripe/model/v2/billing/CollectionSettingVersion.java
index fb3cbd49a15..2035073002d 100644
--- a/src/main/java/com/stripe/model/v2/billing/CollectionSettingVersion.java
+++ b/src/main/java/com/stripe/model/v2/billing/CollectionSettingVersion.java
@@ -1,8 +1,10 @@
// File generated from our OpenAPI spec
package com.stripe.model.v2.billing;
+import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.stripe.model.HasId;
+import com.stripe.model.StringInt64TypeAdapter;
import com.stripe.model.StripeObject;
import java.time.Instant;
import java.util.List;
@@ -226,6 +228,7 @@ public static class Card extends StripeObject {
public static class MandateOptions extends StripeObject {
/** Amount to be charged for future payments. */
@SerializedName("amount")
+ @JsonAdapter(StringInt64TypeAdapter.class)
Long amount;
/** The AmountType for the mandate. One of {@code fixed} or {@code maximum}. */
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 464a21c8888..102ddd8da2d 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,8 @@
import com.google.gson.annotations.SerializedName;
import com.stripe.model.HasId;
import com.stripe.model.StripeObject;
+import com.stripe.v2.Amount;
+import java.math.BigDecimal;
import java.time.Instant;
import java.util.List;
import java.util.Map;
@@ -3737,15 +3739,16 @@ public static class DefaultOutboundDestination extends StripeObject implements H
* Closed Enum. The payout method type of the default outbound destination.
*
* One of {@code ae_bank_account}, {@code ag_bank_account}, {@code al_bank_account},
- * {@code am_bank_account}, {@code at_bank_account}, {@code au_bank_account}, {@code
- * ba_bank_account}, {@code be_bank_account}, {@code bg_bank_account}, {@code
- * bh_bank_account}, {@code bj_bank_account}, {@code bn_bank_account}, {@code
- * bs_bank_account}, {@code bt_bank_account}, {@code bw_bank_account}, {@code card}, {@code
- * ca_bank_account}, {@code ch_bank_account}, {@code ci_bank_account}, {@code
- * crypto_wallet}, {@code cr_bank_account}, {@code cy_bank_account}, {@code
- * cz_bank_account}, {@code de_bank_account}, {@code dk_bank_account}, {@code
- * do_bank_account}, {@code dz_bank_account}, {@code ec_bank_account}, {@code
- * ee_bank_account}, {@code es_bank_account}, {@code et_bank_account}, {@code
+ * {@code am_bank_account}, {@code ar_bank_account}, {@code at_bank_account}, {@code
+ * au_bank_account}, {@code ba_bank_account}, {@code be_bank_account}, {@code
+ * bg_bank_account}, {@code bh_bank_account}, {@code bj_bank_account}, {@code
+ * bn_bank_account}, {@code bs_bank_account}, {@code bt_bank_account}, {@code
+ * bw_bank_account}, {@code card}, {@code ca_bank_account}, {@code ch_bank_account}, {@code
+ * ci_bank_account}, {@code co_bank_account}, {@code crypto_wallet}, {@code
+ * cr_bank_account}, {@code cy_bank_account}, {@code cz_bank_account}, {@code
+ * de_bank_account}, {@code dk_bank_account}, {@code do_bank_account}, {@code
+ * dz_bank_account}, {@code ec_bank_account}, {@code ee_bank_account}, {@code
+ * eg_bank_account}, {@code es_bank_account}, {@code et_bank_account}, {@code
* fi_bank_account}, {@code fr_bank_account}, {@code gb_bank_account}, {@code
* gm_bank_account}, {@code gr_bank_account}, {@code gt_bank_account}, {@code
* gy_bank_account}, {@code hk_bank_account}, {@code hr_bank_account}, {@code
@@ -4492,6 +4495,13 @@ public static class Defaults extends StripeObject {
@SerializedName("responsibilities")
Responsibilities responsibilities;
+ /**
+ * The Account's local timezone. A list of possible time zone values is maintained at the IANA Time Zone Database.
+ */
+ @SerializedName("timezone")
+ String timezone;
+
/** Account profile information. */
@Getter
@Setter
@@ -5264,27 +5274,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. */
@@ -5663,30 +5652,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. */
@@ -6403,7 +6368,7 @@ public static class Relationship extends StripeObject {
/** The percentage of the Account's identity that the individual owns. */
@SerializedName("percent_ownership")
- String percentOwnership;
+ BigDecimal percentOwnership;
/**
* Whether the individual is authorized as the primary representative of the Account. This
diff --git a/src/main/java/com/stripe/model/v2/core/AccountPerson.java b/src/main/java/com/stripe/model/v2/core/AccountPerson.java
index f3ce221205d..25eed6ceaab 100644
--- a/src/main/java/com/stripe/model/v2/core/AccountPerson.java
+++ b/src/main/java/com/stripe/model/v2/core/AccountPerson.java
@@ -4,6 +4,7 @@
import com.google.gson.annotations.SerializedName;
import com.stripe.model.HasId;
import com.stripe.model.StripeObject;
+import java.math.BigDecimal;
import java.time.Instant;
import java.util.List;
import java.util.Map;
@@ -584,7 +585,7 @@ public static class Relationship extends StripeObject {
/** The percentage of the Account's identity that the individual owns. */
@SerializedName("percent_ownership")
- String percentOwnership;
+ BigDecimal percentOwnership;
/**
* Whether the individual is authorized as the primary representative of the Account. This is
diff --git a/src/main/java/com/stripe/model/v2/core/BatchJob.java b/src/main/java/com/stripe/model/v2/core/BatchJob.java
new file mode 100644
index 00000000000..9bc1c8bf3e6
--- /dev/null
+++ b/src/main/java/com/stripe/model/v2/core/BatchJob.java
@@ -0,0 +1,408 @@
+// File generated from our OpenAPI spec
+package com.stripe.model.v2.core;
+
+import com.google.gson.annotations.JsonAdapter;
+import com.google.gson.annotations.SerializedName;
+import com.stripe.model.HasId;
+import com.stripe.model.StringInt64TypeAdapter;
+import com.stripe.model.StripeObject;
+import java.time.Instant;
+import java.util.Map;
+import lombok.EqualsAndHashCode;
+import lombok.Getter;
+import lombok.Setter;
+
+/** BatchJob resource. */
+@Getter
+@Setter
+@EqualsAndHashCode(callSuper = false)
+public class BatchJob extends StripeObject implements HasId {
+ /** Timestamp at which BatchJob was created. */
+ @SerializedName("created")
+ Instant created;
+
+ /** Unique identifier for the BatchJob. */
+ @Getter(onMethod_ = {@Override})
+ @SerializedName("id")
+ String id;
+
+ /**
+ * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
+ * object exists in test mode.
+ */
+ @SerializedName("livemode")
+ Boolean livemode;
+
+ /** The maximum rps defined for the {@code BatchJob}. */
+ @SerializedName("maximum_rps")
+ Long maximumRps;
+
+ /** The metadata of the {@code BatchJob} object. */
+ @SerializedName("metadata")
+ Map metadata;
+
+ /**
+ * String representing the object's type. Objects of the same type share the same value of the
+ * object field.
+ *
+ * Equal to {@code v2.core.batch_job}.
+ */
+ @SerializedName("object")
+ String object;
+
+ /** If the validation will be run previous to the execution of the {@code BatchJob}. */
+ @SerializedName("skip_validation")
+ Boolean skipValidation;
+
+ /**
+ * The current status of the {@code BatchJob}.
+ *
+ *
One of {@code batch_failed}, {@code canceled}, {@code cancelling}, {@code complete}, {@code
+ * in_progress}, {@code ready_for_upload}, {@code timeout}, {@code upload_timeout}, {@code
+ * validating}, or {@code validation_failed}.
+ */
+ @SerializedName("status")
+ String status;
+
+ /** Additional details about the current state of the {@code BatchJob}. */
+ @SerializedName("status_details")
+ StatusDetails statusDetails;
+
+ /** Additional details about the current state of the {@code BatchJob}. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class StatusDetails extends StripeObject {
+ /** Additional details for the {@code BATCH_FAILED} status of the {@code BatchJob}. */
+ @SerializedName("batch_failed")
+ BatchFailed batchFailed;
+
+ /** Additional details for the {@code CANCELED} status of the {@code BatchJob}. */
+ @SerializedName("canceled")
+ Canceled canceled;
+
+ /** Additional details for the {@code COMPLETE} status of the {@code BatchJob}. */
+ @SerializedName("complete")
+ Complete complete;
+
+ /** Additional details for the {@code IN_PROGRESS} status of the {@code BatchJob}. */
+ @SerializedName("in_progress")
+ InProgress inProgress;
+
+ /** Additional details for the {@code READY_FOR_UPLOAD} status of the {@code BatchJob}. */
+ @SerializedName("ready_for_upload")
+ ReadyForUpload readyForUpload;
+
+ /** Additional details for the {@code TIMEOUT} status of the {@code BatchJob}. */
+ @SerializedName("timeout")
+ Timeout timeout;
+
+ /** Additional details for the {@code VALIDATING} status of the {@code BatchJob}. */
+ @SerializedName("validating")
+ Validating validating;
+
+ /** Additional details for the {@code VALIDATION_FAILED} status of the {@code BatchJob}. */
+ @SerializedName("validation_failed")
+ ValidationFailed validationFailed;
+
+ /** Additional details for the {@code BATCH_FAILED} status of the {@code BatchJob}. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class BatchFailed extends StripeObject {
+ /** Details about the {@code BatchJob} failure. */
+ @SerializedName("error")
+ String error;
+ }
+
+ /** Additional details for the {@code CANCELED} status of the {@code BatchJob}. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Canceled extends StripeObject {
+ /** The total number of records that failed processing. */
+ @SerializedName("failure_count")
+ @JsonAdapter(StringInt64TypeAdapter.class)
+ Long failureCount;
+
+ /**
+ * The output file details. If BatchJob is cancelled it's provided only if there is already
+ * output at this point.
+ */
+ @SerializedName("output_file")
+ OutputFile outputFile;
+
+ /** The total number of records that were successfully processed. */
+ @SerializedName("success_count")
+ @JsonAdapter(StringInt64TypeAdapter.class)
+ Long successCount;
+
+ /**
+ * The output file details. If BatchJob is cancelled it's provided only if there is already
+ * output at this point.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class OutputFile extends StripeObject {
+ /** The content type of the file. */
+ @SerializedName("content_type")
+ String contentType;
+
+ /** A pre-signed URL that allows secure, time-limited access to download the file. */
+ @SerializedName("download_url")
+ DownloadUrl downloadUrl;
+
+ /** The total size of the file in bytes. */
+ @SerializedName("size")
+ @JsonAdapter(StringInt64TypeAdapter.class)
+ Long size;
+
+ /** A pre-signed URL that allows secure, time-limited access to download the file. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class DownloadUrl extends StripeObject {
+ /** The time that the URL expires. */
+ @SerializedName("expires_at")
+ Instant expiresAt;
+
+ /** The URL that can be used for accessing the file. */
+ @SerializedName("url")
+ String url;
+ }
+ }
+ }
+
+ /** Additional details for the {@code COMPLETE} status of the {@code BatchJob}. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Complete extends StripeObject {
+ /** The total number of records that failed processing. */
+ @SerializedName("failure_count")
+ @JsonAdapter(StringInt64TypeAdapter.class)
+ Long failureCount;
+
+ /**
+ * The output file details. If BatchJob is cancelled it's provided only if there is already
+ * output at this point.
+ */
+ @SerializedName("output_file")
+ OutputFile outputFile;
+
+ /** The total number of records that were successfully processed. */
+ @SerializedName("success_count")
+ @JsonAdapter(StringInt64TypeAdapter.class)
+ Long successCount;
+
+ /**
+ * The output file details. If BatchJob is cancelled it's provided only if there is already
+ * output at this point.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class OutputFile extends StripeObject {
+ /** The content type of the file. */
+ @SerializedName("content_type")
+ String contentType;
+
+ /** A pre-signed URL that allows secure, time-limited access to download the file. */
+ @SerializedName("download_url")
+ DownloadUrl downloadUrl;
+
+ /** The total size of the file in bytes. */
+ @SerializedName("size")
+ @JsonAdapter(StringInt64TypeAdapter.class)
+ Long size;
+
+ /** A pre-signed URL that allows secure, time-limited access to download the file. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class DownloadUrl extends StripeObject {
+ /** The time that the URL expires. */
+ @SerializedName("expires_at")
+ Instant expiresAt;
+
+ /** The URL that can be used for accessing the file. */
+ @SerializedName("url")
+ String url;
+ }
+ }
+ }
+
+ /** Additional details for the {@code IN_PROGRESS} status of the {@code BatchJob}. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class InProgress extends StripeObject {
+ /** The number of records that failed processing so far. */
+ @SerializedName("failure_count")
+ @JsonAdapter(StringInt64TypeAdapter.class)
+ Long failureCount;
+
+ /** The number of records that were successfully processed so far. */
+ @SerializedName("success_count")
+ @JsonAdapter(StringInt64TypeAdapter.class)
+ Long successCount;
+ }
+
+ /** Additional details for the {@code READY_FOR_UPLOAD} status of the {@code BatchJob}. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class ReadyForUpload extends StripeObject {
+ /** The upload file details. */
+ @SerializedName("upload_url")
+ UploadUrl uploadUrl;
+
+ /** The upload file details. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class UploadUrl extends StripeObject {
+ /** The time that the URL expires. */
+ @SerializedName("expires_at")
+ Instant expiresAt;
+
+ /** The URL that can be used for accessing the file. */
+ @SerializedName("url")
+ String url;
+ }
+ }
+
+ /** Additional details for the {@code TIMEOUT} status of the {@code BatchJob}. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Timeout extends StripeObject {
+ /** The total number of records that failed processing. */
+ @SerializedName("failure_count")
+ @JsonAdapter(StringInt64TypeAdapter.class)
+ Long failureCount;
+
+ /**
+ * The output file details. If BatchJob is cancelled it's provided only if there is already
+ * output at this point.
+ */
+ @SerializedName("output_file")
+ OutputFile outputFile;
+
+ /** The total number of records that were successfully processed. */
+ @SerializedName("success_count")
+ @JsonAdapter(StringInt64TypeAdapter.class)
+ Long successCount;
+
+ /**
+ * The output file details. If BatchJob is cancelled it's provided only if there is already
+ * output at this point.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class OutputFile extends StripeObject {
+ /** The content type of the file. */
+ @SerializedName("content_type")
+ String contentType;
+
+ /** A pre-signed URL that allows secure, time-limited access to download the file. */
+ @SerializedName("download_url")
+ DownloadUrl downloadUrl;
+
+ /** The total size of the file in bytes. */
+ @SerializedName("size")
+ @JsonAdapter(StringInt64TypeAdapter.class)
+ Long size;
+
+ /** A pre-signed URL that allows secure, time-limited access to download the file. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class DownloadUrl extends StripeObject {
+ /** The time that the URL expires. */
+ @SerializedName("expires_at")
+ Instant expiresAt;
+
+ /** The URL that can be used for accessing the file. */
+ @SerializedName("url")
+ String url;
+ }
+ }
+ }
+
+ /** Additional details for the {@code VALIDATING} status of the {@code BatchJob}. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Validating extends StripeObject {
+ /**
+ * The number of records that were validated. Note that there is no failure counter here; once
+ * we have any validation failures we give up.
+ */
+ @SerializedName("validated_count")
+ @JsonAdapter(StringInt64TypeAdapter.class)
+ Long validatedCount;
+ }
+
+ /** Additional details for the {@code VALIDATION_FAILED} status of the {@code BatchJob}. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class ValidationFailed extends StripeObject {
+ /** The total number of records that failed processing. */
+ @SerializedName("failure_count")
+ @JsonAdapter(StringInt64TypeAdapter.class)
+ Long failureCount;
+
+ /**
+ * The output file details. If BatchJob is cancelled it's provided only if there is already
+ * output at this point.
+ */
+ @SerializedName("output_file")
+ OutputFile outputFile;
+
+ /** The total number of records that were successfully processed. */
+ @SerializedName("success_count")
+ @JsonAdapter(StringInt64TypeAdapter.class)
+ Long successCount;
+
+ /**
+ * The output file details. If BatchJob is cancelled it's provided only if there is already
+ * output at this point.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class OutputFile extends StripeObject {
+ /** The content type of the file. */
+ @SerializedName("content_type")
+ String contentType;
+
+ /** A pre-signed URL that allows secure, time-limited access to download the file. */
+ @SerializedName("download_url")
+ DownloadUrl downloadUrl;
+
+ /** The total size of the file in bytes. */
+ @SerializedName("size")
+ @JsonAdapter(StringInt64TypeAdapter.class)
+ Long size;
+
+ /** A pre-signed URL that allows secure, time-limited access to download the file. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class DownloadUrl extends StripeObject {
+ /** The time that the URL expires. */
+ @SerializedName("expires_at")
+ Instant expiresAt;
+
+ /** The URL that can be used for accessing the file. */
+ @SerializedName("url")
+ String url;
+ }
+ }
+ }
+ }
+}
diff --git a/src/main/java/com/stripe/model/v2/core/EventDestination.java b/src/main/java/com/stripe/model/v2/core/EventDestination.java
index 0aee20d9e9b..cc45e0ae021 100644
--- a/src/main/java/com/stripe/model/v2/core/EventDestination.java
+++ b/src/main/java/com/stripe/model/v2/core/EventDestination.java
@@ -26,6 +26,10 @@ public class EventDestination extends StripeObject implements HasId {
@SerializedName("amazon_eventbridge")
AmazonEventbridge amazonEventbridge;
+ /** Azure Event Grid configuration. */
+ @SerializedName("azure_event_grid")
+ AzureEventGrid azureEventGrid;
+
/** Time at which the object was created. */
@SerializedName("created")
Instant created;
@@ -46,7 +50,14 @@ public class EventDestination extends StripeObject implements HasId {
@SerializedName("event_payload")
String eventPayload;
- /** Where events should be routed from. */
+ /**
+ * Specifies which accounts' events route to this destination. {@code @self}: Receive events from
+ * the account that owns the event destination. {@code @accounts}: Receive events emitted from
+ * other accounts you manage which includes your v1 and v2 accounts.
+ * {@code @organization_members}: Receive events from accounts directly linked to the
+ * organization. {@code @organization_members/@accounts}: Receive events from all accounts
+ * connected to any platform accounts in the organization.
+ */
@SerializedName("events_from")
List eventsFrom;
@@ -98,7 +109,7 @@ public class EventDestination extends StripeObject implements HasId {
/**
* Event destination type.
*
- * One of {@code amazon_eventbridge}, or {@code webhook_endpoint}.
+ *
One of {@code amazon_eventbridge}, {@code azure_event_grid}, or {@code webhook_endpoint}.
*/
@SerializedName("type")
String type;
@@ -133,6 +144,36 @@ public static class AmazonEventbridge extends StripeObject {
String awsEventSourceStatus;
}
+ /** Azure Event Grid configuration. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class AzureEventGrid extends StripeObject {
+ /** The name of the Azure partner topic. */
+ @SerializedName("azure_partner_topic_name")
+ String azurePartnerTopicName;
+
+ /**
+ * The status of the Azure partner topic.
+ *
+ *
One of {@code activated}, {@code deleted}, {@code never_activated}, or {@code unknown}.
+ */
+ @SerializedName("azure_partner_topic_status")
+ String azurePartnerTopicStatus;
+
+ /** The Azure region. */
+ @SerializedName("azure_region")
+ String azureRegion;
+
+ /** The name of the Azure resource group. */
+ @SerializedName("azure_resource_group_name")
+ String azureResourceGroupName;
+
+ /** The Azure subscription ID. */
+ @SerializedName("azure_subscription_id")
+ String azureSubscriptionId;
+ }
+
/** Additional information about event destination status. */
@Getter
@Setter
@@ -150,7 +191,8 @@ public static class Disabled extends StripeObject {
/**
* Reason event destination has been disabled.
*
- *
One of {@code no_aws_event_source_exists}, or {@code user}.
+ *
One of {@code no_aws_event_source_exists}, {@code no_azure_partner_topic_exists}, or
+ * {@code user}.
*/
@SerializedName("reason")
String reason;
diff --git a/src/main/java/com/stripe/model/v2/core/EventNotification.java b/src/main/java/com/stripe/model/v2/core/EventNotification.java
index 2246cabcaa7..374abbb60f8 100644
--- a/src/main/java/com/stripe/model/v2/core/EventNotification.java
+++ b/src/main/java/com/stripe/model/v2/core/EventNotification.java
@@ -93,6 +93,12 @@ public static EventNotification fromJson(String payload, StripeClient client) {
// don't love the double json parse here, but I don't think we can avoid it?
JsonObject jsonObject = ApiResource.GSON.fromJson(payload, JsonObject.class).getAsJsonObject();
+ if (jsonObject.has("object") && "event".equals(jsonObject.get("object").getAsString())) {
+ throw new IllegalArgumentException(
+ "You passed a webhook payload to StripeClient.parseEventNotification, which expects an event notification."
+ + " Use StripeClient.constructEvent instead.");
+ }
+
Class extends EventNotification> cls =
EventNotificationClassLookup.eventClassLookup.get(jsonObject.get("type").getAsString());
if (cls == null) {
diff --git a/src/main/java/com/stripe/model/v2/core/vault/GbBankAccount.java b/src/main/java/com/stripe/model/v2/core/vault/GbBankAccount.java
index d1ea223c682..f43af389910 100644
--- a/src/main/java/com/stripe/model/v2/core/vault/GbBankAccount.java
+++ b/src/main/java/com/stripe/model/v2/core/vault/GbBankAccount.java
@@ -5,6 +5,7 @@
import com.stripe.model.HasId;
import com.stripe.model.StripeObject;
import java.time.Instant;
+import java.util.List;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
@@ -80,6 +81,10 @@ public class GbBankAccount extends StripeObject implements HasId {
@SerializedName("sort_code")
String sortCode;
+ /** The list of currencies supported by this bank account. */
+ @SerializedName("supported_currencies")
+ List supportedCurrencies;
+
/** The alternative reference for this payout method, if it's a projected payout method. */
@Getter
@Setter
diff --git a/src/main/java/com/stripe/model/v2/core/vault/UsBankAccount.java b/src/main/java/com/stripe/model/v2/core/vault/UsBankAccount.java
index a4b359adc37..37a3ed55f33 100644
--- a/src/main/java/com/stripe/model/v2/core/vault/UsBankAccount.java
+++ b/src/main/java/com/stripe/model/v2/core/vault/UsBankAccount.java
@@ -5,6 +5,7 @@
import com.stripe.model.HasId;
import com.stripe.model.StripeObject;
import java.time.Instant;
+import java.util.List;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
@@ -81,6 +82,10 @@ public class UsBankAccount extends StripeObject implements HasId {
@SerializedName("routing_number")
String routingNumber;
+ /** The list of currencies supported by this bank account. */
+ @SerializedName("supported_currencies")
+ List supportedCurrencies;
+
/** The bank account verification details. */
@SerializedName("verification")
Verification verification;
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 25cf1b6224c..6c3003f3991 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;
@@ -110,25 +111,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/FinancialAccount.java b/src/main/java/com/stripe/model/v2/moneymanagement/FinancialAccount.java
index a02e0dfa787..a971b0de373 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;
@@ -86,6 +87,7 @@ public class FinancialAccount extends StripeObject implements HasId {
@SerializedName("status")
String status;
+ /** Additional details related to the status of the FinancialAccount. */
@SerializedName("status_details")
StatusDetails statusDetails;
@@ -117,87 +119,15 @@ public class FinancialAccount extends StripeObject implements HasId {
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;
}
/**
@@ -216,35 +146,33 @@ public static class Other extends StripeObject {
String type;
}
- /**
- * For more details about StatusDetails, please refer to the API Reference.
- */
+ /** Additional details related to the status of the FinancialAccount. */
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class StatusDetails extends StripeObject {
+ /** Details related to the closed state of the FinancialAccount. */
@SerializedName("closed")
Closed closed;
- /**
- * For more details about Closed, please refer to the API
- * Reference.
- */
+ /** Details related to the closed state of the FinancialAccount. */
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Closed extends StripeObject {
+ /** The forwarding settings for the closed FinancialAccount. */
@SerializedName("forwarding_settings")
ForwardingSettings forwardingSettings;
+ /**
+ * The reason the FinancialAccount was closed.
+ *
+ * One of {@code account_closed}, {@code closed_by_platform}, or {@code other}.
+ */
@SerializedName("reason")
String reason;
- /**
- * For more details about ForwardingSettings, please refer to the API Reference.
- */
+ /** The forwarding settings for the closed FinancialAccount. */
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
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 c271016b876..c6046984d89 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;
@@ -145,32 +146,11 @@ public class OutboundPayment extends StripeObject implements HasId {
/**
* A unique identifier that can be used to track this OutboundPayment with recipient bank. Banks
- * might call this a “reference number” or something similar.
+ * might call this a "reference number" or something similar.
*/
@SerializedName("trace_id")
TraceId traceId;
- /** 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
@@ -192,32 +172,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;
- }
}
/** Details about the OutboundPayment notification settings for recipient. */
@@ -329,7 +288,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")
@@ -338,32 +297,11 @@ 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;
- }
}
/**
* A unique identifier that can be used to track this OutboundPayment with recipient bank. Banks
- * might call this a “reference number” or something similar.
+ * might call this a "reference number" or something similar.
*/
@Getter
@Setter
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 1c80c6d4cac..aedc34af7ed 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
@@ -126,27 +106,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. */
@@ -156,32 +115,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. */
@@ -243,7 +181,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")
@@ -252,26 +190,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 d9ab6d45385..c052f60f631 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;
@@ -126,32 +127,11 @@ public class OutboundTransfer extends StripeObject implements HasId {
/**
* A unique identifier that can be used to track this OutboundTransfer with recipient bank. Banks
- * might call this a “reference number” or something similar.
+ * might call this a "reference number" or something similar.
*/
@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
@@ -173,32 +153,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. */
@@ -294,37 +253,16 @@ 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;
- }
}
/**
* A unique identifier that can be used to track this OutboundTransfer with recipient bank. Banks
- * might call this a “reference number” or something similar.
+ * might call this a "reference number" or something similar.
*/
@Getter
@Setter
diff --git a/src/main/java/com/stripe/model/v2/moneymanagement/PayoutMethod.java b/src/main/java/com/stripe/model/v2/moneymanagement/PayoutMethod.java
index e7dae1d42e7..3635800ffb6 100644
--- a/src/main/java/com/stripe/model/v2/moneymanagement/PayoutMethod.java
+++ b/src/main/java/com/stripe/model/v2/moneymanagement/PayoutMethod.java
@@ -60,6 +60,13 @@ public class PayoutMethod extends StripeObject implements HasId {
@SerializedName("object")
String object;
+ /**
+ * Whether the Payout Method is currently unusable for money movement, despite potentially being
+ * correctly set up. Please reach out to Stripe Support for more information.
+ */
+ @SerializedName("restricted")
+ Boolean restricted;
+
/**
* Closed Enum. The type of payout method.
*
@@ -188,6 +195,10 @@ public static class Card extends StripeObject {
/** The last 4 digits of the card number. */
@SerializedName("last4")
String last4;
+
+ /** The list of currencies supported by this bank account. */
+ @SerializedName("supported_currencies")
+ List supportedCurrencies;
}
/**
diff --git a/src/main/java/com/stripe/model/v2/moneymanagement/PayoutMethodsBankAccountSpec.java b/src/main/java/com/stripe/model/v2/moneymanagement/PayoutMethodsBankAccountSpec.java
index 23b774f7353..70c296bc556 100644
--- a/src/main/java/com/stripe/model/v2/moneymanagement/PayoutMethodsBankAccountSpec.java
+++ b/src/main/java/com/stripe/model/v2/moneymanagement/PayoutMethodsBankAccountSpec.java
@@ -54,6 +54,13 @@ public static class Country extends StripeObject {
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Field extends StripeObject {
+ /**
+ * The currencies supported by the corresponding credentials for bank accounts in the
+ * specified country.
+ */
+ @SerializedName("currencies")
+ List currencies;
+
/** The local name of the field. */
@SerializedName("local_name")
String localName;
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 0d985df7536..1c26a25da25 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;
@@ -105,27 +106,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}.
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 b47d0429e59..35e84bcd2d7 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 lombok.EqualsAndHashCode;
import lombok.Getter;
@@ -83,34 +84,13 @@ public class ReceivedDebit extends StripeObject implements HasId {
StatusTransitions statusTransitions;
/**
- * Open enum, the type of the received debit.
+ * Open Enum. The type of the ReceivedDebit.
*
* One of {@code bank_transfer}, or {@code external_debit}.
*/
@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 originating banking transaction that resulted in the
* ReceivedDebit. Present if {@code type} field value is {@code bank_transfer}.
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 9e276469389..bb463978436 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;
@@ -41,6 +42,10 @@ public class Transaction extends StripeObject implements HasId {
@SerializedName("category")
String category;
+ /** Counterparty to this Transaction. */
+ @SerializedName("counterparty")
+ Counterparty counterparty;
+
/**
* Time at which the object was created. Represented as a RFC 3339 date & time UTC value in
* millisecond precision, for example: 2022-09-18T13:22:18.123Z.
@@ -48,6 +53,13 @@ public class Transaction extends StripeObject implements HasId {
@SerializedName("created")
Instant created;
+ /**
+ * Description of this Transaction. When applicable, the description is copied from the Flow
+ * object at the time of transaction creation.
+ */
+ @SerializedName("description")
+ String description;
+
/** Indicates the FinancialAccount affected by this Transaction. */
@SerializedName("financial_account")
String financialAccount;
@@ -93,27 +105,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.
@@ -124,78 +115,25 @@ 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;
+ Amount outboundPending;
+ }
- /**
- * A non-negative integer representing how much to charge in the smallest currency unit.
- */
- @SerializedName("value")
- Long value;
- }
+ /** Counterparty to this Transaction. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Counterparty extends StripeObject {
+ /** Name of the counterparty. */
+ @SerializedName("name")
+ String name;
}
/** 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 c5730e80df6..87d1e6f2e15 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/net/JsonEncoder.java b/src/main/java/com/stripe/net/JsonEncoder.java
index 35de33bc6a2..898a7d6f5e3 100644
--- a/src/main/java/com/stripe/net/JsonEncoder.java
+++ b/src/main/java/com/stripe/net/JsonEncoder.java
@@ -3,15 +3,42 @@
import com.google.gson.FieldNamingPolicy;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
+import com.google.gson.TypeAdapter;
+import com.google.gson.stream.JsonReader;
+import com.google.gson.stream.JsonWriter;
import java.io.IOException;
+import java.math.BigDecimal;
import java.util.HashMap;
import java.util.Map;
final class JsonEncoder {
+ /**
+ * Serializes BigDecimal as a JSON string (e.g., "25.5") rather than a JSON number (25.5). All
+ * BigDecimal fields in the Stripe API use format: decimal, and the V2 API expects them as strings
+ * on the wire.
+ */
+ private static final TypeAdapter BIG_DECIMAL_STRING_ADAPTER =
+ new TypeAdapter() {
+ @Override
+ public void write(JsonWriter out, BigDecimal value) throws IOException {
+ if (value == null) {
+ out.nullValue();
+ } else {
+ out.value(value.toPlainString());
+ }
+ }
+
+ @Override
+ public BigDecimal read(JsonReader in) throws IOException {
+ return new BigDecimal(in.nextString());
+ }
+ };
+
private static final Gson BODY_GSON =
new GsonBuilder()
.setFieldNamingPolicy(FieldNamingPolicy.LOWER_CASE_WITH_UNDERSCORES)
.serializeNulls()
+ .registerTypeAdapter(BigDecimal.class, BIG_DECIMAL_STRING_ADAPTER)
.create();
public static HttpContent createHttpContent(Map params) throws IOException {
diff --git a/src/main/java/com/stripe/net/Webhook.java b/src/main/java/com/stripe/net/Webhook.java
index ea67ea34362..09505f70873 100644
--- a/src/main/java/com/stripe/net/Webhook.java
+++ b/src/main/java/com/stripe/net/Webhook.java
@@ -54,8 +54,8 @@ public static Event constructEvent(
/**
* Returns an Event instance using the provided JSON payload. Throws a JsonSyntaxException if the
- * payload is not valid JSON, and a SignatureVerificationException if the signature verification
- * fails for any reason.
+ * payload is not valid JSON, a SignatureVerificationException if the signature verification fails
+ * for any reason, and an IllegalArgumentException if you pass the wrong type of input.
*
* @param payload the payload sent by Stripe.
* @param sigHeader the contents of the signature header sent by Stripe.
@@ -72,6 +72,13 @@ public static Event constructEvent(
Event event =
StripeObject.deserializeStripeObject(
payload, Event.class, ApiResource.getGlobalResponseGetter());
+
+ if ("v2.core.event".equals(event.getObject())) {
+ throw new IllegalArgumentException(
+ "You passed an event notification to Webhook.constructEvent, which expects a webhook payload."
+ + " Use StripeClient.parseEventNotification instead.");
+ }
+
Signature.verifyHeader(payload, sigHeader, secret, tolerance, clock);
// StripeObjects source their raw JSON object from their last response, but constructed webhooks
// don't have that
diff --git a/src/main/java/com/stripe/param/AccountCreateParams.java b/src/main/java/com/stripe/param/AccountCreateParams.java
index a308f933b6c..7f9acd2895f 100644
--- a/src/main/java/com/stripe/param/AccountCreateParams.java
+++ b/src/main/java/com/stripe/param/AccountCreateParams.java
@@ -1629,6 +1629,10 @@ public static class Capabilities {
@SerializedName("twint_payments")
TwintPayments twintPayments;
+ /** The upi_payments capability. */
+ @SerializedName("upi_payments")
+ UpiPayments upiPayments;
+
/** The us_bank_account_ach_payments capability. */
@SerializedName("us_bank_account_ach_payments")
UsBankAccountAchPayments usBankAccountAchPayments;
@@ -1714,6 +1718,7 @@ private Capabilities(
TreasuryFifthThird treasuryFifthThird,
TreasuryGoldmanSachs treasuryGoldmanSachs,
TwintPayments twintPayments,
+ UpiPayments upiPayments,
UsBankAccountAchPayments usBankAccountAchPayments,
UsBankTransferPayments usBankTransferPayments,
ZipPayments zipPayments) {
@@ -1789,6 +1794,7 @@ private Capabilities(
this.treasuryFifthThird = treasuryFifthThird;
this.treasuryGoldmanSachs = treasuryGoldmanSachs;
this.twintPayments = twintPayments;
+ this.upiPayments = upiPayments;
this.usBankAccountAchPayments = usBankAccountAchPayments;
this.usBankTransferPayments = usBankTransferPayments;
this.zipPayments = zipPayments;
@@ -1943,6 +1949,8 @@ public static class Builder {
private TwintPayments twintPayments;
+ private UpiPayments upiPayments;
+
private UsBankAccountAchPayments usBankAccountAchPayments;
private UsBankTransferPayments usBankTransferPayments;
@@ -2024,6 +2032,7 @@ public AccountCreateParams.Capabilities build() {
this.treasuryFifthThird,
this.treasuryGoldmanSachs,
this.twintPayments,
+ this.upiPayments,
this.usBankAccountAchPayments,
this.usBankTransferPayments,
this.zipPayments);
@@ -2539,6 +2548,12 @@ public Builder setTwintPayments(
return this;
}
+ /** The upi_payments capability. */
+ public Builder setUpiPayments(AccountCreateParams.Capabilities.UpiPayments upiPayments) {
+ this.upiPayments = upiPayments;
+ return this;
+ }
+
/** The us_bank_account_ach_payments capability. */
public Builder setUsBankAccountAchPayments(
AccountCreateParams.Capabilities.UsBankAccountAchPayments usBankAccountAchPayments) {
@@ -8234,6 +8249,85 @@ public Builder setRequested(Boolean requested) {
}
}
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class UpiPayments {
+ /**
+ * Map of extra parameters for custom features not available in this client library. The
+ * content in this map is not serialized under this field's {@code @SerializedName} value.
+ * Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
+ * name in this param object. Effectively, this map is flattened to its parent instance.
+ */
+ @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
+ Map extraParams;
+
+ /**
+ * Passing true requests the capability for the account, if it is not already requested. A
+ * requested capability may not immediately become active. Any requirements to activate the
+ * capability are returned in the {@code requirements} arrays.
+ */
+ @SerializedName("requested")
+ Boolean requested;
+
+ private UpiPayments(Map extraParams, Boolean requested) {
+ this.extraParams = extraParams;
+ this.requested = requested;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Map extraParams;
+
+ private Boolean requested;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public AccountCreateParams.Capabilities.UpiPayments build() {
+ return new AccountCreateParams.Capabilities.UpiPayments(this.extraParams, this.requested);
+ }
+
+ /**
+ * Add a key/value pair to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
+ * map. See {@link AccountCreateParams.Capabilities.UpiPayments#extraParams} for the field
+ * documentation.
+ */
+ public Builder putExtraParam(String key, Object value) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.put(key, value);
+ return this;
+ }
+
+ /**
+ * Add all map key/value pairs to `extraParams` map. 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.Capabilities.UpiPayments#extraParams} for the field
+ * documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+
+ /**
+ * Passing true requests the capability for the account, if it is not already requested. A
+ * requested capability may not immediately become active. Any requirements to activate the
+ * capability are returned in the {@code requirements} arrays.
+ */
+ public Builder setRequested(Boolean requested) {
+ this.requested = requested;
+ return this;
+ }
+ }
+ }
+
@Getter
@EqualsAndHashCode(callSuper = false)
public static class UsBankAccountAchPayments {
@@ -16202,7 +16296,10 @@ public static class PaypayPayments {
@SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
Map extraParams;
- /** Whether your business sells digital content or not. */
+ /**
+ * The type of goods your business sells. Use {@code digital_content} if you sell digital
+ * content. Use {@code other} for all other types of goods or services.
+ */
@SerializedName("goods_type")
GoodsType goodsType;
@@ -16296,7 +16393,10 @@ public Builder putAllExtraParam(Map map) {
return this;
}
- /** Whether your business sells digital content or not. */
+ /**
+ * The type of goods your business sells. Use {@code digital_content} if you sell digital
+ * content. Use {@code other} for all other types of goods or services.
+ */
public Builder setGoodsType(
AccountCreateParams.Settings.PaypayPayments.GoodsType goodsType) {
this.goodsType = goodsType;
diff --git a/src/main/java/com/stripe/param/AccountUpdateParams.java b/src/main/java/com/stripe/param/AccountUpdateParams.java
index 25dae548c9c..b064c2f57c1 100644
--- a/src/main/java/com/stripe/param/AccountUpdateParams.java
+++ b/src/main/java/com/stripe/param/AccountUpdateParams.java
@@ -1730,6 +1730,10 @@ public static class Capabilities {
@SerializedName("twint_payments")
TwintPayments twintPayments;
+ /** The upi_payments capability. */
+ @SerializedName("upi_payments")
+ UpiPayments upiPayments;
+
/** The us_bank_account_ach_payments capability. */
@SerializedName("us_bank_account_ach_payments")
UsBankAccountAchPayments usBankAccountAchPayments;
@@ -1815,6 +1819,7 @@ private Capabilities(
TreasuryFifthThird treasuryFifthThird,
TreasuryGoldmanSachs treasuryGoldmanSachs,
TwintPayments twintPayments,
+ UpiPayments upiPayments,
UsBankAccountAchPayments usBankAccountAchPayments,
UsBankTransferPayments usBankTransferPayments,
ZipPayments zipPayments) {
@@ -1890,6 +1895,7 @@ private Capabilities(
this.treasuryFifthThird = treasuryFifthThird;
this.treasuryGoldmanSachs = treasuryGoldmanSachs;
this.twintPayments = twintPayments;
+ this.upiPayments = upiPayments;
this.usBankAccountAchPayments = usBankAccountAchPayments;
this.usBankTransferPayments = usBankTransferPayments;
this.zipPayments = zipPayments;
@@ -2044,6 +2050,8 @@ public static class Builder {
private TwintPayments twintPayments;
+ private UpiPayments upiPayments;
+
private UsBankAccountAchPayments usBankAccountAchPayments;
private UsBankTransferPayments usBankTransferPayments;
@@ -2125,6 +2133,7 @@ public AccountUpdateParams.Capabilities build() {
this.treasuryFifthThird,
this.treasuryGoldmanSachs,
this.twintPayments,
+ this.upiPayments,
this.usBankAccountAchPayments,
this.usBankTransferPayments,
this.zipPayments);
@@ -2640,6 +2649,12 @@ public Builder setTwintPayments(
return this;
}
+ /** The upi_payments capability. */
+ public Builder setUpiPayments(AccountUpdateParams.Capabilities.UpiPayments upiPayments) {
+ this.upiPayments = upiPayments;
+ return this;
+ }
+
/** The us_bank_account_ach_payments capability. */
public Builder setUsBankAccountAchPayments(
AccountUpdateParams.Capabilities.UsBankAccountAchPayments usBankAccountAchPayments) {
@@ -8335,6 +8350,85 @@ public Builder setRequested(Boolean requested) {
}
}
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class UpiPayments {
+ /**
+ * Map of extra parameters for custom features not available in this client library. The
+ * content in this map is not serialized under this field's {@code @SerializedName} value.
+ * Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
+ * name in this param object. Effectively, this map is flattened to its parent instance.
+ */
+ @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
+ Map extraParams;
+
+ /**
+ * Passing true requests the capability for the account, if it is not already requested. A
+ * requested capability may not immediately become active. Any requirements to activate the
+ * capability are returned in the {@code requirements} arrays.
+ */
+ @SerializedName("requested")
+ Boolean requested;
+
+ private UpiPayments(Map extraParams, Boolean requested) {
+ this.extraParams = extraParams;
+ this.requested = requested;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Map extraParams;
+
+ private Boolean requested;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public AccountUpdateParams.Capabilities.UpiPayments build() {
+ return new AccountUpdateParams.Capabilities.UpiPayments(this.extraParams, this.requested);
+ }
+
+ /**
+ * Add a key/value pair to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
+ * map. See {@link AccountUpdateParams.Capabilities.UpiPayments#extraParams} for the field
+ * documentation.
+ */
+ public Builder putExtraParam(String key, Object value) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.put(key, value);
+ return this;
+ }
+
+ /**
+ * Add all map key/value pairs to `extraParams` map. 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.Capabilities.UpiPayments#extraParams} for the field
+ * documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+
+ /**
+ * Passing true requests the capability for the account, if it is not already requested. A
+ * requested capability may not immediately become active. Any requirements to activate the
+ * capability are returned in the {@code requirements} arrays.
+ */
+ public Builder setRequested(Boolean requested) {
+ this.requested = requested;
+ return this;
+ }
+ }
+ }
+
@Getter
@EqualsAndHashCode(callSuper = false)
public static class UsBankAccountAchPayments {
@@ -16411,7 +16505,10 @@ public static class PaypayPayments {
@SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
Map extraParams;
- /** Whether your business sells digital content or not. */
+ /**
+ * The type of goods your business sells. Use {@code digital_content} if you sell digital
+ * content. Use {@code other} for all other types of goods or services.
+ */
@SerializedName("goods_type")
GoodsType goodsType;
@@ -16505,7 +16602,10 @@ public Builder putAllExtraParam(Map map) {
return this;
}
- /** Whether your business sells digital content or not. */
+ /**
+ * The type of goods your business sells. Use {@code digital_content} if you sell digital
+ * content. Use {@code other} for all other types of goods or services.
+ */
public Builder setGoodsType(
AccountUpdateParams.Settings.PaypayPayments.GoodsType goodsType) {
this.goodsType = goodsType;
diff --git a/src/main/java/com/stripe/param/ChargeCaptureParams.java b/src/main/java/com/stripe/param/ChargeCaptureParams.java
index 0c3aecfd06f..5378c15e0e8 100644
--- a/src/main/java/com/stripe/param/ChargeCaptureParams.java
+++ b/src/main/java/com/stripe/param/ChargeCaptureParams.java
@@ -352,10 +352,6 @@ public static class PaymentDetails {
* A unique value assigned by the business to identify the transaction. Required for L2 and L3
* rates.
*
- * Required when the Payment Method Types array contains {@code card}, including when automatic_payment_methods.enabled
- * is set to {@code true}.
- *
*
For Cards, this field is truncated to 25 alphanumeric characters, excluding spaces, before
* being sent to card networks. For Klarna, this field is truncated to 255 characters and is
* visible to customers when they view the order in the Klarna app.
@@ -637,10 +633,6 @@ public Builder setLodgingData(
* A unique value assigned by the business to identify the transaction. Required for L2 and L3
* rates.
*
- *
Required when the Payment Method Types array contains {@code card}, including when automatic_payment_methods.enabled
- * is set to {@code true}.
- *
*
For Cards, this field is truncated to 25 alphanumeric characters, excluding spaces,
* before being sent to card networks. For Klarna, this field is truncated to 255 characters
* and is visible to customers when they view the order in the Klarna app.
@@ -654,10 +646,6 @@ public Builder setOrderReference(String orderReference) {
* A unique value assigned by the business to identify the transaction. Required for L2 and L3
* rates.
*
- *
Required when the Payment Method Types array contains {@code card}, including when automatic_payment_methods.enabled
- * is set to {@code true}.
- *
*
For Cards, this field is truncated to 25 alphanumeric characters, excluding spaces,
* before being sent to card networks. For Klarna, this field is truncated to 255 characters
* and is visible to customers when they view the order in the Klarna app.
diff --git a/src/main/java/com/stripe/param/ChargeUpdateParams.java b/src/main/java/com/stripe/param/ChargeUpdateParams.java
index 8c0fdfe61de..024f5f587c6 100644
--- a/src/main/java/com/stripe/param/ChargeUpdateParams.java
+++ b/src/main/java/com/stripe/param/ChargeUpdateParams.java
@@ -499,10 +499,6 @@ public static class PaymentDetails {
* A unique value assigned by the business to identify the transaction. Required for L2 and L3
* rates.
*
- *
Required when the Payment Method Types array contains {@code card}, including when automatic_payment_methods.enabled
- * is set to {@code true}.
- *
*
For Cards, this field is truncated to 25 alphanumeric characters, excluding spaces, before
* being sent to card networks. For Klarna, this field is truncated to 255 characters and is
* visible to customers when they view the order in the Klarna app.
@@ -783,10 +779,6 @@ public Builder setLodgingData(
* A unique value assigned by the business to identify the transaction. Required for L2 and L3
* rates.
*
- *
Required when the Payment Method Types array contains {@code card}, including when automatic_payment_methods.enabled
- * is set to {@code true}.
- *
*
For Cards, this field is truncated to 25 alphanumeric characters, excluding spaces,
* before being sent to card networks. For Klarna, this field is truncated to 255 characters
* and is visible to customers when they view the order in the Klarna app.
@@ -800,10 +792,6 @@ public Builder setOrderReference(String orderReference) {
* A unique value assigned by the business to identify the transaction. Required for L2 and L3
* rates.
*
- *
Required when the Payment Method Types array contains {@code card}, including when automatic_payment_methods.enabled
- * is set to {@code true}.
- *
*
For Cards, this field is truncated to 25 alphanumeric characters, excluding spaces,
* before being sent to card networks. For Klarna, this field is truncated to 255 characters
* and is visible to customers when they view the order in the Klarna app.
diff --git a/src/main/java/com/stripe/param/ConfirmationTokenCreateParams.java b/src/main/java/com/stripe/param/ConfirmationTokenCreateParams.java
index 8ece8d38971..06ffbbb9254 100644
--- a/src/main/java/com/stripe/param/ConfirmationTokenCreateParams.java
+++ b/src/main/java/com/stripe/param/ConfirmationTokenCreateParams.java
@@ -635,6 +635,13 @@ public static class PaymentMethodData {
@SerializedName("type")
Type type;
+ /**
+ * If this is a {@code upi} PaymentMethod, this hash contains details about the UPI payment
+ * method.
+ */
+ @SerializedName("upi")
+ Upi upi;
+
/**
* If this is an {@code us_bank_account} PaymentMethod, this hash contains details about the US
* bank account payment method.
@@ -717,6 +724,7 @@ private PaymentMethodData(
Swish swish,
Twint twint,
Type type,
+ Upi upi,
UsBankAccount usBankAccount,
WechatPay wechatPay,
Zip zip) {
@@ -780,6 +788,7 @@ private PaymentMethodData(
this.swish = swish;
this.twint = twint;
this.type = type;
+ this.upi = upi;
this.usBankAccount = usBankAccount;
this.wechatPay = wechatPay;
this.zip = zip;
@@ -910,6 +919,8 @@ public static class Builder {
private Type type;
+ private Upi upi;
+
private UsBankAccount usBankAccount;
private WechatPay wechatPay;
@@ -979,6 +990,7 @@ public ConfirmationTokenCreateParams.PaymentMethodData build() {
this.swish,
this.twint,
this.type,
+ this.upi,
this.usBankAccount,
this.wechatPay,
this.zip);
@@ -1585,6 +1597,15 @@ public Builder setType(ConfirmationTokenCreateParams.PaymentMethodData.Type type
return this;
}
+ /**
+ * If this is a {@code upi} PaymentMethod, this hash contains details about the UPI payment
+ * method.
+ */
+ public Builder setUpi(ConfirmationTokenCreateParams.PaymentMethodData.Upi upi) {
+ this.upi = upi;
+ return this;
+ }
+
/**
* If this is an {@code us_bank_account} PaymentMethod, this hash contains details about the
* US bank account payment method.
@@ -6046,19 +6067,9 @@ public static class StripeBalance {
@SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
Map extraParams;
- /**
- * The source_type
- * of the balance
- */
- @SerializedName("source_type")
- SourceType sourceType;
-
- private StripeBalance(
- String account, Map extraParams, SourceType sourceType) {
+ private StripeBalance(String account, Map extraParams) {
this.account = account;
this.extraParams = extraParams;
- this.sourceType = sourceType;
}
public static Builder builder() {
@@ -6070,12 +6081,10 @@ public static class Builder {
private Map extraParams;
- private SourceType sourceType;
-
/** Finalize and obtain parameter instance from this builder. */
public ConfirmationTokenCreateParams.PaymentMethodData.StripeBalance build() {
return new ConfirmationTokenCreateParams.PaymentMethodData.StripeBalance(
- this.account, this.extraParams, this.sourceType);
+ this.account, this.extraParams);
}
/** The connected account ID whose Stripe balance to use as the source of payment. */
@@ -6113,35 +6122,6 @@ public Builder putAllExtraParam(Map map) {
this.extraParams.putAll(map);
return this;
}
-
- /**
- * The source_type
- * of the balance
- */
- public Builder setSourceType(
- ConfirmationTokenCreateParams.PaymentMethodData.StripeBalance.SourceType sourceType) {
- this.sourceType = sourceType;
- return this;
- }
- }
-
- public enum SourceType implements ApiRequestParams.EnumParam {
- @SerializedName("bank_account")
- BANK_ACCOUNT("bank_account"),
-
- @SerializedName("card")
- CARD("card"),
-
- @SerializedName("fpx")
- FPX("fpx");
-
- @Getter(onMethod_ = {@Override})
- private final String value;
-
- SourceType(String value) {
- this.value = value;
- }
}
}
@@ -6261,6 +6241,229 @@ public Builder putAllExtraParam(Map map) {
}
}
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Upi {
+ /**
+ * Map of extra parameters for custom features not available in this client library. The
+ * content in this map is not serialized under this field's {@code @SerializedName} value.
+ * Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
+ * name in this param object. Effectively, this map is flattened to its parent instance.
+ */
+ @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
+ Map extraParams;
+
+ /** Configuration options for setting up an eMandate. */
+ @SerializedName("mandate_options")
+ MandateOptions mandateOptions;
+
+ private Upi(Map extraParams, MandateOptions mandateOptions) {
+ this.extraParams = extraParams;
+ this.mandateOptions = mandateOptions;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Map extraParams;
+
+ private MandateOptions mandateOptions;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public ConfirmationTokenCreateParams.PaymentMethodData.Upi build() {
+ return new ConfirmationTokenCreateParams.PaymentMethodData.Upi(
+ this.extraParams, this.mandateOptions);
+ }
+
+ /**
+ * Add a key/value pair to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
+ * map. See {@link ConfirmationTokenCreateParams.PaymentMethodData.Upi#extraParams} for the
+ * field documentation.
+ */
+ public Builder putExtraParam(String key, Object value) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.put(key, value);
+ return this;
+ }
+
+ /**
+ * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
+ * map. See {@link ConfirmationTokenCreateParams.PaymentMethodData.Upi#extraParams} for the
+ * field documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+
+ /** Configuration options for setting up an eMandate. */
+ public Builder setMandateOptions(
+ ConfirmationTokenCreateParams.PaymentMethodData.Upi.MandateOptions mandateOptions) {
+ this.mandateOptions = mandateOptions;
+ return this;
+ }
+ }
+
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class MandateOptions {
+ /** Amount to be charged for future payments. */
+ @SerializedName("amount")
+ Long amount;
+
+ /**
+ * One of {@code fixed} or {@code maximum}. If {@code fixed}, the {@code amount} param
+ * refers to the exact amount to be charged in future payments. If {@code maximum}, the
+ * amount charged can be up to the value passed for the {@code amount} param.
+ */
+ @SerializedName("amount_type")
+ AmountType amountType;
+
+ /**
+ * A description of the mandate or subscription that is meant to be displayed to the
+ * customer.
+ */
+ @SerializedName("description")
+ String description;
+
+ /** End date of the mandate or subscription. */
+ @SerializedName("end_date")
+ Long endDate;
+
+ /**
+ * Map of extra parameters for custom features not available in this client library. The
+ * content in this map is not serialized under this field's {@code @SerializedName} value.
+ * Instead, each key/value pair is serialized as if the key is a root-level field
+ * (serialized) name in this param object. Effectively, this map is flattened to its parent
+ * instance.
+ */
+ @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
+ Map extraParams;
+
+ private MandateOptions(
+ Long amount,
+ AmountType amountType,
+ String description,
+ Long endDate,
+ Map extraParams) {
+ this.amount = amount;
+ this.amountType = amountType;
+ this.description = description;
+ this.endDate = endDate;
+ this.extraParams = extraParams;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Long amount;
+
+ private AmountType amountType;
+
+ private String description;
+
+ private Long endDate;
+
+ private Map extraParams;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public ConfirmationTokenCreateParams.PaymentMethodData.Upi.MandateOptions build() {
+ return new ConfirmationTokenCreateParams.PaymentMethodData.Upi.MandateOptions(
+ this.amount, this.amountType, this.description, this.endDate, this.extraParams);
+ }
+
+ /** Amount to be charged for future payments. */
+ public Builder setAmount(Long amount) {
+ this.amount = amount;
+ return this;
+ }
+
+ /**
+ * One of {@code fixed} or {@code maximum}. If {@code fixed}, the {@code amount} param
+ * refers to the exact amount to be charged in future payments. If {@code maximum}, the
+ * amount charged can be up to the value passed for the {@code amount} param.
+ */
+ public Builder setAmountType(
+ ConfirmationTokenCreateParams.PaymentMethodData.Upi.MandateOptions.AmountType
+ amountType) {
+ this.amountType = amountType;
+ return this;
+ }
+
+ /**
+ * A description of the mandate or subscription that is meant to be displayed to the
+ * customer.
+ */
+ public Builder setDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ /** End date of the mandate or subscription. */
+ public Builder setEndDate(Long endDate) {
+ this.endDate = endDate;
+ return this;
+ }
+
+ /**
+ * Add a key/value pair to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
+ * map. See {@link
+ * ConfirmationTokenCreateParams.PaymentMethodData.Upi.MandateOptions#extraParams} for the
+ * field documentation.
+ */
+ public Builder putExtraParam(String key, Object value) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.put(key, value);
+ return this;
+ }
+
+ /**
+ * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
+ * map. See {@link
+ * ConfirmationTokenCreateParams.PaymentMethodData.Upi.MandateOptions#extraParams} for the
+ * field documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+ }
+
+ public enum AmountType implements ApiRequestParams.EnumParam {
+ @SerializedName("fixed")
+ FIXED("fixed"),
+
+ @SerializedName("maximum")
+ MAXIMUM("maximum");
+
+ @Getter(onMethod_ = {@Override})
+ private final String value;
+
+ AmountType(String value) {
+ this.value = value;
+ }
+ }
+ }
+ }
+
@Getter
@EqualsAndHashCode(callSuper = false)
public static class UsBankAccount {
@@ -6725,6 +6928,9 @@ public enum Type implements ApiRequestParams.EnumParam {
@SerializedName("twint")
TWINT("twint"),
+ @SerializedName("upi")
+ UPI("upi"),
+
@SerializedName("us_bank_account")
US_BANK_ACCOUNT("us_bank_account"),
diff --git a/src/main/java/com/stripe/param/CreditNoteCreateParams.java b/src/main/java/com/stripe/param/CreditNoteCreateParams.java
index 4af8c7201f0..cedeeb465b2 100644
--- a/src/main/java/com/stripe/param/CreditNoteCreateParams.java
+++ b/src/main/java/com/stripe/param/CreditNoteCreateParams.java
@@ -452,6 +452,15 @@ public static class Line {
@SerializedName("invoice_line_item")
String invoiceLineItem;
+ /**
+ * Set of key-value pairs that you can attach
+ * to an object. This can be useful for storing additional information about the object in a
+ * structured format. Individual keys can be unset by posting an empty value to them. All keys
+ * can be unset by posting an empty value to {@code metadata}.
+ */
+ @SerializedName("metadata")
+ Map metadata;
+
/** The line item quantity to credit. */
@SerializedName("quantity")
Long quantity;
@@ -499,6 +508,7 @@ private Line(
String description,
Map extraParams,
String invoiceLineItem,
+ Map metadata,
Long quantity,
Object taxAmounts,
Object taxRates,
@@ -509,6 +519,7 @@ private Line(
this.description = description;
this.extraParams = extraParams;
this.invoiceLineItem = invoiceLineItem;
+ this.metadata = metadata;
this.quantity = quantity;
this.taxAmounts = taxAmounts;
this.taxRates = taxRates;
@@ -530,6 +541,8 @@ public static class Builder {
private String invoiceLineItem;
+ private Map metadata;
+
private Long quantity;
private Object taxAmounts;
@@ -549,6 +562,7 @@ public CreditNoteCreateParams.Line build() {
this.description,
this.extraParams,
this.invoiceLineItem,
+ this.metadata,
this.quantity,
this.taxAmounts,
this.taxRates,
@@ -610,6 +624,32 @@ public Builder setInvoiceLineItem(String invoiceLineItem) {
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
+ * CreditNoteCreateParams.Line#metadata} for the field documentation.
+ */
+ public Builder putMetadata(String key, String value) {
+ if (this.metadata == null) {
+ this.metadata = new HashMap<>();
+ }
+ this.metadata.put(key, value);
+ return this;
+ }
+
+ /**
+ * Add all map key/value pairs to `metadata` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
+ * See {@link CreditNoteCreateParams.Line#metadata} for the field documentation.
+ */
+ public Builder putAllMetadata(Map map) {
+ if (this.metadata == null) {
+ this.metadata = new HashMap<>();
+ }
+ this.metadata.putAll(map);
+ return this;
+ }
+
/** The line item quantity to credit. */
public Builder setQuantity(Long quantity) {
this.quantity = quantity;
diff --git a/src/main/java/com/stripe/param/CreditNotePreviewLinesListParams.java b/src/main/java/com/stripe/param/CreditNotePreviewLinesListParams.java
index cc81e9c9328..1d1dd8f82a6 100644
--- a/src/main/java/com/stripe/param/CreditNotePreviewLinesListParams.java
+++ b/src/main/java/com/stripe/param/CreditNotePreviewLinesListParams.java
@@ -523,6 +523,15 @@ public static class Line {
@SerializedName("invoice_line_item")
String invoiceLineItem;
+ /**
+ * Set of key-value pairs that you can attach
+ * to an object. This can be useful for storing additional information about the object in a
+ * structured format. Individual keys can be unset by posting an empty value to them. All keys
+ * can be unset by posting an empty value to {@code metadata}.
+ */
+ @SerializedName("metadata")
+ Map metadata;
+
/** The line item quantity to credit. */
@SerializedName("quantity")
Long quantity;
@@ -570,6 +579,7 @@ private Line(
String description,
Map extraParams,
String invoiceLineItem,
+ Map metadata,
Long quantity,
Object taxAmounts,
Object taxRates,
@@ -580,6 +590,7 @@ private Line(
this.description = description;
this.extraParams = extraParams;
this.invoiceLineItem = invoiceLineItem;
+ this.metadata = metadata;
this.quantity = quantity;
this.taxAmounts = taxAmounts;
this.taxRates = taxRates;
@@ -601,6 +612,8 @@ public static class Builder {
private String invoiceLineItem;
+ private Map metadata;
+
private Long quantity;
private Object taxAmounts;
@@ -620,6 +633,7 @@ public CreditNotePreviewLinesListParams.Line build() {
this.description,
this.extraParams,
this.invoiceLineItem,
+ this.metadata,
this.quantity,
this.taxAmounts,
this.taxRates,
@@ -681,6 +695,32 @@ public Builder setInvoiceLineItem(String invoiceLineItem) {
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
+ * CreditNotePreviewLinesListParams.Line#metadata} for the field documentation.
+ */
+ public Builder putMetadata(String key, String value) {
+ if (this.metadata == null) {
+ this.metadata = new HashMap<>();
+ }
+ this.metadata.put(key, value);
+ return this;
+ }
+
+ /**
+ * Add all map key/value pairs to `metadata` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
+ * See {@link CreditNotePreviewLinesListParams.Line#metadata} for the field documentation.
+ */
+ public Builder putAllMetadata(Map map) {
+ if (this.metadata == null) {
+ this.metadata = new HashMap<>();
+ }
+ this.metadata.putAll(map);
+ return this;
+ }
+
/** The line item quantity to credit. */
public Builder setQuantity(Long quantity) {
this.quantity = quantity;
diff --git a/src/main/java/com/stripe/param/CreditNotePreviewParams.java b/src/main/java/com/stripe/param/CreditNotePreviewParams.java
index 68518736636..69350171b81 100644
--- a/src/main/java/com/stripe/param/CreditNotePreviewParams.java
+++ b/src/main/java/com/stripe/param/CreditNotePreviewParams.java
@@ -452,6 +452,15 @@ public static class Line {
@SerializedName("invoice_line_item")
String invoiceLineItem;
+ /**
+ * Set of key-value pairs that you can attach
+ * to an object. This can be useful for storing additional information about the object in a
+ * structured format. Individual keys can be unset by posting an empty value to them. All keys
+ * can be unset by posting an empty value to {@code metadata}.
+ */
+ @SerializedName("metadata")
+ Map metadata;
+
/** The line item quantity to credit. */
@SerializedName("quantity")
Long quantity;
@@ -499,6 +508,7 @@ private Line(
String description,
Map extraParams,
String invoiceLineItem,
+ Map metadata,
Long quantity,
Object taxAmounts,
Object taxRates,
@@ -509,6 +519,7 @@ private Line(
this.description = description;
this.extraParams = extraParams;
this.invoiceLineItem = invoiceLineItem;
+ this.metadata = metadata;
this.quantity = quantity;
this.taxAmounts = taxAmounts;
this.taxRates = taxRates;
@@ -530,6 +541,8 @@ public static class Builder {
private String invoiceLineItem;
+ private Map metadata;
+
private Long quantity;
private Object taxAmounts;
@@ -549,6 +562,7 @@ public CreditNotePreviewParams.Line build() {
this.description,
this.extraParams,
this.invoiceLineItem,
+ this.metadata,
this.quantity,
this.taxAmounts,
this.taxRates,
@@ -610,6 +624,32 @@ public Builder setInvoiceLineItem(String invoiceLineItem) {
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
+ * CreditNotePreviewParams.Line#metadata} for the field documentation.
+ */
+ public Builder putMetadata(String key, String value) {
+ if (this.metadata == null) {
+ this.metadata = new HashMap<>();
+ }
+ this.metadata.put(key, value);
+ return this;
+ }
+
+ /**
+ * Add all map key/value pairs to `metadata` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
+ * See {@link CreditNotePreviewParams.Line#metadata} for the field documentation.
+ */
+ public Builder putAllMetadata(Map map) {
+ if (this.metadata == null) {
+ this.metadata = new HashMap<>();
+ }
+ this.metadata.putAll(map);
+ return this;
+ }
+
/** The line item quantity to credit. */
public Builder setQuantity(Long quantity) {
this.quantity = quantity;
diff --git a/src/main/java/com/stripe/param/CustomerListPaymentMethodsParams.java b/src/main/java/com/stripe/param/CustomerListPaymentMethodsParams.java
index fe47391d356..2b66283037c 100644
--- a/src/main/java/com/stripe/param/CustomerListPaymentMethodsParams.java
+++ b/src/main/java/com/stripe/param/CustomerListPaymentMethodsParams.java
@@ -405,6 +405,9 @@ public enum Type implements ApiRequestParams.EnumParam {
@SerializedName("twint")
TWINT("twint"),
+ @SerializedName("upi")
+ UPI("upi"),
+
@SerializedName("us_bank_account")
US_BANK_ACCOUNT("us_bank_account"),
diff --git a/src/main/java/com/stripe/param/CustomerPaymentMethodListParams.java b/src/main/java/com/stripe/param/CustomerPaymentMethodListParams.java
index 430a8956192..6506d753365 100644
--- a/src/main/java/com/stripe/param/CustomerPaymentMethodListParams.java
+++ b/src/main/java/com/stripe/param/CustomerPaymentMethodListParams.java
@@ -405,6 +405,9 @@ public enum Type implements ApiRequestParams.EnumParam {
@SerializedName("twint")
TWINT("twint"),
+ @SerializedName("upi")
+ UPI("upi"),
+
@SerializedName("us_bank_account")
US_BANK_ACCOUNT("us_bank_account"),
diff --git a/src/main/java/com/stripe/param/InvoiceAddLinesParams.java b/src/main/java/com/stripe/param/InvoiceAddLinesParams.java
index c1fb37f2bd0..7ee9ecce946 100644
--- a/src/main/java/com/stripe/param/InvoiceAddLinesParams.java
+++ b/src/main/java/com/stripe/param/InvoiceAddLinesParams.java
@@ -286,10 +286,20 @@ public static class Line {
@SerializedName("pricing")
Pricing pricing;
- /** Non-negative integer. The quantity of units for the line item. */
+ /**
+ * Non-negative integer. The quantity of units for the line item. Use {@code quantity_decimal}
+ * instead to provide decimal precision. This field will be deprecated in favor of {@code
+ * quantity_decimal} in a future version.
+ */
@SerializedName("quantity")
Long quantity;
+ /**
+ * Non-negative decimal with at most 12 decimal places. The quantity of units for the line item.
+ */
+ @SerializedName("quantity_decimal")
+ BigDecimal quantityDecimal;
+
/**
* A list of up to 10 tax amounts for this line item. This can be useful if you calculate taxes
* on your own or use a third-party to calculate them. You cannot set tax amounts if any line
@@ -324,6 +334,7 @@ private Line(
PriceData priceData,
Pricing pricing,
Long quantity,
+ BigDecimal quantityDecimal,
Object taxAmounts,
Object taxRates) {
this.amount = amount;
@@ -338,6 +349,7 @@ private Line(
this.priceData = priceData;
this.pricing = pricing;
this.quantity = quantity;
+ this.quantityDecimal = quantityDecimal;
this.taxAmounts = taxAmounts;
this.taxRates = taxRates;
}
@@ -371,6 +383,8 @@ public static class Builder {
private Long quantity;
+ private BigDecimal quantityDecimal;
+
private Object taxAmounts;
private Object taxRates;
@@ -390,6 +404,7 @@ public InvoiceAddLinesParams.Line build() {
this.priceData,
this.pricing,
this.quantity,
+ this.quantityDecimal,
this.taxAmounts,
this.taxRates);
}
@@ -630,12 +645,25 @@ public Builder setPricing(InvoiceAddLinesParams.Line.Pricing pricing) {
return this;
}
- /** Non-negative integer. The quantity of units for the line item. */
+ /**
+ * Non-negative integer. The quantity of units for the line item. Use {@code quantity_decimal}
+ * instead to provide decimal precision. This field will be deprecated in favor of {@code
+ * quantity_decimal} in a future version.
+ */
public Builder setQuantity(Long quantity) {
this.quantity = quantity;
return this;
}
+ /**
+ * Non-negative decimal with at most 12 decimal places. The quantity of units for the line
+ * item.
+ */
+ public Builder setQuantityDecimal(BigDecimal quantityDecimal) {
+ this.quantityDecimal = quantityDecimal;
+ return this;
+ }
+
/**
* Add an element to `taxAmounts` list. A list is initialized for the first `add/addAll` call,
* and subsequent calls adds additional elements to the original list. See {@link
@@ -1441,6 +1469,14 @@ public static class ProductData {
@SerializedName("tax_code")
String taxCode;
+ /**
+ * Tax details for this product, including the tax code and an optional performance
+ * location.
+ */
+ @SerializedName("tax_details")
+ TaxDetails taxDetails;
+
/**
* A label that represents units of this product. When set, this will be included in
* customers' receipts, invoices, Checkout, and the customer portal.
@@ -1455,6 +1491,7 @@ private ProductData(
Map metadata,
String name,
String taxCode,
+ TaxDetails taxDetails,
String unitLabel) {
this.description = description;
this.extraParams = extraParams;
@@ -1462,6 +1499,7 @@ private ProductData(
this.metadata = metadata;
this.name = name;
this.taxCode = taxCode;
+ this.taxDetails = taxDetails;
this.unitLabel = unitLabel;
}
@@ -1482,6 +1520,8 @@ public static class Builder {
private String taxCode;
+ private TaxDetails taxDetails;
+
private String unitLabel;
/** Finalize and obtain parameter instance from this builder. */
@@ -1493,6 +1533,7 @@ public InvoiceAddLinesParams.Line.PriceData.ProductData build() {
this.metadata,
this.name,
this.taxCode,
+ this.taxDetails,
this.unitLabel);
}
@@ -1602,6 +1643,17 @@ public Builder setTaxCode(String taxCode) {
return this;
}
+ /**
+ * Tax details for this product, including the tax code and an optional performance
+ * location.
+ */
+ public Builder setTaxDetails(
+ InvoiceAddLinesParams.Line.PriceData.ProductData.TaxDetails taxDetails) {
+ this.taxDetails = taxDetails;
+ return this;
+ }
+
/**
* A label that represents units of this product. When set, this will be included in
* customers' receipts, invoices, Checkout, and the customer portal.
@@ -1611,6 +1663,109 @@ public Builder setUnitLabel(String unitLabel) {
return this;
}
}
+
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class TaxDetails {
+ /**
+ * Map of extra parameters for custom features not available in this client library. The
+ * content in this map is not serialized under this field's {@code @SerializedName} value.
+ * Instead, each key/value pair is serialized as if the key is a root-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 tax location ID. Depending on the tax
+ * code, this is required, optional, or not supported.
+ */
+ @SerializedName("performance_location")
+ String performanceLocation;
+
+ /** A tax code ID. */
+ @SerializedName("tax_code")
+ Object taxCode;
+
+ private TaxDetails(
+ Map extraParams, String performanceLocation, Object taxCode) {
+ this.extraParams = extraParams;
+ this.performanceLocation = performanceLocation;
+ this.taxCode = taxCode;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Map extraParams;
+
+ private String performanceLocation;
+
+ private Object taxCode;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public InvoiceAddLinesParams.Line.PriceData.ProductData.TaxDetails build() {
+ return new InvoiceAddLinesParams.Line.PriceData.ProductData.TaxDetails(
+ this.extraParams, this.performanceLocation, this.taxCode);
+ }
+
+ /**
+ * Add a key/value pair to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the
+ * original map. See {@link
+ * InvoiceAddLinesParams.Line.PriceData.ProductData.TaxDetails#extraParams} for the
+ * field documentation.
+ */
+ public Builder putExtraParam(String key, Object value) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.put(key, value);
+ return this;
+ }
+
+ /**
+ * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the
+ * original map. See {@link
+ * InvoiceAddLinesParams.Line.PriceData.ProductData.TaxDetails#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 tax location ID. Depending on the tax
+ * code, this is required, optional, or not supported.
+ */
+ public Builder setPerformanceLocation(String performanceLocation) {
+ this.performanceLocation = performanceLocation;
+ return this;
+ }
+
+ /** A tax code ID. */
+ public Builder setTaxCode(String taxCode) {
+ this.taxCode = taxCode;
+ return this;
+ }
+
+ /** A tax code ID. */
+ public Builder setTaxCode(EmptyParam taxCode) {
+ this.taxCode = taxCode;
+ return this;
+ }
+ }
+ }
}
public enum TaxBehavior implements ApiRequestParams.EnumParam {
diff --git a/src/main/java/com/stripe/param/InvoiceCreateParams.java b/src/main/java/com/stripe/param/InvoiceCreateParams.java
index 651464b5eeb..8d0b26d869e 100644
--- a/src/main/java/com/stripe/param/InvoiceCreateParams.java
+++ b/src/main/java/com/stripe/param/InvoiceCreateParams.java
@@ -3930,6 +3930,13 @@ public static class Pix {
@SerializedName("amount_includes_iof")
AmountIncludesIof amountIncludesIof;
+ /**
+ * The number of seconds (between 10 and 1209600) after which Pix payment will expire.
+ * Defaults to 86400 seconds.
+ */
+ @SerializedName("expires_after_seconds")
+ Long expiresAfterSeconds;
+
/**
* Map of extra parameters for custom features not available in this client library. The
* content in this map is not serialized under this field's {@code @SerializedName} value.
@@ -3940,8 +3947,12 @@ public static class Pix {
@SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
Map extraParams;
- private Pix(AmountIncludesIof amountIncludesIof, Map extraParams) {
+ private Pix(
+ AmountIncludesIof amountIncludesIof,
+ Long expiresAfterSeconds,
+ Map extraParams) {
this.amountIncludesIof = amountIncludesIof;
+ this.expiresAfterSeconds = expiresAfterSeconds;
this.extraParams = extraParams;
}
@@ -3952,12 +3963,14 @@ public static Builder builder() {
public static class Builder {
private AmountIncludesIof amountIncludesIof;
+ private Long expiresAfterSeconds;
+
private Map extraParams;
/** Finalize and obtain parameter instance from this builder. */
public InvoiceCreateParams.PaymentSettings.PaymentMethodOptions.Pix build() {
return new InvoiceCreateParams.PaymentSettings.PaymentMethodOptions.Pix(
- this.amountIncludesIof, this.extraParams);
+ this.amountIncludesIof, this.expiresAfterSeconds, this.extraParams);
}
/** Determines if the amount includes the IOF tax. Defaults to {@code never}. */
@@ -3968,6 +3981,15 @@ public Builder setAmountIncludesIof(
return this;
}
+ /**
+ * The number of seconds (between 10 and 1209600) after which Pix payment will expire.
+ * Defaults to 86400 seconds.
+ */
+ public Builder setExpiresAfterSeconds(Long expiresAfterSeconds) {
+ this.expiresAfterSeconds = expiresAfterSeconds;
+ return this;
+ }
+
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
diff --git a/src/main/java/com/stripe/param/InvoiceCreatePreviewParams.java b/src/main/java/com/stripe/param/InvoiceCreatePreviewParams.java
index 88b1d35c83c..81e27120ab4 100644
--- a/src/main/java/com/stripe/param/InvoiceCreatePreviewParams.java
+++ b/src/main/java/com/stripe/param/InvoiceCreatePreviewParams.java
@@ -2310,10 +2310,21 @@ public static class InvoiceItem {
@SerializedName("price_data")
PriceData priceData;
- /** Non-negative integer. The quantity of units for the invoice item. */
+ /**
+ * Non-negative integer. The quantity of units for the invoice item. Use {@code
+ * quantity_decimal} instead to provide decimal precision. This field will be deprecated in
+ * favor of {@code quantity_decimal} in a future version.
+ */
@SerializedName("quantity")
Long quantity;
+ /**
+ * Non-negative decimal with at most 12 decimal places. The quantity of units for the invoice
+ * item.
+ */
+ @SerializedName("quantity_decimal")
+ BigDecimal quantityDecimal;
+
/**
* Only required if a default
@@ -2365,6 +2376,7 @@ private InvoiceItem(
String price,
PriceData priceData,
Long quantity,
+ BigDecimal quantityDecimal,
TaxBehavior taxBehavior,
Object taxCode,
Object taxRates,
@@ -2382,6 +2394,7 @@ private InvoiceItem(
this.price = price;
this.priceData = priceData;
this.quantity = quantity;
+ this.quantityDecimal = quantityDecimal;
this.taxBehavior = taxBehavior;
this.taxCode = taxCode;
this.taxRates = taxRates;
@@ -2418,6 +2431,8 @@ public static class Builder {
private Long quantity;
+ private BigDecimal quantityDecimal;
+
private TaxBehavior taxBehavior;
private Object taxCode;
@@ -2443,6 +2458,7 @@ public InvoiceCreatePreviewParams.InvoiceItem build() {
this.price,
this.priceData,
this.quantity,
+ this.quantityDecimal,
this.taxBehavior,
this.taxCode,
this.taxRates,
@@ -2638,12 +2654,25 @@ public Builder setPriceData(InvoiceCreatePreviewParams.InvoiceItem.PriceData pri
return this;
}
- /** Non-negative integer. The quantity of units for the invoice item. */
+ /**
+ * Non-negative integer. The quantity of units for the invoice item. Use {@code
+ * quantity_decimal} instead to provide decimal precision. This field will be deprecated in
+ * favor of {@code quantity_decimal} in a future version.
+ */
public Builder setQuantity(Long quantity) {
this.quantity = quantity;
return this;
}
+ /**
+ * Non-negative decimal with at most 12 decimal places. The quantity of units for the invoice
+ * item.
+ */
+ public Builder setQuantityDecimal(BigDecimal quantityDecimal) {
+ this.quantityDecimal = quantityDecimal;
+ return this;
+ }
+
/**
* Only required if a default
@@ -5602,6 +5631,10 @@ public static class Add {
@SerializedName("trial")
Trial trial;
+ /** The ID of the trial offer to apply to the configuration item. */
+ @SerializedName("trial_offer")
+ String trialOffer;
+
private Add(
List
discounts,
@@ -5610,7 +5643,8 @@ private Add(
String price,
Long quantity,
List taxRates,
- Trial trial) {
+ Trial trial,
+ String trialOffer) {
this.discounts = discounts;
this.extraParams = extraParams;
this.metadata = metadata;
@@ -5618,6 +5652,7 @@ private Add(
this.quantity = quantity;
this.taxRates = taxRates;
this.trial = trial;
+ this.trialOffer = trialOffer;
}
public static Builder builder() {
@@ -5641,6 +5676,8 @@ public static class Builder {
private Trial trial;
+ private String trialOffer;
+
/** Finalize and obtain parameter instance from this builder. */
public InvoiceCreatePreviewParams.ScheduleDetails.Amendment.ItemAction.Add build() {
return new InvoiceCreatePreviewParams.ScheduleDetails.Amendment.ItemAction.Add(
@@ -5650,7 +5687,8 @@ public InvoiceCreatePreviewParams.ScheduleDetails.Amendment.ItemAction.Add build
this.price,
this.quantity,
this.taxRates,
- this.trial);
+ this.trial,
+ this.trialOffer);
}
/**
@@ -5792,6 +5830,12 @@ public Builder setTrial(
this.trial = trial;
return this;
}
+
+ /** The ID of the trial offer to apply to the configuration item. */
+ public Builder setTrialOffer(String trialOffer) {
+ this.trialOffer = trialOffer;
+ return this;
+ }
}
@Getter
@@ -6454,6 +6498,10 @@ public static class Set {
@SerializedName("trial")
Trial trial;
+ /** The ID of the trial offer to apply to the configuration item. */
+ @SerializedName("trial_offer")
+ String trialOffer;
+
private Set(
List
discounts,
@@ -6462,7 +6510,8 @@ private Set(
String price,
Long quantity,
List taxRates,
- Trial trial) {
+ Trial trial,
+ String trialOffer) {
this.discounts = discounts;
this.extraParams = extraParams;
this.metadata = metadata;
@@ -6470,6 +6519,7 @@ private Set(
this.quantity = quantity;
this.taxRates = taxRates;
this.trial = trial;
+ this.trialOffer = trialOffer;
}
public static Builder builder() {
@@ -6493,6 +6543,8 @@ public static class Builder {
private Trial trial;
+ private String trialOffer;
+
/** Finalize and obtain parameter instance from this builder. */
public InvoiceCreatePreviewParams.ScheduleDetails.Amendment.ItemAction.Set build() {
return new InvoiceCreatePreviewParams.ScheduleDetails.Amendment.ItemAction.Set(
@@ -6502,7 +6554,8 @@ public InvoiceCreatePreviewParams.ScheduleDetails.Amendment.ItemAction.Set build
this.price,
this.quantity,
this.taxRates,
- this.trial);
+ this.trial,
+ this.trialOffer);
}
/**
@@ -6654,6 +6707,12 @@ public Builder setTrial(
this.trial = trial;
return this;
}
+
+ /** The ID of the trial offer to apply to the configuration item. */
+ public Builder setTrialOffer(String trialOffer) {
+ this.trialOffer = trialOffer;
+ return this;
+ }
}
@Getter
@@ -7530,7 +7589,7 @@ public Builder setType(
public static class Set {
/**
* Required. The payment collection behavior for this subscription while
- * paused. One of {@code keep_as_draft}, {@code mark_uncollectible}, or {@code void}.
+ * paused.
*/
@SerializedName("behavior")
Behavior behavior;
@@ -7568,8 +7627,7 @@ public static class Builder {
/**
* Required. The payment collection behavior for this subscription
- * while paused. One of {@code keep_as_draft}, {@code mark_uncollectible}, or {@code
- * void}.
+ * while paused.
*/
public Builder setBehavior(
InvoiceCreatePreviewParams.ScheduleDetails.Amendment.SetPauseCollection.Set.Behavior
@@ -11239,6 +11297,10 @@ public static class Item {
@SerializedName("trial")
Trial trial;
+ /** The ID of the trial offer to apply to the configuration item. */
+ @SerializedName("trial_offer")
+ String trialOffer;
+
private Item(
Object billingThresholds,
Object discounts,
@@ -11249,7 +11311,8 @@ private Item(
PriceData priceData,
Long quantity,
Object taxRates,
- Trial trial) {
+ Trial trial,
+ String trialOffer) {
this.billingThresholds = billingThresholds;
this.discounts = discounts;
this.extraParams = extraParams;
@@ -11260,6 +11323,7 @@ private Item(
this.quantity = quantity;
this.taxRates = taxRates;
this.trial = trial;
+ this.trialOffer = trialOffer;
}
public static Builder builder() {
@@ -11287,6 +11351,8 @@ public static class Builder {
private Trial trial;
+ private String trialOffer;
+
/** Finalize and obtain parameter instance from this builder. */
public InvoiceCreatePreviewParams.ScheduleDetails.Phase.Item build() {
return new InvoiceCreatePreviewParams.ScheduleDetails.Phase.Item(
@@ -11299,7 +11365,8 @@ public InvoiceCreatePreviewParams.ScheduleDetails.Phase.Item build() {
this.priceData,
this.quantity,
this.taxRates,
- this.trial);
+ this.trial,
+ this.trialOffer);
}
/**
@@ -11521,6 +11588,12 @@ public Builder setTrial(
this.trial = trial;
return this;
}
+
+ /** The ID of the trial offer to apply to the configuration item. */
+ public Builder setTrialOffer(String trialOffer) {
+ this.trialOffer = trialOffer;
+ return this;
+ }
}
@Getter
@@ -12480,7 +12553,7 @@ public enum Type implements ApiRequestParams.EnumParam {
public static class PauseCollection {
/**
* Required. The payment collection behavior for this subscription while
- * paused. One of {@code keep_as_draft}, {@code mark_uncollectible}, or {@code void}.
+ * paused.
*/
@SerializedName("behavior")
Behavior behavior;
@@ -12517,7 +12590,7 @@ public InvoiceCreatePreviewParams.ScheduleDetails.Phase.PauseCollection build()
/**
* Required. The payment collection behavior for this subscription while
- * paused. One of {@code keep_as_draft}, {@code mark_uncollectible}, or {@code void}.
+ * paused.
*/
public Builder setBehavior(
InvoiceCreatePreviewParams.ScheduleDetails.Phase.PauseCollection.Behavior behavior) {
@@ -14658,6 +14731,10 @@ public static class Item {
@SerializedName("clear_usage")
Boolean clearUsage;
+ /** The trial offer to apply to this subscription item. */
+ @SerializedName("current_trial")
+ CurrentTrial currentTrial;
+
/** A flag that, if set to {@code true}, will delete the specified item. */
@SerializedName("deleted")
Boolean deleted;
@@ -14724,6 +14801,7 @@ public static class Item {
private Item(
Object billingThresholds,
Boolean clearUsage,
+ CurrentTrial currentTrial,
Boolean deleted,
Object discounts,
Map extraParams,
@@ -14736,6 +14814,7 @@ private Item(
Object taxRates) {
this.billingThresholds = billingThresholds;
this.clearUsage = clearUsage;
+ this.currentTrial = currentTrial;
this.deleted = deleted;
this.discounts = discounts;
this.extraParams = extraParams;
@@ -14757,6 +14836,8 @@ public static class Builder {
private Boolean clearUsage;
+ private CurrentTrial currentTrial;
+
private Boolean deleted;
private Object discounts;
@@ -14782,6 +14863,7 @@ public InvoiceCreatePreviewParams.SubscriptionDetails.Item build() {
return new InvoiceCreatePreviewParams.SubscriptionDetails.Item(
this.billingThresholds,
this.clearUsage,
+ this.currentTrial,
this.deleted,
this.discounts,
this.extraParams,
@@ -14824,6 +14906,13 @@ public Builder setClearUsage(Boolean clearUsage) {
return this;
}
+ /** The trial offer to apply to this subscription item. */
+ public Builder setCurrentTrial(
+ InvoiceCreatePreviewParams.SubscriptionDetails.Item.CurrentTrial currentTrial) {
+ this.currentTrial = currentTrial;
+ return this;
+ }
+
/** A flag that, if set to {@code true}, will delete the specified item. */
public Builder setDeleted(Boolean deleted) {
this.deleted = deleted;
@@ -15137,6 +15226,106 @@ public Builder setUsageGte(Long usageGte) {
}
}
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class CurrentTrial {
+ /**
+ * Map of extra parameters for custom features not available in this client library. The
+ * content in this map is not serialized under this field's {@code @SerializedName} value.
+ * Instead, each key/value pair is serialized as if the key is a root-level field
+ * (serialized) name in this param object. Effectively, this map is flattened to its parent
+ * instance.
+ */
+ @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
+ Map extraParams;
+
+ /**
+ * Unix timestamp representing the end of the trial offer period. Required when the trial
+ * offer has {@code duration.type=timestamp}. Cannot be specified when {@code
+ * duration.type=relative}.
+ */
+ @SerializedName("trial_end")
+ Long trialEnd;
+
+ /**
+ * Required. The ID of the trial offer to apply to the subscription item.
+ */
+ @SerializedName("trial_offer")
+ String trialOffer;
+
+ private CurrentTrial(Map extraParams, Long trialEnd, String trialOffer) {
+ this.extraParams = extraParams;
+ this.trialEnd = trialEnd;
+ this.trialOffer = trialOffer;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Map extraParams;
+
+ private Long trialEnd;
+
+ private String trialOffer;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public InvoiceCreatePreviewParams.SubscriptionDetails.Item.CurrentTrial build() {
+ return new InvoiceCreatePreviewParams.SubscriptionDetails.Item.CurrentTrial(
+ this.extraParams, this.trialEnd, this.trialOffer);
+ }
+
+ /**
+ * Add a key/value pair to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
+ * map. See {@link
+ * InvoiceCreatePreviewParams.SubscriptionDetails.Item.CurrentTrial#extraParams} for the
+ * field documentation.
+ */
+ public Builder putExtraParam(String key, Object value) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.put(key, value);
+ return this;
+ }
+
+ /**
+ * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
+ * map. See {@link
+ * InvoiceCreatePreviewParams.SubscriptionDetails.Item.CurrentTrial#extraParams} for the
+ * field documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+
+ /**
+ * Unix timestamp representing the end of the trial offer period. Required when the trial
+ * offer has {@code duration.type=timestamp}. Cannot be specified when {@code
+ * duration.type=relative}.
+ */
+ public Builder setTrialEnd(Long trialEnd) {
+ this.trialEnd = trialEnd;
+ return this;
+ }
+
+ /**
+ * Required. The ID of the trial offer to apply to the subscription item.
+ */
+ public Builder setTrialOffer(String trialOffer) {
+ this.trialOffer = trialOffer;
+ return this;
+ }
+ }
+ }
+
@Getter
@EqualsAndHashCode(callSuper = false)
public static class Discount {
diff --git a/src/main/java/com/stripe/param/InvoiceItemCreateParams.java b/src/main/java/com/stripe/param/InvoiceItemCreateParams.java
index 69cbd571523..d297a75a88e 100644
--- a/src/main/java/com/stripe/param/InvoiceItemCreateParams.java
+++ b/src/main/java/com/stripe/param/InvoiceItemCreateParams.java
@@ -121,10 +121,21 @@ public class InvoiceItemCreateParams extends ApiRequestParams {
@SerializedName("pricing")
Pricing pricing;
- /** Non-negative integer. The quantity of units for the invoice item. */
+ /**
+ * Non-negative integer. The quantity of units for the invoice item. Use {@code quantity_decimal}
+ * instead to provide decimal precision. This field will be deprecated in favor of {@code
+ * quantity_decimal} in a future version.
+ */
@SerializedName("quantity")
Long quantity;
+ /**
+ * Non-negative decimal with at most 12 decimal places. The quantity of units for the invoice
+ * item.
+ */
+ @SerializedName("quantity_decimal")
+ BigDecimal quantityDecimal;
+
/**
* The ID of a subscription to add this invoice item to. When left blank, the invoice item is
* added to the next upcoming scheduled invoice. When set, scheduled invoices for subscriptions
@@ -182,6 +193,7 @@ private InvoiceItemCreateParams(
PriceData priceData,
Pricing pricing,
Long quantity,
+ BigDecimal quantityDecimal,
String subscription,
TaxBehavior taxBehavior,
Object taxCode,
@@ -203,6 +215,7 @@ private InvoiceItemCreateParams(
this.priceData = priceData;
this.pricing = pricing;
this.quantity = quantity;
+ this.quantityDecimal = quantityDecimal;
this.subscription = subscription;
this.taxBehavior = taxBehavior;
this.taxCode = taxCode;
@@ -247,6 +260,8 @@ public static class Builder {
private Long quantity;
+ private BigDecimal quantityDecimal;
+
private String subscription;
private TaxBehavior taxBehavior;
@@ -276,6 +291,7 @@ public InvoiceItemCreateParams build() {
this.priceData,
this.pricing,
this.quantity,
+ this.quantityDecimal,
this.subscription,
this.taxBehavior,
this.taxCode,
@@ -548,12 +564,25 @@ public Builder setPricing(InvoiceItemCreateParams.Pricing pricing) {
return this;
}
- /** Non-negative integer. The quantity of units for the invoice item. */
+ /**
+ * Non-negative integer. The quantity of units for the invoice item. Use {@code
+ * quantity_decimal} instead to provide decimal precision. This field will be deprecated in
+ * favor of {@code quantity_decimal} in a future version.
+ */
public Builder setQuantity(Long quantity) {
this.quantity = quantity;
return this;
}
+ /**
+ * Non-negative decimal with at most 12 decimal places. The quantity of units for the invoice
+ * item.
+ */
+ public Builder setQuantityDecimal(BigDecimal quantityDecimal) {
+ this.quantityDecimal = quantityDecimal;
+ return this;
+ }
+
/**
* The ID of a subscription to add this invoice item to. When left blank, the invoice item is
* added to the next upcoming scheduled invoice. When set, scheduled invoices for subscriptions
diff --git a/src/main/java/com/stripe/param/InvoiceItemUpdateParams.java b/src/main/java/com/stripe/param/InvoiceItemUpdateParams.java
index 8c0fc3f9030..5cc28374b49 100644
--- a/src/main/java/com/stripe/param/InvoiceItemUpdateParams.java
+++ b/src/main/java/com/stripe/param/InvoiceItemUpdateParams.java
@@ -96,10 +96,20 @@ public class InvoiceItemUpdateParams extends ApiRequestParams {
@SerializedName("pricing")
Pricing pricing;
- /** Non-negative integer. The quantity of units for the invoice item. */
+ /**
+ * Non-negative integer. The quantity of units for the invoice item. Use {@code quantity_decimal}
+ * instead to provide decimal precision. This field will be deprecated in favor of {@code
+ * quantity_decimal} in a future version.
+ */
@SerializedName("quantity")
Long quantity;
+ /**
+ * Non-negative decimal with at most 12 decimal places. The quantity of units for the line item.
+ */
+ @SerializedName("quantity_decimal")
+ Object quantityDecimal;
+
/**
* Only required if a default
@@ -145,6 +155,7 @@ private InvoiceItemUpdateParams(
PriceData priceData,
Pricing pricing,
Long quantity,
+ Object quantityDecimal,
TaxBehavior taxBehavior,
Object taxCode,
Object taxRates,
@@ -161,6 +172,7 @@ private InvoiceItemUpdateParams(
this.priceData = priceData;
this.pricing = pricing;
this.quantity = quantity;
+ this.quantityDecimal = quantityDecimal;
this.taxBehavior = taxBehavior;
this.taxCode = taxCode;
this.taxRates = taxRates;
@@ -196,6 +208,8 @@ public static class Builder {
private Long quantity;
+ private Object quantityDecimal;
+
private TaxBehavior taxBehavior;
private Object taxCode;
@@ -219,6 +233,7 @@ public InvoiceItemUpdateParams build() {
this.priceData,
this.pricing,
this.quantity,
+ this.quantityDecimal,
this.taxBehavior,
this.taxCode,
this.taxRates,
@@ -486,12 +501,32 @@ public Builder setPricing(InvoiceItemUpdateParams.Pricing pricing) {
return this;
}
- /** Non-negative integer. The quantity of units for the invoice item. */
+ /**
+ * Non-negative integer. The quantity of units for the invoice item. Use {@code
+ * quantity_decimal} instead to provide decimal precision. This field will be deprecated in
+ * favor of {@code quantity_decimal} in a future version.
+ */
public Builder setQuantity(Long quantity) {
this.quantity = quantity;
return this;
}
+ /**
+ * Non-negative decimal with at most 12 decimal places. The quantity of units for the line item.
+ */
+ public Builder setQuantityDecimal(BigDecimal quantityDecimal) {
+ this.quantityDecimal = quantityDecimal;
+ return this;
+ }
+
+ /**
+ * Non-negative decimal with at most 12 decimal places. The quantity of units for the line item.
+ */
+ public Builder setQuantityDecimal(EmptyParam quantityDecimal) {
+ this.quantityDecimal = quantityDecimal;
+ return this;
+ }
+
/**
* Only required if a default
diff --git a/src/main/java/com/stripe/param/InvoiceLineItemUpdateParams.java b/src/main/java/com/stripe/param/InvoiceLineItemUpdateParams.java
index 300745cd970..7263b0a27c0 100644
--- a/src/main/java/com/stripe/param/InvoiceLineItemUpdateParams.java
+++ b/src/main/java/com/stripe/param/InvoiceLineItemUpdateParams.java
@@ -69,11 +69,10 @@ public class InvoiceLineItemUpdateParams extends ApiRequestParams {
* 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}. For type=subscription
- * line items, the incoming metadata specified on the request is directly used to set this value,
- * in contrast to type=invoiceitem line items,
- * where any existing metadata on the invoice line is merged with the incoming data.
+ * href="https://stripe.com/api/invoices/line_item">type=subscription line items, the incoming
+ * metadata specified on the request is directly used to set this value, in contrast to type=invoiceitem line items, where any
+ * existing metadata on the invoice line is merged with the incoming data.
*/
@SerializedName("metadata")
Object metadata;
@@ -100,10 +99,20 @@ public class InvoiceLineItemUpdateParams extends ApiRequestParams {
@SerializedName("pricing")
Pricing pricing;
- /** Non-negative integer. The quantity of units for the line item. */
+ /**
+ * Non-negative integer. The quantity of units for the line item. Use {@code quantity_decimal}
+ * instead to provide decimal precision. This field will be deprecated in favor of {@code
+ * quantity_decimal} in a future version.
+ */
@SerializedName("quantity")
Long quantity;
+ /**
+ * Non-negative decimal with at most 12 decimal places. The quantity of units for the line item.
+ */
+ @SerializedName("quantity_decimal")
+ Object quantityDecimal;
+
/**
* A list of up to 10 tax amounts for this line item. This can be useful if you calculate taxes on
* your own or use a third-party to calculate them. You cannot set tax amounts if any line item
@@ -138,6 +147,7 @@ private InvoiceLineItemUpdateParams(
PriceData priceData,
Pricing pricing,
Long quantity,
+ Object quantityDecimal,
Object taxAmounts,
Object taxRates) {
this.amount = amount;
@@ -152,6 +162,7 @@ private InvoiceLineItemUpdateParams(
this.priceData = priceData;
this.pricing = pricing;
this.quantity = quantity;
+ this.quantityDecimal = quantityDecimal;
this.taxAmounts = taxAmounts;
this.taxRates = taxRates;
}
@@ -185,6 +196,8 @@ public static class Builder {
private Long quantity;
+ private Object quantityDecimal;
+
private Object taxAmounts;
private Object taxRates;
@@ -204,6 +217,7 @@ public InvoiceLineItemUpdateParams build() {
this.priceData,
this.pricing,
this.quantity,
+ this.quantityDecimal,
this.taxAmounts,
this.taxRates);
}
@@ -423,11 +437,10 @@ public Builder putAllMetadata(Map map) {
* 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}. For type=subscription
- * line items, the incoming metadata specified on the request is directly used to set this
- * value, in contrast to type=invoiceitem line items,
- * where any existing metadata on the invoice line is merged with the incoming data.
+ * href="https://stripe.com/api/invoices/line_item">type=subscription line items, the
+ * incoming metadata specified on the request is directly used to set this value, in contrast to
+ * type=invoiceitem line items, where
+ * any existing metadata on the invoice line is merged with the incoming data.
*/
public Builder setMetadata(EmptyParam metadata) {
this.metadata = metadata;
@@ -439,11 +452,10 @@ public Builder setMetadata(EmptyParam metadata) {
* 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}. For type=subscription
- * line items, the incoming metadata specified on the request is directly used to set this
- * value, in contrast to type=invoiceitem line items,
- * where any existing metadata on the invoice line is merged with the incoming data.
+ * href="https://stripe.com/api/invoices/line_item">type=subscription line items, the
+ * incoming metadata specified on the request is directly used to set this value, in contrast to
+ * type=invoiceitem line items, where
+ * any existing metadata on the invoice line is merged with the incoming data.
*/
public Builder setMetadata(Map metadata) {
this.metadata = metadata;
@@ -478,12 +490,32 @@ public Builder setPricing(InvoiceLineItemUpdateParams.Pricing pricing) {
return this;
}
- /** Non-negative integer. The quantity of units for the line item. */
+ /**
+ * Non-negative integer. The quantity of units for the line item. Use {@code quantity_decimal}
+ * instead to provide decimal precision. This field will be deprecated in favor of {@code
+ * quantity_decimal} in a future version.
+ */
public Builder setQuantity(Long quantity) {
this.quantity = quantity;
return this;
}
+ /**
+ * Non-negative decimal with at most 12 decimal places. The quantity of units for the line item.
+ */
+ public Builder setQuantityDecimal(BigDecimal quantityDecimal) {
+ this.quantityDecimal = quantityDecimal;
+ return this;
+ }
+
+ /**
+ * Non-negative decimal with at most 12 decimal places. The quantity of units for the line item.
+ */
+ public Builder setQuantityDecimal(EmptyParam quantityDecimal) {
+ this.quantityDecimal = quantityDecimal;
+ return this;
+ }
+
/**
* Add an element to `taxAmounts` list. A list is initialized for the first `add/addAll` call,
* and subsequent calls adds additional elements to the original list. See {@link
@@ -1322,6 +1354,13 @@ public static class ProductData {
@SerializedName("tax_code")
Object taxCode;
+ /**
+ * Tax details for this product, including the tax
+ * code and an optional performance location.
+ */
+ @SerializedName("tax_details")
+ TaxDetails taxDetails;
+
/**
* A label that represents units of this product. When set, this will be included in
* customers' receipts, invoices, Checkout, and the customer portal.
@@ -1336,6 +1375,7 @@ private ProductData(
Map metadata,
Object name,
Object taxCode,
+ TaxDetails taxDetails,
Object unitLabel) {
this.description = description;
this.extraParams = extraParams;
@@ -1343,6 +1383,7 @@ private ProductData(
this.metadata = metadata;
this.name = name;
this.taxCode = taxCode;
+ this.taxDetails = taxDetails;
this.unitLabel = unitLabel;
}
@@ -1363,6 +1404,8 @@ public static class Builder {
private Object taxCode;
+ private TaxDetails taxDetails;
+
private Object unitLabel;
/** Finalize and obtain parameter instance from this builder. */
@@ -1374,6 +1417,7 @@ public InvoiceLineItemUpdateParams.PriceData.ProductData build() {
this.metadata,
this.name,
this.taxCode,
+ this.taxDetails,
this.unitLabel);
}
@@ -1506,6 +1550,17 @@ public Builder setTaxCode(EmptyParam taxCode) {
return this;
}
+ /**
+ * Tax details for this product, including the tax code and an optional performance
+ * location.
+ */
+ public Builder setTaxDetails(
+ InvoiceLineItemUpdateParams.PriceData.ProductData.TaxDetails taxDetails) {
+ this.taxDetails = taxDetails;
+ return this;
+ }
+
/**
* A label that represents units of this product. When set, this will be included in
* customers' receipts, invoices, Checkout, and the customer portal.
@@ -1524,6 +1579,119 @@ public Builder setUnitLabel(EmptyParam unitLabel) {
return this;
}
}
+
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class TaxDetails {
+ /**
+ * Map of extra parameters for custom features not available in this client library. The
+ * content in this map is not serialized under this field's {@code @SerializedName} value.
+ * Instead, each key/value pair is serialized as if the key is a root-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 tax location ID. Depending on the tax
+ * code, this is required, optional, or not supported.
+ */
+ @SerializedName("performance_location")
+ Object performanceLocation;
+
+ /** A tax code ID. */
+ @SerializedName("tax_code")
+ Object taxCode;
+
+ private TaxDetails(
+ Map extraParams, Object performanceLocation, Object taxCode) {
+ this.extraParams = extraParams;
+ this.performanceLocation = performanceLocation;
+ this.taxCode = taxCode;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Map extraParams;
+
+ private Object performanceLocation;
+
+ private Object taxCode;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public InvoiceLineItemUpdateParams.PriceData.ProductData.TaxDetails build() {
+ return new InvoiceLineItemUpdateParams.PriceData.ProductData.TaxDetails(
+ this.extraParams, this.performanceLocation, this.taxCode);
+ }
+
+ /**
+ * Add a key/value pair to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
+ * map. See {@link
+ * InvoiceLineItemUpdateParams.PriceData.ProductData.TaxDetails#extraParams} for the field
+ * documentation.
+ */
+ public Builder putExtraParam(String key, Object value) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.put(key, value);
+ return this;
+ }
+
+ /**
+ * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
+ * map. See {@link
+ * InvoiceLineItemUpdateParams.PriceData.ProductData.TaxDetails#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 tax location ID. Depending on the tax
+ * code, this is required, optional, or not supported.
+ */
+ public Builder setPerformanceLocation(String performanceLocation) {
+ this.performanceLocation = performanceLocation;
+ return this;
+ }
+
+ /**
+ * A tax location ID. Depending on the tax
+ * code, this is required, optional, or not supported.
+ */
+ public Builder setPerformanceLocation(EmptyParam performanceLocation) {
+ this.performanceLocation = performanceLocation;
+ return this;
+ }
+
+ /** A tax code ID. */
+ public Builder setTaxCode(String taxCode) {
+ this.taxCode = taxCode;
+ return this;
+ }
+
+ /** A tax code ID. */
+ public Builder setTaxCode(EmptyParam taxCode) {
+ this.taxCode = taxCode;
+ return this;
+ }
+ }
+ }
}
public enum TaxBehavior implements ApiRequestParams.EnumParam {
diff --git a/src/main/java/com/stripe/param/InvoiceUpdateLinesParams.java b/src/main/java/com/stripe/param/InvoiceUpdateLinesParams.java
index 32987413672..f2baf50bd6a 100644
--- a/src/main/java/com/stripe/param/InvoiceUpdateLinesParams.java
+++ b/src/main/java/com/stripe/param/InvoiceUpdateLinesParams.java
@@ -303,10 +303,20 @@ public static class Line {
@SerializedName("pricing")
Pricing pricing;
- /** Non-negative integer. The quantity of units for the line item. */
+ /**
+ * Non-negative integer. The quantity of units for the line item. Use {@code quantity_decimal}
+ * instead to provide decimal precision. This field will be deprecated in favor of {@code
+ * quantity_decimal} in a future version.
+ */
@SerializedName("quantity")
Long quantity;
+ /**
+ * Non-negative decimal with at most 12 decimal places. The quantity of units for the line item.
+ */
+ @SerializedName("quantity_decimal")
+ BigDecimal quantityDecimal;
+
/**
* A list of up to 10 tax amounts for this line item. This can be useful if you calculate taxes
* on your own or use a third-party to calculate them. You cannot set tax amounts if any line
@@ -341,6 +351,7 @@ private Line(
PriceData priceData,
Pricing pricing,
Long quantity,
+ BigDecimal quantityDecimal,
Object taxAmounts,
Object taxRates) {
this.amount = amount;
@@ -355,6 +366,7 @@ private Line(
this.priceData = priceData;
this.pricing = pricing;
this.quantity = quantity;
+ this.quantityDecimal = quantityDecimal;
this.taxAmounts = taxAmounts;
this.taxRates = taxRates;
}
@@ -388,6 +400,8 @@ public static class Builder {
private Long quantity;
+ private BigDecimal quantityDecimal;
+
private Object taxAmounts;
private Object taxRates;
@@ -407,6 +421,7 @@ public InvoiceUpdateLinesParams.Line build() {
this.priceData,
this.pricing,
this.quantity,
+ this.quantityDecimal,
this.taxAmounts,
this.taxRates);
}
@@ -654,12 +669,25 @@ public Builder setPricing(InvoiceUpdateLinesParams.Line.Pricing pricing) {
return this;
}
- /** Non-negative integer. The quantity of units for the line item. */
+ /**
+ * Non-negative integer. The quantity of units for the line item. Use {@code quantity_decimal}
+ * instead to provide decimal precision. This field will be deprecated in favor of {@code
+ * quantity_decimal} in a future version.
+ */
public Builder setQuantity(Long quantity) {
this.quantity = quantity;
return this;
}
+ /**
+ * Non-negative decimal with at most 12 decimal places. The quantity of units for the line
+ * item.
+ */
+ public Builder setQuantityDecimal(BigDecimal quantityDecimal) {
+ this.quantityDecimal = quantityDecimal;
+ return this;
+ }
+
/**
* Add an element to `taxAmounts` list. A list is initialized for the first `add/addAll` call,
* and subsequent calls adds additional elements to the original list. See {@link
@@ -1466,6 +1494,14 @@ public static class ProductData {
@SerializedName("tax_code")
String taxCode;
+ /**
+ * Tax details for this product, including the tax code and an optional performance
+ * location.
+ */
+ @SerializedName("tax_details")
+ TaxDetails taxDetails;
+
/**
* A label that represents units of this product. When set, this will be included in
* customers' receipts, invoices, Checkout, and the customer portal.
@@ -1480,6 +1516,7 @@ private ProductData(
Map metadata,
String name,
String taxCode,
+ TaxDetails taxDetails,
String unitLabel) {
this.description = description;
this.extraParams = extraParams;
@@ -1487,6 +1524,7 @@ private ProductData(
this.metadata = metadata;
this.name = name;
this.taxCode = taxCode;
+ this.taxDetails = taxDetails;
this.unitLabel = unitLabel;
}
@@ -1507,6 +1545,8 @@ public static class Builder {
private String taxCode;
+ private TaxDetails taxDetails;
+
private String unitLabel;
/** Finalize and obtain parameter instance from this builder. */
@@ -1518,6 +1558,7 @@ public InvoiceUpdateLinesParams.Line.PriceData.ProductData build() {
this.metadata,
this.name,
this.taxCode,
+ this.taxDetails,
this.unitLabel);
}
@@ -1629,6 +1670,17 @@ public Builder setTaxCode(String taxCode) {
return this;
}
+ /**
+ * Tax details for this product, including the tax code and an optional performance
+ * location.
+ */
+ public Builder setTaxDetails(
+ InvoiceUpdateLinesParams.Line.PriceData.ProductData.TaxDetails taxDetails) {
+ this.taxDetails = taxDetails;
+ return this;
+ }
+
/**
* A label that represents units of this product. When set, this will be included in
* customers' receipts, invoices, Checkout, and the customer portal.
@@ -1638,6 +1690,109 @@ public Builder setUnitLabel(String unitLabel) {
return this;
}
}
+
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class TaxDetails {
+ /**
+ * Map of extra parameters for custom features not available in this client library. The
+ * content in this map is not serialized under this field's {@code @SerializedName} value.
+ * Instead, each key/value pair is serialized as if the key is a root-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 tax location ID. Depending on the tax
+ * code, this is required, optional, or not supported.
+ */
+ @SerializedName("performance_location")
+ String performanceLocation;
+
+ /** A tax code ID. */
+ @SerializedName("tax_code")
+ Object taxCode;
+
+ private TaxDetails(
+ Map extraParams, String performanceLocation, Object taxCode) {
+ this.extraParams = extraParams;
+ this.performanceLocation = performanceLocation;
+ this.taxCode = taxCode;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Map extraParams;
+
+ private String performanceLocation;
+
+ private Object taxCode;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public InvoiceUpdateLinesParams.Line.PriceData.ProductData.TaxDetails build() {
+ return new InvoiceUpdateLinesParams.Line.PriceData.ProductData.TaxDetails(
+ this.extraParams, this.performanceLocation, this.taxCode);
+ }
+
+ /**
+ * Add a key/value pair to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the
+ * original map. See {@link
+ * InvoiceUpdateLinesParams.Line.PriceData.ProductData.TaxDetails#extraParams} for the
+ * field documentation.
+ */
+ public Builder putExtraParam(String key, Object value) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.put(key, value);
+ return this;
+ }
+
+ /**
+ * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the
+ * original map. See {@link
+ * InvoiceUpdateLinesParams.Line.PriceData.ProductData.TaxDetails#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 tax location ID. Depending on the tax
+ * code, this is required, optional, or not supported.
+ */
+ public Builder setPerformanceLocation(String performanceLocation) {
+ this.performanceLocation = performanceLocation;
+ return this;
+ }
+
+ /** A tax code ID. */
+ public Builder setTaxCode(String taxCode) {
+ this.taxCode = taxCode;
+ return this;
+ }
+
+ /** A tax code ID. */
+ public Builder setTaxCode(EmptyParam taxCode) {
+ this.taxCode = taxCode;
+ return this;
+ }
+ }
+ }
}
public enum TaxBehavior implements ApiRequestParams.EnumParam {
diff --git a/src/main/java/com/stripe/param/InvoiceUpdateParams.java b/src/main/java/com/stripe/param/InvoiceUpdateParams.java
index 49039bfc406..b76da51a272 100644
--- a/src/main/java/com/stripe/param/InvoiceUpdateParams.java
+++ b/src/main/java/com/stripe/param/InvoiceUpdateParams.java
@@ -3953,6 +3953,13 @@ public static class Pix {
@SerializedName("amount_includes_iof")
AmountIncludesIof amountIncludesIof;
+ /**
+ * The number of seconds (between 10 and 1209600) after which Pix payment will expire.
+ * Defaults to 86400 seconds.
+ */
+ @SerializedName("expires_after_seconds")
+ Long expiresAfterSeconds;
+
/**
* Map of extra parameters for custom features not available in this client library. The
* content in this map is not serialized under this field's {@code @SerializedName} value.
@@ -3963,8 +3970,12 @@ public static class Pix {
@SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
Map extraParams;
- private Pix(AmountIncludesIof amountIncludesIof, Map extraParams) {
+ private Pix(
+ AmountIncludesIof amountIncludesIof,
+ Long expiresAfterSeconds,
+ Map extraParams) {
this.amountIncludesIof = amountIncludesIof;
+ this.expiresAfterSeconds = expiresAfterSeconds;
this.extraParams = extraParams;
}
@@ -3975,12 +3986,14 @@ public static Builder builder() {
public static class Builder {
private AmountIncludesIof amountIncludesIof;
+ private Long expiresAfterSeconds;
+
private Map extraParams;
/** Finalize and obtain parameter instance from this builder. */
public InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.Pix build() {
return new InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.Pix(
- this.amountIncludesIof, this.extraParams);
+ this.amountIncludesIof, this.expiresAfterSeconds, this.extraParams);
}
/** Determines if the amount includes the IOF tax. Defaults to {@code never}. */
@@ -3991,6 +4004,15 @@ public Builder setAmountIncludesIof(
return this;
}
+ /**
+ * The number of seconds (between 10 and 1209600) after which Pix payment will expire.
+ * Defaults to 86400 seconds.
+ */
+ public Builder setExpiresAfterSeconds(Long expiresAfterSeconds) {
+ this.expiresAfterSeconds = expiresAfterSeconds;
+ return this;
+ }
+
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
diff --git a/src/main/java/com/stripe/param/OrderCreateParams.java b/src/main/java/com/stripe/param/OrderCreateParams.java
index 61a3a43a8b4..f67bbe667e5 100644
--- a/src/main/java/com/stripe/param/OrderCreateParams.java
+++ b/src/main/java/com/stripe/param/OrderCreateParams.java
@@ -2666,7 +2666,7 @@ public static class AcssDebit {
@SerializedName("target_date")
String targetDate;
- /** Bank account verification method. */
+ /** Bank account verification method. The default value is {@code automatic}. */
@SerializedName("verification_method")
VerificationMethod verificationMethod;
@@ -2816,7 +2816,7 @@ public Builder setTargetDate(String targetDate) {
return this;
}
- /** Bank account verification method. */
+ /** Bank account verification method. The default value is {@code automatic}. */
public Builder setVerificationMethod(
OrderCreateParams.Payment.Settings.PaymentMethodOptions.AcssDebit.VerificationMethod
verificationMethod) {
diff --git a/src/main/java/com/stripe/param/OrderUpdateParams.java b/src/main/java/com/stripe/param/OrderUpdateParams.java
index 2d0a8c07d33..474779b0baf 100644
--- a/src/main/java/com/stripe/param/OrderUpdateParams.java
+++ b/src/main/java/com/stripe/param/OrderUpdateParams.java
@@ -3099,7 +3099,7 @@ public static class AcssDebit {
@SerializedName("target_date")
Object targetDate;
- /** Bank account verification method. */
+ /** Bank account verification method. The default value is {@code automatic}. */
@SerializedName("verification_method")
VerificationMethod verificationMethod;
@@ -3259,7 +3259,7 @@ public Builder setTargetDate(EmptyParam targetDate) {
return this;
}
- /** Bank account verification method. */
+ /** Bank account verification method. The default value is {@code automatic}. */
public Builder setVerificationMethod(
OrderUpdateParams.Payment.Settings.PaymentMethodOptions.AcssDebit.VerificationMethod
verificationMethod) {
diff --git a/src/main/java/com/stripe/param/PaymentIntentCaptureParams.java b/src/main/java/com/stripe/param/PaymentIntentCaptureParams.java
index d49a3b8f50d..608d54a5db1 100644
--- a/src/main/java/com/stripe/param/PaymentIntentCaptureParams.java
+++ b/src/main/java/com/stripe/param/PaymentIntentCaptureParams.java
@@ -426,6 +426,10 @@ public static class AmountDetails {
@SerializedName("shipping")
Object shipping;
+ /** Contains information about the surcharge portion of the amount. */
+ @SerializedName("surcharge")
+ Object surcharge;
+
/** Contains information about the tax portion of the amount. */
@SerializedName("tax")
Object tax;
@@ -436,12 +440,14 @@ private AmountDetails(
Map extraParams,
Object lineItems,
Object shipping,
+ Object surcharge,
Object tax) {
this.discountAmount = discountAmount;
this.enforceArithmeticValidation = enforceArithmeticValidation;
this.extraParams = extraParams;
this.lineItems = lineItems;
this.shipping = shipping;
+ this.surcharge = surcharge;
this.tax = tax;
}
@@ -460,6 +466,8 @@ public static class Builder {
private Object shipping;
+ private Object surcharge;
+
private Object tax;
/** Finalize and obtain parameter instance from this builder. */
@@ -470,6 +478,7 @@ public PaymentIntentCaptureParams.AmountDetails build() {
this.extraParams,
this.lineItems,
this.shipping,
+ this.surcharge,
this.tax);
}
@@ -603,6 +612,18 @@ public Builder setShipping(EmptyParam shipping) {
return this;
}
+ /** Contains information about the surcharge portion of the amount. */
+ public Builder setSurcharge(PaymentIntentCaptureParams.AmountDetails.Surcharge surcharge) {
+ this.surcharge = surcharge;
+ return this;
+ }
+
+ /** Contains information about the surcharge portion of the amount. */
+ public Builder setSurcharge(EmptyParam surcharge) {
+ this.surcharge = surcharge;
+ return this;
+ }
+
/** Contains information about the tax portion of the amount. */
public Builder setTax(PaymentIntentCaptureParams.AmountDetails.Tax tax) {
this.tax = tax;
@@ -1653,6 +1674,126 @@ public Builder setToPostalCode(EmptyParam toPostalCode) {
}
}
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Surcharge {
+ /** Portion of the amount that corresponds to a surcharge. */
+ @SerializedName("amount")
+ Object amount;
+
+ /** Indicate whether to enforce validations on the surcharge amount. */
+ @SerializedName("enforce_validation")
+ ApiRequestParams.EnumParam enforceValidation;
+
+ /**
+ * Map of extra parameters for custom features not available in this client library. The
+ * content in this map is not serialized under this field's {@code @SerializedName} value.
+ * Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
+ * name in this param object. Effectively, this map is flattened to its parent instance.
+ */
+ @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
+ Map extraParams;
+
+ private Surcharge(
+ Object amount,
+ ApiRequestParams.EnumParam enforceValidation,
+ Map extraParams) {
+ this.amount = amount;
+ this.enforceValidation = enforceValidation;
+ this.extraParams = extraParams;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Object amount;
+
+ private ApiRequestParams.EnumParam enforceValidation;
+
+ private Map extraParams;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public PaymentIntentCaptureParams.AmountDetails.Surcharge build() {
+ return new PaymentIntentCaptureParams.AmountDetails.Surcharge(
+ this.amount, this.enforceValidation, this.extraParams);
+ }
+
+ /** Portion of the amount that corresponds to a surcharge. */
+ public Builder setAmount(Long amount) {
+ this.amount = amount;
+ return this;
+ }
+
+ /** Portion of the amount that corresponds to a surcharge. */
+ public Builder setAmount(EmptyParam amount) {
+ this.amount = amount;
+ return this;
+ }
+
+ /** Indicate whether to enforce validations on the surcharge amount. */
+ public Builder setEnforceValidation(
+ PaymentIntentCaptureParams.AmountDetails.Surcharge.EnforceValidation
+ enforceValidation) {
+ this.enforceValidation = enforceValidation;
+ return this;
+ }
+
+ /** Indicate whether to enforce validations on the surcharge amount. */
+ public Builder setEnforceValidation(EmptyParam enforceValidation) {
+ this.enforceValidation = enforceValidation;
+ return this;
+ }
+
+ /**
+ * Add a key/value pair to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
+ * map. See {@link PaymentIntentCaptureParams.AmountDetails.Surcharge#extraParams} for the
+ * field documentation.
+ */
+ public Builder putExtraParam(String key, Object value) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.put(key, value);
+ return this;
+ }
+
+ /**
+ * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
+ * map. See {@link PaymentIntentCaptureParams.AmountDetails.Surcharge#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 EnforceValidation implements ApiRequestParams.EnumParam {
+ @SerializedName("automatic")
+ AUTOMATIC("automatic"),
+
+ @SerializedName("disabled")
+ DISABLED("disabled"),
+
+ @SerializedName("enabled")
+ ENABLED("enabled");
+
+ @Getter(onMethod_ = {@Override})
+ private final String value;
+
+ EnforceValidation(String value) {
+ this.value = value;
+ }
+ }
+ }
+
@Getter
@EqualsAndHashCode(callSuper = false)
public static class Tax {
@@ -2021,10 +2162,6 @@ public static class PaymentDetails {
* A unique value assigned by the business to identify the transaction. Required for L2 and L3
* rates.
*
- * Required when the Payment Method Types array contains {@code card}, including when automatic_payment_methods.enabled
- * is set to {@code true}.
- *
*
For Cards, this field is truncated to 25 alphanumeric characters, excluding spaces, before
* being sent to card networks. For Klarna, this field is truncated to 255 characters and is
* visible to customers when they view the order in the Klarna app.
@@ -2316,10 +2453,6 @@ public Builder setLodgingData(
* A unique value assigned by the business to identify the transaction. Required for L2 and L3
* rates.
*
- *
Required when the Payment Method Types array contains {@code card}, including when automatic_payment_methods.enabled
- * is set to {@code true}.
- *
*
For Cards, this field is truncated to 25 alphanumeric characters, excluding spaces,
* before being sent to card networks. For Klarna, this field is truncated to 255 characters
* and is visible to customers when they view the order in the Klarna app.
@@ -2333,10 +2466,6 @@ public Builder setOrderReference(String orderReference) {
* A unique value assigned by the business to identify the transaction. Required for L2 and L3
* rates.
*
- *
Required when the Payment Method Types array contains {@code card}, including when automatic_payment_methods.enabled
- * is set to {@code true}.
- *
*
For Cards, this field is truncated to 25 alphanumeric characters, excluding spaces,
* before being sent to card networks. For Klarna, this field is truncated to 255 characters
* and is visible to customers when they view the order in the Klarna app.
diff --git a/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java b/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java
index 9a25c045961..939ee1e3582 100644
--- a/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java
+++ b/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java
@@ -784,6 +784,10 @@ public static class AmountDetails {
@SerializedName("shipping")
Object shipping;
+ /** Contains information about the surcharge portion of the amount. */
+ @SerializedName("surcharge")
+ Object surcharge;
+
/** Contains information about the tax portion of the amount. */
@SerializedName("tax")
Object tax;
@@ -794,12 +798,14 @@ private AmountDetails(
Map extraParams,
Object lineItems,
Object shipping,
+ Object surcharge,
Object tax) {
this.discountAmount = discountAmount;
this.enforceArithmeticValidation = enforceArithmeticValidation;
this.extraParams = extraParams;
this.lineItems = lineItems;
this.shipping = shipping;
+ this.surcharge = surcharge;
this.tax = tax;
}
@@ -818,6 +824,8 @@ public static class Builder {
private Object shipping;
+ private Object surcharge;
+
private Object tax;
/** Finalize and obtain parameter instance from this builder. */
@@ -828,6 +836,7 @@ public PaymentIntentConfirmParams.AmountDetails build() {
this.extraParams,
this.lineItems,
this.shipping,
+ this.surcharge,
this.tax);
}
@@ -961,6 +970,18 @@ public Builder setShipping(EmptyParam shipping) {
return this;
}
+ /** Contains information about the surcharge portion of the amount. */
+ public Builder setSurcharge(PaymentIntentConfirmParams.AmountDetails.Surcharge surcharge) {
+ this.surcharge = surcharge;
+ return this;
+ }
+
+ /** Contains information about the surcharge portion of the amount. */
+ public Builder setSurcharge(EmptyParam surcharge) {
+ this.surcharge = surcharge;
+ return this;
+ }
+
/** Contains information about the tax portion of the amount. */
public Builder setTax(PaymentIntentConfirmParams.AmountDetails.Tax tax) {
this.tax = tax;
@@ -2011,6 +2032,126 @@ public Builder setToPostalCode(EmptyParam toPostalCode) {
}
}
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Surcharge {
+ /** Portion of the amount that corresponds to a surcharge. */
+ @SerializedName("amount")
+ Object amount;
+
+ /** Indicate whether to enforce validations on the surcharge amount. */
+ @SerializedName("enforce_validation")
+ ApiRequestParams.EnumParam enforceValidation;
+
+ /**
+ * Map of extra parameters for custom features not available in this client library. The
+ * content in this map is not serialized under this field's {@code @SerializedName} value.
+ * Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
+ * name in this param object. Effectively, this map is flattened to its parent instance.
+ */
+ @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
+ Map extraParams;
+
+ private Surcharge(
+ Object amount,
+ ApiRequestParams.EnumParam enforceValidation,
+ Map extraParams) {
+ this.amount = amount;
+ this.enforceValidation = enforceValidation;
+ this.extraParams = extraParams;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Object amount;
+
+ private ApiRequestParams.EnumParam enforceValidation;
+
+ private Map extraParams;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public PaymentIntentConfirmParams.AmountDetails.Surcharge build() {
+ return new PaymentIntentConfirmParams.AmountDetails.Surcharge(
+ this.amount, this.enforceValidation, this.extraParams);
+ }
+
+ /** Portion of the amount that corresponds to a surcharge. */
+ public Builder setAmount(Long amount) {
+ this.amount = amount;
+ return this;
+ }
+
+ /** Portion of the amount that corresponds to a surcharge. */
+ public Builder setAmount(EmptyParam amount) {
+ this.amount = amount;
+ return this;
+ }
+
+ /** Indicate whether to enforce validations on the surcharge amount. */
+ public Builder setEnforceValidation(
+ PaymentIntentConfirmParams.AmountDetails.Surcharge.EnforceValidation
+ enforceValidation) {
+ this.enforceValidation = enforceValidation;
+ return this;
+ }
+
+ /** Indicate whether to enforce validations on the surcharge amount. */
+ public Builder setEnforceValidation(EmptyParam enforceValidation) {
+ this.enforceValidation = enforceValidation;
+ return this;
+ }
+
+ /**
+ * Add a key/value pair to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
+ * map. See {@link PaymentIntentConfirmParams.AmountDetails.Surcharge#extraParams} for the
+ * field documentation.
+ */
+ public Builder putExtraParam(String key, Object value) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.put(key, value);
+ return this;
+ }
+
+ /**
+ * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
+ * map. See {@link PaymentIntentConfirmParams.AmountDetails.Surcharge#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 EnforceValidation implements ApiRequestParams.EnumParam {
+ @SerializedName("automatic")
+ AUTOMATIC("automatic"),
+
+ @SerializedName("disabled")
+ DISABLED("disabled"),
+
+ @SerializedName("enabled")
+ ENABLED("enabled");
+
+ @Getter(onMethod_ = {@Override})
+ private final String value;
+
+ EnforceValidation(String value) {
+ this.value = value;
+ }
+ }
+ }
+
@Getter
@EqualsAndHashCode(callSuper = false)
public static class Tax {
@@ -2752,10 +2893,6 @@ public static class PaymentDetails {
* A unique value assigned by the business to identify the transaction. Required for L2 and L3
* rates.
*
- * Required when the Payment Method Types array contains {@code card}, including when automatic_payment_methods.enabled
- * is set to {@code true}.
- *
*
For Cards, this field is truncated to 25 alphanumeric characters, excluding spaces, before
* being sent to card networks. For Klarna, this field is truncated to 255 characters and is
* visible to customers when they view the order in the Klarna app.
@@ -3047,10 +3184,6 @@ public Builder setLodgingData(
* A unique value assigned by the business to identify the transaction. Required for L2 and L3
* rates.
*
- *
Required when the Payment Method Types array contains {@code card}, including when automatic_payment_methods.enabled
- * is set to {@code true}.
- *
*
For Cards, this field is truncated to 25 alphanumeric characters, excluding spaces,
* before being sent to card networks. For Klarna, this field is truncated to 255 characters
* and is visible to customers when they view the order in the Klarna app.
@@ -3064,10 +3197,6 @@ public Builder setOrderReference(String orderReference) {
* A unique value assigned by the business to identify the transaction. Required for L2 and L3
* rates.
*
- *
Required when the Payment Method Types array contains {@code card}, including when automatic_payment_methods.enabled
- * is set to {@code true}.
- *
*
For Cards, this field is truncated to 25 alphanumeric characters, excluding spaces,
* before being sent to card networks. For Klarna, this field is truncated to 255 characters
* and is visible to customers when they view the order in the Klarna app.
@@ -13739,6 +13868,13 @@ public static class PaymentMethodData {
@SerializedName("type")
Type type;
+ /**
+ * If this is a {@code upi} PaymentMethod, this hash contains details about the UPI payment
+ * method.
+ */
+ @SerializedName("upi")
+ Upi upi;
+
/**
* If this is an {@code us_bank_account} PaymentMethod, this hash contains details about the US
* bank account payment method.
@@ -13821,6 +13957,7 @@ private PaymentMethodData(
Swish swish,
Twint twint,
Type type,
+ Upi upi,
UsBankAccount usBankAccount,
WechatPay wechatPay,
Zip zip) {
@@ -13884,6 +14021,7 @@ private PaymentMethodData(
this.swish = swish;
this.twint = twint;
this.type = type;
+ this.upi = upi;
this.usBankAccount = usBankAccount;
this.wechatPay = wechatPay;
this.zip = zip;
@@ -14014,6 +14152,8 @@ public static class Builder {
private Type type;
+ private Upi upi;
+
private UsBankAccount usBankAccount;
private WechatPay wechatPay;
@@ -14083,6 +14223,7 @@ public PaymentIntentConfirmParams.PaymentMethodData build() {
this.swish,
this.twint,
this.type,
+ this.upi,
this.usBankAccount,
this.wechatPay,
this.zip);
@@ -14685,6 +14826,15 @@ public Builder setType(PaymentIntentConfirmParams.PaymentMethodData.Type type) {
return this;
}
+ /**
+ * If this is a {@code upi} PaymentMethod, this hash contains details about the UPI payment
+ * method.
+ */
+ public Builder setUpi(PaymentIntentConfirmParams.PaymentMethodData.Upi upi) {
+ this.upi = upi;
+ return this;
+ }
+
/**
* If this is an {@code us_bank_account} PaymentMethod, this hash contains details about the
* US bank account payment method.
@@ -19129,19 +19279,9 @@ public static class StripeBalance {
@SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
Map extraParams;
- /**
- * The source_type
- * of the balance
- */
- @SerializedName("source_type")
- SourceType sourceType;
-
- private StripeBalance(
- String account, Map extraParams, SourceType sourceType) {
+ private StripeBalance(String account, Map extraParams) {
this.account = account;
this.extraParams = extraParams;
- this.sourceType = sourceType;
}
public static Builder builder() {
@@ -19153,12 +19293,10 @@ public static class Builder {
private Map extraParams;
- private SourceType sourceType;
-
/** Finalize and obtain parameter instance from this builder. */
public PaymentIntentConfirmParams.PaymentMethodData.StripeBalance build() {
return new PaymentIntentConfirmParams.PaymentMethodData.StripeBalance(
- this.account, this.extraParams, this.sourceType);
+ this.account, this.extraParams);
}
/** The connected account ID whose Stripe balance to use as the source of payment. */
@@ -19194,35 +19332,6 @@ public Builder putAllExtraParam(Map map) {
this.extraParams.putAll(map);
return this;
}
-
- /**
- * The source_type
- * of the balance
- */
- public Builder setSourceType(
- PaymentIntentConfirmParams.PaymentMethodData.StripeBalance.SourceType sourceType) {
- this.sourceType = sourceType;
- return this;
- }
- }
-
- public enum SourceType implements ApiRequestParams.EnumParam {
- @SerializedName("bank_account")
- BANK_ACCOUNT("bank_account"),
-
- @SerializedName("card")
- CARD("card"),
-
- @SerializedName("fpx")
- FPX("fpx");
-
- @Getter(onMethod_ = {@Override})
- private final String value;
-
- SourceType(String value) {
- this.value = value;
- }
}
}
@@ -19342,6 +19451,229 @@ public Builder putAllExtraParam(Map map) {
}
}
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Upi {
+ /**
+ * Map of extra parameters for custom features not available in this client library. The
+ * content in this map is not serialized under this field's {@code @SerializedName} value.
+ * Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
+ * name in this param object. Effectively, this map is flattened to its parent instance.
+ */
+ @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
+ Map extraParams;
+
+ /** Configuration options for setting up an eMandate. */
+ @SerializedName("mandate_options")
+ MandateOptions mandateOptions;
+
+ private Upi(Map extraParams, MandateOptions mandateOptions) {
+ this.extraParams = extraParams;
+ this.mandateOptions = mandateOptions;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Map extraParams;
+
+ private MandateOptions mandateOptions;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public PaymentIntentConfirmParams.PaymentMethodData.Upi build() {
+ return new PaymentIntentConfirmParams.PaymentMethodData.Upi(
+ this.extraParams, this.mandateOptions);
+ }
+
+ /**
+ * Add a key/value pair to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
+ * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Upi#extraParams} for the
+ * field documentation.
+ */
+ public Builder putExtraParam(String key, Object value) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.put(key, value);
+ return this;
+ }
+
+ /**
+ * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
+ * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Upi#extraParams} for the
+ * field documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+
+ /** Configuration options for setting up an eMandate. */
+ public Builder setMandateOptions(
+ PaymentIntentConfirmParams.PaymentMethodData.Upi.MandateOptions mandateOptions) {
+ this.mandateOptions = mandateOptions;
+ return this;
+ }
+ }
+
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class MandateOptions {
+ /** Amount to be charged for future payments. */
+ @SerializedName("amount")
+ Long amount;
+
+ /**
+ * One of {@code fixed} or {@code maximum}. If {@code fixed}, the {@code amount} param
+ * refers to the exact amount to be charged in future payments. If {@code maximum}, the
+ * amount charged can be up to the value passed for the {@code amount} param.
+ */
+ @SerializedName("amount_type")
+ AmountType amountType;
+
+ /**
+ * A description of the mandate or subscription that is meant to be displayed to the
+ * customer.
+ */
+ @SerializedName("description")
+ String description;
+
+ /** End date of the mandate or subscription. */
+ @SerializedName("end_date")
+ Long endDate;
+
+ /**
+ * Map of extra parameters for custom features not available in this client library. The
+ * content in this map is not serialized under this field's {@code @SerializedName} value.
+ * Instead, each key/value pair is serialized as if the key is a root-level field
+ * (serialized) name in this param object. Effectively, this map is flattened to its parent
+ * instance.
+ */
+ @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
+ Map extraParams;
+
+ private MandateOptions(
+ Long amount,
+ AmountType amountType,
+ String description,
+ Long endDate,
+ Map extraParams) {
+ this.amount = amount;
+ this.amountType = amountType;
+ this.description = description;
+ this.endDate = endDate;
+ this.extraParams = extraParams;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Long amount;
+
+ private AmountType amountType;
+
+ private String description;
+
+ private Long endDate;
+
+ private Map extraParams;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public PaymentIntentConfirmParams.PaymentMethodData.Upi.MandateOptions build() {
+ return new PaymentIntentConfirmParams.PaymentMethodData.Upi.MandateOptions(
+ this.amount, this.amountType, this.description, this.endDate, this.extraParams);
+ }
+
+ /** Amount to be charged for future payments. */
+ public Builder setAmount(Long amount) {
+ this.amount = amount;
+ return this;
+ }
+
+ /**
+ * One of {@code fixed} or {@code maximum}. If {@code fixed}, the {@code amount} param
+ * refers to the exact amount to be charged in future payments. If {@code maximum}, the
+ * amount charged can be up to the value passed for the {@code amount} param.
+ */
+ public Builder setAmountType(
+ PaymentIntentConfirmParams.PaymentMethodData.Upi.MandateOptions.AmountType
+ amountType) {
+ this.amountType = amountType;
+ return this;
+ }
+
+ /**
+ * A description of the mandate or subscription that is meant to be displayed to the
+ * customer.
+ */
+ public Builder setDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ /** End date of the mandate or subscription. */
+ public Builder setEndDate(Long endDate) {
+ this.endDate = endDate;
+ return this;
+ }
+
+ /**
+ * Add a key/value pair to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
+ * map. See {@link
+ * PaymentIntentConfirmParams.PaymentMethodData.Upi.MandateOptions#extraParams} for the
+ * field documentation.
+ */
+ public Builder putExtraParam(String key, Object value) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.put(key, value);
+ return this;
+ }
+
+ /**
+ * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
+ * map. See {@link
+ * PaymentIntentConfirmParams.PaymentMethodData.Upi.MandateOptions#extraParams} for the
+ * field documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+ }
+
+ public enum AmountType implements ApiRequestParams.EnumParam {
+ @SerializedName("fixed")
+ FIXED("fixed"),
+
+ @SerializedName("maximum")
+ MAXIMUM("maximum");
+
+ @Getter(onMethod_ = {@Override})
+ private final String value;
+
+ AmountType(String value) {
+ this.value = value;
+ }
+ }
+ }
+ }
+
@Getter
@EqualsAndHashCode(callSuper = false)
public static class UsBankAccount {
@@ -19804,6 +20136,9 @@ public enum Type implements ApiRequestParams.EnumParam {
@SerializedName("twint")
TWINT("twint"),
+ @SerializedName("upi")
+ UPI("upi"),
+
@SerializedName("us_bank_account")
US_BANK_ACCOUNT("us_bank_account"),
@@ -20223,6 +20558,13 @@ public static class PaymentMethodOptions {
@SerializedName("twint")
Object twint;
+ /**
+ * If this is a {@code upi} PaymentIntent, this sub-hash contains details about the UPI payment
+ * method options.
+ */
+ @SerializedName("upi")
+ Object upi;
+
/**
* If this is a {@code us_bank_account} PaymentMethod, this sub-hash contains details about the
* US bank account payment method options.
@@ -20302,6 +20644,7 @@ private PaymentMethodOptions(
Object stripeBalance,
Object swish,
Object twint,
+ Object upi,
Object usBankAccount,
Object wechatPay,
Object zip) {
@@ -20362,6 +20705,7 @@ private PaymentMethodOptions(
this.stripeBalance = stripeBalance;
this.swish = swish;
this.twint = twint;
+ this.upi = upi;
this.usBankAccount = usBankAccount;
this.wechatPay = wechatPay;
this.zip = zip;
@@ -20486,6 +20830,8 @@ public static class Builder {
private Object twint;
+ private Object upi;
+
private Object usBankAccount;
private Object wechatPay;
@@ -20552,6 +20898,7 @@ public PaymentIntentConfirmParams.PaymentMethodOptions build() {
this.stripeBalance,
this.swish,
this.twint,
+ this.upi,
this.usBankAccount,
this.wechatPay,
this.zip);
@@ -21610,6 +21957,24 @@ public Builder setTwint(EmptyParam twint) {
return this;
}
+ /**
+ * If this is a {@code upi} PaymentIntent, this sub-hash contains details about the UPI
+ * payment method options.
+ */
+ public Builder setUpi(PaymentIntentConfirmParams.PaymentMethodOptions.Upi upi) {
+ this.upi = upi;
+ return this;
+ }
+
+ /**
+ * If this is a {@code upi} PaymentIntent, this sub-hash contains details about the UPI
+ * payment method options.
+ */
+ public Builder setUpi(EmptyParam upi) {
+ this.upi = upi;
+ return this;
+ }
+
/**
* If this is a {@code us_bank_account} PaymentMethod, this sub-hash contains details about
* the US bank account payment method options.
@@ -21717,7 +22082,7 @@ public static class AcssDebit {
@SerializedName("target_date")
String targetDate;
- /** Bank account verification method. */
+ /** Bank account verification method. The default value is {@code automatic}. */
@SerializedName("verification_method")
VerificationMethod verificationMethod;
@@ -21865,7 +22230,7 @@ public Builder setTargetDate(String targetDate) {
return this;
}
- /** Bank account verification method. */
+ /** Bank account verification method. The default value is {@code automatic}. */
public Builder setVerificationMethod(
PaymentIntentConfirmParams.PaymentMethodOptions.AcssDebit.VerificationMethod
verificationMethod) {
@@ -25114,7 +25479,10 @@ public enum Type implements ApiRequestParams.EnumParam {
@Getter
@EqualsAndHashCode(callSuper = false)
public static class MandateOptions {
- /** Required. Amount to be charged for future payments. */
+ /**
+ * Required. Amount to be charged for future payments, specified in the
+ * presentment currency.
+ */
@SerializedName("amount")
Long amount;
@@ -25249,7 +25617,10 @@ public PaymentIntentConfirmParams.PaymentMethodOptions.Card.MandateOptions build
this.supportedTypes);
}
- /** Required. Amount to be charged for future payments. */
+ /**
+ * Required. Amount to be charged for future payments, specified in the
+ * presentment currency.
+ */
public Builder setAmount(Long amount) {
this.amount = amount;
return this;
@@ -40122,7 +40493,7 @@ public static class MandateOptions {
@SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
Map extraParams;
- /** Schedule at which the future payments will be charged. Defaults to {@code weekly}. */
+ /** Schedule at which the future payments will be charged. Defaults to {@code monthly}. */
@SerializedName("payment_schedule")
PaymentSchedule paymentSchedule;
@@ -40272,7 +40643,7 @@ public Builder putAllExtraParam(Map map) {
return this;
}
- /** Schedule at which the future payments will be charged. Defaults to {@code weekly}. */
+ /** Schedule at which the future payments will be charged. Defaults to {@code monthly}. */
public Builder setPaymentSchedule(
PaymentIntentConfirmParams.PaymentMethodOptions.Pix.MandateOptions.PaymentSchedule
paymentSchedule) {
@@ -42252,6 +42623,267 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam {
}
}
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Upi {
+ /**
+ * Map of extra parameters for custom features not available in this client library. The
+ * content in this map is not serialized under this field's {@code @SerializedName} value.
+ * Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
+ * name in this param object. Effectively, this map is flattened to its parent instance.
+ */
+ @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
+ Map extraParams;
+
+ /** Configuration options for setting up an eMandate. */
+ @SerializedName("mandate_options")
+ MandateOptions mandateOptions;
+
+ @SerializedName("setup_future_usage")
+ ApiRequestParams.EnumParam setupFutureUsage;
+
+ private Upi(
+ Map extraParams,
+ MandateOptions mandateOptions,
+ ApiRequestParams.EnumParam setupFutureUsage) {
+ this.extraParams = extraParams;
+ this.mandateOptions = mandateOptions;
+ this.setupFutureUsage = setupFutureUsage;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Map extraParams;
+
+ private MandateOptions mandateOptions;
+
+ private ApiRequestParams.EnumParam setupFutureUsage;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public PaymentIntentConfirmParams.PaymentMethodOptions.Upi build() {
+ return new PaymentIntentConfirmParams.PaymentMethodOptions.Upi(
+ this.extraParams, this.mandateOptions, this.setupFutureUsage);
+ }
+
+ /**
+ * Add a key/value pair to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
+ * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.Upi#extraParams} for the
+ * field documentation.
+ */
+ public Builder putExtraParam(String key, Object value) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.put(key, value);
+ return this;
+ }
+
+ /**
+ * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
+ * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.Upi#extraParams} for the
+ * field documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+
+ /** Configuration options for setting up an eMandate. */
+ public Builder setMandateOptions(
+ PaymentIntentConfirmParams.PaymentMethodOptions.Upi.MandateOptions mandateOptions) {
+ this.mandateOptions = mandateOptions;
+ return this;
+ }
+
+ public Builder setSetupFutureUsage(
+ PaymentIntentConfirmParams.PaymentMethodOptions.Upi.SetupFutureUsage setupFutureUsage) {
+ this.setupFutureUsage = setupFutureUsage;
+ return this;
+ }
+
+ public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) {
+ this.setupFutureUsage = setupFutureUsage;
+ return this;
+ }
+ }
+
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class MandateOptions {
+ /** Amount to be charged for future payments. */
+ @SerializedName("amount")
+ Long amount;
+
+ /**
+ * One of {@code fixed} or {@code maximum}. If {@code fixed}, the {@code amount} param
+ * refers to the exact amount to be charged in future payments. If {@code maximum}, the
+ * amount charged can be up to the value passed for the {@code amount} param.
+ */
+ @SerializedName("amount_type")
+ AmountType amountType;
+
+ /**
+ * A description of the mandate or subscription that is meant to be displayed to the
+ * customer.
+ */
+ @SerializedName("description")
+ String description;
+
+ /** End date of the mandate or subscription. */
+ @SerializedName("end_date")
+ Long endDate;
+
+ /**
+ * Map of extra parameters for custom features not available in this client library. The
+ * content in this map is not serialized under this field's {@code @SerializedName} value.
+ * Instead, each key/value pair is serialized as if the key is a root-level field
+ * (serialized) name in this param object. Effectively, this map is flattened to its parent
+ * instance.
+ */
+ @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
+ Map extraParams;
+
+ private MandateOptions(
+ Long amount,
+ AmountType amountType,
+ String description,
+ Long endDate,
+ Map extraParams) {
+ this.amount = amount;
+ this.amountType = amountType;
+ this.description = description;
+ this.endDate = endDate;
+ this.extraParams = extraParams;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Long amount;
+
+ private AmountType amountType;
+
+ private String description;
+
+ private Long endDate;
+
+ private Map extraParams;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public PaymentIntentConfirmParams.PaymentMethodOptions.Upi.MandateOptions build() {
+ return new PaymentIntentConfirmParams.PaymentMethodOptions.Upi.MandateOptions(
+ this.amount, this.amountType, this.description, this.endDate, this.extraParams);
+ }
+
+ /** Amount to be charged for future payments. */
+ public Builder setAmount(Long amount) {
+ this.amount = amount;
+ return this;
+ }
+
+ /**
+ * One of {@code fixed} or {@code maximum}. If {@code fixed}, the {@code amount} param
+ * refers to the exact amount to be charged in future payments. If {@code maximum}, the
+ * amount charged can be up to the value passed for the {@code amount} param.
+ */
+ public Builder setAmountType(
+ PaymentIntentConfirmParams.PaymentMethodOptions.Upi.MandateOptions.AmountType
+ amountType) {
+ this.amountType = amountType;
+ return this;
+ }
+
+ /**
+ * A description of the mandate or subscription that is meant to be displayed to the
+ * customer.
+ */
+ public Builder setDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ /** End date of the mandate or subscription. */
+ public Builder setEndDate(Long endDate) {
+ this.endDate = endDate;
+ return this;
+ }
+
+ /**
+ * Add a key/value pair to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
+ * map. See {@link
+ * PaymentIntentConfirmParams.PaymentMethodOptions.Upi.MandateOptions#extraParams} for the
+ * field documentation.
+ */
+ public Builder putExtraParam(String key, Object value) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.put(key, value);
+ return this;
+ }
+
+ /**
+ * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
+ * map. See {@link
+ * PaymentIntentConfirmParams.PaymentMethodOptions.Upi.MandateOptions#extraParams} for the
+ * field documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+ }
+
+ public enum AmountType implements ApiRequestParams.EnumParam {
+ @SerializedName("fixed")
+ FIXED("fixed"),
+
+ @SerializedName("maximum")
+ MAXIMUM("maximum");
+
+ @Getter(onMethod_ = {@Override})
+ private final String value;
+
+ AmountType(String value) {
+ this.value = value;
+ }
+ }
+ }
+
+ public enum SetupFutureUsage implements ApiRequestParams.EnumParam {
+ @SerializedName("none")
+ NONE("none"),
+
+ @SerializedName("off_session")
+ OFF_SESSION("off_session"),
+
+ @SerializedName("on_session")
+ ON_SESSION("on_session");
+
+ @Getter(onMethod_ = {@Override})
+ private final String value;
+
+ SetupFutureUsage(String value) {
+ this.value = value;
+ }
+ }
+ }
+
@Getter
@EqualsAndHashCode(callSuper = false)
public static class UsBankAccount {
@@ -42276,10 +42908,6 @@ public static class UsBankAccount {
@SerializedName("networks")
Networks networks;
- /** Preferred transaction settlement speed. */
- @SerializedName("preferred_settlement_speed")
- ApiRequestParams.EnumParam preferredSettlementSpeed;
-
/**
* Indicates that you intend to make future payments with this PaymentIntent's payment method.
*
@@ -42318,7 +42946,7 @@ public static class UsBankAccount {
@SerializedName("transaction_purpose")
ApiRequestParams.EnumParam transactionPurpose;
- /** Bank account verification method. */
+ /** Bank account verification method. The default value is {@code automatic}. */
@SerializedName("verification_method")
VerificationMethod verificationMethod;
@@ -42327,7 +42955,6 @@ private UsBankAccount(
FinancialConnections financialConnections,
MandateOptions mandateOptions,
Networks networks,
- ApiRequestParams.EnumParam preferredSettlementSpeed,
ApiRequestParams.EnumParam setupFutureUsage,
String targetDate,
ApiRequestParams.EnumParam transactionPurpose,
@@ -42336,7 +42963,6 @@ private UsBankAccount(
this.financialConnections = financialConnections;
this.mandateOptions = mandateOptions;
this.networks = networks;
- this.preferredSettlementSpeed = preferredSettlementSpeed;
this.setupFutureUsage = setupFutureUsage;
this.targetDate = targetDate;
this.transactionPurpose = transactionPurpose;
@@ -42356,8 +42982,6 @@ public static class Builder {
private Networks networks;
- private ApiRequestParams.EnumParam preferredSettlementSpeed;
-
private ApiRequestParams.EnumParam setupFutureUsage;
private String targetDate;
@@ -42373,7 +42997,6 @@ public PaymentIntentConfirmParams.PaymentMethodOptions.UsBankAccount build() {
this.financialConnections,
this.mandateOptions,
this.networks,
- this.preferredSettlementSpeed,
this.setupFutureUsage,
this.targetDate,
this.transactionPurpose,
@@ -42433,20 +43056,6 @@ public Builder setNetworks(
return this;
}
- /** Preferred transaction settlement speed. */
- public Builder setPreferredSettlementSpeed(
- PaymentIntentConfirmParams.PaymentMethodOptions.UsBankAccount.PreferredSettlementSpeed
- preferredSettlementSpeed) {
- this.preferredSettlementSpeed = preferredSettlementSpeed;
- return this;
- }
-
- /** Preferred transaction settlement speed. */
- public Builder setPreferredSettlementSpeed(EmptyParam preferredSettlementSpeed) {
- this.preferredSettlementSpeed = preferredSettlementSpeed;
- return this;
- }
-
/**
* Indicates that you intend to make future payments with this PaymentIntent's payment
* method.
@@ -42531,7 +43140,7 @@ public Builder setTransactionPurpose(EmptyParam transactionPurpose) {
return this;
}
- /** Bank account verification method. */
+ /** Bank account verification method. The default value is {@code automatic}. */
public Builder setVerificationMethod(
PaymentIntentConfirmParams.PaymentMethodOptions.UsBankAccount.VerificationMethod
verificationMethod) {
@@ -43292,21 +43901,6 @@ public enum Requested implements ApiRequestParams.EnumParam {
}
}
- public enum PreferredSettlementSpeed implements ApiRequestParams.EnumParam {
- @SerializedName("fastest")
- FASTEST("fastest"),
-
- @SerializedName("standard")
- STANDARD("standard");
-
- @Getter(onMethod_ = {@Override})
- private final String value;
-
- PreferredSettlementSpeed(String value) {
- this.value = value;
- }
- }
-
public enum SetupFutureUsage implements ApiRequestParams.EnumParam {
@SerializedName("none")
NONE("none"),
@@ -44233,6 +44827,9 @@ public enum ExcludedPaymentMethodType implements ApiRequestParams.EnumParam {
@SerializedName("twint")
TWINT("twint"),
+ @SerializedName("upi")
+ UPI("upi"),
+
@SerializedName("us_bank_account")
US_BANK_ACCOUNT("us_bank_account"),
diff --git a/src/main/java/com/stripe/param/PaymentIntentCreateParams.java b/src/main/java/com/stripe/param/PaymentIntentCreateParams.java
index 5df7d757d92..556cc99bb34 100644
--- a/src/main/java/com/stripe/param/PaymentIntentCreateParams.java
+++ b/src/main/java/com/stripe/param/PaymentIntentCreateParams.java
@@ -1170,6 +1170,10 @@ public static class AmountDetails {
@SerializedName("shipping")
Object shipping;
+ /** Contains information about the surcharge portion of the amount. */
+ @SerializedName("surcharge")
+ Object surcharge;
+
/** Contains information about the tax portion of the amount. */
@SerializedName("tax")
Object tax;
@@ -1180,12 +1184,14 @@ private AmountDetails(
Map extraParams,
Object lineItems,
Object shipping,
+ Object surcharge,
Object tax) {
this.discountAmount = discountAmount;
this.enforceArithmeticValidation = enforceArithmeticValidation;
this.extraParams = extraParams;
this.lineItems = lineItems;
this.shipping = shipping;
+ this.surcharge = surcharge;
this.tax = tax;
}
@@ -1204,6 +1210,8 @@ public static class Builder {
private Object shipping;
+ private Object surcharge;
+
private Object tax;
/** Finalize and obtain parameter instance from this builder. */
@@ -1214,6 +1222,7 @@ public PaymentIntentCreateParams.AmountDetails build() {
this.extraParams,
this.lineItems,
this.shipping,
+ this.surcharge,
this.tax);
}
@@ -1347,6 +1356,18 @@ public Builder setShipping(EmptyParam shipping) {
return this;
}
+ /** Contains information about the surcharge portion of the amount. */
+ public Builder setSurcharge(PaymentIntentCreateParams.AmountDetails.Surcharge surcharge) {
+ this.surcharge = surcharge;
+ return this;
+ }
+
+ /** Contains information about the surcharge portion of the amount. */
+ public Builder setSurcharge(EmptyParam surcharge) {
+ this.surcharge = surcharge;
+ return this;
+ }
+
/** Contains information about the tax portion of the amount. */
public Builder setTax(PaymentIntentCreateParams.AmountDetails.Tax tax) {
this.tax = tax;
@@ -2394,6 +2415,125 @@ public Builder setToPostalCode(EmptyParam toPostalCode) {
}
}
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Surcharge {
+ /** Portion of the amount that corresponds to a surcharge. */
+ @SerializedName("amount")
+ Object amount;
+
+ /** Indicate whether to enforce validations on the surcharge amount. */
+ @SerializedName("enforce_validation")
+ ApiRequestParams.EnumParam enforceValidation;
+
+ /**
+ * Map of extra parameters for custom features not available in this client library. The
+ * content in this map is not serialized under this field's {@code @SerializedName} value.
+ * Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
+ * name in this param object. Effectively, this map is flattened to its parent instance.
+ */
+ @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
+ Map extraParams;
+
+ private Surcharge(
+ Object amount,
+ ApiRequestParams.EnumParam enforceValidation,
+ Map extraParams) {
+ this.amount = amount;
+ this.enforceValidation = enforceValidation;
+ this.extraParams = extraParams;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Object amount;
+
+ private ApiRequestParams.EnumParam enforceValidation;
+
+ private Map extraParams;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public PaymentIntentCreateParams.AmountDetails.Surcharge build() {
+ return new PaymentIntentCreateParams.AmountDetails.Surcharge(
+ this.amount, this.enforceValidation, this.extraParams);
+ }
+
+ /** Portion of the amount that corresponds to a surcharge. */
+ public Builder setAmount(Long amount) {
+ this.amount = amount;
+ return this;
+ }
+
+ /** Portion of the amount that corresponds to a surcharge. */
+ public Builder setAmount(EmptyParam amount) {
+ this.amount = amount;
+ return this;
+ }
+
+ /** Indicate whether to enforce validations on the surcharge amount. */
+ public Builder setEnforceValidation(
+ PaymentIntentCreateParams.AmountDetails.Surcharge.EnforceValidation enforceValidation) {
+ this.enforceValidation = enforceValidation;
+ return this;
+ }
+
+ /** Indicate whether to enforce validations on the surcharge amount. */
+ public Builder setEnforceValidation(EmptyParam enforceValidation) {
+ this.enforceValidation = enforceValidation;
+ return this;
+ }
+
+ /**
+ * Add a key/value pair to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
+ * map. See {@link PaymentIntentCreateParams.AmountDetails.Surcharge#extraParams} for the
+ * field documentation.
+ */
+ public Builder putExtraParam(String key, Object value) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.put(key, value);
+ return this;
+ }
+
+ /**
+ * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
+ * map. See {@link PaymentIntentCreateParams.AmountDetails.Surcharge#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 EnforceValidation implements ApiRequestParams.EnumParam {
+ @SerializedName("automatic")
+ AUTOMATIC("automatic"),
+
+ @SerializedName("disabled")
+ DISABLED("disabled"),
+
+ @SerializedName("enabled")
+ ENABLED("enabled");
+
+ @Getter(onMethod_ = {@Override})
+ private final String value;
+
+ EnforceValidation(String value) {
+ this.value = value;
+ }
+ }
+ }
+
@Getter
@EqualsAndHashCode(callSuper = false)
public static class Tax {
@@ -3268,10 +3408,6 @@ public static class PaymentDetails {
* A unique value assigned by the business to identify the transaction. Required for L2 and L3
* rates.
*
- * Required when the Payment Method Types array contains {@code card}, including when automatic_payment_methods.enabled
- * is set to {@code true}.
- *
*
For Cards, this field is truncated to 25 alphanumeric characters, excluding spaces, before
* being sent to card networks. For Klarna, this field is truncated to 255 characters and is
* visible to customers when they view the order in the Klarna app.
@@ -3563,10 +3699,6 @@ public Builder setLodgingData(
* A unique value assigned by the business to identify the transaction. Required for L2 and L3
* rates.
*
- *
Required when the Payment Method Types array contains {@code card}, including when automatic_payment_methods.enabled
- * is set to {@code true}.
- *
*
For Cards, this field is truncated to 25 alphanumeric characters, excluding spaces,
* before being sent to card networks. For Klarna, this field is truncated to 255 characters
* and is visible to customers when they view the order in the Klarna app.
@@ -3580,10 +3712,6 @@ public Builder setOrderReference(String orderReference) {
* A unique value assigned by the business to identify the transaction. Required for L2 and L3
* rates.
*
- *
Required when the Payment Method Types array contains {@code card}, including when automatic_payment_methods.enabled
- * is set to {@code true}.
- *
*
For Cards, this field is truncated to 25 alphanumeric characters, excluding spaces,
* before being sent to card networks. For Klarna, this field is truncated to 255 characters
* and is visible to customers when they view the order in the Klarna app.
@@ -14236,6 +14364,13 @@ public static class PaymentMethodData {
@SerializedName("type")
Type type;
+ /**
+ * If this is a {@code upi} PaymentMethod, this hash contains details about the UPI payment
+ * method.
+ */
+ @SerializedName("upi")
+ Upi upi;
+
/**
* If this is an {@code us_bank_account} PaymentMethod, this hash contains details about the US
* bank account payment method.
@@ -14318,6 +14453,7 @@ private PaymentMethodData(
Swish swish,
Twint twint,
Type type,
+ Upi upi,
UsBankAccount usBankAccount,
WechatPay wechatPay,
Zip zip) {
@@ -14381,6 +14517,7 @@ private PaymentMethodData(
this.swish = swish;
this.twint = twint;
this.type = type;
+ this.upi = upi;
this.usBankAccount = usBankAccount;
this.wechatPay = wechatPay;
this.zip = zip;
@@ -14511,6 +14648,8 @@ public static class Builder {
private Type type;
+ private Upi upi;
+
private UsBankAccount usBankAccount;
private WechatPay wechatPay;
@@ -14580,6 +14719,7 @@ public PaymentIntentCreateParams.PaymentMethodData build() {
this.swish,
this.twint,
this.type,
+ this.upi,
this.usBankAccount,
this.wechatPay,
this.zip);
@@ -15174,6 +15314,15 @@ public Builder setType(PaymentIntentCreateParams.PaymentMethodData.Type type) {
return this;
}
+ /**
+ * If this is a {@code upi} PaymentMethod, this hash contains details about the UPI payment
+ * method.
+ */
+ public Builder setUpi(PaymentIntentCreateParams.PaymentMethodData.Upi upi) {
+ this.upi = upi;
+ return this;
+ }
+
/**
* If this is an {@code us_bank_account} PaymentMethod, this hash contains details about the
* US bank account payment method.
@@ -19612,19 +19761,9 @@ public static class StripeBalance {
@SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
Map extraParams;
- /**
- * The source_type
- * of the balance
- */
- @SerializedName("source_type")
- SourceType sourceType;
-
- private StripeBalance(
- String account, Map extraParams, SourceType sourceType) {
+ private StripeBalance(String account, Map extraParams) {
this.account = account;
this.extraParams = extraParams;
- this.sourceType = sourceType;
}
public static Builder builder() {
@@ -19636,12 +19775,10 @@ public static class Builder {
private Map extraParams;
- private SourceType sourceType;
-
/** Finalize and obtain parameter instance from this builder. */
public PaymentIntentCreateParams.PaymentMethodData.StripeBalance build() {
return new PaymentIntentCreateParams.PaymentMethodData.StripeBalance(
- this.account, this.extraParams, this.sourceType);
+ this.account, this.extraParams);
}
/** The connected account ID whose Stripe balance to use as the source of payment. */
@@ -19677,35 +19814,6 @@ public Builder putAllExtraParam(Map map) {
this.extraParams.putAll(map);
return this;
}
-
- /**
- * The source_type
- * of the balance
- */
- public Builder setSourceType(
- PaymentIntentCreateParams.PaymentMethodData.StripeBalance.SourceType sourceType) {
- this.sourceType = sourceType;
- return this;
- }
- }
-
- public enum SourceType implements ApiRequestParams.EnumParam {
- @SerializedName("bank_account")
- BANK_ACCOUNT("bank_account"),
-
- @SerializedName("card")
- CARD("card"),
-
- @SerializedName("fpx")
- FPX("fpx");
-
- @Getter(onMethod_ = {@Override})
- private final String value;
-
- SourceType(String value) {
- this.value = value;
- }
}
}
@@ -19825,6 +19933,229 @@ public Builder putAllExtraParam(Map map) {
}
}
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Upi {
+ /**
+ * Map of extra parameters for custom features not available in this client library. The
+ * content in this map is not serialized under this field's {@code @SerializedName} value.
+ * Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
+ * name in this param object. Effectively, this map is flattened to its parent instance.
+ */
+ @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
+ Map extraParams;
+
+ /** Configuration options for setting up an eMandate. */
+ @SerializedName("mandate_options")
+ MandateOptions mandateOptions;
+
+ private Upi(Map extraParams, MandateOptions mandateOptions) {
+ this.extraParams = extraParams;
+ this.mandateOptions = mandateOptions;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Map extraParams;
+
+ private MandateOptions mandateOptions;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public PaymentIntentCreateParams.PaymentMethodData.Upi build() {
+ return new PaymentIntentCreateParams.PaymentMethodData.Upi(
+ this.extraParams, this.mandateOptions);
+ }
+
+ /**
+ * Add a key/value pair to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
+ * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Upi#extraParams} for the
+ * field documentation.
+ */
+ public Builder putExtraParam(String key, Object value) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.put(key, value);
+ return this;
+ }
+
+ /**
+ * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
+ * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Upi#extraParams} for the
+ * field documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+
+ /** Configuration options for setting up an eMandate. */
+ public Builder setMandateOptions(
+ PaymentIntentCreateParams.PaymentMethodData.Upi.MandateOptions mandateOptions) {
+ this.mandateOptions = mandateOptions;
+ return this;
+ }
+ }
+
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class MandateOptions {
+ /** Amount to be charged for future payments. */
+ @SerializedName("amount")
+ Long amount;
+
+ /**
+ * One of {@code fixed} or {@code maximum}. If {@code fixed}, the {@code amount} param
+ * refers to the exact amount to be charged in future payments. If {@code maximum}, the
+ * amount charged can be up to the value passed for the {@code amount} param.
+ */
+ @SerializedName("amount_type")
+ AmountType amountType;
+
+ /**
+ * A description of the mandate or subscription that is meant to be displayed to the
+ * customer.
+ */
+ @SerializedName("description")
+ String description;
+
+ /** End date of the mandate or subscription. */
+ @SerializedName("end_date")
+ Long endDate;
+
+ /**
+ * Map of extra parameters for custom features not available in this client library. The
+ * content in this map is not serialized under this field's {@code @SerializedName} value.
+ * Instead, each key/value pair is serialized as if the key is a root-level field
+ * (serialized) name in this param object. Effectively, this map is flattened to its parent
+ * instance.
+ */
+ @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
+ Map extraParams;
+
+ private MandateOptions(
+ Long amount,
+ AmountType amountType,
+ String description,
+ Long endDate,
+ Map extraParams) {
+ this.amount = amount;
+ this.amountType = amountType;
+ this.description = description;
+ this.endDate = endDate;
+ this.extraParams = extraParams;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Long amount;
+
+ private AmountType amountType;
+
+ private String description;
+
+ private Long endDate;
+
+ private Map extraParams;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public PaymentIntentCreateParams.PaymentMethodData.Upi.MandateOptions build() {
+ return new PaymentIntentCreateParams.PaymentMethodData.Upi.MandateOptions(
+ this.amount, this.amountType, this.description, this.endDate, this.extraParams);
+ }
+
+ /** Amount to be charged for future payments. */
+ public Builder setAmount(Long amount) {
+ this.amount = amount;
+ return this;
+ }
+
+ /**
+ * One of {@code fixed} or {@code maximum}. If {@code fixed}, the {@code amount} param
+ * refers to the exact amount to be charged in future payments. If {@code maximum}, the
+ * amount charged can be up to the value passed for the {@code amount} param.
+ */
+ public Builder setAmountType(
+ PaymentIntentCreateParams.PaymentMethodData.Upi.MandateOptions.AmountType
+ amountType) {
+ this.amountType = amountType;
+ return this;
+ }
+
+ /**
+ * A description of the mandate or subscription that is meant to be displayed to the
+ * customer.
+ */
+ public Builder setDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ /** End date of the mandate or subscription. */
+ public Builder setEndDate(Long endDate) {
+ this.endDate = endDate;
+ return this;
+ }
+
+ /**
+ * Add a key/value pair to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
+ * map. See {@link
+ * PaymentIntentCreateParams.PaymentMethodData.Upi.MandateOptions#extraParams} for the
+ * field documentation.
+ */
+ public Builder putExtraParam(String key, Object value) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.put(key, value);
+ return this;
+ }
+
+ /**
+ * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
+ * map. See {@link
+ * PaymentIntentCreateParams.PaymentMethodData.Upi.MandateOptions#extraParams} for the
+ * field documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+ }
+
+ public enum AmountType implements ApiRequestParams.EnumParam {
+ @SerializedName("fixed")
+ FIXED("fixed"),
+
+ @SerializedName("maximum")
+ MAXIMUM("maximum");
+
+ @Getter(onMethod_ = {@Override})
+ private final String value;
+
+ AmountType(String value) {
+ this.value = value;
+ }
+ }
+ }
+ }
+
@Getter
@EqualsAndHashCode(callSuper = false)
public static class UsBankAccount {
@@ -20287,6 +20618,9 @@ public enum Type implements ApiRequestParams.EnumParam {
@SerializedName("twint")
TWINT("twint"),
+ @SerializedName("upi")
+ UPI("upi"),
+
@SerializedName("us_bank_account")
US_BANK_ACCOUNT("us_bank_account"),
@@ -20706,6 +21040,13 @@ public static class PaymentMethodOptions {
@SerializedName("twint")
Object twint;
+ /**
+ * If this is a {@code upi} PaymentIntent, this sub-hash contains details about the UPI payment
+ * method options.
+ */
+ @SerializedName("upi")
+ Object upi;
+
/**
* If this is a {@code us_bank_account} PaymentMethod, this sub-hash contains details about the
* US bank account payment method options.
@@ -20785,6 +21126,7 @@ private PaymentMethodOptions(
Object stripeBalance,
Object swish,
Object twint,
+ Object upi,
Object usBankAccount,
Object wechatPay,
Object zip) {
@@ -20845,6 +21187,7 @@ private PaymentMethodOptions(
this.stripeBalance = stripeBalance;
this.swish = swish;
this.twint = twint;
+ this.upi = upi;
this.usBankAccount = usBankAccount;
this.wechatPay = wechatPay;
this.zip = zip;
@@ -20969,6 +21312,8 @@ public static class Builder {
private Object twint;
+ private Object upi;
+
private Object usBankAccount;
private Object wechatPay;
@@ -21035,6 +21380,7 @@ public PaymentIntentCreateParams.PaymentMethodOptions build() {
this.stripeBalance,
this.swish,
this.twint,
+ this.upi,
this.usBankAccount,
this.wechatPay,
this.zip);
@@ -22089,6 +22435,24 @@ public Builder setTwint(EmptyParam twint) {
return this;
}
+ /**
+ * If this is a {@code upi} PaymentIntent, this sub-hash contains details about the UPI
+ * payment method options.
+ */
+ public Builder setUpi(PaymentIntentCreateParams.PaymentMethodOptions.Upi upi) {
+ this.upi = upi;
+ return this;
+ }
+
+ /**
+ * If this is a {@code upi} PaymentIntent, this sub-hash contains details about the UPI
+ * payment method options.
+ */
+ public Builder setUpi(EmptyParam upi) {
+ this.upi = upi;
+ return this;
+ }
+
/**
* If this is a {@code us_bank_account} PaymentMethod, this sub-hash contains details about
* the US bank account payment method options.
@@ -22196,7 +22560,7 @@ public static class AcssDebit {
@SerializedName("target_date")
String targetDate;
- /** Bank account verification method. */
+ /** Bank account verification method. The default value is {@code automatic}. */
@SerializedName("verification_method")
VerificationMethod verificationMethod;
@@ -22344,7 +22708,7 @@ public Builder setTargetDate(String targetDate) {
return this;
}
- /** Bank account verification method. */
+ /** Bank account verification method. The default value is {@code automatic}. */
public Builder setVerificationMethod(
PaymentIntentCreateParams.PaymentMethodOptions.AcssDebit.VerificationMethod
verificationMethod) {
@@ -25590,7 +25954,10 @@ public enum Type implements ApiRequestParams.EnumParam {
@Getter
@EqualsAndHashCode(callSuper = false)
public static class MandateOptions {
- /** Required. Amount to be charged for future payments. */
+ /**
+ * Required. Amount to be charged for future payments, specified in the
+ * presentment currency.
+ */
@SerializedName("amount")
Long amount;
@@ -25725,7 +26092,10 @@ public PaymentIntentCreateParams.PaymentMethodOptions.Card.MandateOptions build(
this.supportedTypes);
}
- /** Required. Amount to be charged for future payments. */
+ /**
+ * Required. Amount to be charged for future payments, specified in the
+ * presentment currency.
+ */
public Builder setAmount(Long amount) {
this.amount = amount;
return this;
@@ -40587,7 +40957,7 @@ public static class MandateOptions {
@SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
Map extraParams;
- /** Schedule at which the future payments will be charged. Defaults to {@code weekly}. */
+ /** Schedule at which the future payments will be charged. Defaults to {@code monthly}. */
@SerializedName("payment_schedule")
PaymentSchedule paymentSchedule;
@@ -40737,7 +41107,7 @@ public Builder putAllExtraParam(Map map) {
return this;
}
- /** Schedule at which the future payments will be charged. Defaults to {@code weekly}. */
+ /** Schedule at which the future payments will be charged. Defaults to {@code monthly}. */
public Builder setPaymentSchedule(
PaymentIntentCreateParams.PaymentMethodOptions.Pix.MandateOptions.PaymentSchedule
paymentSchedule) {
@@ -42712,6 +43082,267 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam {
}
}
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Upi {
+ /**
+ * Map of extra parameters for custom features not available in this client library. The
+ * content in this map is not serialized under this field's {@code @SerializedName} value.
+ * Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
+ * name in this param object. Effectively, this map is flattened to its parent instance.
+ */
+ @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
+ Map