From 7e0ffb8c806ed6dc64eb3f10993eef2322f7b340 Mon Sep 17 00:00:00 2001
From: "stripe-openapi[bot]"
<105521251+stripe-openapi[bot]@users.noreply.github.com>
Date: Thu, 15 Aug 2024 20:51:05 +0000
Subject: [PATCH 01/16] Update generated code (#1847)
* Update generated code for v1190
* Update generated code for v1192
* Update generated code for v1194
* Update generated code for v1195
* Update generated code for v1196
* Update generated code for v1199
* Update generated code for v1200
* Update generated code for v1201
---------
Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>
Co-authored-by: helenye-stripe <111009531+helenye-stripe@users.noreply.github.com>
---
OPENAPI_VERSION | 2 +-
src/main/java/com/stripe/model/Account.java | 8 +-
src/main/java/com/stripe/model/Charge.java | 23 ++-
.../com/stripe/model/ConfirmationToken.java | 30 ++++
.../java/com/stripe/model/PaymentIntent.java | 12 +-
.../java/com/stripe/model/PaymentMethod.java | 30 ++++
src/main/java/com/stripe/model/Quote.java | 10 +-
.../java/com/stripe/model/SetupIntent.java | 18 +-
.../model/treasury/OutboundPayment.java | 7 +
.../model/treasury/OutboundTransfer.java | 7 +
.../com/stripe/param/AccountCreateParams.java | 4 +-
.../AccountExternalAccountUpdateParams.java | 4 +-
.../param/AccountPersonCreateParams.java | 8 +-
.../param/AccountPersonUpdateParams.java | 8 +-
.../com/stripe/param/AccountUpdateParams.java | 4 +-
.../com/stripe/param/ChargeCaptureParams.java | 4 +-
.../com/stripe/param/ChargeCreateParams.java | 4 +-
.../param/PaymentIntentCaptureParams.java | 4 +-
.../param/PaymentIntentConfirmParams.java | 82 ++++++++-
.../param/PaymentIntentCreateParams.java | 90 +++++++++-
.../param/PaymentIntentUpdateParams.java | 94 ++++++++++-
.../param/PersonCollectionCreateParams.java | 8 +-
.../com/stripe/param/PersonUpdateParams.java | 8 +-
.../param/SetupIntentConfirmParams.java | 155 ++++++++++++++++++
.../stripe/param/SetupIntentCreateParams.java | 155 ++++++++++++++++++
.../stripe/param/SetupIntentUpdateParams.java | 155 ++++++++++++++++++
.../com/stripe/param/TokenCreateParams.java | 9 +-
.../param/checkout/SessionCreateParams.java | 6 +-
.../treasury/OutboundPaymentUpdateParams.java | 33 +++-
.../OutboundTransferUpdateParams.java | 33 +++-
.../com/stripe/service/AccountService.java | 4 +-
.../java/com/stripe/service/QuoteService.java | 8 +-
32 files changed, 962 insertions(+), 65 deletions(-)
diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION
index 1af8caa5d1a..82e4a49f96e 100644
--- a/OPENAPI_VERSION
+++ b/OPENAPI_VERSION
@@ -1 +1 @@
-v1189
\ No newline at end of file
+v1201
\ No newline at end of file
diff --git a/src/main/java/com/stripe/model/Account.java b/src/main/java/com/stripe/model/Account.java
index 38ad2b0d668..ac7d40f91a7 100644
--- a/src/main/java/com/stripe/model/Account.java
+++ b/src/main/java/com/stripe/model/Account.java
@@ -320,7 +320,7 @@ public static Account create(AccountCreateParams params, RequestOptions options)
*
Live-mode accounts where Stripe is responsible for negative account balances cannot be
* deleted, which includes Standard accounts. Live-mode accounts where your platform is liable for
* negative account balances, which includes Custom and Express accounts, can be deleted when all
- * balances are zero.
+ * balances are zero.
*
*
If you want to delete your own account, use the account information tab in your account
@@ -338,7 +338,7 @@ public Account delete() throws StripeException {
* Live-mode accounts where Stripe is responsible for negative account balances cannot be
* deleted, which includes Standard accounts. Live-mode accounts where your platform is liable for
* negative account balances, which includes Custom and Express accounts, can be deleted when all
- * balances are zero.
+ * balances are zero.
*
*
If you want to delete your own account, use the account information tab in your account
@@ -356,7 +356,7 @@ public Account delete(RequestOptions options) throws StripeException {
* Live-mode accounts where Stripe is responsible for negative account balances cannot be
* deleted, which includes Standard accounts. Live-mode accounts where your platform is liable for
* negative account balances, which includes Custom and Express accounts, can be deleted when all
- * balances are zero.
+ * balances are zero.
*
*
If you want to delete your own account, use the account information tab in your account
@@ -374,7 +374,7 @@ public Account delete(Map params) throws StripeException {
* Live-mode accounts where Stripe is responsible for negative account balances cannot be
* deleted, which includes Standard accounts. Live-mode accounts where your platform is liable for
* negative account balances, which includes Custom and Express accounts, can be deleted when all
- * balances are zero.
+ * balances are zero.
*
*
If you want to delete your own account, use the account information tab in your account
diff --git a/src/main/java/com/stripe/model/Charge.java b/src/main/java/com/stripe/model/Charge.java
index 16fded5e54b..58a377278ec 100644
--- a/src/main/java/com/stripe/model/Charge.java
+++ b/src/main/java/com/stripe/model/Charge.java
@@ -293,7 +293,7 @@ public class Charge extends ApiResource implements MetadataStore, Balanc
/**
* The transfer ID which created this charge. Only present if the charge came from another Stripe
- * account. See the Connect
+ * account. See the Connect
* documentation for details.
*/
@SerializedName("source_transfer")
@@ -313,7 +313,7 @@ public class Charge extends ApiResource implements MetadataStore, Balanc
/**
* Provides information about a card charge. Concatenated to the account's statement
+ * href="https://docs.stripe.com/get-started/account/statement-descriptors#static">statement
* descriptor prefix to form the complete statement descriptor that appears on the customer's
* statement. If the account has no prefix value, the suffix is concatenated to the account's
* statement descriptor.
@@ -1572,6 +1572,10 @@ public static class Card extends StripeObject {
@SerializedName("amount_authorized")
Long amountAuthorized;
+ /** Authorization code on the charge. */
+ @SerializedName("authorization_code")
+ String authorizationCode;
+
/**
* Card brand. Can be {@code amex}, {@code diners}, {@code discover}, {@code eftpos_au},
* {@code jcb}, {@code mastercard}, {@code unionpay}, {@code visa}, or {@code unknown}.
@@ -2201,6 +2205,9 @@ public static class CardPresent extends StripeObject {
@SerializedName("receipt")
Receipt receipt;
+ @SerializedName("wallet")
+ Wallet wallet;
+
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
@@ -2268,6 +2275,18 @@ public static class Receipt extends StripeObject {
@SerializedName("transaction_status_information")
String transactionStatusInformation;
}
+
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Wallet extends StripeObject {
+ /**
+ * The type of mobile wallet, one of {@code apple_pay}, {@code google_pay}, {@code
+ * samsung_pay}, or {@code unknown}.
+ */
+ @SerializedName("type")
+ String type;
+ }
}
@Getter
diff --git a/src/main/java/com/stripe/model/ConfirmationToken.java b/src/main/java/com/stripe/model/ConfirmationToken.java
index a08839bf349..f28623832fa 100644
--- a/src/main/java/com/stripe/model/ConfirmationToken.java
+++ b/src/main/java/com/stripe/model/ConfirmationToken.java
@@ -876,6 +876,9 @@ public static class CardPresent extends StripeObject {
@SerializedName("receipt")
Receipt receipt;
+ @SerializedName("wallet")
+ Wallet wallet;
+
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
@@ -945,6 +948,18 @@ public static class Receipt extends StripeObject {
@SerializedName("transaction_status_information")
String transactionStatusInformation;
}
+
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Wallet extends StripeObject {
+ /**
+ * The type of mobile wallet, one of {@code apple_pay}, {@code google_pay}, {@code
+ * samsung_pay}, or {@code unknown}.
+ */
+ @SerializedName("type")
+ String type;
+ }
}
}
}
@@ -1219,6 +1234,9 @@ public static class CardPresent extends StripeObject {
@SerializedName("read_method")
String readMethod;
+ @SerializedName("wallet")
+ Wallet wallet;
+
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
@@ -1248,6 +1266,18 @@ public static class Offline extends StripeObject {
@SerializedName("type")
String type;
}
+
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Wallet extends StripeObject {
+ /**
+ * The type of mobile wallet, one of {@code apple_pay}, {@code google_pay}, {@code
+ * samsung_pay}, or {@code unknown}.
+ */
+ @SerializedName("type")
+ String type;
+ }
}
@Getter
diff --git a/src/main/java/com/stripe/model/PaymentIntent.java b/src/main/java/com/stripe/model/PaymentIntent.java
index 121b35983b3..e95ec8bef56 100644
--- a/src/main/java/com/stripe/model/PaymentIntent.java
+++ b/src/main/java/com/stripe/model/PaymentIntent.java
@@ -163,7 +163,7 @@ public class PaymentIntent extends ApiResource implements HasId, MetadataStoregenerated_card
+ * href="https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card
* payment method representing the card is created and attached to the Customer instead.
*/
@SerializedName("customer")
@@ -332,7 +332,7 @@ public class PaymentIntent extends ApiResource implements HasId, MetadataStore
statement
+ * href="https://docs.stripe.com/get-started/account/statement-descriptors#static">statement
* descriptor prefix
to form the complete statement descriptor that appears on the customer's
* statement.
*/
@@ -2694,6 +2694,9 @@ public static class AuBecsDebit extends StripeObject {
@Setter
@EqualsAndHashCode(callSuper = false)
public static class BacsDebit extends StripeObject {
+ @SerializedName("mandate_options")
+ MandateOptions mandateOptions;
+
/**
* Indicates that you intend to make future payments with this PaymentIntent's payment method.
*
@@ -2717,6 +2720,11 @@ public static class BacsDebit extends StripeObject {
*/
@SerializedName("setup_future_usage")
String setupFutureUsage;
+
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class MandateOptions extends StripeObject {}
}
@Getter
diff --git a/src/main/java/com/stripe/model/PaymentMethod.java b/src/main/java/com/stripe/model/PaymentMethod.java
index 0feb377abd7..ff0d48e1dd0 100644
--- a/src/main/java/com/stripe/model/PaymentMethod.java
+++ b/src/main/java/com/stripe/model/PaymentMethod.java
@@ -1118,6 +1118,9 @@ public static class CardPresent extends StripeObject {
@SerializedName("receipt")
Receipt receipt;
+ @SerializedName("wallet")
+ Wallet wallet;
+
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
@@ -1186,6 +1189,18 @@ public static class Receipt extends StripeObject {
@SerializedName("transaction_status_information")
String transactionStatusInformation;
}
+
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Wallet extends StripeObject {
+ /**
+ * The type of mobile wallet, one of {@code apple_pay}, {@code google_pay}, {@code
+ * samsung_pay}, or {@code unknown}.
+ */
+ @SerializedName("type")
+ String type;
+ }
}
}
}
@@ -1455,6 +1470,9 @@ public static class CardPresent extends StripeObject {
@SerializedName("read_method")
String readMethod;
+ @SerializedName("wallet")
+ Wallet wallet;
+
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
@@ -1484,6 +1502,18 @@ public static class Offline extends StripeObject {
@SerializedName("type")
String type;
}
+
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Wallet extends StripeObject {
+ /**
+ * The type of mobile wallet, one of {@code apple_pay}, {@code google_pay}, {@code
+ * samsung_pay}, or {@code unknown}.
+ */
+ @SerializedName("type")
+ String type;
+ }
}
@Getter
diff --git a/src/main/java/com/stripe/model/Quote.java b/src/main/java/com/stripe/model/Quote.java
index bd45ca0850e..01ca6f7d3aa 100644
--- a/src/main/java/com/stripe/model/Quote.java
+++ b/src/main/java/com/stripe/model/Quote.java
@@ -813,7 +813,7 @@ public LineItemCollection listLineItems(QuoteListLineItemsParams params, Request
/**
* Download the PDF for a finalized quote. Explanation for special handling can be found here
+ * href="https://docs.stripe.com/quotes/overview#quote_pdf">here
*/
public InputStream pdf() throws StripeException {
return pdf((Map) null, (RequestOptions) null);
@@ -821,7 +821,7 @@ public InputStream pdf() throws StripeException {
/**
* Download the PDF for a finalized quote. Explanation for special handling can be found here
+ * href="https://docs.stripe.com/quotes/overview#quote_pdf">here
*/
public InputStream pdf(Map params) throws StripeException {
return pdf(params, (RequestOptions) null);
@@ -829,7 +829,7 @@ public InputStream pdf(Map params) throws StripeException {
/**
* Download the PDF for a finalized quote. Explanation for special handling can be found here
+ * href="https://docs.stripe.com/quotes/overview#quote_pdf">here
*/
public InputStream pdf(Map params, RequestOptions options)
throws StripeException {
@@ -842,7 +842,7 @@ public InputStream pdf(Map params, RequestOptions options)
/**
* Download the PDF for a finalized quote. Explanation for special handling can be found here
+ * href="https://docs.stripe.com/quotes/overview#quote_pdf">here
*/
public InputStream pdf(QuotePdfParams params) throws StripeException {
return pdf(params, (RequestOptions) null);
@@ -850,7 +850,7 @@ public InputStream pdf(QuotePdfParams params) throws StripeException {
/**
* Download the PDF for a finalized quote. Explanation for special handling can be found here
+ * href="https://docs.stripe.com/quotes/overview#quote_pdf">here
*/
public InputStream pdf(QuotePdfParams params, RequestOptions options) throws StripeException {
String path = String.format("/v1/quotes/%s/pdf", ApiResource.urlEncodeId(this.getId()));
diff --git a/src/main/java/com/stripe/model/SetupIntent.java b/src/main/java/com/stripe/model/SetupIntent.java
index 8b81055d829..0a416f37281 100644
--- a/src/main/java/com/stripe/model/SetupIntent.java
+++ b/src/main/java/com/stripe/model/SetupIntent.java
@@ -186,7 +186,7 @@ public class SetupIntent extends ApiResource implements HasId, MetadataStoregenerated_card
+ * href="https://docs.stripe.com/api/setup_attempts/object#setup_attempt_object-payment_method_details-card_present-generated_card">generated_card
* associated with the {@code latest_attempt} is attached to the Customer instead.
*/
@SerializedName("payment_method")
@@ -987,6 +987,9 @@ public static class PaymentMethodOptions extends StripeObject {
@SerializedName("amazon_pay")
AmazonPay amazonPay;
+ @SerializedName("bacs_debit")
+ BacsDebit bacsDebit;
+
@SerializedName("card")
Card card;
@@ -1070,6 +1073,19 @@ public static class MandateOptions extends StripeObject {
@EqualsAndHashCode(callSuper = false)
public static class AmazonPay extends StripeObject {}
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class BacsDebit extends StripeObject {
+ @SerializedName("mandate_options")
+ MandateOptions mandateOptions;
+
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class MandateOptions extends StripeObject {}
+ }
+
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
diff --git a/src/main/java/com/stripe/model/treasury/OutboundPayment.java b/src/main/java/com/stripe/model/treasury/OutboundPayment.java
index 684fb24ddab..4037a67ef2f 100644
--- a/src/main/java/com/stripe/model/treasury/OutboundPayment.java
+++ b/src/main/java/com/stripe/model/treasury/OutboundPayment.java
@@ -602,6 +602,13 @@ public static class Ach extends StripeObject {
@Setter
@EqualsAndHashCode(callSuper = false)
public static class UsDomesticWire extends StripeObject {
+ /**
+ * CHIPS System Sequence Number (SSN) of the OutboundPayment for payments sent over the {@code
+ * us_domestic_wire} network.
+ */
+ @SerializedName("chips")
+ String chips;
+
/**
* IMAD of the OutboundPayment for payments sent over the {@code us_domestic_wire} network.
*/
diff --git a/src/main/java/com/stripe/model/treasury/OutboundTransfer.java b/src/main/java/com/stripe/model/treasury/OutboundTransfer.java
index a8d5e0f4106..bfaf685562e 100644
--- a/src/main/java/com/stripe/model/treasury/OutboundTransfer.java
+++ b/src/main/java/com/stripe/model/treasury/OutboundTransfer.java
@@ -551,6 +551,13 @@ public static class Ach extends StripeObject {
@Setter
@EqualsAndHashCode(callSuper = false)
public static class UsDomesticWire extends StripeObject {
+ /**
+ * CHIPS System Sequence Number (SSN) of the OutboundTransfer for transfers sent over the
+ * {@code us_domestic_wire} network.
+ */
+ @SerializedName("chips")
+ String chips;
+
/**
* IMAD of the OutboundTransfer for transfers sent over the {@code us_domestic_wire} network.
*/
diff --git a/src/main/java/com/stripe/param/AccountCreateParams.java b/src/main/java/com/stripe/param/AccountCreateParams.java
index a61d565d848..1593447263c 100644
--- a/src/main/java/com/stripe/param/AccountCreateParams.java
+++ b/src/main/java/com/stripe/param/AccountCreateParams.java
@@ -7389,7 +7389,7 @@ public static class Documents {
* href="https://support.stripe.com/questions/bank-account-ownership-verification">Bank account
* ownership verification requirement. Must be a document associated with the account’s
* primary active bank account that displays the last 4 digits of the account number, either a
- * statement or a voided check.
+ * statement or a check.
*/
@SerializedName("bank_account_ownership_verification")
BankAccountOwnershipVerification bankAccountOwnershipVerification;
@@ -7494,7 +7494,7 @@ public AccountCreateParams.Documents build() {
* href="https://support.stripe.com/questions/bank-account-ownership-verification">Bank
* account ownership verification requirement. Must be a document associated with the
* account’s primary active bank account that displays the last 4 digits of the account
- * number, either a statement or a voided check.
+ * number, either a statement or a check.
*/
public Builder setBankAccountOwnershipVerification(
AccountCreateParams.Documents.BankAccountOwnershipVerification
diff --git a/src/main/java/com/stripe/param/AccountExternalAccountUpdateParams.java b/src/main/java/com/stripe/param/AccountExternalAccountUpdateParams.java
index 98c59e65af4..83039bd70d6 100644
--- a/src/main/java/com/stripe/param/AccountExternalAccountUpdateParams.java
+++ b/src/main/java/com/stripe/param/AccountExternalAccountUpdateParams.java
@@ -463,7 +463,7 @@ public static class Documents {
* One or more documents that support the Bank account
* ownership verification requirement. Must be a document associated with the bank account
- * that displays the last 4 digits of the account number, either a statement or a voided check.
+ * that displays the last 4 digits of the account number, either a statement or a check.
*/
@SerializedName("bank_account_ownership_verification")
BankAccountOwnershipVerification bankAccountOwnershipVerification;
@@ -504,7 +504,7 @@ public AccountExternalAccountUpdateParams.Documents build() {
* href="https://support.stripe.com/questions/bank-account-ownership-verification">Bank
* account ownership verification requirement. Must be a document associated with the bank
* account that displays the last 4 digits of the account number, either a statement or a
- * voided check.
+ * check.
*/
public Builder setBankAccountOwnershipVerification(
AccountExternalAccountUpdateParams.Documents.BankAccountOwnershipVerification
diff --git a/src/main/java/com/stripe/param/AccountPersonCreateParams.java b/src/main/java/com/stripe/param/AccountPersonCreateParams.java
index 7d40761caaf..cb47088e7bc 100644
--- a/src/main/java/com/stripe/param/AccountPersonCreateParams.java
+++ b/src/main/java/com/stripe/param/AccountPersonCreateParams.java
@@ -13,7 +13,9 @@
@Getter
public class AccountPersonCreateParams extends ApiRequestParams {
- /** Details on the legal guardian's acceptance of the required Stripe agreements. */
+ /**
+ * Details on the legal guardian's or authorizer's acceptance of the required Stripe agreements.
+ */
@SerializedName("additional_tos_acceptances")
AdditionalTosAcceptances additionalTosAcceptances;
@@ -322,7 +324,9 @@ public AccountPersonCreateParams build() {
this.verification);
}
- /** Details on the legal guardian's acceptance of the required Stripe agreements. */
+ /**
+ * Details on the legal guardian's or authorizer's acceptance of the required Stripe agreements.
+ */
public Builder setAdditionalTosAcceptances(
AccountPersonCreateParams.AdditionalTosAcceptances additionalTosAcceptances) {
this.additionalTosAcceptances = additionalTosAcceptances;
diff --git a/src/main/java/com/stripe/param/AccountPersonUpdateParams.java b/src/main/java/com/stripe/param/AccountPersonUpdateParams.java
index 318297ab2e9..d60e41f4ac8 100644
--- a/src/main/java/com/stripe/param/AccountPersonUpdateParams.java
+++ b/src/main/java/com/stripe/param/AccountPersonUpdateParams.java
@@ -13,7 +13,9 @@
@Getter
public class AccountPersonUpdateParams extends ApiRequestParams {
- /** Details on the legal guardian's acceptance of the required Stripe agreements. */
+ /**
+ * Details on the legal guardian's or authorizer's acceptance of the required Stripe agreements.
+ */
@SerializedName("additional_tos_acceptances")
AdditionalTosAcceptances additionalTosAcceptances;
@@ -322,7 +324,9 @@ public AccountPersonUpdateParams build() {
this.verification);
}
- /** Details on the legal guardian's acceptance of the required Stripe agreements. */
+ /**
+ * Details on the legal guardian's or authorizer's acceptance of the required Stripe agreements.
+ */
public Builder setAdditionalTosAcceptances(
AccountPersonUpdateParams.AdditionalTosAcceptances additionalTosAcceptances) {
this.additionalTosAcceptances = additionalTosAcceptances;
diff --git a/src/main/java/com/stripe/param/AccountUpdateParams.java b/src/main/java/com/stripe/param/AccountUpdateParams.java
index 9d45c561e66..b28b2e2530c 100644
--- a/src/main/java/com/stripe/param/AccountUpdateParams.java
+++ b/src/main/java/com/stripe/param/AccountUpdateParams.java
@@ -7298,7 +7298,7 @@ public static class Documents {
* href="https://support.stripe.com/questions/bank-account-ownership-verification">Bank account
* ownership verification requirement. Must be a document associated with the account’s
* primary active bank account that displays the last 4 digits of the account number, either a
- * statement or a voided check.
+ * statement or a check.
*/
@SerializedName("bank_account_ownership_verification")
BankAccountOwnershipVerification bankAccountOwnershipVerification;
@@ -7403,7 +7403,7 @@ public AccountUpdateParams.Documents build() {
* href="https://support.stripe.com/questions/bank-account-ownership-verification">Bank
* account ownership verification requirement. Must be a document associated with the
* account’s primary active bank account that displays the last 4 digits of the account
- * number, either a statement or a voided check.
+ * number, either a statement or a check.
*/
public Builder setBankAccountOwnershipVerification(
AccountUpdateParams.Documents.BankAccountOwnershipVerification
diff --git a/src/main/java/com/stripe/param/ChargeCaptureParams.java b/src/main/java/com/stripe/param/ChargeCaptureParams.java
index 01d377bb789..c84543c5be2 100644
--- a/src/main/java/com/stripe/param/ChargeCaptureParams.java
+++ b/src/main/java/com/stripe/param/ChargeCaptureParams.java
@@ -61,7 +61,7 @@ public class ChargeCaptureParams extends ApiRequestParams {
/**
* Provides information about a card charge. Concatenated to the account's statement
+ * href="https://docs.stripe.com/get-started/account/statement-descriptors#static">statement
* descriptor prefix to form the complete statement descriptor that appears on the customer's
* statement. If the account has no prefix value, the suffix is concatenated to the account's
* statement descriptor.
@@ -249,7 +249,7 @@ public Builder setStatementDescriptor(String statementDescriptor) {
/**
* Provides information about a card charge. Concatenated to the account's statement
+ * href="https://docs.stripe.com/get-started/account/statement-descriptors#static">statement
* descriptor prefix to form the complete statement descriptor that appears on the
* customer's statement. If the account has no prefix value, the suffix is concatenated to the
* account's statement descriptor.
diff --git a/src/main/java/com/stripe/param/ChargeCreateParams.java b/src/main/java/com/stripe/param/ChargeCreateParams.java
index 0001254d3e3..13b205d5be8 100644
--- a/src/main/java/com/stripe/param/ChargeCreateParams.java
+++ b/src/main/java/com/stripe/param/ChargeCreateParams.java
@@ -153,7 +153,7 @@ public class ChargeCreateParams extends ApiRequestParams {
/**
* Provides information about a card charge. Concatenated to the account's statement
+ * href="https://docs.stripe.com/get-started/account/statement-descriptors#static">statement
* descriptor prefix to form the complete statement descriptor that appears on the customer's
* statement. If the account has no prefix value, the suffix is concatenated to the account's
* statement descriptor.
@@ -540,7 +540,7 @@ public Builder setStatementDescriptor(String statementDescriptor) {
/**
* Provides information about a card charge. Concatenated to the account's statement
+ * href="https://docs.stripe.com/get-started/account/statement-descriptors#static">statement
* descriptor prefix to form the complete statement descriptor that appears on the
* customer's statement. If the account has no prefix value, the suffix is concatenated to the
* account's statement descriptor.
diff --git a/src/main/java/com/stripe/param/PaymentIntentCaptureParams.java b/src/main/java/com/stripe/param/PaymentIntentCaptureParams.java
index 1d661de21c8..f4dd615e46a 100644
--- a/src/main/java/com/stripe/param/PaymentIntentCaptureParams.java
+++ b/src/main/java/com/stripe/param/PaymentIntentCaptureParams.java
@@ -75,7 +75,7 @@ public class PaymentIntentCaptureParams extends ApiRequestParams {
/**
* Provides information about a card charge. Concatenated to the account's statement
+ * href="https://docs.stripe.com/get-started/account/statement-descriptors#static">statement
* descriptor prefix to form the complete statement descriptor that appears on the customer's
* statement.
*/
@@ -300,7 +300,7 @@ public Builder setStatementDescriptor(String statementDescriptor) {
/**
* Provides information about a card charge. Concatenated to the account's statement
+ * href="https://docs.stripe.com/get-started/account/statement-descriptors#static">statement
* descriptor prefix to form the complete statement descriptor that appears on the
* customer's statement.
*/
diff --git a/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java b/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java
index 0e6723cbc45..be7128804e5 100644
--- a/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java
+++ b/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java
@@ -7941,6 +7941,10 @@ public static class BacsDebit {
@SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
Map extraParams;
+ /** Additional fields for Mandate creation. */
+ @SerializedName("mandate_options")
+ MandateOptions mandateOptions;
+
/**
* Indicates that you intend to make future payments with this PaymentIntent's payment method.
*
@@ -7968,8 +7972,11 @@ public static class BacsDebit {
ApiRequestParams.EnumParam setupFutureUsage;
private BacsDebit(
- Map extraParams, ApiRequestParams.EnumParam setupFutureUsage) {
+ Map extraParams,
+ MandateOptions mandateOptions,
+ ApiRequestParams.EnumParam setupFutureUsage) {
this.extraParams = extraParams;
+ this.mandateOptions = mandateOptions;
this.setupFutureUsage = setupFutureUsage;
}
@@ -7980,12 +7987,14 @@ public static Builder 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.BacsDebit build() {
return new PaymentIntentConfirmParams.PaymentMethodOptions.BacsDebit(
- this.extraParams, this.setupFutureUsage);
+ this.extraParams, this.mandateOptions, this.setupFutureUsage);
}
/**
@@ -8016,6 +8025,14 @@ public Builder putAllExtraParam(Map map) {
return this;
}
+ /** Additional fields for Mandate creation. */
+ public Builder setMandateOptions(
+ PaymentIntentConfirmParams.PaymentMethodOptions.BacsDebit.MandateOptions
+ mandateOptions) {
+ this.mandateOptions = mandateOptions;
+ return this;
+ }
+
/**
* Indicates that you intend to make future payments with this PaymentIntent's payment
* method.
@@ -8077,6 +8094,67 @@ public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) {
}
}
+ @Getter
+ public static class MandateOptions {
+ /**
+ * Map of extra parameters for custom features not available in this client library. The
+ * content in this map is not serialized under this field's {@code @SerializedName} value.
+ * Instead, each key/value pair is serialized as if the key is a root-level field
+ * (serialized) name in this param object. Effectively, this map is flattened to its parent
+ * instance.
+ */
+ @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
+ Map extraParams;
+
+ private MandateOptions(Map extraParams) {
+ this.extraParams = extraParams;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Map extraParams;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public PaymentIntentConfirmParams.PaymentMethodOptions.BacsDebit.MandateOptions build() {
+ return new PaymentIntentConfirmParams.PaymentMethodOptions.BacsDebit.MandateOptions(
+ this.extraParams);
+ }
+
+ /**
+ * Add a key/value pair to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
+ * map. See {@link
+ * PaymentIntentConfirmParams.PaymentMethodOptions.BacsDebit.MandateOptions#extraParams}
+ * for the field documentation.
+ */
+ public Builder putExtraParam(String key, Object value) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.put(key, value);
+ return this;
+ }
+
+ /**
+ * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
+ * map. See {@link
+ * PaymentIntentConfirmParams.PaymentMethodOptions.BacsDebit.MandateOptions#extraParams}
+ * for the field documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+ }
+ }
+
public enum SetupFutureUsage implements ApiRequestParams.EnumParam {
@SerializedName("none")
NONE("none"),
diff --git a/src/main/java/com/stripe/param/PaymentIntentCreateParams.java b/src/main/java/com/stripe/param/PaymentIntentCreateParams.java
index 46b4614f519..b40f5406940 100644
--- a/src/main/java/com/stripe/param/PaymentIntentCreateParams.java
+++ b/src/main/java/com/stripe/param/PaymentIntentCreateParams.java
@@ -91,7 +91,7 @@ public class PaymentIntentCreateParams extends ApiRequestParams {
* method attaches to the Customer after the PaymentIntent has been confirmed and any required
* actions from the user are complete. If the payment method is {@code card_present} and isn't a
* digital wallet, then a generated_card
+ * href="https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card
* payment method representing the card is created and attached to the Customer instead.
*/
@SerializedName("customer")
@@ -272,7 +272,7 @@ public class PaymentIntentCreateParams extends ApiRequestParams {
/**
* Provides information about a card charge. Concatenated to the account's statement
+ * href="https://docs.stripe.com/get-started/account/statement-descriptors#static">statement
* descriptor prefix to form the complete statement descriptor that appears on the customer's
* statement.
*/
@@ -577,7 +577,7 @@ public Builder setCurrency(String currency) {
* method attaches to the Customer after the PaymentIntent has been confirmed and any required
* actions from the user are complete. If the payment method is {@code card_present} and isn't a
* digital wallet, then a generated_card
+ * href="https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card
* payment method representing the card is created and attached to the Customer instead.
*/
public Builder setCustomer(String customer) {
@@ -895,7 +895,7 @@ public Builder setStatementDescriptor(String statementDescriptor) {
/**
* Provides information about a card charge. Concatenated to the account's statement
+ * href="https://docs.stripe.com/get-started/account/statement-descriptors#static">statement
* descriptor prefix to form the complete statement descriptor that appears on the
* customer's statement.
*/
@@ -8445,6 +8445,10 @@ public static class BacsDebit {
@SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
Map extraParams;
+ /** Additional fields for Mandate creation. */
+ @SerializedName("mandate_options")
+ MandateOptions mandateOptions;
+
/**
* Indicates that you intend to make future payments with this PaymentIntent's payment method.
*
@@ -8472,8 +8476,11 @@ public static class BacsDebit {
ApiRequestParams.EnumParam setupFutureUsage;
private BacsDebit(
- Map extraParams, ApiRequestParams.EnumParam setupFutureUsage) {
+ Map extraParams,
+ MandateOptions mandateOptions,
+ ApiRequestParams.EnumParam setupFutureUsage) {
this.extraParams = extraParams;
+ this.mandateOptions = mandateOptions;
this.setupFutureUsage = setupFutureUsage;
}
@@ -8484,12 +8491,14 @@ public static Builder builder() {
public static class Builder {
private Map extraParams;
+ private MandateOptions mandateOptions;
+
private ApiRequestParams.EnumParam setupFutureUsage;
/** Finalize and obtain parameter instance from this builder. */
public PaymentIntentCreateParams.PaymentMethodOptions.BacsDebit build() {
return new PaymentIntentCreateParams.PaymentMethodOptions.BacsDebit(
- this.extraParams, this.setupFutureUsage);
+ this.extraParams, this.mandateOptions, this.setupFutureUsage);
}
/**
@@ -8520,6 +8529,14 @@ public Builder putAllExtraParam(Map map) {
return this;
}
+ /** Additional fields for Mandate creation. */
+ public Builder setMandateOptions(
+ PaymentIntentCreateParams.PaymentMethodOptions.BacsDebit.MandateOptions
+ mandateOptions) {
+ this.mandateOptions = mandateOptions;
+ return this;
+ }
+
/**
* Indicates that you intend to make future payments with this PaymentIntent's payment
* method.
@@ -8581,6 +8598,67 @@ public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) {
}
}
+ @Getter
+ public static class MandateOptions {
+ /**
+ * Map of extra parameters for custom features not available in this client library. The
+ * content in this map is not serialized under this field's {@code @SerializedName} value.
+ * Instead, each key/value pair is serialized as if the key is a root-level field
+ * (serialized) name in this param object. Effectively, this map is flattened to its parent
+ * instance.
+ */
+ @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
+ Map extraParams;
+
+ private MandateOptions(Map extraParams) {
+ this.extraParams = extraParams;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Map extraParams;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public PaymentIntentCreateParams.PaymentMethodOptions.BacsDebit.MandateOptions build() {
+ return new PaymentIntentCreateParams.PaymentMethodOptions.BacsDebit.MandateOptions(
+ this.extraParams);
+ }
+
+ /**
+ * Add a key/value pair to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
+ * map. See {@link
+ * PaymentIntentCreateParams.PaymentMethodOptions.BacsDebit.MandateOptions#extraParams}
+ * for the field documentation.
+ */
+ public Builder putExtraParam(String key, Object value) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.put(key, value);
+ return this;
+ }
+
+ /**
+ * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
+ * map. See {@link
+ * PaymentIntentCreateParams.PaymentMethodOptions.BacsDebit.MandateOptions#extraParams}
+ * for the field documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+ }
+ }
+
public enum SetupFutureUsage implements ApiRequestParams.EnumParam {
@SerializedName("none")
NONE("none"),
diff --git a/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java b/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java
index 1869b92a7d3..6a958fb55b3 100644
--- a/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java
+++ b/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java
@@ -56,7 +56,7 @@ public class PaymentIntentUpdateParams extends ApiRequestParams {
* method attaches to the Customer after the PaymentIntent has been confirmed and any required
* actions from the user are complete. If the payment method is {@code card_present} and isn't a
* digital wallet, then a generated_card
+ * href="https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card
* payment method representing the card is created and attached to the Customer instead.
*/
@SerializedName("customer")
@@ -172,7 +172,7 @@ public class PaymentIntentUpdateParams extends ApiRequestParams {
/**
* Provides information about a card charge. Concatenated to the account's statement
+ * href="https://docs.stripe.com/get-started/account/statement-descriptors#static">statement
* descriptor prefix to form the complete statement descriptor that appears on the customer's
* statement.
*/
@@ -388,7 +388,7 @@ public Builder setCurrency(EmptyParam currency) {
* method attaches to the Customer after the PaymentIntent has been confirmed and any required
* actions from the user are complete. If the payment method is {@code card_present} and isn't a
* digital wallet, then a generated_card
+ * href="https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card
* payment method representing the card is created and attached to the Customer instead.
*/
public Builder setCustomer(String customer) {
@@ -407,7 +407,7 @@ public Builder setCustomer(String customer) {
* method attaches to the Customer after the PaymentIntent has been confirmed and any required
* actions from the user are complete. If the payment method is {@code card_present} and isn't a
* digital wallet, then a generated_card
+ * href="https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card
* payment method representing the card is created and attached to the Customer instead.
*/
public Builder setCustomer(EmptyParam customer) {
@@ -727,7 +727,7 @@ public Builder setStatementDescriptor(EmptyParam statementDescriptor) {
/**
* Provides information about a card charge. Concatenated to the account's statement
+ * href="https://docs.stripe.com/get-started/account/statement-descriptors#static">statement
* descriptor prefix to form the complete statement descriptor that appears on the
* customer's statement.
*/
@@ -738,7 +738,7 @@ public Builder setStatementDescriptorSuffix(String statementDescriptorSuffix) {
/**
* Provides information about a card charge. Concatenated to the account's statement
+ * href="https://docs.stripe.com/get-started/account/statement-descriptors#static">statement
* descriptor prefix to form the complete statement descriptor that appears on the
* customer's statement.
*/
@@ -7941,6 +7941,10 @@ public static class BacsDebit {
@SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
Map extraParams;
+ /** Additional fields for Mandate creation. */
+ @SerializedName("mandate_options")
+ MandateOptions mandateOptions;
+
/**
* Indicates that you intend to make future payments with this PaymentIntent's payment method.
*
@@ -7968,8 +7972,11 @@ public static class BacsDebit {
ApiRequestParams.EnumParam setupFutureUsage;
private BacsDebit(
- Map extraParams, ApiRequestParams.EnumParam setupFutureUsage) {
+ Map extraParams,
+ MandateOptions mandateOptions,
+ ApiRequestParams.EnumParam setupFutureUsage) {
this.extraParams = extraParams;
+ this.mandateOptions = mandateOptions;
this.setupFutureUsage = setupFutureUsage;
}
@@ -7980,12 +7987,14 @@ public static Builder builder() {
public static class Builder {
private Map extraParams;
+ private MandateOptions mandateOptions;
+
private ApiRequestParams.EnumParam setupFutureUsage;
/** Finalize and obtain parameter instance from this builder. */
public PaymentIntentUpdateParams.PaymentMethodOptions.BacsDebit build() {
return new PaymentIntentUpdateParams.PaymentMethodOptions.BacsDebit(
- this.extraParams, this.setupFutureUsage);
+ this.extraParams, this.mandateOptions, this.setupFutureUsage);
}
/**
@@ -8016,6 +8025,14 @@ public Builder putAllExtraParam(Map map) {
return this;
}
+ /** Additional fields for Mandate creation. */
+ public Builder setMandateOptions(
+ PaymentIntentUpdateParams.PaymentMethodOptions.BacsDebit.MandateOptions
+ mandateOptions) {
+ this.mandateOptions = mandateOptions;
+ return this;
+ }
+
/**
* Indicates that you intend to make future payments with this PaymentIntent's payment
* method.
@@ -8077,6 +8094,67 @@ public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) {
}
}
+ @Getter
+ public static class MandateOptions {
+ /**
+ * Map of extra parameters for custom features not available in this client library. The
+ * content in this map is not serialized under this field's {@code @SerializedName} value.
+ * Instead, each key/value pair is serialized as if the key is a root-level field
+ * (serialized) name in this param object. Effectively, this map is flattened to its parent
+ * instance.
+ */
+ @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
+ Map extraParams;
+
+ private MandateOptions(Map extraParams) {
+ this.extraParams = extraParams;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Map extraParams;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public PaymentIntentUpdateParams.PaymentMethodOptions.BacsDebit.MandateOptions build() {
+ return new PaymentIntentUpdateParams.PaymentMethodOptions.BacsDebit.MandateOptions(
+ this.extraParams);
+ }
+
+ /**
+ * Add a key/value pair to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
+ * map. See {@link
+ * PaymentIntentUpdateParams.PaymentMethodOptions.BacsDebit.MandateOptions#extraParams}
+ * for the field documentation.
+ */
+ public Builder putExtraParam(String key, Object value) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.put(key, value);
+ return this;
+ }
+
+ /**
+ * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
+ * map. See {@link
+ * PaymentIntentUpdateParams.PaymentMethodOptions.BacsDebit.MandateOptions#extraParams}
+ * for the field documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+ }
+ }
+
public enum SetupFutureUsage implements ApiRequestParams.EnumParam {
@SerializedName("none")
NONE("none"),
diff --git a/src/main/java/com/stripe/param/PersonCollectionCreateParams.java b/src/main/java/com/stripe/param/PersonCollectionCreateParams.java
index 585f0d711e8..e27a2902c37 100644
--- a/src/main/java/com/stripe/param/PersonCollectionCreateParams.java
+++ b/src/main/java/com/stripe/param/PersonCollectionCreateParams.java
@@ -13,7 +13,9 @@
@Getter
public class PersonCollectionCreateParams extends ApiRequestParams {
- /** Details on the legal guardian's acceptance of the required Stripe agreements. */
+ /**
+ * Details on the legal guardian's or authorizer's acceptance of the required Stripe agreements.
+ */
@SerializedName("additional_tos_acceptances")
AdditionalTosAcceptances additionalTosAcceptances;
@@ -322,7 +324,9 @@ public PersonCollectionCreateParams build() {
this.verification);
}
- /** Details on the legal guardian's acceptance of the required Stripe agreements. */
+ /**
+ * Details on the legal guardian's or authorizer's acceptance of the required Stripe agreements.
+ */
public Builder setAdditionalTosAcceptances(
PersonCollectionCreateParams.AdditionalTosAcceptances additionalTosAcceptances) {
this.additionalTosAcceptances = additionalTosAcceptances;
diff --git a/src/main/java/com/stripe/param/PersonUpdateParams.java b/src/main/java/com/stripe/param/PersonUpdateParams.java
index 6137d1095d9..f5a6ef6f15a 100644
--- a/src/main/java/com/stripe/param/PersonUpdateParams.java
+++ b/src/main/java/com/stripe/param/PersonUpdateParams.java
@@ -13,7 +13,9 @@
@Getter
public class PersonUpdateParams extends ApiRequestParams {
- /** Details on the legal guardian's acceptance of the required Stripe agreements. */
+ /**
+ * Details on the legal guardian's or authorizer's acceptance of the required Stripe agreements.
+ */
@SerializedName("additional_tos_acceptances")
AdditionalTosAcceptances additionalTosAcceptances;
@@ -322,7 +324,9 @@ public PersonUpdateParams build() {
this.verification);
}
- /** Details on the legal guardian's acceptance of the required Stripe agreements. */
+ /**
+ * Details on the legal guardian's or authorizer's acceptance of the required Stripe agreements.
+ */
public Builder setAdditionalTosAcceptances(
PersonUpdateParams.AdditionalTosAcceptances additionalTosAcceptances) {
this.additionalTosAcceptances = additionalTosAcceptances;
diff --git a/src/main/java/com/stripe/param/SetupIntentConfirmParams.java b/src/main/java/com/stripe/param/SetupIntentConfirmParams.java
index 6037b2f204c..8409d020e4f 100644
--- a/src/main/java/com/stripe/param/SetupIntentConfirmParams.java
+++ b/src/main/java/com/stripe/param/SetupIntentConfirmParams.java
@@ -5027,6 +5027,13 @@ public static class PaymentMethodOptions {
@SerializedName("amazon_pay")
AmazonPay amazonPay;
+ /**
+ * If this is a {@code bacs_debit} SetupIntent, this sub-hash contains details about the Bacs
+ * Debit payment method options.
+ */
+ @SerializedName("bacs_debit")
+ BacsDebit bacsDebit;
+
/** Configuration for any card setup attempted on this SetupIntent. */
@SerializedName("card")
Card card;
@@ -5078,6 +5085,7 @@ public static class PaymentMethodOptions {
private PaymentMethodOptions(
AcssDebit acssDebit,
AmazonPay amazonPay,
+ BacsDebit bacsDebit,
Card card,
CardPresent cardPresent,
Map extraParams,
@@ -5087,6 +5095,7 @@ private PaymentMethodOptions(
UsBankAccount usBankAccount) {
this.acssDebit = acssDebit;
this.amazonPay = amazonPay;
+ this.bacsDebit = bacsDebit;
this.card = card;
this.cardPresent = cardPresent;
this.extraParams = extraParams;
@@ -5105,6 +5114,8 @@ public static class Builder {
private AmazonPay amazonPay;
+ private BacsDebit bacsDebit;
+
private Card card;
private CardPresent cardPresent;
@@ -5124,6 +5135,7 @@ public SetupIntentConfirmParams.PaymentMethodOptions build() {
return new SetupIntentConfirmParams.PaymentMethodOptions(
this.acssDebit,
this.amazonPay,
+ this.bacsDebit,
this.card,
this.cardPresent,
this.extraParams,
@@ -5153,6 +5165,16 @@ public Builder setAmazonPay(
return this;
}
+ /**
+ * If this is a {@code bacs_debit} SetupIntent, this sub-hash contains details about the Bacs
+ * Debit payment method options.
+ */
+ public Builder setBacsDebit(
+ SetupIntentConfirmParams.PaymentMethodOptions.BacsDebit bacsDebit) {
+ this.bacsDebit = bacsDebit;
+ return this;
+ }
+
/** Configuration for any card setup attempted on this SetupIntent. */
public Builder setCard(SetupIntentConfirmParams.PaymentMethodOptions.Card card) {
this.card = card;
@@ -5686,6 +5708,139 @@ public Builder putAllExtraParam(Map map) {
}
}
+ @Getter
+ public static class BacsDebit {
+ /**
+ * Map of extra parameters for custom features not available in this client library. The
+ * content in this map is not serialized under this field's {@code @SerializedName} value.
+ * Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
+ * name in this param object. Effectively, this map is flattened to its parent instance.
+ */
+ @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
+ Map extraParams;
+
+ /** Additional fields for Mandate creation. */
+ @SerializedName("mandate_options")
+ MandateOptions mandateOptions;
+
+ private BacsDebit(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 SetupIntentConfirmParams.PaymentMethodOptions.BacsDebit build() {
+ return new SetupIntentConfirmParams.PaymentMethodOptions.BacsDebit(
+ 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 SetupIntentConfirmParams.PaymentMethodOptions.BacsDebit#extraParams} for
+ * the field documentation.
+ */
+ public Builder putExtraParam(String key, Object value) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.put(key, value);
+ return this;
+ }
+
+ /**
+ * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
+ * map. See {@link SetupIntentConfirmParams.PaymentMethodOptions.BacsDebit#extraParams} for
+ * the field documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+
+ /** Additional fields for Mandate creation. */
+ public Builder setMandateOptions(
+ SetupIntentConfirmParams.PaymentMethodOptions.BacsDebit.MandateOptions mandateOptions) {
+ this.mandateOptions = mandateOptions;
+ return this;
+ }
+ }
+
+ @Getter
+ public static class MandateOptions {
+ /**
+ * Map of extra parameters for custom features not available in this client library. The
+ * content in this map is not serialized under this field's {@code @SerializedName} value.
+ * Instead, each key/value pair is serialized as if the key is a root-level field
+ * (serialized) name in this param object. Effectively, this map is flattened to its parent
+ * instance.
+ */
+ @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
+ Map extraParams;
+
+ private MandateOptions(Map extraParams) {
+ this.extraParams = extraParams;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Map extraParams;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public SetupIntentConfirmParams.PaymentMethodOptions.BacsDebit.MandateOptions build() {
+ return new SetupIntentConfirmParams.PaymentMethodOptions.BacsDebit.MandateOptions(
+ this.extraParams);
+ }
+
+ /**
+ * Add a key/value pair to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
+ * map. See {@link
+ * SetupIntentConfirmParams.PaymentMethodOptions.BacsDebit.MandateOptions#extraParams} for
+ * the field documentation.
+ */
+ public Builder putExtraParam(String key, Object value) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.put(key, value);
+ return this;
+ }
+
+ /**
+ * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
+ * map. See {@link
+ * SetupIntentConfirmParams.PaymentMethodOptions.BacsDebit.MandateOptions#extraParams} for
+ * the field documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+ }
+ }
+ }
+
@Getter
public static class Card {
/**
diff --git a/src/main/java/com/stripe/param/SetupIntentCreateParams.java b/src/main/java/com/stripe/param/SetupIntentCreateParams.java
index 98206b5b2b5..5f5f8e7ee39 100644
--- a/src/main/java/com/stripe/param/SetupIntentCreateParams.java
+++ b/src/main/java/com/stripe/param/SetupIntentCreateParams.java
@@ -5483,6 +5483,13 @@ public static class PaymentMethodOptions {
@SerializedName("amazon_pay")
AmazonPay amazonPay;
+ /**
+ * If this is a {@code bacs_debit} SetupIntent, this sub-hash contains details about the Bacs
+ * Debit payment method options.
+ */
+ @SerializedName("bacs_debit")
+ BacsDebit bacsDebit;
+
/** Configuration for any card setup attempted on this SetupIntent. */
@SerializedName("card")
Card card;
@@ -5534,6 +5541,7 @@ public static class PaymentMethodOptions {
private PaymentMethodOptions(
AcssDebit acssDebit,
AmazonPay amazonPay,
+ BacsDebit bacsDebit,
Card card,
CardPresent cardPresent,
Map extraParams,
@@ -5543,6 +5551,7 @@ private PaymentMethodOptions(
UsBankAccount usBankAccount) {
this.acssDebit = acssDebit;
this.amazonPay = amazonPay;
+ this.bacsDebit = bacsDebit;
this.card = card;
this.cardPresent = cardPresent;
this.extraParams = extraParams;
@@ -5561,6 +5570,8 @@ public static class Builder {
private AmazonPay amazonPay;
+ private BacsDebit bacsDebit;
+
private Card card;
private CardPresent cardPresent;
@@ -5580,6 +5591,7 @@ public SetupIntentCreateParams.PaymentMethodOptions build() {
return new SetupIntentCreateParams.PaymentMethodOptions(
this.acssDebit,
this.amazonPay,
+ this.bacsDebit,
this.card,
this.cardPresent,
this.extraParams,
@@ -5609,6 +5621,16 @@ public Builder setAmazonPay(
return this;
}
+ /**
+ * If this is a {@code bacs_debit} SetupIntent, this sub-hash contains details about the Bacs
+ * Debit payment method options.
+ */
+ public Builder setBacsDebit(
+ SetupIntentCreateParams.PaymentMethodOptions.BacsDebit bacsDebit) {
+ this.bacsDebit = bacsDebit;
+ return this;
+ }
+
/** Configuration for any card setup attempted on this SetupIntent. */
public Builder setCard(SetupIntentCreateParams.PaymentMethodOptions.Card card) {
this.card = card;
@@ -6140,6 +6162,139 @@ public Builder putAllExtraParam(Map map) {
}
}
+ @Getter
+ public static class BacsDebit {
+ /**
+ * Map of extra parameters for custom features not available in this client library. The
+ * content in this map is not serialized under this field's {@code @SerializedName} value.
+ * Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
+ * name in this param object. Effectively, this map is flattened to its parent instance.
+ */
+ @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
+ Map extraParams;
+
+ /** Additional fields for Mandate creation. */
+ @SerializedName("mandate_options")
+ MandateOptions mandateOptions;
+
+ private BacsDebit(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 SetupIntentCreateParams.PaymentMethodOptions.BacsDebit build() {
+ return new SetupIntentCreateParams.PaymentMethodOptions.BacsDebit(
+ 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 SetupIntentCreateParams.PaymentMethodOptions.BacsDebit#extraParams} for
+ * the field documentation.
+ */
+ public Builder putExtraParam(String key, Object value) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.put(key, value);
+ return this;
+ }
+
+ /**
+ * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
+ * map. See {@link SetupIntentCreateParams.PaymentMethodOptions.BacsDebit#extraParams} for
+ * the field documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+
+ /** Additional fields for Mandate creation. */
+ public Builder setMandateOptions(
+ SetupIntentCreateParams.PaymentMethodOptions.BacsDebit.MandateOptions mandateOptions) {
+ this.mandateOptions = mandateOptions;
+ return this;
+ }
+ }
+
+ @Getter
+ public static class MandateOptions {
+ /**
+ * Map of extra parameters for custom features not available in this client library. The
+ * content in this map is not serialized under this field's {@code @SerializedName} value.
+ * Instead, each key/value pair is serialized as if the key is a root-level field
+ * (serialized) name in this param object. Effectively, this map is flattened to its parent
+ * instance.
+ */
+ @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
+ Map extraParams;
+
+ private MandateOptions(Map extraParams) {
+ this.extraParams = extraParams;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Map extraParams;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public SetupIntentCreateParams.PaymentMethodOptions.BacsDebit.MandateOptions build() {
+ return new SetupIntentCreateParams.PaymentMethodOptions.BacsDebit.MandateOptions(
+ this.extraParams);
+ }
+
+ /**
+ * Add a key/value pair to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
+ * map. See {@link
+ * SetupIntentCreateParams.PaymentMethodOptions.BacsDebit.MandateOptions#extraParams} for
+ * the field documentation.
+ */
+ public Builder putExtraParam(String key, Object value) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.put(key, value);
+ return this;
+ }
+
+ /**
+ * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
+ * map. See {@link
+ * SetupIntentCreateParams.PaymentMethodOptions.BacsDebit.MandateOptions#extraParams} for
+ * the field documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+ }
+ }
+ }
+
@Getter
public static class Card {
/**
diff --git a/src/main/java/com/stripe/param/SetupIntentUpdateParams.java b/src/main/java/com/stripe/param/SetupIntentUpdateParams.java
index 88ca435b578..b3804a2fc2b 100644
--- a/src/main/java/com/stripe/param/SetupIntentUpdateParams.java
+++ b/src/main/java/com/stripe/param/SetupIntentUpdateParams.java
@@ -4954,6 +4954,13 @@ public static class PaymentMethodOptions {
@SerializedName("amazon_pay")
AmazonPay amazonPay;
+ /**
+ * If this is a {@code bacs_debit} SetupIntent, this sub-hash contains details about the Bacs
+ * Debit payment method options.
+ */
+ @SerializedName("bacs_debit")
+ BacsDebit bacsDebit;
+
/** Configuration for any card setup attempted on this SetupIntent. */
@SerializedName("card")
Card card;
@@ -5005,6 +5012,7 @@ public static class PaymentMethodOptions {
private PaymentMethodOptions(
AcssDebit acssDebit,
AmazonPay amazonPay,
+ BacsDebit bacsDebit,
Card card,
CardPresent cardPresent,
Map extraParams,
@@ -5014,6 +5022,7 @@ private PaymentMethodOptions(
UsBankAccount usBankAccount) {
this.acssDebit = acssDebit;
this.amazonPay = amazonPay;
+ this.bacsDebit = bacsDebit;
this.card = card;
this.cardPresent = cardPresent;
this.extraParams = extraParams;
@@ -5032,6 +5041,8 @@ public static class Builder {
private AmazonPay amazonPay;
+ private BacsDebit bacsDebit;
+
private Card card;
private CardPresent cardPresent;
@@ -5051,6 +5062,7 @@ public SetupIntentUpdateParams.PaymentMethodOptions build() {
return new SetupIntentUpdateParams.PaymentMethodOptions(
this.acssDebit,
this.amazonPay,
+ this.bacsDebit,
this.card,
this.cardPresent,
this.extraParams,
@@ -5080,6 +5092,16 @@ public Builder setAmazonPay(
return this;
}
+ /**
+ * If this is a {@code bacs_debit} SetupIntent, this sub-hash contains details about the Bacs
+ * Debit payment method options.
+ */
+ public Builder setBacsDebit(
+ SetupIntentUpdateParams.PaymentMethodOptions.BacsDebit bacsDebit) {
+ this.bacsDebit = bacsDebit;
+ return this;
+ }
+
/** Configuration for any card setup attempted on this SetupIntent. */
public Builder setCard(SetupIntentUpdateParams.PaymentMethodOptions.Card card) {
this.card = card;
@@ -5620,6 +5642,139 @@ public Builder putAllExtraParam(Map map) {
}
}
+ @Getter
+ public static class BacsDebit {
+ /**
+ * Map of extra parameters for custom features not available in this client library. The
+ * content in this map is not serialized under this field's {@code @SerializedName} value.
+ * Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
+ * name in this param object. Effectively, this map is flattened to its parent instance.
+ */
+ @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
+ Map extraParams;
+
+ /** Additional fields for Mandate creation. */
+ @SerializedName("mandate_options")
+ MandateOptions mandateOptions;
+
+ private BacsDebit(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 SetupIntentUpdateParams.PaymentMethodOptions.BacsDebit build() {
+ return new SetupIntentUpdateParams.PaymentMethodOptions.BacsDebit(
+ 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 SetupIntentUpdateParams.PaymentMethodOptions.BacsDebit#extraParams} for
+ * the field documentation.
+ */
+ public Builder putExtraParam(String key, Object value) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.put(key, value);
+ return this;
+ }
+
+ /**
+ * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
+ * map. See {@link SetupIntentUpdateParams.PaymentMethodOptions.BacsDebit#extraParams} for
+ * the field documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+
+ /** Additional fields for Mandate creation. */
+ public Builder setMandateOptions(
+ SetupIntentUpdateParams.PaymentMethodOptions.BacsDebit.MandateOptions mandateOptions) {
+ this.mandateOptions = mandateOptions;
+ return this;
+ }
+ }
+
+ @Getter
+ public static class MandateOptions {
+ /**
+ * Map of extra parameters for custom features not available in this client library. The
+ * content in this map is not serialized under this field's {@code @SerializedName} value.
+ * Instead, each key/value pair is serialized as if the key is a root-level field
+ * (serialized) name in this param object. Effectively, this map is flattened to its parent
+ * instance.
+ */
+ @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
+ Map extraParams;
+
+ private MandateOptions(Map extraParams) {
+ this.extraParams = extraParams;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Map extraParams;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public SetupIntentUpdateParams.PaymentMethodOptions.BacsDebit.MandateOptions build() {
+ return new SetupIntentUpdateParams.PaymentMethodOptions.BacsDebit.MandateOptions(
+ this.extraParams);
+ }
+
+ /**
+ * Add a key/value pair to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
+ * map. See {@link
+ * SetupIntentUpdateParams.PaymentMethodOptions.BacsDebit.MandateOptions#extraParams} for
+ * the field documentation.
+ */
+ public Builder putExtraParam(String key, Object value) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.put(key, value);
+ return this;
+ }
+
+ /**
+ * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
+ * map. See {@link
+ * SetupIntentUpdateParams.PaymentMethodOptions.BacsDebit.MandateOptions#extraParams} for
+ * the field documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+ }
+ }
+ }
+
@Getter
public static class Card {
/**
diff --git a/src/main/java/com/stripe/param/TokenCreateParams.java b/src/main/java/com/stripe/param/TokenCreateParams.java
index 84688fc1f0e..65a89d682c2 100644
--- a/src/main/java/com/stripe/param/TokenCreateParams.java
+++ b/src/main/java/com/stripe/param/TokenCreateParams.java
@@ -4174,7 +4174,9 @@ public Builder putAllExtraParam(Map map) {
@Getter
public static class Person {
- /** Details on the legal guardian's acceptance of the required Stripe agreements. */
+ /**
+ * Details on the legal guardian's or authorizer's acceptance of the required Stripe agreements.
+ */
@SerializedName("additional_tos_acceptances")
AdditionalTosAcceptances additionalTosAcceptances;
@@ -4462,7 +4464,10 @@ public TokenCreateParams.Person build() {
this.verification);
}
- /** Details on the legal guardian's acceptance of the required Stripe agreements. */
+ /**
+ * Details on the legal guardian's or authorizer's acceptance of the required Stripe
+ * agreements.
+ */
public Builder setAdditionalTosAcceptances(
TokenCreateParams.Person.AdditionalTosAcceptances additionalTosAcceptances) {
this.additionalTosAcceptances = additionalTosAcceptances;
diff --git a/src/main/java/com/stripe/param/checkout/SessionCreateParams.java b/src/main/java/com/stripe/param/checkout/SessionCreateParams.java
index e811316426b..cd73b083ca8 100644
--- a/src/main/java/com/stripe/param/checkout/SessionCreateParams.java
+++ b/src/main/java/com/stripe/param/checkout/SessionCreateParams.java
@@ -37,7 +37,8 @@ public class SessionCreateParams extends ApiRequestParams {
/**
* If set, Checkout displays a back button and customers will be directed to this URL if they
- * decide to cancel payment and return to your website.
+ * decide to cancel payment and return to your website. This parameter is not allowed if ui_mode
+ * is {@code embedded}.
*/
@SerializedName("cancel_url")
String cancelUrl;
@@ -591,7 +592,8 @@ public Builder setBillingAddressCollection(
/**
* If set, Checkout displays a back button and customers will be directed to this URL if they
- * decide to cancel payment and return to your website.
+ * decide to cancel payment and return to your website. This parameter is not allowed if ui_mode
+ * is {@code embedded}.
*/
public Builder setCancelUrl(String cancelUrl) {
this.cancelUrl = cancelUrl;
diff --git a/src/main/java/com/stripe/param/treasury/OutboundPaymentUpdateParams.java b/src/main/java/com/stripe/param/treasury/OutboundPaymentUpdateParams.java
index 1f5b1a22b0b..4eb9253f7a5 100644
--- a/src/main/java/com/stripe/param/treasury/OutboundPaymentUpdateParams.java
+++ b/src/main/java/com/stripe/param/treasury/OutboundPaymentUpdateParams.java
@@ -287,6 +287,13 @@ public Builder setTraceId(EmptyParam traceId) {
@Getter
public static class UsDomesticWire {
+ /**
+ * CHIPS System Sequence Number (SSN) for funds sent over the {@code us_domestic_wire}
+ * network.
+ */
+ @SerializedName("chips")
+ Object chips;
+
/**
* Map of extra parameters for custom features not available in this client library. The
* content in this map is not serialized under this field's {@code @SerializedName} value.
@@ -304,7 +311,9 @@ public static class UsDomesticWire {
@SerializedName("omad")
Object omad;
- private UsDomesticWire(Map extraParams, Object imad, Object omad) {
+ private UsDomesticWire(
+ Object chips, Map extraParams, Object imad, Object omad) {
+ this.chips = chips;
this.extraParams = extraParams;
this.imad = imad;
this.omad = omad;
@@ -315,6 +324,8 @@ public static Builder builder() {
}
public static class Builder {
+ private Object chips;
+
private Map extraParams;
private Object imad;
@@ -324,7 +335,25 @@ public static class Builder {
/** Finalize and obtain parameter instance from this builder. */
public OutboundPaymentUpdateParams.TrackingDetails.UsDomesticWire build() {
return new OutboundPaymentUpdateParams.TrackingDetails.UsDomesticWire(
- this.extraParams, this.imad, this.omad);
+ this.chips, this.extraParams, this.imad, this.omad);
+ }
+
+ /**
+ * CHIPS System Sequence Number (SSN) for funds sent over the {@code us_domestic_wire}
+ * network.
+ */
+ public Builder setChips(String chips) {
+ this.chips = chips;
+ return this;
+ }
+
+ /**
+ * CHIPS System Sequence Number (SSN) for funds sent over the {@code us_domestic_wire}
+ * network.
+ */
+ public Builder setChips(EmptyParam chips) {
+ this.chips = chips;
+ return this;
}
/**
diff --git a/src/main/java/com/stripe/param/treasury/OutboundTransferUpdateParams.java b/src/main/java/com/stripe/param/treasury/OutboundTransferUpdateParams.java
index 3fdc6162607..4d9707ac527 100644
--- a/src/main/java/com/stripe/param/treasury/OutboundTransferUpdateParams.java
+++ b/src/main/java/com/stripe/param/treasury/OutboundTransferUpdateParams.java
@@ -288,6 +288,13 @@ public Builder setTraceId(EmptyParam traceId) {
@Getter
public static class UsDomesticWire {
+ /**
+ * CHIPS System Sequence Number (SSN) for funds sent over the {@code us_domestic_wire}
+ * network.
+ */
+ @SerializedName("chips")
+ Object chips;
+
/**
* Map of extra parameters for custom features not available in this client library. The
* content in this map is not serialized under this field's {@code @SerializedName} value.
@@ -305,7 +312,9 @@ public static class UsDomesticWire {
@SerializedName("omad")
Object omad;
- private UsDomesticWire(Map extraParams, Object imad, Object omad) {
+ private UsDomesticWire(
+ Object chips, Map extraParams, Object imad, Object omad) {
+ this.chips = chips;
this.extraParams = extraParams;
this.imad = imad;
this.omad = omad;
@@ -316,6 +325,8 @@ public static Builder builder() {
}
public static class Builder {
+ private Object chips;
+
private Map extraParams;
private Object imad;
@@ -325,7 +336,25 @@ public static class Builder {
/** Finalize and obtain parameter instance from this builder. */
public OutboundTransferUpdateParams.TrackingDetails.UsDomesticWire build() {
return new OutboundTransferUpdateParams.TrackingDetails.UsDomesticWire(
- this.extraParams, this.imad, this.omad);
+ this.chips, this.extraParams, this.imad, this.omad);
+ }
+
+ /**
+ * CHIPS System Sequence Number (SSN) for funds sent over the {@code us_domestic_wire}
+ * network.
+ */
+ public Builder setChips(String chips) {
+ this.chips = chips;
+ return this;
+ }
+
+ /**
+ * CHIPS System Sequence Number (SSN) for funds sent over the {@code us_domestic_wire}
+ * network.
+ */
+ public Builder setChips(EmptyParam chips) {
+ this.chips = chips;
+ return this;
}
/**
diff --git a/src/main/java/com/stripe/service/AccountService.java b/src/main/java/com/stripe/service/AccountService.java
index d9f59b62281..719702229f7 100644
--- a/src/main/java/com/stripe/service/AccountService.java
+++ b/src/main/java/com/stripe/service/AccountService.java
@@ -33,7 +33,7 @@ public AccountService(StripeResponseGetter responseGetter) {
* Live-mode accounts where Stripe is responsible for negative account balances cannot be
* deleted, which includes Standard accounts. Live-mode accounts where your platform is liable for
* negative account balances, which includes Custom and Express accounts, can be deleted when all
- * balances are zero.
+ * balances are zero.
*
*
If you want to delete your own account, use the account information tab in your account
@@ -50,7 +50,7 @@ public Account delete(String account) throws StripeException {
* Live-mode accounts where Stripe is responsible for negative account balances cannot be
* deleted, which includes Standard accounts. Live-mode accounts where your platform is liable for
* negative account balances, which includes Custom and Express accounts, can be deleted when all
- * balances are zero.
+ * balances are zero.
*
*
If you want to delete your own account, use the account information tab in your account
diff --git a/src/main/java/com/stripe/service/QuoteService.java b/src/main/java/com/stripe/service/QuoteService.java
index e67dc8492d2..bec0485ed2f 100644
--- a/src/main/java/com/stripe/service/QuoteService.java
+++ b/src/main/java/com/stripe/service/QuoteService.java
@@ -227,28 +227,28 @@ public Quote finalizeQuote(String quote, QuoteFinalizeQuoteParams params, Reques
}
/**
* Download the PDF for a finalized quote. Explanation for special handling can be found here
+ * href="https://docs.stripe.com/quotes/overview#quote_pdf">here
*/
public InputStream pdf(String quote, QuotePdfParams params) throws StripeException {
return pdf(quote, params, (RequestOptions) null);
}
/**
* Download the PDF for a finalized quote. Explanation for special handling can be found here
+ * href="https://docs.stripe.com/quotes/overview#quote_pdf">here
*/
public InputStream pdf(String quote, RequestOptions options) throws StripeException {
return pdf(quote, (QuotePdfParams) null, options);
}
/**
* Download the PDF for a finalized quote. Explanation for special handling can be found here
+ * href="https://docs.stripe.com/quotes/overview#quote_pdf">here
*/
public InputStream pdf(String quote) throws StripeException {
return pdf(quote, (QuotePdfParams) null, (RequestOptions) null);
}
/**
* Download the PDF for a finalized quote. Explanation for special handling can be found here
+ * href="https://docs.stripe.com/quotes/overview#quote_pdf">here
*/
public InputStream pdf(String quote, QuotePdfParams params, RequestOptions options)
throws StripeException {
From a6080c2d972fe66b6c236d3cd07625ac3e13b05f Mon Sep 17 00:00:00 2001
From: Helen Ye
Date: Thu, 15 Aug 2024 14:18:16 -0700
Subject: [PATCH 02/16] Bump version to 26.8.0
---
CHANGELOG.md | 9 +++++++++
README.md | 8 ++++----
VERSION | 2 +-
gradle.properties | 2 +-
src/main/java/com/stripe/Stripe.java | 2 +-
5 files changed, 16 insertions(+), 7 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 32aa7875ce8..3785db799fa 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,14 @@
# Changelog
+## 26.8.0 - 2024-08-15
+* [#1847](https://github.com/stripe/stripe-java/pull/1847) Update generated code
+ * Add support for `authorization_code` on `Charge.payment_method_details.card`
+ * Add support for `wallet` on `Charge.payment_method_details.card_present`, `ConfirmationToken.payment_method_preview.card.generated_from.payment_method_details.card_present`, `ConfirmationToken.payment_method_preview.card_present`, `PaymentMethod.card.generated_from.payment_method_details.card_present`, and `PaymentMethod.card_present`
+ * Add support for `mandate_options` on `PaymentIntent.payment_method_options.bacs_debit`, `PaymentIntentConfirmParams.payment_method_options.bacs_debit`, `PaymentIntentCreateParams.payment_method_options.bacs_debit`, and `PaymentIntentUpdateParams.payment_method_options.bacs_debit`
+ * Add support for `bacs_debit` on `SetupIntent.payment_method_options`, `SetupIntentConfirmParams.payment_method_options`, `SetupIntentCreateParams.payment_method_options`, and `SetupIntentUpdateParams.payment_method_options`
+ * Add support for `chips` on `Treasury.OutboundPayment.tracking_details.us_domestic_wire`, `Treasury.OutboundTransfer.tracking_details.us_domestic_wire`, `treasury.OutboundPaymentUpdateParams.tracking_details.us_domestic_wire`, and `treasury.OutboundTransferUpdateParams.tracking_details.us_domestic_wire`
+* [#1849](https://github.com/stripe/stripe-java/pull/1849) Update recommended VSCode extensions
+
## 26.7.0 - 2024-08-08
* [#1843](https://github.com/stripe/stripe-java/pull/1843) Update generated code
* Add support for `activate`, `archive`, `create`, `deactivate`, `list`, and `retrieve` methods on resource `Billing.Alert`
diff --git a/README.md b/README.md
index 687d7d0be3c..22cb7e72eda 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
# Stripe Java client library
-[![Maven Central](https://img.shields.io/badge/maven--central-v26.7.0-blue)](https://mvnrepository.com/artifact/com.stripe/stripe-java)
+[![Maven Central](https://img.shields.io/badge/maven--central-v26.8.0-blue)](https://mvnrepository.com/artifact/com.stripe/stripe-java)
[![JavaDoc](http://img.shields.io/badge/javadoc-reference-blue.svg)](https://stripe.dev/stripe-java)
[![Build Status](https://github.com/stripe/stripe-java/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/stripe/stripe-java/actions?query=branch%3Amaster)
[![Coverage Status](https://coveralls.io/repos/github/stripe/stripe-java/badge.svg?branch=master)](https://coveralls.io/github/stripe/stripe-java?branch=master)
@@ -18,7 +18,7 @@ The official [Stripe][stripe] Java client library.
Add this dependency to your project's build file:
```groovy
-implementation "com.stripe:stripe-java:26.7.0"
+implementation "com.stripe:stripe-java:26.8.0"
```
### Maven users
@@ -29,7 +29,7 @@ Add this dependency to your project's POM:
com.stripe
stripe-java
- 26.7.0
+ 26.8.0
```
@@ -37,7 +37,7 @@ Add this dependency to your project's POM:
You'll need to manually install the following JARs:
-- [The Stripe JAR](https://search.maven.org/remotecontent?filepath=com/stripe/stripe-java/26.7.0/stripe-java-26.7.0.jar)
+- [The Stripe JAR](https://search.maven.org/remotecontent?filepath=com/stripe/stripe-java/26.8.0/stripe-java-26.8.0.jar)
- [Google Gson][gson] from .
### [ProGuard][proguard]
diff --git a/VERSION b/VERSION
index 91d2624eb7e..c241fa1a177 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-26.7.0
+26.8.0
diff --git a/gradle.properties b/gradle.properties
index 10964e22373..ee6f81676d4 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -1,5 +1,5 @@
GROUP=com.stripe
-VERSION_NAME=26.7.0
+VERSION_NAME=26.8.0
POM_URL=https://github.com/stripe/stripe-java
POM_SCM_URL=git@github.com:stripe/stripe-java.git
diff --git a/src/main/java/com/stripe/Stripe.java b/src/main/java/com/stripe/Stripe.java
index fa6afec33ff..4782d8f2f04 100644
--- a/src/main/java/com/stripe/Stripe.java
+++ b/src/main/java/com/stripe/Stripe.java
@@ -13,7 +13,7 @@ public abstract class Stripe {
public static final String CONNECT_API_BASE = "https://connect.stripe.com";
public static final String LIVE_API_BASE = "https://api.stripe.com";
public static final String UPLOAD_API_BASE = "https://files.stripe.com";
- public static final String VERSION = "26.7.0";
+ public static final String VERSION = "26.8.0";
public static volatile String apiKey;
public static volatile String clientId;
From 2411292cbd91a48c572d869e5afc246ffe765c1b Mon Sep 17 00:00:00 2001
From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>
Date: Thu, 15 Aug 2024 23:02:53 +0000
Subject: [PATCH 03/16] Update generated code for v1203
---
OPENAPI_VERSION | 2 +-
.../com/stripe/param/QuoteCreateParams.java | 2219 ++---------------
.../com/stripe/param/QuoteUpdateParams.java | 1945 ---------------
3 files changed, 163 insertions(+), 4003 deletions(-)
diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION
index a94d21e070f..a8ae45aaca9 100644
--- a/OPENAPI_VERSION
+++ b/OPENAPI_VERSION
@@ -1 +1 @@
-v1202
\ No newline at end of file
+v1203
\ No newline at end of file
diff --git a/src/main/java/com/stripe/param/QuoteCreateParams.java b/src/main/java/com/stripe/param/QuoteCreateParams.java
index 462a621f5c4..3ca3b078e40 100644
--- a/src/main/java/com/stripe/param/QuoteCreateParams.java
+++ b/src/main/java/com/stripe/param/QuoteCreateParams.java
@@ -152,13 +152,6 @@ public class QuoteCreateParams extends ApiRequestParams {
@SerializedName("on_behalf_of")
Object onBehalfOf;
- /**
- * List representing phases of the Quote. Each phase can be customized to have different
- * durations, prices, and coupons.
- */
- @SerializedName("phases")
- List phases;
-
/**
* When creating a subscription or subscription schedule, the specified configuration data will be
* used. There must be at least one line item with a recurring price for a subscription or
@@ -205,7 +198,6 @@ private QuoteCreateParams(
List lines,
Map metadata,
Object onBehalfOf,
- List phases,
SubscriptionData subscriptionData,
List subscriptionDataOverrides,
String testClock,
@@ -230,7 +222,6 @@ private QuoteCreateParams(
this.lines = lines;
this.metadata = metadata;
this.onBehalfOf = onBehalfOf;
- this.phases = phases;
this.subscriptionData = subscriptionData;
this.subscriptionDataOverrides = subscriptionDataOverrides;
this.testClock = testClock;
@@ -282,8 +273,6 @@ public static class Builder {
private Object onBehalfOf;
- private List phases;
-
private SubscriptionData subscriptionData;
private List subscriptionDataOverrides;
@@ -315,7 +304,6 @@ public QuoteCreateParams build() {
this.lines,
this.metadata,
this.onBehalfOf,
- this.phases,
this.subscriptionData,
this.subscriptionDataOverrides,
this.testClock,
@@ -713,32 +701,6 @@ public Builder setOnBehalfOf(EmptyParam onBehalfOf) {
return this;
}
- /**
- * Add an element to `phases` list. A list is initialized for the first `add/addAll` call, and
- * subsequent calls adds additional elements to the original list. See {@link
- * QuoteCreateParams#phases} for the field documentation.
- */
- public Builder addPhase(QuoteCreateParams.Phase element) {
- if (this.phases == null) {
- this.phases = new ArrayList<>();
- }
- this.phases.add(element);
- return this;
- }
-
- /**
- * Add all elements to `phases` list. A list is initialized for the first `add/addAll` call, and
- * subsequent calls adds additional elements to the original list. See {@link
- * QuoteCreateParams#phases} for the field documentation.
- */
- public Builder addAllPhase(List elements) {
- if (this.phases == null) {
- this.phases = new ArrayList<>();
- }
- this.phases.addAll(elements);
- return this;
- }
-
/**
* When creating a subscription or subscription schedule, the specified configuration data will
* be used. There must be at least one line item with a recurring price for a subscription or
@@ -6418,48 +6380,49 @@ public enum TaxBehavior implements ApiRequestParams.EnumParam {
}
@Getter
- public static class Phase {
- /**
- * When specified as {@code reset}, the subscription will always start a new billing period when
- * the quote is accepted.
- */
- @SerializedName("billing_cycle_anchor")
- BillingCycleAnchor billingCycleAnchor;
+ public static class SubscriptionData {
+ /** Describes the period to bill for upon accepting the quote. */
+ @SerializedName("bill_on_acceptance")
+ BillOnAcceptance billOnAcceptance;
/**
- * Either {@code charge_automatically}, or {@code send_invoice}. When charging automatically,
- * Stripe will attempt to pay the underlying subscription at the end of each billing cycle using
- * the default source attached to the customer. When sending an invoice, Stripe will email your
- * customer an invoice with payment instructions and mark the subscription as {@code active}.
- * Defaults to {@code charge_automatically} on creation.
+ * Configures when the subscription schedule generates prorations for phase transitions.
+ * Possible values are {@code prorate_on_next_phase} or {@code prorate_up_front} with the
+ * default being {@code prorate_on_next_phase}. {@code prorate_on_next_phase} will apply phase
+ * changes and generate prorations at transition time. {@code prorate_up_front} will bill for
+ * all phases within the current billing cycle up front.
*/
- @SerializedName("collection_method")
- CollectionMethod collectionMethod;
+ @SerializedName("billing_behavior")
+ BillingBehavior billingBehavior;
/**
- * A list of Tax Rate ids. These Tax Rates
- * will set the Subscription's {@code
- * default_tax_rates}, which means they will be the Invoice's {@code
- * default_tax_rates} for any Invoices issued by the Subscription during this Phase.
+ * When specified as {@code reset}, the subscription will always start a new billing period when
+ * the quote is accepted.
*/
- @SerializedName("default_tax_rates")
- Object defaultTaxRates;
+ @SerializedName("billing_cycle_anchor")
+ ApiRequestParams.EnumParam billingCycleAnchor;
/**
- * The coupons to redeem into discounts for the schedule phase. If not specified, inherits the
- * discount from the subscription's customer. Pass an empty string to avoid inheriting any
- * discounts.
+ * The subscription's description, meant to be displayable to the customer. Use this field to
+ * optionally store an explanation of the subscription for rendering in Stripe surfaces and
+ * certain local payment methods UIs.
*/
- @SerializedName("discounts")
- Object discounts;
+ @SerializedName("description")
+ String description;
/**
- * The date at which this phase of the quote ends. If set, {@code iterations} must not be set.
+ * When creating a new subscription, the date of which the subscription schedule will start
+ * after the quote is accepted. When updating a subscription, the date of which the subscription
+ * will be updated using a subscription schedule. The special value {@code current_period_end}
+ * can be provided to update a subscription at the end of its current period. The {@code
+ * effective_date} is ignored if it is in the past when the quote is accepted.
*/
- @SerializedName("end_date")
- Long endDate;
+ @SerializedName("effective_date")
+ Object effectiveDate;
+
+ /** Behavior of the subscription schedule and underlying subscription when it ends. */
+ @SerializedName("end_behavior")
+ EndBehavior endBehavior;
/**
* Map of extra parameters for custom features not available in this client library. The content
@@ -6470,82 +6433,84 @@ public static class Phase {
@SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
Map extraParams;
- /** All invoices will be billed using the specified settings. */
- @SerializedName("invoice_settings")
- InvoiceSettings invoiceSettings;
-
/**
- * Integer representing the multiplier applied to the price interval. For example, {@code
- * iterations=2} applied to a price with {@code interval=month} and {@code interval_count=3}
- * results in a phase of duration {@code 2 * 3 months = 6 months}. If set, {@code end_date} must
- * not be set.
- */
- @SerializedName("iterations")
- Long iterations;
-
- /**
- * Required. A list of line items the customer is being quoted for within this
- * phase. Each line item includes information about the product, the quantity, and the resulting
- * cost.
+ * The id of a subscription that the quote will update. By default, the quote will contain the
+ * state of the subscription (such as line items, collection method and billing thresholds)
+ * unless overridden.
*/
- @SerializedName("line_items")
- List lineItems;
+ @SerializedName("from_subscription")
+ String fromSubscription;
/**
- * Set of key-value pairs that will
- * declaratively set metadata on the subscription schedule's phases when the quote is accepted.
+ * Set of key-value pairs that will set
+ * metadata on the subscription or subscription schedule when the quote is accepted. If a
+ * recurring price is included in {@code line_items}, this field will be passed to the resulting
+ * subscription's {@code metadata} field. If {@code subscription_data.effective_date} is used,
+ * this field will be passed to the resulting subscription schedule's {@code phases.metadata}
+ * field. Unlike object-level metadata, this field is declarative. Updates will clear prior
+ * values.
*/
@SerializedName("metadata")
Map metadata;
/**
- * If the update changes the current phase, indicates whether the changes should be prorated.
- * The default value is {@code create_prorations}.
+ * If specified, the invoicing for the given billing cycle iterations will be processed when the
+ * quote is accepted. Cannot be used with {@code effective_date}.
*/
- @SerializedName("proration_behavior")
- ProrationBehavior prorationBehavior;
+ @SerializedName("prebilling")
+ Object prebilling;
/**
- * If set to true the entire phase is counted as a trial and the customer will not be charged
- * for any fees.
+ * Determines how to handle prorations. When
+ * creating a subscription, valid values are {@code create_prorations} or {@code none}.
+ *
+ * When updating a subscription, valid values are {@code create_prorations}, {@code none}, or
+ * {@code always_invoice}.
+ *
+ *
Passing {@code create_prorations} will cause proration invoice items to be created when
+ * applicable. These proration items will only be invoiced immediately under certain
+ * conditions. In order to always invoice immediately for prorations, pass {@code
+ * always_invoice}.
+ *
+ *
Prorations can be disabled by passing {@code none}.
*/
- @SerializedName("trial")
- Boolean trial;
+ @SerializedName("proration_behavior")
+ ProrationBehavior prorationBehavior;
/**
- * Sets the phase to trialing from the start date to this date. Must be before the phase end
- * date, can not be combined with {@code trial}.
+ * Integer representing the number of trial period days before the customer is charged for the
+ * first time.
*/
- @SerializedName("trial_end")
- Long trialEnd;
+ @SerializedName("trial_period_days")
+ Object trialPeriodDays;
- private Phase(
- BillingCycleAnchor billingCycleAnchor,
- CollectionMethod collectionMethod,
- Object defaultTaxRates,
- Object discounts,
- Long endDate,
+ private SubscriptionData(
+ BillOnAcceptance billOnAcceptance,
+ BillingBehavior billingBehavior,
+ ApiRequestParams.EnumParam billingCycleAnchor,
+ String description,
+ Object effectiveDate,
+ EndBehavior endBehavior,
Map extraParams,
- InvoiceSettings invoiceSettings,
- Long iterations,
- List lineItems,
+ String fromSubscription,
Map metadata,
+ Object prebilling,
ProrationBehavior prorationBehavior,
- Boolean trial,
- Long trialEnd) {
+ Object trialPeriodDays) {
+ this.billOnAcceptance = billOnAcceptance;
+ this.billingBehavior = billingBehavior;
this.billingCycleAnchor = billingCycleAnchor;
- this.collectionMethod = collectionMethod;
- this.defaultTaxRates = defaultTaxRates;
- this.discounts = discounts;
- this.endDate = endDate;
+ this.description = description;
+ this.effectiveDate = effectiveDate;
+ this.endBehavior = endBehavior;
this.extraParams = extraParams;
- this.invoiceSettings = invoiceSettings;
- this.iterations = iterations;
- this.lineItems = lineItems;
+ this.fromSubscription = fromSubscription;
this.metadata = metadata;
+ this.prebilling = prebilling;
this.prorationBehavior = prorationBehavior;
- this.trial = trial;
- this.trialEnd = trialEnd;
+ this.trialPeriodDays = trialPeriodDays;
}
public static Builder builder() {
@@ -6553,187 +6518,146 @@ public static Builder builder() {
}
public static class Builder {
- private BillingCycleAnchor billingCycleAnchor;
-
- private CollectionMethod collectionMethod;
+ private BillOnAcceptance billOnAcceptance;
- private Object defaultTaxRates;
+ private BillingBehavior billingBehavior;
- private Object discounts;
+ private ApiRequestParams.EnumParam billingCycleAnchor;
- private Long endDate;
+ private String description;
- private Map extraParams;
+ private Object effectiveDate;
- private InvoiceSettings invoiceSettings;
+ private EndBehavior endBehavior;
- private Long iterations;
+ private Map extraParams;
- private List lineItems;
+ private String fromSubscription;
private Map metadata;
- private ProrationBehavior prorationBehavior;
+ private Object prebilling;
- private Boolean trial;
+ private ProrationBehavior prorationBehavior;
- private Long trialEnd;
+ private Object trialPeriodDays;
/** Finalize and obtain parameter instance from this builder. */
- public QuoteCreateParams.Phase build() {
- return new QuoteCreateParams.Phase(
+ public QuoteCreateParams.SubscriptionData build() {
+ return new QuoteCreateParams.SubscriptionData(
+ this.billOnAcceptance,
+ this.billingBehavior,
this.billingCycleAnchor,
- this.collectionMethod,
- this.defaultTaxRates,
- this.discounts,
- this.endDate,
+ this.description,
+ this.effectiveDate,
+ this.endBehavior,
this.extraParams,
- this.invoiceSettings,
- this.iterations,
- this.lineItems,
+ this.fromSubscription,
this.metadata,
+ this.prebilling,
this.prorationBehavior,
- this.trial,
- this.trialEnd);
- }
-
- /**
- * When specified as {@code reset}, the subscription will always start a new billing period
- * when the quote is accepted.
- */
- public Builder setBillingCycleAnchor(
- QuoteCreateParams.Phase.BillingCycleAnchor billingCycleAnchor) {
- this.billingCycleAnchor = billingCycleAnchor;
- return this;
- }
-
- /**
- * Either {@code charge_automatically}, or {@code send_invoice}. When charging automatically,
- * Stripe will attempt to pay the underlying subscription at the end of each billing cycle
- * using the default source attached to the customer. When sending an invoice, Stripe will
- * email your customer an invoice with payment instructions and mark the subscription as
- * {@code active}. Defaults to {@code charge_automatically} on creation.
- */
- public Builder setCollectionMethod(
- QuoteCreateParams.Phase.CollectionMethod collectionMethod) {
- this.collectionMethod = collectionMethod;
- return this;
+ this.trialPeriodDays);
}
- /**
- * Add an element to `defaultTaxRates` list. A list is initialized for the first `add/addAll`
- * call, and subsequent calls adds additional elements to the original list. See {@link
- * QuoteCreateParams.Phase#defaultTaxRates} for the field documentation.
- */
- @SuppressWarnings("unchecked")
- public Builder addDefaultTaxRate(String element) {
- if (this.defaultTaxRates == null || this.defaultTaxRates instanceof EmptyParam) {
- this.defaultTaxRates = new ArrayList();
- }
- ((List) this.defaultTaxRates).add(element);
+ /** Describes the period to bill for upon accepting the quote. */
+ public Builder setBillOnAcceptance(
+ QuoteCreateParams.SubscriptionData.BillOnAcceptance billOnAcceptance) {
+ this.billOnAcceptance = billOnAcceptance;
return this;
}
/**
- * Add all elements to `defaultTaxRates` list. A list is initialized for the first
- * `add/addAll` call, and subsequent calls adds additional elements to the original list. See
- * {@link QuoteCreateParams.Phase#defaultTaxRates} for the field documentation.
+ * Configures when the subscription schedule generates prorations for phase transitions.
+ * Possible values are {@code prorate_on_next_phase} or {@code prorate_up_front} with the
+ * default being {@code prorate_on_next_phase}. {@code prorate_on_next_phase} will apply phase
+ * changes and generate prorations at transition time. {@code prorate_up_front} will bill for
+ * all phases within the current billing cycle up front.
*/
- @SuppressWarnings("unchecked")
- public Builder addAllDefaultTaxRate(List elements) {
- if (this.defaultTaxRates == null || this.defaultTaxRates instanceof EmptyParam) {
- this.defaultTaxRates = new ArrayList();
- }
- ((List) this.defaultTaxRates).addAll(elements);
+ public Builder setBillingBehavior(
+ QuoteCreateParams.SubscriptionData.BillingBehavior billingBehavior) {
+ this.billingBehavior = billingBehavior;
return this;
}
/**
- * A list of Tax Rate ids. These Tax Rates
- * will set the Subscription's {@code
- * default_tax_rates}, which means they will be the Invoice's {@code
- * default_tax_rates} for any Invoices issued by the Subscription during this Phase.
+ * When specified as {@code reset}, the subscription will always start a new billing period
+ * when the quote is accepted.
*/
- public Builder setDefaultTaxRates(EmptyParam defaultTaxRates) {
- this.defaultTaxRates = defaultTaxRates;
+ public Builder setBillingCycleAnchor(
+ QuoteCreateParams.SubscriptionData.BillingCycleAnchor billingCycleAnchor) {
+ this.billingCycleAnchor = billingCycleAnchor;
return this;
}
/**
- * A list of Tax Rate ids. These Tax Rates
- * will set the Subscription's {@code
- * default_tax_rates}, which means they will be the Invoice's {@code
- * default_tax_rates} for any Invoices issued by the Subscription during this Phase.
+ * When specified as {@code reset}, the subscription will always start a new billing period
+ * when the quote is accepted.
*/
- public Builder setDefaultTaxRates(List defaultTaxRates) {
- this.defaultTaxRates = defaultTaxRates;
+ public Builder setBillingCycleAnchor(EmptyParam billingCycleAnchor) {
+ this.billingCycleAnchor = billingCycleAnchor;
return this;
}
/**
- * Add an element to `discounts` list. A list is initialized for the first `add/addAll` call,
- * and subsequent calls adds additional elements to the original list. See {@link
- * QuoteCreateParams.Phase#discounts} for the field documentation.
+ * The subscription's description, meant to be displayable to the customer. Use this field to
+ * optionally store an explanation of the subscription for rendering in Stripe surfaces and
+ * certain local payment methods UIs.
*/
- @SuppressWarnings("unchecked")
- public Builder addDiscount(QuoteCreateParams.Phase.Discount element) {
- if (this.discounts == null || this.discounts instanceof EmptyParam) {
- this.discounts = new ArrayList();
- }
- ((List) this.discounts).add(element);
+ public Builder setDescription(String description) {
+ this.description = description;
return this;
}
/**
- * Add all elements to `discounts` list. A list is initialized for the first `add/addAll`
- * call, and subsequent calls adds additional elements to the original list. See {@link
- * QuoteCreateParams.Phase#discounts} for the field documentation.
+ * When creating a new subscription, the date of which the subscription schedule will start
+ * after the quote is accepted. When updating a subscription, the date of which the
+ * subscription will be updated using a subscription schedule. The special value {@code
+ * current_period_end} can be provided to update a subscription at the end of its current
+ * period. The {@code effective_date} is ignored if it is in the past when the quote is
+ * accepted.
*/
- @SuppressWarnings("unchecked")
- public Builder addAllDiscount(List elements) {
- if (this.discounts == null || this.discounts instanceof EmptyParam) {
- this.discounts = new ArrayList();
- }
- ((List) this.discounts).addAll(elements);
+ public Builder setEffectiveDate(
+ QuoteCreateParams.SubscriptionData.EffectiveDate effectiveDate) {
+ this.effectiveDate = effectiveDate;
return this;
}
/**
- * The coupons to redeem into discounts for the schedule phase. If not specified, inherits the
- * discount from the subscription's customer. Pass an empty string to avoid inheriting any
- * discounts.
+ * When creating a new subscription, the date of which the subscription schedule will start
+ * after the quote is accepted. When updating a subscription, the date of which the
+ * subscription will be updated using a subscription schedule. The special value {@code
+ * current_period_end} can be provided to update a subscription at the end of its current
+ * period. The {@code effective_date} is ignored if it is in the past when the quote is
+ * accepted.
*/
- public Builder setDiscounts(EmptyParam discounts) {
- this.discounts = discounts;
+ public Builder setEffectiveDate(Long effectiveDate) {
+ this.effectiveDate = effectiveDate;
return this;
}
/**
- * The coupons to redeem into discounts for the schedule phase. If not specified, inherits the
- * discount from the subscription's customer. Pass an empty string to avoid inheriting any
- * discounts.
+ * When creating a new subscription, the date of which the subscription schedule will start
+ * after the quote is accepted. When updating a subscription, the date of which the
+ * subscription will be updated using a subscription schedule. The special value {@code
+ * current_period_end} can be provided to update a subscription at the end of its current
+ * period. The {@code effective_date} is ignored if it is in the past when the quote is
+ * accepted.
*/
- public Builder setDiscounts(List discounts) {
- this.discounts = discounts;
+ public Builder setEffectiveDate(EmptyParam effectiveDate) {
+ this.effectiveDate = effectiveDate;
return this;
}
- /**
- * The date at which this phase of the quote ends. If set, {@code iterations} must not be set.
- */
- public Builder setEndDate(Long endDate) {
- this.endDate = endDate;
+ /** Behavior of the subscription schedule and underlying subscription when it ends. */
+ public Builder setEndBehavior(QuoteCreateParams.SubscriptionData.EndBehavior endBehavior) {
+ this.endBehavior = endBehavior;
return this;
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
* call, and subsequent calls add additional key/value pairs to the original map. See {@link
- * QuoteCreateParams.Phase#extraParams} for the field documentation.
+ * QuoteCreateParams.SubscriptionData#extraParams} for the field documentation.
*/
public Builder putExtraParam(String key, Object value) {
if (this.extraParams == null) {
@@ -6746,7 +6670,7 @@ public Builder putExtraParam(String key, Object value) {
/**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
- * See {@link QuoteCreateParams.Phase#extraParams} for the field documentation.
+ * See {@link QuoteCreateParams.SubscriptionData#extraParams} for the field documentation.
*/
public Builder putAllExtraParam(Map map) {
if (this.extraParams == null) {
@@ -6756,1825 +6680,6 @@ public Builder putAllExtraParam(Map map) {
return this;
}
- /** All invoices will be billed using the specified settings. */
- public Builder setInvoiceSettings(QuoteCreateParams.Phase.InvoiceSettings invoiceSettings) {
- this.invoiceSettings = invoiceSettings;
- return this;
- }
-
- /**
- * Integer representing the multiplier applied to the price interval. For example, {@code
- * iterations=2} applied to a price with {@code interval=month} and {@code interval_count=3}
- * results in a phase of duration {@code 2 * 3 months = 6 months}. If set, {@code end_date}
- * must not be set.
- */
- public Builder setIterations(Long iterations) {
- this.iterations = iterations;
- return this;
- }
-
- /**
- * Add an element to `lineItems` list. A list is initialized for the first `add/addAll` call,
- * and subsequent calls adds additional elements to the original list. See {@link
- * QuoteCreateParams.Phase#lineItems} for the field documentation.
- */
- public Builder addLineItem(QuoteCreateParams.Phase.LineItem element) {
- if (this.lineItems == null) {
- this.lineItems = new ArrayList<>();
- }
- this.lineItems.add(element);
- return this;
- }
-
- /**
- * Add all elements to `lineItems` list. A list is initialized for the first `add/addAll`
- * call, and subsequent calls adds additional elements to the original list. See {@link
- * QuoteCreateParams.Phase#lineItems} for the field documentation.
- */
- public Builder addAllLineItem(List elements) {
- if (this.lineItems == null) {
- this.lineItems = new ArrayList<>();
- }
- this.lineItems.addAll(elements);
- 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
- * QuoteCreateParams.Phase#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 QuoteCreateParams.Phase#metadata} for the field documentation.
- */
- public Builder putAllMetadata(Map map) {
- if (this.metadata == null) {
- this.metadata = new HashMap<>();
- }
- this.metadata.putAll(map);
- return this;
- }
-
- /**
- * If the update changes the current phase, indicates whether the changes should be prorated.
- * The default value is {@code create_prorations}.
- */
- public Builder setProrationBehavior(
- QuoteCreateParams.Phase.ProrationBehavior prorationBehavior) {
- this.prorationBehavior = prorationBehavior;
- return this;
- }
-
- /**
- * If set to true the entire phase is counted as a trial and the customer will not be charged
- * for any fees.
- */
- public Builder setTrial(Boolean trial) {
- this.trial = trial;
- return this;
- }
-
- /**
- * Sets the phase to trialing from the start date to this date. Must be before the phase end
- * date, can not be combined with {@code trial}.
- */
- public Builder setTrialEnd(Long trialEnd) {
- this.trialEnd = trialEnd;
- return this;
- }
- }
-
- @Getter
- public static class Discount {
- /** ID of the coupon to create a new discount for. */
- @SerializedName("coupon")
- String coupon;
-
- /** ID of an existing discount on the object (or one of its ancestors) to reuse. */
- @SerializedName("discount")
- String discount;
-
- /** Details to determine how long the discount should be applied for. */
- @SerializedName("discount_end")
- DiscountEnd discountEnd;
-
- /**
- * Map of extra parameters for custom features not available in this client library. The
- * content in this map is not serialized under this field's {@code @SerializedName} value.
- * Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
- * name in this param object. Effectively, this map is flattened to its parent instance.
- */
- @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
- Map extraParams;
-
- /** ID of the promotion code to create a new discount for. */
- @SerializedName("promotion_code")
- String promotionCode;
-
- private Discount(
- String coupon,
- String discount,
- DiscountEnd discountEnd,
- Map extraParams,
- String promotionCode) {
- this.coupon = coupon;
- this.discount = discount;
- this.discountEnd = discountEnd;
- this.extraParams = extraParams;
- this.promotionCode = promotionCode;
- }
-
- public static Builder builder() {
- return new Builder();
- }
-
- public static class Builder {
- private String coupon;
-
- private String discount;
-
- private DiscountEnd discountEnd;
-
- private Map extraParams;
-
- private String promotionCode;
-
- /** Finalize and obtain parameter instance from this builder. */
- public QuoteCreateParams.Phase.Discount build() {
- return new QuoteCreateParams.Phase.Discount(
- this.coupon, this.discount, this.discountEnd, this.extraParams, this.promotionCode);
- }
-
- /** ID of the coupon to create a new discount for. */
- public Builder setCoupon(String coupon) {
- this.coupon = coupon;
- return this;
- }
-
- /** ID of an existing discount on the object (or one of its ancestors) to reuse. */
- public Builder setDiscount(String discount) {
- this.discount = discount;
- return this;
- }
-
- /** Details to determine how long the discount should be applied for. */
- public Builder setDiscountEnd(QuoteCreateParams.Phase.Discount.DiscountEnd discountEnd) {
- this.discountEnd = discountEnd;
- return this;
- }
-
- /**
- * Add a key/value pair to `extraParams` map. A map is initialized for the first
- * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
- * map. See {@link QuoteCreateParams.Phase.Discount#extraParams} for the field
- * documentation.
- */
- public Builder putExtraParam(String key, Object value) {
- if (this.extraParams == null) {
- this.extraParams = new HashMap<>();
- }
- this.extraParams.put(key, value);
- return this;
- }
-
- /**
- * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
- * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
- * map. See {@link QuoteCreateParams.Phase.Discount#extraParams} for the field
- * documentation.
- */
- public Builder putAllExtraParam(Map map) {
- if (this.extraParams == null) {
- this.extraParams = new HashMap<>();
- }
- this.extraParams.putAll(map);
- return this;
- }
-
- /** ID of the promotion code to create a new discount for. */
- public Builder setPromotionCode(String promotionCode) {
- this.promotionCode = promotionCode;
- return this;
- }
- }
-
- @Getter
- public static class DiscountEnd {
- /** Time span for the redeemed discount. */
- @SerializedName("duration")
- Duration duration;
-
- /**
- * Map of extra parameters for custom features not available in this client library. The
- * content in this map is not serialized under this field's {@code @SerializedName} value.
- * Instead, each key/value pair is serialized as if the key is a root-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 precise Unix timestamp for the discount to end. Must be in the future. */
- @SerializedName("timestamp")
- Long timestamp;
-
- /**
- * Required. The type of calculation made to determine when the discount
- * ends.
- */
- @SerializedName("type")
- Type type;
-
- private DiscountEnd(
- Duration duration, Map extraParams, Long timestamp, Type type) {
- this.duration = duration;
- this.extraParams = extraParams;
- this.timestamp = timestamp;
- this.type = type;
- }
-
- public static Builder builder() {
- return new Builder();
- }
-
- public static class Builder {
- private Duration duration;
-
- private Map extraParams;
-
- private Long timestamp;
-
- private Type type;
-
- /** Finalize and obtain parameter instance from this builder. */
- public QuoteCreateParams.Phase.Discount.DiscountEnd build() {
- return new QuoteCreateParams.Phase.Discount.DiscountEnd(
- this.duration, this.extraParams, this.timestamp, this.type);
- }
-
- /** Time span for the redeemed discount. */
- public Builder setDuration(
- QuoteCreateParams.Phase.Discount.DiscountEnd.Duration duration) {
- this.duration = duration;
- return this;
- }
-
- /**
- * Add a key/value pair to `extraParams` map. A map is initialized for the first
- * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
- * map. See {@link QuoteCreateParams.Phase.Discount.DiscountEnd#extraParams} for the field
- * documentation.
- */
- public Builder putExtraParam(String key, Object value) {
- if (this.extraParams == null) {
- this.extraParams = new HashMap<>();
- }
- this.extraParams.put(key, value);
- return this;
- }
-
- /**
- * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
- * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
- * map. See {@link QuoteCreateParams.Phase.Discount.DiscountEnd#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 precise Unix timestamp for the discount to end. Must be in the future. */
- public Builder setTimestamp(Long timestamp) {
- this.timestamp = timestamp;
- return this;
- }
-
- /**
- * Required. The type of calculation made to determine when the discount
- * ends.
- */
- public Builder setType(QuoteCreateParams.Phase.Discount.DiscountEnd.Type type) {
- this.type = type;
- return this;
- }
- }
-
- @Getter
- public static class Duration {
- /**
- * Map of extra parameters for custom features not available in this client library. The
- * content in this map is not serialized under this field's {@code @SerializedName} value.
- * Instead, each key/value pair is serialized as if the key is a root-level field
- * (serialized) name in this param object. Effectively, this map is flattened to its
- * parent instance.
- */
- @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
- Map extraParams;
-
- /**
- * Required. Specifies a type of interval unit. Either {@code day},
- * {@code week}, {@code month} or {@code year}.
- */
- @SerializedName("interval")
- Interval interval;
-
- /**
- * Required. The number of intervals, as an whole number greater than 0.
- * Stripe multiplies this by the interval type to get the overall duration.
- */
- @SerializedName("interval_count")
- Long intervalCount;
-
- private Duration(Map extraParams, Interval interval, Long intervalCount) {
- this.extraParams = extraParams;
- this.interval = interval;
- this.intervalCount = intervalCount;
- }
-
- public static Builder builder() {
- return new Builder();
- }
-
- public static class Builder {
- private Map extraParams;
-
- private Interval interval;
-
- private Long intervalCount;
-
- /** Finalize and obtain parameter instance from this builder. */
- public QuoteCreateParams.Phase.Discount.DiscountEnd.Duration build() {
- return new QuoteCreateParams.Phase.Discount.DiscountEnd.Duration(
- this.extraParams, this.interval, this.intervalCount);
- }
-
- /**
- * Add a key/value pair to `extraParams` map. A map is initialized for the first
- * `put/putAll` call, and subsequent calls add additional key/value pairs to the
- * original map. See {@link
- * QuoteCreateParams.Phase.Discount.DiscountEnd.Duration#extraParams} for the field
- * documentation.
- */
- public Builder putExtraParam(String key, Object value) {
- if (this.extraParams == null) {
- this.extraParams = new HashMap<>();
- }
- this.extraParams.put(key, value);
- return this;
- }
-
- /**
- * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
- * `put/putAll` call, and subsequent calls add additional key/value pairs to the
- * original map. See {@link
- * QuoteCreateParams.Phase.Discount.DiscountEnd.Duration#extraParams} for the field
- * documentation.
- */
- public Builder putAllExtraParam(Map map) {
- if (this.extraParams == null) {
- this.extraParams = new HashMap<>();
- }
- this.extraParams.putAll(map);
- return this;
- }
-
- /**
- * Required. Specifies a type of interval unit. Either {@code day},
- * {@code week}, {@code month} or {@code year}.
- */
- public Builder setInterval(
- QuoteCreateParams.Phase.Discount.DiscountEnd.Duration.Interval interval) {
- this.interval = interval;
- return this;
- }
-
- /**
- * Required. The number of intervals, as an whole number greater than
- * 0. Stripe multiplies this by the interval type to get the overall duration.
- */
- public Builder setIntervalCount(Long intervalCount) {
- this.intervalCount = intervalCount;
- return this;
- }
- }
-
- public enum Interval implements ApiRequestParams.EnumParam {
- @SerializedName("day")
- DAY("day"),
-
- @SerializedName("month")
- MONTH("month"),
-
- @SerializedName("week")
- WEEK("week"),
-
- @SerializedName("year")
- YEAR("year");
-
- @Getter(onMethod_ = {@Override})
- private final String value;
-
- Interval(String value) {
- this.value = value;
- }
- }
- }
-
- public enum Type implements ApiRequestParams.EnumParam {
- @SerializedName("duration")
- DURATION("duration"),
-
- @SerializedName("timestamp")
- TIMESTAMP("timestamp");
-
- @Getter(onMethod_ = {@Override})
- private final String value;
-
- Type(String value) {
- this.value = value;
- }
- }
- }
- }
-
- @Getter
- public static class InvoiceSettings {
- /**
- * Number of days within which a customer must pay invoices generated by this subscription
- * schedule. This value will be {@code null} for subscription schedules where {@code
- * billing=charge_automatically}.
- */
- @SerializedName("days_until_due")
- Long daysUntilDue;
-
- /**
- * Map of extra parameters for custom features not available in this client library. The
- * content in this map is not serialized under this field's {@code @SerializedName} value.
- * Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
- * name in this param object. Effectively, this map is flattened to its parent instance.
- */
- @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
- Map extraParams;
-
- private InvoiceSettings(Long daysUntilDue, Map extraParams) {
- this.daysUntilDue = daysUntilDue;
- this.extraParams = extraParams;
- }
-
- public static Builder builder() {
- return new Builder();
- }
-
- public static class Builder {
- private Long daysUntilDue;
-
- private Map extraParams;
-
- /** Finalize and obtain parameter instance from this builder. */
- public QuoteCreateParams.Phase.InvoiceSettings build() {
- return new QuoteCreateParams.Phase.InvoiceSettings(this.daysUntilDue, this.extraParams);
- }
-
- /**
- * Number of days within which a customer must pay invoices generated by this subscription
- * schedule. This value will be {@code null} for subscription schedules where {@code
- * billing=charge_automatically}.
- */
- public Builder setDaysUntilDue(Long daysUntilDue) {
- this.daysUntilDue = daysUntilDue;
- return this;
- }
-
- /**
- * Add a key/value pair to `extraParams` map. A map is initialized for the first
- * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
- * map. See {@link QuoteCreateParams.Phase.InvoiceSettings#extraParams} for the field
- * documentation.
- */
- public Builder putExtraParam(String key, Object value) {
- if (this.extraParams == null) {
- this.extraParams = new HashMap<>();
- }
- this.extraParams.put(key, value);
- return this;
- }
-
- /**
- * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
- * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
- * map. See {@link QuoteCreateParams.Phase.InvoiceSettings#extraParams} for the field
- * documentation.
- */
- public Builder putAllExtraParam(Map map) {
- if (this.extraParams == null) {
- this.extraParams = new HashMap<>();
- }
- this.extraParams.putAll(map);
- return this;
- }
- }
- }
-
- @Getter
- public static class LineItem {
- /** The discounts applied to this line item. */
- @SerializedName("discounts")
- Object discounts;
-
- /**
- * Map of extra parameters for custom features not available in this client library. The
- * content in this map is not serialized under this field's {@code @SerializedName} value.
- * Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
- * name in this param object. Effectively, this map is flattened to its parent instance.
- */
- @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
- Map extraParams;
-
- /** The ID of the price object. One of {@code price} or {@code price_data} is required. */
- @SerializedName("price")
- String price;
-
- /**
- * Data used to generate a new Price object
- * inline. One of {@code price} or {@code price_data} is required.
- */
- @SerializedName("price_data")
- PriceData priceData;
-
- /** The quantity of the line item. */
- @SerializedName("quantity")
- Long quantity;
-
- /**
- * The tax rates which apply to the line item. When set, the {@code default_tax_rates} on the
- * quote do not apply to this line item.
- */
- @SerializedName("tax_rates")
- Object taxRates;
-
- private LineItem(
- Object discounts,
- Map extraParams,
- String price,
- PriceData priceData,
- Long quantity,
- Object taxRates) {
- this.discounts = discounts;
- this.extraParams = extraParams;
- this.price = price;
- this.priceData = priceData;
- this.quantity = quantity;
- this.taxRates = taxRates;
- }
-
- public static Builder builder() {
- return new Builder();
- }
-
- public static class Builder {
- private Object discounts;
-
- private Map extraParams;
-
- private String price;
-
- private PriceData priceData;
-
- private Long quantity;
-
- private Object taxRates;
-
- /** Finalize and obtain parameter instance from this builder. */
- public QuoteCreateParams.Phase.LineItem build() {
- return new QuoteCreateParams.Phase.LineItem(
- this.discounts,
- this.extraParams,
- this.price,
- this.priceData,
- this.quantity,
- this.taxRates);
- }
-
- /**
- * Add an element to `discounts` list. A list is initialized for the first `add/addAll`
- * call, and subsequent calls adds additional elements to the original list. See {@link
- * QuoteCreateParams.Phase.LineItem#discounts} for the field documentation.
- */
- @SuppressWarnings("unchecked")
- public Builder addDiscount(QuoteCreateParams.Phase.LineItem.Discount element) {
- if (this.discounts == null || this.discounts instanceof EmptyParam) {
- this.discounts = new ArrayList();
- }
- ((List) this.discounts).add(element);
- return this;
- }
-
- /**
- * Add all elements to `discounts` list. A list is initialized for the first `add/addAll`
- * call, and subsequent calls adds additional elements to the original list. See {@link
- * QuoteCreateParams.Phase.LineItem#discounts} for the field documentation.
- */
- @SuppressWarnings("unchecked")
- public Builder addAllDiscount(List elements) {
- if (this.discounts == null || this.discounts instanceof EmptyParam) {
- this.discounts = new ArrayList();
- }
- ((List) this.discounts).addAll(elements);
- return this;
- }
-
- /** The discounts applied to this line item. */
- public Builder setDiscounts(EmptyParam discounts) {
- this.discounts = discounts;
- return this;
- }
-
- /** The discounts applied to this line item. */
- public Builder setDiscounts(List discounts) {
- this.discounts = discounts;
- return this;
- }
-
- /**
- * Add a key/value pair to `extraParams` map. A map is initialized for the first
- * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
- * map. See {@link QuoteCreateParams.Phase.LineItem#extraParams} for the field
- * documentation.
- */
- public Builder putExtraParam(String key, Object value) {
- if (this.extraParams == null) {
- this.extraParams = new HashMap<>();
- }
- this.extraParams.put(key, value);
- return this;
- }
-
- /**
- * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
- * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
- * map. See {@link QuoteCreateParams.Phase.LineItem#extraParams} for the field
- * documentation.
- */
- public Builder putAllExtraParam(Map map) {
- if (this.extraParams == null) {
- this.extraParams = new HashMap<>();
- }
- this.extraParams.putAll(map);
- return this;
- }
-
- /** The ID of the price object. One of {@code price} or {@code price_data} is required. */
- public Builder setPrice(String price) {
- this.price = price;
- return this;
- }
-
- /**
- * Data used to generate a new Price object
- * inline. One of {@code price} or {@code price_data} is required.
- */
- public Builder setPriceData(QuoteCreateParams.Phase.LineItem.PriceData priceData) {
- this.priceData = priceData;
- return this;
- }
-
- /** The quantity of the line item. */
- public Builder setQuantity(Long quantity) {
- this.quantity = quantity;
- return this;
- }
-
- /**
- * Add an element to `taxRates` list. A list is initialized for the first `add/addAll` call,
- * and subsequent calls adds additional elements to the original list. See {@link
- * QuoteCreateParams.Phase.LineItem#taxRates} for the field documentation.
- */
- @SuppressWarnings("unchecked")
- public Builder addTaxRate(String element) {
- if (this.taxRates == null || this.taxRates instanceof EmptyParam) {
- this.taxRates = new ArrayList();
- }
- ((List) this.taxRates).add(element);
- return this;
- }
-
- /**
- * Add all elements to `taxRates` list. A list is initialized for the first `add/addAll`
- * call, and subsequent calls adds additional elements to the original list. See {@link
- * QuoteCreateParams.Phase.LineItem#taxRates} for the field documentation.
- */
- @SuppressWarnings("unchecked")
- public Builder addAllTaxRate(List elements) {
- if (this.taxRates == null || this.taxRates instanceof EmptyParam) {
- this.taxRates = new ArrayList();
- }
- ((List) this.taxRates).addAll(elements);
- return this;
- }
-
- /**
- * The tax rates which apply to the line item. When set, the {@code default_tax_rates} on
- * the quote do not apply to this line item.
- */
- public Builder setTaxRates(EmptyParam taxRates) {
- this.taxRates = taxRates;
- return this;
- }
-
- /**
- * The tax rates which apply to the line item. When set, the {@code default_tax_rates} on
- * the quote do not apply to this line item.
- */
- public Builder setTaxRates(List taxRates) {
- this.taxRates = taxRates;
- return this;
- }
- }
-
- @Getter
- public static class Discount {
- /** ID of the coupon to create a new discount for. */
- @SerializedName("coupon")
- String coupon;
-
- /** ID of an existing discount on the object (or one of its ancestors) to reuse. */
- @SerializedName("discount")
- String discount;
-
- /** Details to determine how long the discount should be applied for. */
- @SerializedName("discount_end")
- DiscountEnd discountEnd;
-
- /**
- * Map of extra parameters for custom features not available in this client library. The
- * content in this map is not serialized under this field's {@code @SerializedName} value.
- * Instead, each key/value pair is serialized as if the key is a root-level field
- * (serialized) name in this param object. Effectively, this map is flattened to its parent
- * instance.
- */
- @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
- Map extraParams;
-
- /** ID of the promotion code to create a new discount for. */
- @SerializedName("promotion_code")
- String promotionCode;
-
- private Discount(
- String coupon,
- String discount,
- DiscountEnd discountEnd,
- Map extraParams,
- String promotionCode) {
- this.coupon = coupon;
- this.discount = discount;
- this.discountEnd = discountEnd;
- this.extraParams = extraParams;
- this.promotionCode = promotionCode;
- }
-
- public static Builder builder() {
- return new Builder();
- }
-
- public static class Builder {
- private String coupon;
-
- private String discount;
-
- private DiscountEnd discountEnd;
-
- private Map extraParams;
-
- private String promotionCode;
-
- /** Finalize and obtain parameter instance from this builder. */
- public QuoteCreateParams.Phase.LineItem.Discount build() {
- return new QuoteCreateParams.Phase.LineItem.Discount(
- this.coupon, this.discount, this.discountEnd, this.extraParams, this.promotionCode);
- }
-
- /** ID of the coupon to create a new discount for. */
- public Builder setCoupon(String coupon) {
- this.coupon = coupon;
- return this;
- }
-
- /** ID of an existing discount on the object (or one of its ancestors) to reuse. */
- public Builder setDiscount(String discount) {
- this.discount = discount;
- return this;
- }
-
- /** Details to determine how long the discount should be applied for. */
- public Builder setDiscountEnd(
- QuoteCreateParams.Phase.LineItem.Discount.DiscountEnd discountEnd) {
- this.discountEnd = discountEnd;
- return this;
- }
-
- /**
- * Add a key/value pair to `extraParams` map. A map is initialized for the first
- * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
- * map. See {@link QuoteCreateParams.Phase.LineItem.Discount#extraParams} for the field
- * documentation.
- */
- public Builder putExtraParam(String key, Object value) {
- if (this.extraParams == null) {
- this.extraParams = new HashMap<>();
- }
- this.extraParams.put(key, value);
- return this;
- }
-
- /**
- * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
- * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
- * map. See {@link QuoteCreateParams.Phase.LineItem.Discount#extraParams} for the field
- * documentation.
- */
- public Builder putAllExtraParam(Map map) {
- if (this.extraParams == null) {
- this.extraParams = new HashMap<>();
- }
- this.extraParams.putAll(map);
- return this;
- }
-
- /** ID of the promotion code to create a new discount for. */
- public Builder setPromotionCode(String promotionCode) {
- this.promotionCode = promotionCode;
- return this;
- }
- }
-
- @Getter
- public static class DiscountEnd {
- /** Time span for the redeemed discount. */
- @SerializedName("duration")
- Duration duration;
-
- /**
- * Map of extra parameters for custom features not available in this client library. The
- * content in this map is not serialized under this field's {@code @SerializedName} value.
- * Instead, each key/value pair is serialized as if the key is a root-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 precise Unix timestamp for the discount to end. Must be in the future. */
- @SerializedName("timestamp")
- Long timestamp;
-
- /**
- * Required. The type of calculation made to determine when the discount
- * ends.
- */
- @SerializedName("type")
- Type type;
-
- private DiscountEnd(
- Duration duration, Map extraParams, Long timestamp, Type type) {
- this.duration = duration;
- this.extraParams = extraParams;
- this.timestamp = timestamp;
- this.type = type;
- }
-
- public static Builder builder() {
- return new Builder();
- }
-
- public static class Builder {
- private Duration duration;
-
- private Map extraParams;
-
- private Long timestamp;
-
- private Type type;
-
- /** Finalize and obtain parameter instance from this builder. */
- public QuoteCreateParams.Phase.LineItem.Discount.DiscountEnd build() {
- return new QuoteCreateParams.Phase.LineItem.Discount.DiscountEnd(
- this.duration, this.extraParams, this.timestamp, this.type);
- }
-
- /** Time span for the redeemed discount. */
- public Builder setDuration(
- QuoteCreateParams.Phase.LineItem.Discount.DiscountEnd.Duration duration) {
- this.duration = duration;
- return this;
- }
-
- /**
- * Add a key/value pair to `extraParams` map. A map is initialized for the first
- * `put/putAll` call, and subsequent calls add additional key/value pairs to the
- * original map. See {@link
- * QuoteCreateParams.Phase.LineItem.Discount.DiscountEnd#extraParams} for the field
- * documentation.
- */
- public Builder putExtraParam(String key, Object value) {
- if (this.extraParams == null) {
- this.extraParams = new HashMap<>();
- }
- this.extraParams.put(key, value);
- return this;
- }
-
- /**
- * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
- * `put/putAll` call, and subsequent calls add additional key/value pairs to the
- * original map. See {@link
- * QuoteCreateParams.Phase.LineItem.Discount.DiscountEnd#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 precise Unix timestamp for the discount to end. Must be in the future. */
- public Builder setTimestamp(Long timestamp) {
- this.timestamp = timestamp;
- return this;
- }
-
- /**
- * Required. The type of calculation made to determine when the
- * discount ends.
- */
- public Builder setType(
- QuoteCreateParams.Phase.LineItem.Discount.DiscountEnd.Type type) {
- this.type = type;
- return this;
- }
- }
-
- @Getter
- public static class Duration {
- /**
- * Map of extra parameters for custom features not available in this client library. The
- * content in this map is not serialized under this field's {@code @SerializedName}
- * value. Instead, each key/value pair is serialized as if the key is a root-level field
- * (serialized) name in this param object. Effectively, this map is flattened to its
- * parent instance.
- */
- @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
- Map extraParams;
-
- /**
- * Required. Specifies a type of interval unit. Either {@code day},
- * {@code week}, {@code month} or {@code year}.
- */
- @SerializedName("interval")
- Interval interval;
-
- /**
- * Required. The number of intervals, as an whole number greater than
- * 0. Stripe multiplies this by the interval type to get the overall duration.
- */
- @SerializedName("interval_count")
- Long intervalCount;
-
- private Duration(
- Map extraParams, Interval interval, Long intervalCount) {
- this.extraParams = extraParams;
- this.interval = interval;
- this.intervalCount = intervalCount;
- }
-
- public static Builder builder() {
- return new Builder();
- }
-
- public static class Builder {
- private Map extraParams;
-
- private Interval interval;
-
- private Long intervalCount;
-
- /** Finalize and obtain parameter instance from this builder. */
- public QuoteCreateParams.Phase.LineItem.Discount.DiscountEnd.Duration build() {
- return new QuoteCreateParams.Phase.LineItem.Discount.DiscountEnd.Duration(
- this.extraParams, this.interval, this.intervalCount);
- }
-
- /**
- * Add a key/value pair to `extraParams` map. A map is initialized for the first
- * `put/putAll` call, and subsequent calls add additional key/value pairs to the
- * original map. See {@link
- * QuoteCreateParams.Phase.LineItem.Discount.DiscountEnd.Duration#extraParams} for the
- * field documentation.
- */
- public Builder putExtraParam(String key, Object value) {
- if (this.extraParams == null) {
- this.extraParams = new HashMap<>();
- }
- this.extraParams.put(key, value);
- return this;
- }
-
- /**
- * Add all map key/value pairs to `extraParams` map. A map is initialized for the
- * first `put/putAll` call, and subsequent calls add additional key/value pairs to the
- * original map. See {@link
- * QuoteCreateParams.Phase.LineItem.Discount.DiscountEnd.Duration#extraParams} for the
- * field documentation.
- */
- public Builder putAllExtraParam(Map map) {
- if (this.extraParams == null) {
- this.extraParams = new HashMap<>();
- }
- this.extraParams.putAll(map);
- return this;
- }
-
- /**
- * Required. Specifies a type of interval unit. Either {@code day},
- * {@code week}, {@code month} or {@code year}.
- */
- public Builder setInterval(
- QuoteCreateParams.Phase.LineItem.Discount.DiscountEnd.Duration.Interval
- interval) {
- this.interval = interval;
- return this;
- }
-
- /**
- * Required. The number of intervals, as an whole number greater than
- * 0. Stripe multiplies this by the interval type to get the overall duration.
- */
- public Builder setIntervalCount(Long intervalCount) {
- this.intervalCount = intervalCount;
- return this;
- }
- }
-
- public enum Interval implements ApiRequestParams.EnumParam {
- @SerializedName("day")
- DAY("day"),
-
- @SerializedName("month")
- MONTH("month"),
-
- @SerializedName("week")
- WEEK("week"),
-
- @SerializedName("year")
- YEAR("year");
-
- @Getter(onMethod_ = {@Override})
- private final String value;
-
- Interval(String value) {
- this.value = value;
- }
- }
- }
-
- public enum Type implements ApiRequestParams.EnumParam {
- @SerializedName("duration")
- DURATION("duration"),
-
- @SerializedName("timestamp")
- TIMESTAMP("timestamp");
-
- @Getter(onMethod_ = {@Override})
- private final String value;
-
- Type(String value) {
- this.value = value;
- }
- }
- }
- }
-
- @Getter
- public static class PriceData {
- /**
- * Required. Three-letter ISO currency code, in
- * lowercase. Must be a supported currency.
- */
- @SerializedName("currency")
- String currency;
-
- /**
- * Map of extra parameters for custom features not available in this client library. The
- * content in this map is not serialized under this field's {@code @SerializedName} value.
- * Instead, each key/value pair is serialized as if the key is a root-level field
- * (serialized) name in this param object. Effectively, this map is flattened to its parent
- * instance.
- */
- @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
- Map extraParams;
-
- /** Required. The ID of the product that this price will belong to. */
- @SerializedName("product")
- String product;
-
- /**
- * The recurring components of a price such as {@code interval} and {@code interval_count}.
- */
- @SerializedName("recurring")
- Recurring recurring;
-
- /**
- * Only required if a default
- * tax behavior was not provided in the Stripe Tax settings. Specifies whether the price
- * is considered inclusive of taxes or exclusive of taxes. One of {@code inclusive}, {@code
- * exclusive}, or {@code unspecified}. Once specified as either {@code inclusive} or {@code
- * exclusive}, it cannot be changed.
- */
- @SerializedName("tax_behavior")
- TaxBehavior taxBehavior;
-
- /**
- * A positive integer in cents (or local equivalent) (or 0 for a free price) representing
- * how much to charge.
- */
- @SerializedName("unit_amount")
- Long unitAmount;
-
- /**
- * Same as {@code unit_amount}, but accepts a decimal value in cents (or local equivalent)
- * with at most 12 decimal places. Only one of {@code unit_amount} and {@code
- * unit_amount_decimal} can be set.
- */
- @SerializedName("unit_amount_decimal")
- BigDecimal unitAmountDecimal;
-
- private PriceData(
- String currency,
- Map extraParams,
- String product,
- Recurring recurring,
- TaxBehavior taxBehavior,
- Long unitAmount,
- BigDecimal unitAmountDecimal) {
- this.currency = currency;
- this.extraParams = extraParams;
- this.product = product;
- this.recurring = recurring;
- this.taxBehavior = taxBehavior;
- this.unitAmount = unitAmount;
- this.unitAmountDecimal = unitAmountDecimal;
- }
-
- public static Builder builder() {
- return new Builder();
- }
-
- public static class Builder {
- private String currency;
-
- private Map extraParams;
-
- private String product;
-
- private Recurring recurring;
-
- private TaxBehavior taxBehavior;
-
- private Long unitAmount;
-
- private BigDecimal unitAmountDecimal;
-
- /** Finalize and obtain parameter instance from this builder. */
- public QuoteCreateParams.Phase.LineItem.PriceData build() {
- return new QuoteCreateParams.Phase.LineItem.PriceData(
- this.currency,
- this.extraParams,
- this.product,
- this.recurring,
- this.taxBehavior,
- this.unitAmount,
- this.unitAmountDecimal);
- }
-
- /**
- * Required. Three-letter ISO currency code, in
- * lowercase. Must be a supported
- * currency.
- */
- public Builder setCurrency(String currency) {
- this.currency = currency;
- return this;
- }
-
- /**
- * Add a key/value pair to `extraParams` map. A map is initialized for the first
- * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
- * map. See {@link QuoteCreateParams.Phase.LineItem.PriceData#extraParams} for the field
- * documentation.
- */
- public Builder putExtraParam(String key, Object value) {
- if (this.extraParams == null) {
- this.extraParams = new HashMap<>();
- }
- this.extraParams.put(key, value);
- return this;
- }
-
- /**
- * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
- * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
- * map. See {@link QuoteCreateParams.Phase.LineItem.PriceData#extraParams} for the field
- * documentation.
- */
- public Builder putAllExtraParam(Map map) {
- if (this.extraParams == null) {
- this.extraParams = new HashMap<>();
- }
- this.extraParams.putAll(map);
- return this;
- }
-
- /** Required. The ID of the product that this price will belong to. */
- public Builder setProduct(String product) {
- this.product = product;
- return this;
- }
-
- /**
- * The recurring components of a price such as {@code interval} and {@code
- * interval_count}.
- */
- public Builder setRecurring(
- QuoteCreateParams.Phase.LineItem.PriceData.Recurring recurring) {
- this.recurring = recurring;
- return this;
- }
-
- /**
- * Only required if a default
- * tax behavior was not provided in the Stripe Tax settings. Specifies whether the
- * price is considered inclusive of taxes or exclusive of taxes. One of {@code inclusive},
- * {@code exclusive}, or {@code unspecified}. Once specified as either {@code inclusive}
- * or {@code exclusive}, it cannot be changed.
- */
- public Builder setTaxBehavior(
- QuoteCreateParams.Phase.LineItem.PriceData.TaxBehavior taxBehavior) {
- this.taxBehavior = taxBehavior;
- return this;
- }
-
- /**
- * A positive integer in cents (or local equivalent) (or 0 for a free price) representing
- * how much to charge.
- */
- public Builder setUnitAmount(Long unitAmount) {
- this.unitAmount = unitAmount;
- return this;
- }
-
- /**
- * Same as {@code unit_amount}, but accepts a decimal value in cents (or local equivalent)
- * with at most 12 decimal places. Only one of {@code unit_amount} and {@code
- * unit_amount_decimal} can be set.
- */
- public Builder setUnitAmountDecimal(BigDecimal unitAmountDecimal) {
- this.unitAmountDecimal = unitAmountDecimal;
- return this;
- }
- }
-
- @Getter
- public static class Recurring {
- /**
- * Map of extra parameters for custom features not available in this client library. The
- * content in this map is not serialized under this field's {@code @SerializedName} value.
- * Instead, each key/value pair is serialized as if the key is a root-level field
- * (serialized) name in this param object. Effectively, this map is flattened to its
- * parent instance.
- */
- @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
- Map extraParams;
-
- /**
- * Required. Specifies billing frequency. Either {@code day}, {@code
- * week}, {@code month} or {@code year}.
- */
- @SerializedName("interval")
- Interval interval;
-
- /**
- * The number of intervals between subscription billings. For example, {@code
- * interval=month} and {@code interval_count=3} bills every 3 months. Maximum of three
- * years interval allowed (3 years, 36 months, or 156 weeks).
- */
- @SerializedName("interval_count")
- Long intervalCount;
-
- private Recurring(
- Map extraParams, Interval interval, Long intervalCount) {
- this.extraParams = extraParams;
- this.interval = interval;
- this.intervalCount = intervalCount;
- }
-
- public static Builder builder() {
- return new Builder();
- }
-
- public static class Builder {
- private Map extraParams;
-
- private Interval interval;
-
- private Long intervalCount;
-
- /** Finalize and obtain parameter instance from this builder. */
- public QuoteCreateParams.Phase.LineItem.PriceData.Recurring build() {
- return new QuoteCreateParams.Phase.LineItem.PriceData.Recurring(
- this.extraParams, this.interval, this.intervalCount);
- }
-
- /**
- * Add a key/value pair to `extraParams` map. A map is initialized for the first
- * `put/putAll` call, and subsequent calls add additional key/value pairs to the
- * original map. See {@link
- * QuoteCreateParams.Phase.LineItem.PriceData.Recurring#extraParams} for the field
- * documentation.
- */
- public Builder putExtraParam(String key, Object value) {
- if (this.extraParams == null) {
- this.extraParams = new HashMap<>();
- }
- this.extraParams.put(key, value);
- return this;
- }
-
- /**
- * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
- * `put/putAll` call, and subsequent calls add additional key/value pairs to the
- * original map. See {@link
- * QuoteCreateParams.Phase.LineItem.PriceData.Recurring#extraParams} for the field
- * documentation.
- */
- public Builder putAllExtraParam(Map map) {
- if (this.extraParams == null) {
- this.extraParams = new HashMap<>();
- }
- this.extraParams.putAll(map);
- return this;
- }
-
- /**
- * Required. Specifies billing frequency. Either {@code day}, {@code
- * week}, {@code month} or {@code year}.
- */
- public Builder setInterval(
- QuoteCreateParams.Phase.LineItem.PriceData.Recurring.Interval interval) {
- this.interval = interval;
- return this;
- }
-
- /**
- * The number of intervals between subscription billings. For example, {@code
- * interval=month} and {@code interval_count=3} bills every 3 months. Maximum of three
- * years interval allowed (3 years, 36 months, or 156 weeks).
- */
- public Builder setIntervalCount(Long intervalCount) {
- this.intervalCount = intervalCount;
- return this;
- }
- }
-
- public enum Interval implements ApiRequestParams.EnumParam {
- @SerializedName("day")
- DAY("day"),
-
- @SerializedName("month")
- MONTH("month"),
-
- @SerializedName("week")
- WEEK("week"),
-
- @SerializedName("year")
- YEAR("year");
-
- @Getter(onMethod_ = {@Override})
- private final String value;
-
- Interval(String value) {
- this.value = value;
- }
- }
- }
-
- public enum TaxBehavior implements ApiRequestParams.EnumParam {
- @SerializedName("exclusive")
- EXCLUSIVE("exclusive"),
-
- @SerializedName("inclusive")
- INCLUSIVE("inclusive"),
-
- @SerializedName("unspecified")
- UNSPECIFIED("unspecified");
-
- @Getter(onMethod_ = {@Override})
- private final String value;
-
- TaxBehavior(String value) {
- this.value = value;
- }
- }
- }
- }
-
- public enum BillingCycleAnchor implements ApiRequestParams.EnumParam {
- @SerializedName("reset")
- RESET("reset");
-
- @Getter(onMethod_ = {@Override})
- private final String value;
-
- BillingCycleAnchor(String value) {
- this.value = value;
- }
- }
-
- public enum CollectionMethod implements ApiRequestParams.EnumParam {
- @SerializedName("charge_automatically")
- CHARGE_AUTOMATICALLY("charge_automatically"),
-
- @SerializedName("send_invoice")
- SEND_INVOICE("send_invoice");
-
- @Getter(onMethod_ = {@Override})
- private final String value;
-
- CollectionMethod(String value) {
- this.value = value;
- }
- }
-
- public enum ProrationBehavior implements ApiRequestParams.EnumParam {
- @SerializedName("always_invoice")
- ALWAYS_INVOICE("always_invoice"),
-
- @SerializedName("create_prorations")
- CREATE_PRORATIONS("create_prorations"),
-
- @SerializedName("none")
- NONE("none");
-
- @Getter(onMethod_ = {@Override})
- private final String value;
-
- ProrationBehavior(String value) {
- this.value = value;
- }
- }
- }
-
- @Getter
- public static class SubscriptionData {
- /** Describes the period to bill for upon accepting the quote. */
- @SerializedName("bill_on_acceptance")
- BillOnAcceptance billOnAcceptance;
-
- /**
- * Configures when the subscription schedule generates prorations for phase transitions.
- * Possible values are {@code prorate_on_next_phase} or {@code prorate_up_front} with the
- * default being {@code prorate_on_next_phase}. {@code prorate_on_next_phase} will apply phase
- * changes and generate prorations at transition time. {@code prorate_up_front} will bill for
- * all phases within the current billing cycle up front.
- */
- @SerializedName("billing_behavior")
- BillingBehavior billingBehavior;
-
- /**
- * When specified as {@code reset}, the subscription will always start a new billing period when
- * the quote is accepted.
- */
- @SerializedName("billing_cycle_anchor")
- ApiRequestParams.EnumParam billingCycleAnchor;
-
- /**
- * The subscription's description, meant to be displayable to the customer. Use this field to
- * optionally store an explanation of the subscription for rendering in Stripe surfaces and
- * certain local payment methods UIs.
- */
- @SerializedName("description")
- String description;
-
- /**
- * When creating a new subscription, the date of which the subscription schedule will start
- * after the quote is accepted. When updating a subscription, the date of which the subscription
- * will be updated using a subscription schedule. The special value {@code current_period_end}
- * can be provided to update a subscription at the end of its current period. The {@code
- * effective_date} is ignored if it is in the past when the quote is accepted.
- */
- @SerializedName("effective_date")
- Object effectiveDate;
-
- /** Behavior of the subscription schedule and underlying subscription when it ends. */
- @SerializedName("end_behavior")
- EndBehavior endBehavior;
-
- /**
- * Map of extra parameters for custom features not available in this client library. The content
- * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each
- * key/value pair is serialized as if the key is a root-level field (serialized) name in this
- * param object. Effectively, this map is flattened to its parent instance.
- */
- @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
- Map extraParams;
-
- /**
- * The id of a subscription schedule the quote will update. The quote will inherit the state of
- * the subscription schedule, such as {@code phases}. Cannot be combined with other parameters.
- */
- @SerializedName("from_schedule")
- String fromSchedule;
-
- /**
- * The id of a subscription that the quote will update. By default, the quote will contain the
- * state of the subscription (such as line items, collection method and billing thresholds)
- * unless overridden.
- */
- @SerializedName("from_subscription")
- String fromSubscription;
-
- /**
- * Set of key-value pairs that will set
- * metadata on the subscription or subscription schedule when the quote is accepted. If a
- * recurring price is included in {@code line_items}, this field will be passed to the resulting
- * subscription's {@code metadata} field. If {@code subscription_data.effective_date} is used,
- * this field will be passed to the resulting subscription schedule's {@code phases.metadata}
- * field. Unlike object-level metadata, this field is declarative. Updates will clear prior
- * values.
- */
- @SerializedName("metadata")
- Map metadata;
-
- /**
- * If specified, the invoicing for the given billing cycle iterations will be processed when the
- * quote is accepted. Cannot be used with {@code effective_date}.
- */
- @SerializedName("prebilling")
- Object prebilling;
-
- /**
- * Determines how to handle prorations. When
- * creating a subscription, valid values are {@code create_prorations} or {@code none}.
- *
- * When updating a subscription, valid values are {@code create_prorations}, {@code none}, or
- * {@code always_invoice}.
- *
- *
Passing {@code create_prorations} will cause proration invoice items to be created when
- * applicable. These proration items will only be invoiced immediately under certain
- * conditions. In order to always invoice immediately for prorations, pass {@code
- * always_invoice}.
- *
- *
Prorations can be disabled by passing {@code none}.
- */
- @SerializedName("proration_behavior")
- ProrationBehavior prorationBehavior;
-
- /**
- * Integer representing the number of trial period days before the customer is charged for the
- * first time.
- */
- @SerializedName("trial_period_days")
- Object trialPeriodDays;
-
- private SubscriptionData(
- BillOnAcceptance billOnAcceptance,
- BillingBehavior billingBehavior,
- ApiRequestParams.EnumParam billingCycleAnchor,
- String description,
- Object effectiveDate,
- EndBehavior endBehavior,
- Map extraParams,
- String fromSchedule,
- String fromSubscription,
- Map metadata,
- Object prebilling,
- ProrationBehavior prorationBehavior,
- Object trialPeriodDays) {
- this.billOnAcceptance = billOnAcceptance;
- this.billingBehavior = billingBehavior;
- this.billingCycleAnchor = billingCycleAnchor;
- this.description = description;
- this.effectiveDate = effectiveDate;
- this.endBehavior = endBehavior;
- this.extraParams = extraParams;
- this.fromSchedule = fromSchedule;
- this.fromSubscription = fromSubscription;
- this.metadata = metadata;
- this.prebilling = prebilling;
- this.prorationBehavior = prorationBehavior;
- this.trialPeriodDays = trialPeriodDays;
- }
-
- public static Builder builder() {
- return new Builder();
- }
-
- public static class Builder {
- private BillOnAcceptance billOnAcceptance;
-
- private BillingBehavior billingBehavior;
-
- private ApiRequestParams.EnumParam billingCycleAnchor;
-
- private String description;
-
- private Object effectiveDate;
-
- private EndBehavior endBehavior;
-
- private Map extraParams;
-
- private String fromSchedule;
-
- private String fromSubscription;
-
- private Map metadata;
-
- private Object prebilling;
-
- private ProrationBehavior prorationBehavior;
-
- private Object trialPeriodDays;
-
- /** Finalize and obtain parameter instance from this builder. */
- public QuoteCreateParams.SubscriptionData build() {
- return new QuoteCreateParams.SubscriptionData(
- this.billOnAcceptance,
- this.billingBehavior,
- this.billingCycleAnchor,
- this.description,
- this.effectiveDate,
- this.endBehavior,
- this.extraParams,
- this.fromSchedule,
- this.fromSubscription,
- this.metadata,
- this.prebilling,
- this.prorationBehavior,
- this.trialPeriodDays);
- }
-
- /** Describes the period to bill for upon accepting the quote. */
- public Builder setBillOnAcceptance(
- QuoteCreateParams.SubscriptionData.BillOnAcceptance billOnAcceptance) {
- this.billOnAcceptance = billOnAcceptance;
- return this;
- }
-
- /**
- * Configures when the subscription schedule generates prorations for phase transitions.
- * Possible values are {@code prorate_on_next_phase} or {@code prorate_up_front} with the
- * default being {@code prorate_on_next_phase}. {@code prorate_on_next_phase} will apply phase
- * changes and generate prorations at transition time. {@code prorate_up_front} will bill for
- * all phases within the current billing cycle up front.
- */
- public Builder setBillingBehavior(
- QuoteCreateParams.SubscriptionData.BillingBehavior billingBehavior) {
- this.billingBehavior = billingBehavior;
- return this;
- }
-
- /**
- * When specified as {@code reset}, the subscription will always start a new billing period
- * when the quote is accepted.
- */
- public Builder setBillingCycleAnchor(
- QuoteCreateParams.SubscriptionData.BillingCycleAnchor billingCycleAnchor) {
- this.billingCycleAnchor = billingCycleAnchor;
- return this;
- }
-
- /**
- * When specified as {@code reset}, the subscription will always start a new billing period
- * when the quote is accepted.
- */
- public Builder setBillingCycleAnchor(EmptyParam billingCycleAnchor) {
- this.billingCycleAnchor = billingCycleAnchor;
- return this;
- }
-
- /**
- * The subscription's description, meant to be displayable to the customer. Use this field to
- * optionally store an explanation of the subscription for rendering in Stripe surfaces and
- * certain local payment methods UIs.
- */
- public Builder setDescription(String description) {
- this.description = description;
- return this;
- }
-
- /**
- * When creating a new subscription, the date of which the subscription schedule will start
- * after the quote is accepted. When updating a subscription, the date of which the
- * subscription will be updated using a subscription schedule. The special value {@code
- * current_period_end} can be provided to update a subscription at the end of its current
- * period. The {@code effective_date} is ignored if it is in the past when the quote is
- * accepted.
- */
- public Builder setEffectiveDate(
- QuoteCreateParams.SubscriptionData.EffectiveDate effectiveDate) {
- this.effectiveDate = effectiveDate;
- return this;
- }
-
- /**
- * When creating a new subscription, the date of which the subscription schedule will start
- * after the quote is accepted. When updating a subscription, the date of which the
- * subscription will be updated using a subscription schedule. The special value {@code
- * current_period_end} can be provided to update a subscription at the end of its current
- * period. The {@code effective_date} is ignored if it is in the past when the quote is
- * accepted.
- */
- public Builder setEffectiveDate(Long effectiveDate) {
- this.effectiveDate = effectiveDate;
- return this;
- }
-
- /**
- * When creating a new subscription, the date of which the subscription schedule will start
- * after the quote is accepted. When updating a subscription, the date of which the
- * subscription will be updated using a subscription schedule. The special value {@code
- * current_period_end} can be provided to update a subscription at the end of its current
- * period. The {@code effective_date} is ignored if it is in the past when the quote is
- * accepted.
- */
- public Builder setEffectiveDate(EmptyParam effectiveDate) {
- this.effectiveDate = effectiveDate;
- return this;
- }
-
- /** Behavior of the subscription schedule and underlying subscription when it ends. */
- public Builder setEndBehavior(QuoteCreateParams.SubscriptionData.EndBehavior endBehavior) {
- this.endBehavior = endBehavior;
- return this;
- }
-
- /**
- * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
- * call, and subsequent calls add additional key/value pairs to the original map. See {@link
- * QuoteCreateParams.SubscriptionData#extraParams} for the field documentation.
- */
- public Builder putExtraParam(String key, Object value) {
- if (this.extraParams == null) {
- this.extraParams = new HashMap<>();
- }
- this.extraParams.put(key, value);
- return this;
- }
-
- /**
- * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
- * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
- * See {@link QuoteCreateParams.SubscriptionData#extraParams} for the field documentation.
- */
- public Builder putAllExtraParam(Map map) {
- if (this.extraParams == null) {
- this.extraParams = new HashMap<>();
- }
- this.extraParams.putAll(map);
- return this;
- }
-
- /**
- * The id of a subscription schedule the quote will update. The quote will inherit the state
- * of the subscription schedule, such as {@code phases}. Cannot be combined with other
- * parameters.
- */
- public Builder setFromSchedule(String fromSchedule) {
- this.fromSchedule = fromSchedule;
- return this;
- }
-
/**
* The id of a subscription that the quote will update. By default, the quote will contain the
* state of the subscription (such as line items, collection method and billing thresholds)
diff --git a/src/main/java/com/stripe/param/QuoteUpdateParams.java b/src/main/java/com/stripe/param/QuoteUpdateParams.java
index c1d693cff7d..a9d3ff34f2b 100644
--- a/src/main/java/com/stripe/param/QuoteUpdateParams.java
+++ b/src/main/java/com/stripe/param/QuoteUpdateParams.java
@@ -130,13 +130,6 @@ public class QuoteUpdateParams extends ApiRequestParams {
@SerializedName("on_behalf_of")
Object onBehalfOf;
- /**
- * List representing phases of the Quote. Each phase can be customized to have different
- * durations, prices, and coupons.
- */
- @SerializedName("phases")
- List phases;
-
/**
* When creating a subscription or subscription schedule, the specified configuration data will be
* used. There must be at least one line item with a recurring price for a subscription or
@@ -178,7 +171,6 @@ private QuoteUpdateParams(
List lines,
Map metadata,
Object onBehalfOf,
- List phases,
SubscriptionData subscriptionData,
Object subscriptionDataOverrides,
Object transferData) {
@@ -201,7 +193,6 @@ private QuoteUpdateParams(
this.lines = lines;
this.metadata = metadata;
this.onBehalfOf = onBehalfOf;
- this.phases = phases;
this.subscriptionData = subscriptionData;
this.subscriptionDataOverrides = subscriptionDataOverrides;
this.transferData = transferData;
@@ -250,8 +241,6 @@ public static class Builder {
private Object onBehalfOf;
- private List phases;
-
private SubscriptionData subscriptionData;
private Object subscriptionDataOverrides;
@@ -280,7 +269,6 @@ public QuoteUpdateParams build() {
this.lines,
this.metadata,
this.onBehalfOf,
- this.phases,
this.subscriptionData,
this.subscriptionDataOverrides,
this.transferData);
@@ -648,32 +636,6 @@ public Builder setOnBehalfOf(EmptyParam onBehalfOf) {
return this;
}
- /**
- * Add an element to `phases` list. A list is initialized for the first `add/addAll` call, and
- * subsequent calls adds additional elements to the original list. See {@link
- * QuoteUpdateParams#phases} for the field documentation.
- */
- public Builder addPhase(QuoteUpdateParams.Phase element) {
- if (this.phases == null) {
- this.phases = new ArrayList<>();
- }
- this.phases.add(element);
- return this;
- }
-
- /**
- * Add all elements to `phases` list. A list is initialized for the first `add/addAll` call, and
- * subsequent calls adds additional elements to the original list. See {@link
- * QuoteUpdateParams#phases} for the field documentation.
- */
- public Builder addAllPhase(List elements) {
- if (this.phases == null) {
- this.phases = new ArrayList<>();
- }
- this.phases.addAll(elements);
- return this;
- }
-
/**
* When creating a subscription or subscription schedule, the specified configuration data will
* be used. There must be at least one line item with a recurring price for a subscription or
@@ -6570,1913 +6532,6 @@ public enum TaxBehavior implements ApiRequestParams.EnumParam {
}
}
- @Getter
- public static class Phase {
- /**
- * When specified as {@code reset}, the subscription will always start a new billing period when
- * the quote is accepted.
- */
- @SerializedName("billing_cycle_anchor")
- BillingCycleAnchor billingCycleAnchor;
-
- /**
- * Either {@code charge_automatically}, or {@code send_invoice}. When charging automatically,
- * Stripe will attempt to pay the underlying subscription at the end of each billing cycle using
- * the default source attached to the customer. When sending an invoice, Stripe will email your
- * customer an invoice with payment instructions and mark the subscription as {@code active}.
- * Defaults to {@code charge_automatically} on creation.
- */
- @SerializedName("collection_method")
- CollectionMethod collectionMethod;
-
- /**
- * A list of Tax Rate ids. These Tax Rates
- * will set the Subscription's {@code
- * default_tax_rates}, which means they will be the Invoice's {@code
- * default_tax_rates} for any Invoices issued by the Subscription during this Phase.
- */
- @SerializedName("default_tax_rates")
- Object defaultTaxRates;
-
- /**
- * The coupons to redeem into discounts for the schedule phase. If not specified, inherits the
- * discount from the subscription's customer. Pass an empty string to avoid inheriting any
- * discounts.
- */
- @SerializedName("discounts")
- Object discounts;
-
- /**
- * The date at which this phase of the quote ends. If set, {@code iterations} must not be set.
- */
- @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;
-
- /** All invoices will be billed using the specified settings. */
- @SerializedName("invoice_settings")
- InvoiceSettings invoiceSettings;
-
- /**
- * Integer representing the multiplier applied to the price interval. For example, {@code
- * iterations=2} applied to a price with {@code interval=month} and {@code interval_count=3}
- * results in a phase of duration {@code 2 * 3 months = 6 months}. If set, {@code end_date} must
- * not be set.
- */
- @SerializedName("iterations")
- Long iterations;
-
- /**
- * Required. A list of line items the customer is being quoted for within this
- * phase. Each line item includes information about the product, the quantity, and the resulting
- * cost.
- */
- @SerializedName("line_items")
- List lineItems;
-
- /**
- * Set of key-value pairs that will
- * declaratively set metadata on the subscription schedule's phases when the quote is accepted.
- * After a quote has been finalized, this field can be updated by specifying an identical set of
- * quote phases to what was on the quote originally, excluding changes in metadata and phases
- * that are now in the past.
- */
- @SerializedName("metadata")
- Map metadata;
-
- /**
- * If the update changes the current phase, indicates whether the changes should be prorated.
- * The default value is {@code create_prorations}.
- */
- @SerializedName("proration_behavior")
- ProrationBehavior prorationBehavior;
-
- /**
- * If set to true the entire phase is counted as a trial and the customer will not be charged
- * for any fees.
- */
- @SerializedName("trial")
- Boolean trial;
-
- /**
- * Sets the phase to trialing from the start date to this date. Must be before the phase end
- * date, can not be combined with {@code trial}.
- */
- @SerializedName("trial_end")
- Long trialEnd;
-
- private Phase(
- BillingCycleAnchor billingCycleAnchor,
- CollectionMethod collectionMethod,
- Object defaultTaxRates,
- Object discounts,
- Long endDate,
- Map extraParams,
- InvoiceSettings invoiceSettings,
- Long iterations,
- List lineItems,
- Map metadata,
- ProrationBehavior prorationBehavior,
- Boolean trial,
- Long trialEnd) {
- this.billingCycleAnchor = billingCycleAnchor;
- this.collectionMethod = collectionMethod;
- this.defaultTaxRates = defaultTaxRates;
- this.discounts = discounts;
- this.endDate = endDate;
- this.extraParams = extraParams;
- this.invoiceSettings = invoiceSettings;
- this.iterations = iterations;
- this.lineItems = lineItems;
- this.metadata = metadata;
- this.prorationBehavior = prorationBehavior;
- this.trial = trial;
- this.trialEnd = trialEnd;
- }
-
- public static Builder builder() {
- return new Builder();
- }
-
- public static class Builder {
- private BillingCycleAnchor billingCycleAnchor;
-
- private CollectionMethod collectionMethod;
-
- private Object defaultTaxRates;
-
- private Object discounts;
-
- private Long endDate;
-
- private Map extraParams;
-
- private InvoiceSettings invoiceSettings;
-
- private Long iterations;
-
- private List lineItems;
-
- private Map metadata;
-
- private ProrationBehavior prorationBehavior;
-
- private Boolean trial;
-
- private Long trialEnd;
-
- /** Finalize and obtain parameter instance from this builder. */
- public QuoteUpdateParams.Phase build() {
- return new QuoteUpdateParams.Phase(
- this.billingCycleAnchor,
- this.collectionMethod,
- this.defaultTaxRates,
- this.discounts,
- this.endDate,
- this.extraParams,
- this.invoiceSettings,
- this.iterations,
- this.lineItems,
- this.metadata,
- this.prorationBehavior,
- this.trial,
- this.trialEnd);
- }
-
- /**
- * When specified as {@code reset}, the subscription will always start a new billing period
- * when the quote is accepted.
- */
- public Builder setBillingCycleAnchor(
- QuoteUpdateParams.Phase.BillingCycleAnchor billingCycleAnchor) {
- this.billingCycleAnchor = billingCycleAnchor;
- return this;
- }
-
- /**
- * Either {@code charge_automatically}, or {@code send_invoice}. When charging automatically,
- * Stripe will attempt to pay the underlying subscription at the end of each billing cycle
- * using the default source attached to the customer. When sending an invoice, Stripe will
- * email your customer an invoice with payment instructions and mark the subscription as
- * {@code active}. Defaults to {@code charge_automatically} on creation.
- */
- public Builder setCollectionMethod(
- QuoteUpdateParams.Phase.CollectionMethod collectionMethod) {
- this.collectionMethod = collectionMethod;
- return this;
- }
-
- /**
- * Add an element to `defaultTaxRates` list. A list is initialized for the first `add/addAll`
- * call, and subsequent calls adds additional elements to the original list. See {@link
- * QuoteUpdateParams.Phase#defaultTaxRates} for the field documentation.
- */
- @SuppressWarnings("unchecked")
- public Builder addDefaultTaxRate(String element) {
- if (this.defaultTaxRates == null || this.defaultTaxRates instanceof EmptyParam) {
- this.defaultTaxRates = new ArrayList();
- }
- ((List) this.defaultTaxRates).add(element);
- return this;
- }
-
- /**
- * Add all elements to `defaultTaxRates` list. A list is initialized for the first
- * `add/addAll` call, and subsequent calls adds additional elements to the original list. See
- * {@link QuoteUpdateParams.Phase#defaultTaxRates} for the field documentation.
- */
- @SuppressWarnings("unchecked")
- public Builder addAllDefaultTaxRate(List elements) {
- if (this.defaultTaxRates == null || this.defaultTaxRates instanceof EmptyParam) {
- this.defaultTaxRates = new ArrayList();
- }
- ((List) this.defaultTaxRates).addAll(elements);
- return this;
- }
-
- /**
- * A list of Tax Rate ids. These Tax Rates
- * will set the Subscription's {@code
- * default_tax_rates}, which means they will be the Invoice's {@code
- * default_tax_rates} for any Invoices issued by the Subscription during this Phase.
- */
- public Builder setDefaultTaxRates(EmptyParam defaultTaxRates) {
- this.defaultTaxRates = defaultTaxRates;
- return this;
- }
-
- /**
- * A list of Tax Rate ids. These Tax Rates
- * will set the Subscription's {@code
- * default_tax_rates}, which means they will be the Invoice's {@code
- * default_tax_rates} for any Invoices issued by the Subscription during this Phase.
- */
- public Builder setDefaultTaxRates(List defaultTaxRates) {
- this.defaultTaxRates = defaultTaxRates;
- return this;
- }
-
- /**
- * Add an element to `discounts` list. A list is initialized for the first `add/addAll` call,
- * and subsequent calls adds additional elements to the original list. See {@link
- * QuoteUpdateParams.Phase#discounts} for the field documentation.
- */
- @SuppressWarnings("unchecked")
- public Builder addDiscount(QuoteUpdateParams.Phase.Discount element) {
- if (this.discounts == null || this.discounts instanceof EmptyParam) {
- this.discounts = new ArrayList();
- }
- ((List) this.discounts).add(element);
- return this;
- }
-
- /**
- * Add all elements to `discounts` list. A list is initialized for the first `add/addAll`
- * call, and subsequent calls adds additional elements to the original list. See {@link
- * QuoteUpdateParams.Phase#discounts} for the field documentation.
- */
- @SuppressWarnings("unchecked")
- public Builder addAllDiscount(List elements) {
- if (this.discounts == null || this.discounts instanceof EmptyParam) {
- this.discounts = new ArrayList();
- }
- ((List) this.discounts).addAll(elements);
- return this;
- }
-
- /**
- * The coupons to redeem into discounts for the schedule phase. If not specified, inherits the
- * discount from the subscription's customer. Pass an empty string to avoid inheriting any
- * discounts.
- */
- public Builder setDiscounts(EmptyParam discounts) {
- this.discounts = discounts;
- return this;
- }
-
- /**
- * The coupons to redeem into discounts for the schedule phase. If not specified, inherits the
- * discount from the subscription's customer. Pass an empty string to avoid inheriting any
- * discounts.
- */
- public Builder setDiscounts(List discounts) {
- this.discounts = discounts;
- return this;
- }
-
- /**
- * The date at which this phase of the quote ends. If set, {@code iterations} must not be set.
- */
- 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
- * QuoteUpdateParams.Phase#extraParams} for the field documentation.
- */
- public Builder putExtraParam(String key, Object value) {
- if (this.extraParams == null) {
- this.extraParams = new HashMap<>();
- }
- this.extraParams.put(key, value);
- return this;
- }
-
- /**
- * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
- * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
- * See {@link QuoteUpdateParams.Phase#extraParams} for the field documentation.
- */
- public Builder putAllExtraParam(Map map) {
- if (this.extraParams == null) {
- this.extraParams = new HashMap<>();
- }
- this.extraParams.putAll(map);
- return this;
- }
-
- /** All invoices will be billed using the specified settings. */
- public Builder setInvoiceSettings(QuoteUpdateParams.Phase.InvoiceSettings invoiceSettings) {
- this.invoiceSettings = invoiceSettings;
- return this;
- }
-
- /**
- * Integer representing the multiplier applied to the price interval. For example, {@code
- * iterations=2} applied to a price with {@code interval=month} and {@code interval_count=3}
- * results in a phase of duration {@code 2 * 3 months = 6 months}. If set, {@code end_date}
- * must not be set.
- */
- public Builder setIterations(Long iterations) {
- this.iterations = iterations;
- return this;
- }
-
- /**
- * Add an element to `lineItems` list. A list is initialized for the first `add/addAll` call,
- * and subsequent calls adds additional elements to the original list. See {@link
- * QuoteUpdateParams.Phase#lineItems} for the field documentation.
- */
- public Builder addLineItem(QuoteUpdateParams.Phase.LineItem element) {
- if (this.lineItems == null) {
- this.lineItems = new ArrayList<>();
- }
- this.lineItems.add(element);
- return this;
- }
-
- /**
- * Add all elements to `lineItems` list. A list is initialized for the first `add/addAll`
- * call, and subsequent calls adds additional elements to the original list. See {@link
- * QuoteUpdateParams.Phase#lineItems} for the field documentation.
- */
- public Builder addAllLineItem(List elements) {
- if (this.lineItems == null) {
- this.lineItems = new ArrayList<>();
- }
- this.lineItems.addAll(elements);
- 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
- * QuoteUpdateParams.Phase#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 QuoteUpdateParams.Phase#metadata} for the field documentation.
- */
- public Builder putAllMetadata(Map map) {
- if (this.metadata == null) {
- this.metadata = new HashMap<>();
- }
- this.metadata.putAll(map);
- return this;
- }
-
- /**
- * If the update changes the current phase, indicates whether the changes should be prorated.
- * The default value is {@code create_prorations}.
- */
- public Builder setProrationBehavior(
- QuoteUpdateParams.Phase.ProrationBehavior prorationBehavior) {
- this.prorationBehavior = prorationBehavior;
- return this;
- }
-
- /**
- * If set to true the entire phase is counted as a trial and the customer will not be charged
- * for any fees.
- */
- public Builder setTrial(Boolean trial) {
- this.trial = trial;
- return this;
- }
-
- /**
- * Sets the phase to trialing from the start date to this date. Must be before the phase end
- * date, can not be combined with {@code trial}.
- */
- public Builder setTrialEnd(Long trialEnd) {
- this.trialEnd = trialEnd;
- return this;
- }
- }
-
- @Getter
- public static class Discount {
- /** ID of the coupon to create a new discount for. */
- @SerializedName("coupon")
- Object coupon;
-
- /** ID of an existing discount on the object (or one of its ancestors) to reuse. */
- @SerializedName("discount")
- Object discount;
-
- /** Details to determine how long the discount should be applied for. */
- @SerializedName("discount_end")
- DiscountEnd discountEnd;
-
- /**
- * Map of extra parameters for custom features not available in this client library. The
- * content in this map is not serialized under this field's {@code @SerializedName} value.
- * Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
- * name in this param object. Effectively, this map is flattened to its parent instance.
- */
- @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
- Map extraParams;
-
- /** ID of the promotion code to create a new discount for. */
- @SerializedName("promotion_code")
- Object promotionCode;
-
- private Discount(
- Object coupon,
- Object discount,
- DiscountEnd discountEnd,
- Map extraParams,
- Object promotionCode) {
- this.coupon = coupon;
- this.discount = discount;
- this.discountEnd = discountEnd;
- this.extraParams = extraParams;
- this.promotionCode = promotionCode;
- }
-
- public static Builder builder() {
- return new Builder();
- }
-
- public static class Builder {
- private Object coupon;
-
- private Object discount;
-
- private DiscountEnd discountEnd;
-
- private Map extraParams;
-
- private Object promotionCode;
-
- /** Finalize and obtain parameter instance from this builder. */
- public QuoteUpdateParams.Phase.Discount build() {
- return new QuoteUpdateParams.Phase.Discount(
- this.coupon, this.discount, this.discountEnd, this.extraParams, this.promotionCode);
- }
-
- /** ID of the coupon to create a new discount for. */
- public Builder setCoupon(String coupon) {
- this.coupon = coupon;
- return this;
- }
-
- /** ID of the coupon to create a new discount for. */
- public Builder setCoupon(EmptyParam coupon) {
- this.coupon = coupon;
- return this;
- }
-
- /** ID of an existing discount on the object (or one of its ancestors) to reuse. */
- public Builder setDiscount(String discount) {
- this.discount = discount;
- return this;
- }
-
- /** ID of an existing discount on the object (or one of its ancestors) to reuse. */
- public Builder setDiscount(EmptyParam discount) {
- this.discount = discount;
- return this;
- }
-
- /** Details to determine how long the discount should be applied for. */
- public Builder setDiscountEnd(QuoteUpdateParams.Phase.Discount.DiscountEnd discountEnd) {
- this.discountEnd = discountEnd;
- return this;
- }
-
- /**
- * Add a key/value pair to `extraParams` map. A map is initialized for the first
- * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
- * map. See {@link QuoteUpdateParams.Phase.Discount#extraParams} for the field
- * documentation.
- */
- public Builder putExtraParam(String key, Object value) {
- if (this.extraParams == null) {
- this.extraParams = new HashMap<>();
- }
- this.extraParams.put(key, value);
- return this;
- }
-
- /**
- * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
- * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
- * map. See {@link QuoteUpdateParams.Phase.Discount#extraParams} for the field
- * documentation.
- */
- public Builder putAllExtraParam(Map map) {
- if (this.extraParams == null) {
- this.extraParams = new HashMap<>();
- }
- this.extraParams.putAll(map);
- return this;
- }
-
- /** ID of the promotion code to create a new discount for. */
- public Builder setPromotionCode(String promotionCode) {
- this.promotionCode = promotionCode;
- return this;
- }
-
- /** ID of the promotion code to create a new discount for. */
- public Builder setPromotionCode(EmptyParam promotionCode) {
- this.promotionCode = promotionCode;
- return this;
- }
- }
-
- @Getter
- public static class DiscountEnd {
- /** Time span for the redeemed discount. */
- @SerializedName("duration")
- Duration duration;
-
- /**
- * Map of extra parameters for custom features not available in this client library. The
- * content in this map is not serialized under this field's {@code @SerializedName} value.
- * Instead, each key/value pair is serialized as if the key is a root-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 precise Unix timestamp for the discount to end. Must be in the future. */
- @SerializedName("timestamp")
- Long timestamp;
-
- /**
- * Required. The type of calculation made to determine when the discount
- * ends.
- */
- @SerializedName("type")
- Type type;
-
- private DiscountEnd(
- Duration duration, Map extraParams, Long timestamp, Type type) {
- this.duration = duration;
- this.extraParams = extraParams;
- this.timestamp = timestamp;
- this.type = type;
- }
-
- public static Builder builder() {
- return new Builder();
- }
-
- public static class Builder {
- private Duration duration;
-
- private Map extraParams;
-
- private Long timestamp;
-
- private Type type;
-
- /** Finalize and obtain parameter instance from this builder. */
- public QuoteUpdateParams.Phase.Discount.DiscountEnd build() {
- return new QuoteUpdateParams.Phase.Discount.DiscountEnd(
- this.duration, this.extraParams, this.timestamp, this.type);
- }
-
- /** Time span for the redeemed discount. */
- public Builder setDuration(
- QuoteUpdateParams.Phase.Discount.DiscountEnd.Duration duration) {
- this.duration = duration;
- return this;
- }
-
- /**
- * Add a key/value pair to `extraParams` map. A map is initialized for the first
- * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
- * map. See {@link QuoteUpdateParams.Phase.Discount.DiscountEnd#extraParams} for the field
- * documentation.
- */
- public Builder putExtraParam(String key, Object value) {
- if (this.extraParams == null) {
- this.extraParams = new HashMap<>();
- }
- this.extraParams.put(key, value);
- return this;
- }
-
- /**
- * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
- * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
- * map. See {@link QuoteUpdateParams.Phase.Discount.DiscountEnd#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 precise Unix timestamp for the discount to end. Must be in the future. */
- public Builder setTimestamp(Long timestamp) {
- this.timestamp = timestamp;
- return this;
- }
-
- /**
- * Required. The type of calculation made to determine when the discount
- * ends.
- */
- public Builder setType(QuoteUpdateParams.Phase.Discount.DiscountEnd.Type type) {
- this.type = type;
- return this;
- }
- }
-
- @Getter
- public static class Duration {
- /**
- * Map of extra parameters for custom features not available in this client library. The
- * content in this map is not serialized under this field's {@code @SerializedName} value.
- * Instead, each key/value pair is serialized as if the key is a root-level field
- * (serialized) name in this param object. Effectively, this map is flattened to its
- * parent instance.
- */
- @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
- Map extraParams;
-
- /**
- * Required. Specifies a type of interval unit. Either {@code day},
- * {@code week}, {@code month} or {@code year}.
- */
- @SerializedName("interval")
- Interval interval;
-
- /**
- * Required. The number of intervals, as an whole number greater than 0.
- * Stripe multiplies this by the interval type to get the overall duration.
- */
- @SerializedName("interval_count")
- Long intervalCount;
-
- private Duration(Map extraParams, Interval interval, Long intervalCount) {
- this.extraParams = extraParams;
- this.interval = interval;
- this.intervalCount = intervalCount;
- }
-
- public static Builder builder() {
- return new Builder();
- }
-
- public static class Builder {
- private Map extraParams;
-
- private Interval interval;
-
- private Long intervalCount;
-
- /** Finalize and obtain parameter instance from this builder. */
- public QuoteUpdateParams.Phase.Discount.DiscountEnd.Duration build() {
- return new QuoteUpdateParams.Phase.Discount.DiscountEnd.Duration(
- this.extraParams, this.interval, this.intervalCount);
- }
-
- /**
- * Add a key/value pair to `extraParams` map. A map is initialized for the first
- * `put/putAll` call, and subsequent calls add additional key/value pairs to the
- * original map. See {@link
- * QuoteUpdateParams.Phase.Discount.DiscountEnd.Duration#extraParams} for the field
- * documentation.
- */
- public Builder putExtraParam(String key, Object value) {
- if (this.extraParams == null) {
- this.extraParams = new HashMap<>();
- }
- this.extraParams.put(key, value);
- return this;
- }
-
- /**
- * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
- * `put/putAll` call, and subsequent calls add additional key/value pairs to the
- * original map. See {@link
- * QuoteUpdateParams.Phase.Discount.DiscountEnd.Duration#extraParams} for the field
- * documentation.
- */
- public Builder putAllExtraParam(Map map) {
- if (this.extraParams == null) {
- this.extraParams = new HashMap<>();
- }
- this.extraParams.putAll(map);
- return this;
- }
-
- /**
- * Required. Specifies a type of interval unit. Either {@code day},
- * {@code week}, {@code month} or {@code year}.
- */
- public Builder setInterval(
- QuoteUpdateParams.Phase.Discount.DiscountEnd.Duration.Interval interval) {
- this.interval = interval;
- return this;
- }
-
- /**
- * Required. The number of intervals, as an whole number greater than
- * 0. Stripe multiplies this by the interval type to get the overall duration.
- */
- public Builder setIntervalCount(Long intervalCount) {
- this.intervalCount = intervalCount;
- return this;
- }
- }
-
- public enum Interval implements ApiRequestParams.EnumParam {
- @SerializedName("day")
- DAY("day"),
-
- @SerializedName("month")
- MONTH("month"),
-
- @SerializedName("week")
- WEEK("week"),
-
- @SerializedName("year")
- YEAR("year");
-
- @Getter(onMethod_ = {@Override})
- private final String value;
-
- Interval(String value) {
- this.value = value;
- }
- }
- }
-
- public enum Type implements ApiRequestParams.EnumParam {
- @SerializedName("duration")
- DURATION("duration"),
-
- @SerializedName("timestamp")
- TIMESTAMP("timestamp");
-
- @Getter(onMethod_ = {@Override})
- private final String value;
-
- Type(String value) {
- this.value = value;
- }
- }
- }
- }
-
- @Getter
- public static class InvoiceSettings {
- /**
- * Number of days within which a customer must pay invoices generated by this subscription
- * schedule. This value will be {@code null} for subscription schedules where {@code
- * billing=charge_automatically}.
- */
- @SerializedName("days_until_due")
- Long daysUntilDue;
-
- /**
- * Map of extra parameters for custom features not available in this client library. The
- * content in this map is not serialized under this field's {@code @SerializedName} value.
- * Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
- * name in this param object. Effectively, this map is flattened to its parent instance.
- */
- @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
- Map extraParams;
-
- private InvoiceSettings(Long daysUntilDue, Map extraParams) {
- this.daysUntilDue = daysUntilDue;
- this.extraParams = extraParams;
- }
-
- public static Builder builder() {
- return new Builder();
- }
-
- public static class Builder {
- private Long daysUntilDue;
-
- private Map extraParams;
-
- /** Finalize and obtain parameter instance from this builder. */
- public QuoteUpdateParams.Phase.InvoiceSettings build() {
- return new QuoteUpdateParams.Phase.InvoiceSettings(this.daysUntilDue, this.extraParams);
- }
-
- /**
- * Number of days within which a customer must pay invoices generated by this subscription
- * schedule. This value will be {@code null} for subscription schedules where {@code
- * billing=charge_automatically}.
- */
- public Builder setDaysUntilDue(Long daysUntilDue) {
- this.daysUntilDue = daysUntilDue;
- return this;
- }
-
- /**
- * Add a key/value pair to `extraParams` map. A map is initialized for the first
- * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
- * map. See {@link QuoteUpdateParams.Phase.InvoiceSettings#extraParams} for the field
- * documentation.
- */
- public Builder putExtraParam(String key, Object value) {
- if (this.extraParams == null) {
- this.extraParams = new HashMap<>();
- }
- this.extraParams.put(key, value);
- return this;
- }
-
- /**
- * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
- * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
- * map. See {@link QuoteUpdateParams.Phase.InvoiceSettings#extraParams} for the field
- * documentation.
- */
- public Builder putAllExtraParam(Map map) {
- if (this.extraParams == null) {
- this.extraParams = new HashMap<>();
- }
- this.extraParams.putAll(map);
- return this;
- }
- }
- }
-
- @Getter
- public static class LineItem {
- /** The discounts applied to this line item. */
- @SerializedName("discounts")
- Object discounts;
-
- /**
- * Map of extra parameters for custom features not available in this client library. The
- * content in this map is not serialized under this field's {@code @SerializedName} value.
- * Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
- * name in this param object. Effectively, this map is flattened to its parent instance.
- */
- @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
- Map extraParams;
-
- /** The ID of the price object. One of {@code price} or {@code price_data} is required. */
- @SerializedName("price")
- Object price;
-
- /**
- * Data used to generate a new Price object
- * inline. One of {@code price} or {@code price_data} is required.
- */
- @SerializedName("price_data")
- PriceData priceData;
-
- /** The quantity of the line item. */
- @SerializedName("quantity")
- Long quantity;
-
- /**
- * The tax rates which apply to the line item. When set, the {@code default_tax_rates} on the
- * quote do not apply to this line item.
- */
- @SerializedName("tax_rates")
- Object taxRates;
-
- private LineItem(
- Object discounts,
- Map extraParams,
- Object price,
- PriceData priceData,
- Long quantity,
- Object taxRates) {
- this.discounts = discounts;
- this.extraParams = extraParams;
- this.price = price;
- this.priceData = priceData;
- this.quantity = quantity;
- this.taxRates = taxRates;
- }
-
- public static Builder builder() {
- return new Builder();
- }
-
- public static class Builder {
- private Object discounts;
-
- private Map extraParams;
-
- private Object price;
-
- private PriceData priceData;
-
- private Long quantity;
-
- private Object taxRates;
-
- /** Finalize and obtain parameter instance from this builder. */
- public QuoteUpdateParams.Phase.LineItem build() {
- return new QuoteUpdateParams.Phase.LineItem(
- this.discounts,
- this.extraParams,
- this.price,
- this.priceData,
- this.quantity,
- this.taxRates);
- }
-
- /**
- * Add an element to `discounts` list. A list is initialized for the first `add/addAll`
- * call, and subsequent calls adds additional elements to the original list. See {@link
- * QuoteUpdateParams.Phase.LineItem#discounts} for the field documentation.
- */
- @SuppressWarnings("unchecked")
- public Builder addDiscount(QuoteUpdateParams.Phase.LineItem.Discount element) {
- if (this.discounts == null || this.discounts instanceof EmptyParam) {
- this.discounts = new ArrayList();
- }
- ((List) this.discounts).add(element);
- return this;
- }
-
- /**
- * Add all elements to `discounts` list. A list is initialized for the first `add/addAll`
- * call, and subsequent calls adds additional elements to the original list. See {@link
- * QuoteUpdateParams.Phase.LineItem#discounts} for the field documentation.
- */
- @SuppressWarnings("unchecked")
- public Builder addAllDiscount(List elements) {
- if (this.discounts == null || this.discounts instanceof EmptyParam) {
- this.discounts = new ArrayList();
- }
- ((List) this.discounts).addAll(elements);
- return this;
- }
-
- /** The discounts applied to this line item. */
- public Builder setDiscounts(EmptyParam discounts) {
- this.discounts = discounts;
- return this;
- }
-
- /** The discounts applied to this line item. */
- public Builder setDiscounts(List discounts) {
- this.discounts = discounts;
- return this;
- }
-
- /**
- * Add a key/value pair to `extraParams` map. A map is initialized for the first
- * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
- * map. See {@link QuoteUpdateParams.Phase.LineItem#extraParams} for the field
- * documentation.
- */
- public Builder putExtraParam(String key, Object value) {
- if (this.extraParams == null) {
- this.extraParams = new HashMap<>();
- }
- this.extraParams.put(key, value);
- return this;
- }
-
- /**
- * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
- * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
- * map. See {@link QuoteUpdateParams.Phase.LineItem#extraParams} for the field
- * documentation.
- */
- public Builder putAllExtraParam(Map map) {
- if (this.extraParams == null) {
- this.extraParams = new HashMap<>();
- }
- this.extraParams.putAll(map);
- return this;
- }
-
- /** The ID of the price object. One of {@code price} or {@code price_data} is required. */
- public Builder setPrice(String price) {
- this.price = price;
- return this;
- }
-
- /** The ID of the price object. One of {@code price} or {@code price_data} is required. */
- public Builder setPrice(EmptyParam price) {
- this.price = price;
- return this;
- }
-
- /**
- * Data used to generate a new Price object
- * inline. One of {@code price} or {@code price_data} is required.
- */
- public Builder setPriceData(QuoteUpdateParams.Phase.LineItem.PriceData priceData) {
- this.priceData = priceData;
- return this;
- }
-
- /** The quantity of the line item. */
- public Builder setQuantity(Long quantity) {
- this.quantity = quantity;
- return this;
- }
-
- /**
- * Add an element to `taxRates` list. A list is initialized for the first `add/addAll` call,
- * and subsequent calls adds additional elements to the original list. See {@link
- * QuoteUpdateParams.Phase.LineItem#taxRates} for the field documentation.
- */
- @SuppressWarnings("unchecked")
- public Builder addTaxRate(String element) {
- if (this.taxRates == null || this.taxRates instanceof EmptyParam) {
- this.taxRates = new ArrayList();
- }
- ((List) this.taxRates).add(element);
- return this;
- }
-
- /**
- * Add all elements to `taxRates` list. A list is initialized for the first `add/addAll`
- * call, and subsequent calls adds additional elements to the original list. See {@link
- * QuoteUpdateParams.Phase.LineItem#taxRates} for the field documentation.
- */
- @SuppressWarnings("unchecked")
- public Builder addAllTaxRate(List elements) {
- if (this.taxRates == null || this.taxRates instanceof EmptyParam) {
- this.taxRates = new ArrayList();
- }
- ((List) this.taxRates).addAll(elements);
- return this;
- }
-
- /**
- * The tax rates which apply to the line item. When set, the {@code default_tax_rates} on
- * the quote do not apply to this line item.
- */
- public Builder setTaxRates(EmptyParam taxRates) {
- this.taxRates = taxRates;
- return this;
- }
-
- /**
- * The tax rates which apply to the line item. When set, the {@code default_tax_rates} on
- * the quote do not apply to this line item.
- */
- public Builder setTaxRates(List taxRates) {
- this.taxRates = taxRates;
- return this;
- }
- }
-
- @Getter
- public static class Discount {
- /** ID of the coupon to create a new discount for. */
- @SerializedName("coupon")
- Object coupon;
-
- /** ID of an existing discount on the object (or one of its ancestors) to reuse. */
- @SerializedName("discount")
- Object discount;
-
- /** Details to determine how long the discount should be applied for. */
- @SerializedName("discount_end")
- DiscountEnd discountEnd;
-
- /**
- * Map of extra parameters for custom features not available in this client library. The
- * content in this map is not serialized under this field's {@code @SerializedName} value.
- * Instead, each key/value pair is serialized as if the key is a root-level field
- * (serialized) name in this param object. Effectively, this map is flattened to its parent
- * instance.
- */
- @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
- Map extraParams;
-
- /** ID of the promotion code to create a new discount for. */
- @SerializedName("promotion_code")
- Object promotionCode;
-
- private Discount(
- Object coupon,
- Object discount,
- DiscountEnd discountEnd,
- Map extraParams,
- Object promotionCode) {
- this.coupon = coupon;
- this.discount = discount;
- this.discountEnd = discountEnd;
- this.extraParams = extraParams;
- this.promotionCode = promotionCode;
- }
-
- public static Builder builder() {
- return new Builder();
- }
-
- public static class Builder {
- private Object coupon;
-
- private Object discount;
-
- private DiscountEnd discountEnd;
-
- private Map extraParams;
-
- private Object promotionCode;
-
- /** Finalize and obtain parameter instance from this builder. */
- public QuoteUpdateParams.Phase.LineItem.Discount build() {
- return new QuoteUpdateParams.Phase.LineItem.Discount(
- this.coupon, this.discount, this.discountEnd, this.extraParams, this.promotionCode);
- }
-
- /** ID of the coupon to create a new discount for. */
- public Builder setCoupon(String coupon) {
- this.coupon = coupon;
- return this;
- }
-
- /** ID of the coupon to create a new discount for. */
- public Builder setCoupon(EmptyParam coupon) {
- this.coupon = coupon;
- return this;
- }
-
- /** ID of an existing discount on the object (or one of its ancestors) to reuse. */
- public Builder setDiscount(String discount) {
- this.discount = discount;
- return this;
- }
-
- /** ID of an existing discount on the object (or one of its ancestors) to reuse. */
- public Builder setDiscount(EmptyParam discount) {
- this.discount = discount;
- return this;
- }
-
- /** Details to determine how long the discount should be applied for. */
- public Builder setDiscountEnd(
- QuoteUpdateParams.Phase.LineItem.Discount.DiscountEnd discountEnd) {
- this.discountEnd = discountEnd;
- return this;
- }
-
- /**
- * Add a key/value pair to `extraParams` map. A map is initialized for the first
- * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
- * map. See {@link QuoteUpdateParams.Phase.LineItem.Discount#extraParams} for the field
- * documentation.
- */
- public Builder putExtraParam(String key, Object value) {
- if (this.extraParams == null) {
- this.extraParams = new HashMap<>();
- }
- this.extraParams.put(key, value);
- return this;
- }
-
- /**
- * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
- * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
- * map. See {@link QuoteUpdateParams.Phase.LineItem.Discount#extraParams} for the field
- * documentation.
- */
- public Builder putAllExtraParam(Map map) {
- if (this.extraParams == null) {
- this.extraParams = new HashMap<>();
- }
- this.extraParams.putAll(map);
- return this;
- }
-
- /** ID of the promotion code to create a new discount for. */
- public Builder setPromotionCode(String promotionCode) {
- this.promotionCode = promotionCode;
- return this;
- }
-
- /** ID of the promotion code to create a new discount for. */
- public Builder setPromotionCode(EmptyParam promotionCode) {
- this.promotionCode = promotionCode;
- return this;
- }
- }
-
- @Getter
- public static class DiscountEnd {
- /** Time span for the redeemed discount. */
- @SerializedName("duration")
- Duration duration;
-
- /**
- * Map of extra parameters for custom features not available in this client library. The
- * content in this map is not serialized under this field's {@code @SerializedName} value.
- * Instead, each key/value pair is serialized as if the key is a root-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 precise Unix timestamp for the discount to end. Must be in the future. */
- @SerializedName("timestamp")
- Long timestamp;
-
- /**
- * Required. The type of calculation made to determine when the discount
- * ends.
- */
- @SerializedName("type")
- Type type;
-
- private DiscountEnd(
- Duration duration, Map extraParams, Long timestamp, Type type) {
- this.duration = duration;
- this.extraParams = extraParams;
- this.timestamp = timestamp;
- this.type = type;
- }
-
- public static Builder builder() {
- return new Builder();
- }
-
- public static class Builder {
- private Duration duration;
-
- private Map extraParams;
-
- private Long timestamp;
-
- private Type type;
-
- /** Finalize and obtain parameter instance from this builder. */
- public QuoteUpdateParams.Phase.LineItem.Discount.DiscountEnd build() {
- return new QuoteUpdateParams.Phase.LineItem.Discount.DiscountEnd(
- this.duration, this.extraParams, this.timestamp, this.type);
- }
-
- /** Time span for the redeemed discount. */
- public Builder setDuration(
- QuoteUpdateParams.Phase.LineItem.Discount.DiscountEnd.Duration duration) {
- this.duration = duration;
- return this;
- }
-
- /**
- * Add a key/value pair to `extraParams` map. A map is initialized for the first
- * `put/putAll` call, and subsequent calls add additional key/value pairs to the
- * original map. See {@link
- * QuoteUpdateParams.Phase.LineItem.Discount.DiscountEnd#extraParams} for the field
- * documentation.
- */
- public Builder putExtraParam(String key, Object value) {
- if (this.extraParams == null) {
- this.extraParams = new HashMap<>();
- }
- this.extraParams.put(key, value);
- return this;
- }
-
- /**
- * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
- * `put/putAll` call, and subsequent calls add additional key/value pairs to the
- * original map. See {@link
- * QuoteUpdateParams.Phase.LineItem.Discount.DiscountEnd#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 precise Unix timestamp for the discount to end. Must be in the future. */
- public Builder setTimestamp(Long timestamp) {
- this.timestamp = timestamp;
- return this;
- }
-
- /**
- * Required. The type of calculation made to determine when the
- * discount ends.
- */
- public Builder setType(
- QuoteUpdateParams.Phase.LineItem.Discount.DiscountEnd.Type type) {
- this.type = type;
- return this;
- }
- }
-
- @Getter
- public static class Duration {
- /**
- * Map of extra parameters for custom features not available in this client library. The
- * content in this map is not serialized under this field's {@code @SerializedName}
- * value. Instead, each key/value pair is serialized as if the key is a root-level field
- * (serialized) name in this param object. Effectively, this map is flattened to its
- * parent instance.
- */
- @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
- Map extraParams;
-
- /**
- * Required. Specifies a type of interval unit. Either {@code day},
- * {@code week}, {@code month} or {@code year}.
- */
- @SerializedName("interval")
- Interval interval;
-
- /**
- * Required. The number of intervals, as an whole number greater than
- * 0. Stripe multiplies this by the interval type to get the overall duration.
- */
- @SerializedName("interval_count")
- Long intervalCount;
-
- private Duration(
- Map extraParams, Interval interval, Long intervalCount) {
- this.extraParams = extraParams;
- this.interval = interval;
- this.intervalCount = intervalCount;
- }
-
- public static Builder builder() {
- return new Builder();
- }
-
- public static class Builder {
- private Map extraParams;
-
- private Interval interval;
-
- private Long intervalCount;
-
- /** Finalize and obtain parameter instance from this builder. */
- public QuoteUpdateParams.Phase.LineItem.Discount.DiscountEnd.Duration build() {
- return new QuoteUpdateParams.Phase.LineItem.Discount.DiscountEnd.Duration(
- this.extraParams, this.interval, this.intervalCount);
- }
-
- /**
- * Add a key/value pair to `extraParams` map. A map is initialized for the first
- * `put/putAll` call, and subsequent calls add additional key/value pairs to the
- * original map. See {@link
- * QuoteUpdateParams.Phase.LineItem.Discount.DiscountEnd.Duration#extraParams} for the
- * field documentation.
- */
- public Builder putExtraParam(String key, Object value) {
- if (this.extraParams == null) {
- this.extraParams = new HashMap<>();
- }
- this.extraParams.put(key, value);
- return this;
- }
-
- /**
- * Add all map key/value pairs to `extraParams` map. A map is initialized for the
- * first `put/putAll` call, and subsequent calls add additional key/value pairs to the
- * original map. See {@link
- * QuoteUpdateParams.Phase.LineItem.Discount.DiscountEnd.Duration#extraParams} for the
- * field documentation.
- */
- public Builder putAllExtraParam(Map map) {
- if (this.extraParams == null) {
- this.extraParams = new HashMap<>();
- }
- this.extraParams.putAll(map);
- return this;
- }
-
- /**
- * Required. Specifies a type of interval unit. Either {@code day},
- * {@code week}, {@code month} or {@code year}.
- */
- public Builder setInterval(
- QuoteUpdateParams.Phase.LineItem.Discount.DiscountEnd.Duration.Interval
- interval) {
- this.interval = interval;
- return this;
- }
-
- /**
- * Required. The number of intervals, as an whole number greater than
- * 0. Stripe multiplies this by the interval type to get the overall duration.
- */
- public Builder setIntervalCount(Long intervalCount) {
- this.intervalCount = intervalCount;
- return this;
- }
- }
-
- public enum Interval implements ApiRequestParams.EnumParam {
- @SerializedName("day")
- DAY("day"),
-
- @SerializedName("month")
- MONTH("month"),
-
- @SerializedName("week")
- WEEK("week"),
-
- @SerializedName("year")
- YEAR("year");
-
- @Getter(onMethod_ = {@Override})
- private final String value;
-
- Interval(String value) {
- this.value = value;
- }
- }
- }
-
- public enum Type implements ApiRequestParams.EnumParam {
- @SerializedName("duration")
- DURATION("duration"),
-
- @SerializedName("timestamp")
- TIMESTAMP("timestamp");
-
- @Getter(onMethod_ = {@Override})
- private final String value;
-
- Type(String value) {
- this.value = value;
- }
- }
- }
- }
-
- @Getter
- public static class PriceData {
- /**
- * Required. Three-letter ISO currency code, in
- * lowercase. Must be a supported currency.
- */
- @SerializedName("currency")
- Object currency;
-
- /**
- * Map of extra parameters for custom features not available in this client library. The
- * content in this map is not serialized under this field's {@code @SerializedName} value.
- * Instead, each key/value pair is serialized as if the key is a root-level field
- * (serialized) name in this param object. Effectively, this map is flattened to its parent
- * instance.
- */
- @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
- Map extraParams;
-
- /** Required. The ID of the product that this price will belong to. */
- @SerializedName("product")
- Object product;
-
- /**
- * The recurring components of a price such as {@code interval} and {@code interval_count}.
- */
- @SerializedName("recurring")
- Recurring recurring;
-
- /**
- * Only required if a default
- * tax behavior was not provided in the Stripe Tax settings. Specifies whether the price
- * is considered inclusive of taxes or exclusive of taxes. One of {@code inclusive}, {@code
- * exclusive}, or {@code unspecified}. Once specified as either {@code inclusive} or {@code
- * exclusive}, it cannot be changed.
- */
- @SerializedName("tax_behavior")
- TaxBehavior taxBehavior;
-
- /**
- * A positive integer in cents (or local equivalent) (or 0 for a free price) representing
- * how much to charge.
- */
- @SerializedName("unit_amount")
- Long unitAmount;
-
- /**
- * Same as {@code unit_amount}, but accepts a decimal value in cents (or local equivalent)
- * with at most 12 decimal places. Only one of {@code unit_amount} and {@code
- * unit_amount_decimal} can be set.
- */
- @SerializedName("unit_amount_decimal")
- Object unitAmountDecimal;
-
- private PriceData(
- Object currency,
- Map extraParams,
- Object product,
- Recurring recurring,
- TaxBehavior taxBehavior,
- Long unitAmount,
- Object unitAmountDecimal) {
- this.currency = currency;
- this.extraParams = extraParams;
- this.product = product;
- this.recurring = recurring;
- this.taxBehavior = taxBehavior;
- this.unitAmount = unitAmount;
- this.unitAmountDecimal = unitAmountDecimal;
- }
-
- public static Builder builder() {
- return new Builder();
- }
-
- public static class Builder {
- private Object currency;
-
- private Map extraParams;
-
- private Object product;
-
- private Recurring recurring;
-
- private TaxBehavior taxBehavior;
-
- private Long unitAmount;
-
- private Object unitAmountDecimal;
-
- /** Finalize and obtain parameter instance from this builder. */
- public QuoteUpdateParams.Phase.LineItem.PriceData build() {
- return new QuoteUpdateParams.Phase.LineItem.PriceData(
- this.currency,
- this.extraParams,
- this.product,
- this.recurring,
- this.taxBehavior,
- this.unitAmount,
- this.unitAmountDecimal);
- }
-
- /**
- * Required. Three-letter ISO currency code, in
- * lowercase. Must be a supported
- * currency.
- */
- public Builder setCurrency(String currency) {
- this.currency = currency;
- return this;
- }
-
- /**
- * Required. Three-letter ISO currency code, in
- * lowercase. Must be a supported
- * currency.
- */
- public Builder setCurrency(EmptyParam currency) {
- this.currency = currency;
- return this;
- }
-
- /**
- * Add a key/value pair to `extraParams` map. A map is initialized for the first
- * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
- * map. See {@link QuoteUpdateParams.Phase.LineItem.PriceData#extraParams} for the field
- * documentation.
- */
- public Builder putExtraParam(String key, Object value) {
- if (this.extraParams == null) {
- this.extraParams = new HashMap<>();
- }
- this.extraParams.put(key, value);
- return this;
- }
-
- /**
- * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
- * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
- * map. See {@link QuoteUpdateParams.Phase.LineItem.PriceData#extraParams} for the field
- * documentation.
- */
- public Builder putAllExtraParam(Map map) {
- if (this.extraParams == null) {
- this.extraParams = new HashMap<>();
- }
- this.extraParams.putAll(map);
- return this;
- }
-
- /** Required. The ID of the product that this price will belong to. */
- public Builder setProduct(String product) {
- this.product = product;
- return this;
- }
-
- /** Required. The ID of the product that this price will belong to. */
- public Builder setProduct(EmptyParam product) {
- this.product = product;
- return this;
- }
-
- /**
- * The recurring components of a price such as {@code interval} and {@code
- * interval_count}.
- */
- public Builder setRecurring(
- QuoteUpdateParams.Phase.LineItem.PriceData.Recurring recurring) {
- this.recurring = recurring;
- return this;
- }
-
- /**
- * Only required if a default
- * tax behavior was not provided in the Stripe Tax settings. Specifies whether the
- * price is considered inclusive of taxes or exclusive of taxes. One of {@code inclusive},
- * {@code exclusive}, or {@code unspecified}. Once specified as either {@code inclusive}
- * or {@code exclusive}, it cannot be changed.
- */
- public Builder setTaxBehavior(
- QuoteUpdateParams.Phase.LineItem.PriceData.TaxBehavior taxBehavior) {
- this.taxBehavior = taxBehavior;
- return this;
- }
-
- /**
- * A positive integer in cents (or local equivalent) (or 0 for a free price) representing
- * how much to charge.
- */
- public Builder setUnitAmount(Long unitAmount) {
- this.unitAmount = unitAmount;
- return this;
- }
-
- /**
- * Same as {@code unit_amount}, but accepts a decimal value in cents (or local equivalent)
- * with at most 12 decimal places. Only one of {@code unit_amount} and {@code
- * unit_amount_decimal} can be set.
- */
- public Builder setUnitAmountDecimal(BigDecimal unitAmountDecimal) {
- this.unitAmountDecimal = unitAmountDecimal;
- return this;
- }
-
- /**
- * Same as {@code unit_amount}, but accepts a decimal value in cents (or local equivalent)
- * with at most 12 decimal places. Only one of {@code unit_amount} and {@code
- * unit_amount_decimal} can be set.
- */
- public Builder setUnitAmountDecimal(EmptyParam unitAmountDecimal) {
- this.unitAmountDecimal = unitAmountDecimal;
- return this;
- }
- }
-
- @Getter
- public static class Recurring {
- /**
- * Map of extra parameters for custom features not available in this client library. The
- * content in this map is not serialized under this field's {@code @SerializedName} value.
- * Instead, each key/value pair is serialized as if the key is a root-level field
- * (serialized) name in this param object. Effectively, this map is flattened to its
- * parent instance.
- */
- @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
- Map extraParams;
-
- /**
- * Required. Specifies billing frequency. Either {@code day}, {@code
- * week}, {@code month} or {@code year}.
- */
- @SerializedName("interval")
- Interval interval;
-
- /**
- * The number of intervals between subscription billings. For example, {@code
- * interval=month} and {@code interval_count=3} bills every 3 months. Maximum of three
- * years interval allowed (3 years, 36 months, or 156 weeks).
- */
- @SerializedName("interval_count")
- Long intervalCount;
-
- private Recurring(
- Map extraParams, Interval interval, Long intervalCount) {
- this.extraParams = extraParams;
- this.interval = interval;
- this.intervalCount = intervalCount;
- }
-
- public static Builder builder() {
- return new Builder();
- }
-
- public static class Builder {
- private Map extraParams;
-
- private Interval interval;
-
- private Long intervalCount;
-
- /** Finalize and obtain parameter instance from this builder. */
- public QuoteUpdateParams.Phase.LineItem.PriceData.Recurring build() {
- return new QuoteUpdateParams.Phase.LineItem.PriceData.Recurring(
- this.extraParams, this.interval, this.intervalCount);
- }
-
- /**
- * Add a key/value pair to `extraParams` map. A map is initialized for the first
- * `put/putAll` call, and subsequent calls add additional key/value pairs to the
- * original map. See {@link
- * QuoteUpdateParams.Phase.LineItem.PriceData.Recurring#extraParams} for the field
- * documentation.
- */
- public Builder putExtraParam(String key, Object value) {
- if (this.extraParams == null) {
- this.extraParams = new HashMap<>();
- }
- this.extraParams.put(key, value);
- return this;
- }
-
- /**
- * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
- * `put/putAll` call, and subsequent calls add additional key/value pairs to the
- * original map. See {@link
- * QuoteUpdateParams.Phase.LineItem.PriceData.Recurring#extraParams} for the field
- * documentation.
- */
- public Builder putAllExtraParam(Map map) {
- if (this.extraParams == null) {
- this.extraParams = new HashMap<>();
- }
- this.extraParams.putAll(map);
- return this;
- }
-
- /**
- * Required. Specifies billing frequency. Either {@code day}, {@code
- * week}, {@code month} or {@code year}.
- */
- public Builder setInterval(
- QuoteUpdateParams.Phase.LineItem.PriceData.Recurring.Interval interval) {
- this.interval = interval;
- return this;
- }
-
- /**
- * The number of intervals between subscription billings. For example, {@code
- * interval=month} and {@code interval_count=3} bills every 3 months. Maximum of three
- * years interval allowed (3 years, 36 months, or 156 weeks).
- */
- public Builder setIntervalCount(Long intervalCount) {
- this.intervalCount = intervalCount;
- return this;
- }
- }
-
- public enum Interval implements ApiRequestParams.EnumParam {
- @SerializedName("day")
- DAY("day"),
-
- @SerializedName("month")
- MONTH("month"),
-
- @SerializedName("week")
- WEEK("week"),
-
- @SerializedName("year")
- YEAR("year");
-
- @Getter(onMethod_ = {@Override})
- private final String value;
-
- Interval(String value) {
- this.value = value;
- }
- }
- }
-
- public enum TaxBehavior implements ApiRequestParams.EnumParam {
- @SerializedName("exclusive")
- EXCLUSIVE("exclusive"),
-
- @SerializedName("inclusive")
- INCLUSIVE("inclusive"),
-
- @SerializedName("unspecified")
- UNSPECIFIED("unspecified");
-
- @Getter(onMethod_ = {@Override})
- private final String value;
-
- TaxBehavior(String value) {
- this.value = value;
- }
- }
- }
- }
-
- public enum BillingCycleAnchor implements ApiRequestParams.EnumParam {
- @SerializedName("reset")
- RESET("reset");
-
- @Getter(onMethod_ = {@Override})
- private final String value;
-
- BillingCycleAnchor(String value) {
- this.value = value;
- }
- }
-
- public enum CollectionMethod implements ApiRequestParams.EnumParam {
- @SerializedName("charge_automatically")
- CHARGE_AUTOMATICALLY("charge_automatically"),
-
- @SerializedName("send_invoice")
- SEND_INVOICE("send_invoice");
-
- @Getter(onMethod_ = {@Override})
- private final String value;
-
- CollectionMethod(String value) {
- this.value = value;
- }
- }
-
- public enum ProrationBehavior implements ApiRequestParams.EnumParam {
- @SerializedName("always_invoice")
- ALWAYS_INVOICE("always_invoice"),
-
- @SerializedName("create_prorations")
- CREATE_PRORATIONS("create_prorations"),
-
- @SerializedName("none")
- NONE("none");
-
- @Getter(onMethod_ = {@Override})
- private final String value;
-
- ProrationBehavior(String value) {
- this.value = value;
- }
- }
- }
-
@Getter
public static class SubscriptionData {
/** Describes the period to bill for upon accepting the quote. */
From bdac07dc08963ef3f0a3b169ec51e96173e02055 Mon Sep 17 00:00:00 2001
From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>
Date: Fri, 16 Aug 2024 02:40:12 +0000
Subject: [PATCH 04/16] Update generated code for v1204
---
OPENAPI_VERSION | 2 +-
.../stripe/model/EventDataClassLookup.java | 3 -
.../issuing/DisputeSettlementDetail.java | 142 ------------------
...DisputeSettlementDetailRetrieveParams.java | 99 ------------
.../com/stripe/service/IssuingService.java | 4 -
.../DisputeSettlementDetailService.java | 59 --------
6 files changed, 1 insertion(+), 308 deletions(-)
delete mode 100644 src/main/java/com/stripe/model/issuing/DisputeSettlementDetail.java
delete mode 100644 src/main/java/com/stripe/param/issuing/DisputeSettlementDetailRetrieveParams.java
delete mode 100644 src/main/java/com/stripe/service/issuing/DisputeSettlementDetailService.java
diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION
index a8ae45aaca9..61f85212339 100644
--- a/OPENAPI_VERSION
+++ b/OPENAPI_VERSION
@@ -1 +1 @@
-v1203
\ No newline at end of file
+v1204
\ No newline at end of file
diff --git a/src/main/java/com/stripe/model/EventDataClassLookup.java b/src/main/java/com/stripe/model/EventDataClassLookup.java
index 98b99ca6568..50d8a74701d 100644
--- a/src/main/java/com/stripe/model/EventDataClassLookup.java
+++ b/src/main/java/com/stripe/model/EventDataClassLookup.java
@@ -165,9 +165,6 @@ final class EventDataClassLookup {
"issuing.credit_underwriting_record",
com.stripe.model.issuing.CreditUnderwritingRecord.class);
classLookup.put("issuing.dispute", com.stripe.model.issuing.Dispute.class);
- classLookup.put(
- "issuing.dispute_settlement_detail",
- com.stripe.model.issuing.DisputeSettlementDetail.class);
classLookup.put(
"issuing.personalization_design", com.stripe.model.issuing.PersonalizationDesign.class);
classLookup.put("issuing.physical_bundle", com.stripe.model.issuing.PhysicalBundle.class);
diff --git a/src/main/java/com/stripe/model/issuing/DisputeSettlementDetail.java b/src/main/java/com/stripe/model/issuing/DisputeSettlementDetail.java
deleted file mode 100644
index 0553a13ccfd..00000000000
--- a/src/main/java/com/stripe/model/issuing/DisputeSettlementDetail.java
+++ /dev/null
@@ -1,142 +0,0 @@
-// File generated from our OpenAPI spec
-package com.stripe.model.issuing;
-
-import com.google.gson.annotations.SerializedName;
-import com.stripe.exception.StripeException;
-import com.stripe.model.HasId;
-import com.stripe.net.ApiMode;
-import com.stripe.net.ApiRequest;
-import com.stripe.net.ApiRequestParams;
-import com.stripe.net.ApiResource;
-import com.stripe.net.BaseAddress;
-import com.stripe.net.RequestOptions;
-import com.stripe.param.issuing.DisputeSettlementDetailRetrieveParams;
-import java.util.Map;
-import lombok.EqualsAndHashCode;
-import lombok.Getter;
-import lombok.Setter;
-
-/**
- * Represents a record from the card network of a money movement or change in state for an Issuing
- * dispute. These records are included in the settlement reports that we receive from networks and
- * expose to users as Settlement objects.
- */
-@Getter
-@Setter
-@EqualsAndHashCode(callSuper = false)
-public class DisputeSettlementDetail extends ApiResource implements HasId {
- /**
- * Disputed amount in the card’s currency and in the smallest currency unit. Usually the amount of
- * the transaction, but can differ (usually because of currency fluctuation).
- */
- @SerializedName("amount")
- Long amount;
-
- /** Time at which the object was created. Measured in seconds since the Unix epoch. */
- @SerializedName("created")
- Long created;
-
- /**
- * The currency the original transaction was made in. Three-letter ISO currency code, in lowercase.
- * Must be a supported currency.
- */
- @SerializedName("currency")
- String currency;
-
- /** The ID of the linked dispute. */
- @SerializedName("dispute")
- String dispute;
-
- /**
- * The type of event corresponding to this dispute settlement detail, representing the stage in
- * the dispute network lifecycle.
- *
- * One of {@code filing}, {@code loss}, {@code representment}, or {@code win}.
- */
- @SerializedName("event_type")
- String eventType;
-
- /** Unique identifier for the object. */
- @Getter(onMethod_ = {@Override})
- @SerializedName("id")
- String id;
-
- /** The card used to make the original transaction. */
- @SerializedName("issued_card")
- String issuedCard;
-
- /**
- * 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 card network for this dispute settlement detail. One of ["visa",
- * "mastercard", "maestro"]
- */
- @SerializedName("network")
- String network;
-
- /**
- * String representing the object's type. Objects of the same type share the same value.
- *
- *
Equal to {@code issuing.dispute_settlement_detail}.
- */
- @SerializedName("object")
- String object;
-
- /** The ID of the linked card network settlement. */
- @SerializedName("settlement")
- String settlement;
-
- /** Retrieves an Issuing {@code DisputeSettlementDetail} object. */
- public static DisputeSettlementDetail retrieve(String disputeSettlementDetail)
- throws StripeException {
- return retrieve(disputeSettlementDetail, (Map) null, (RequestOptions) null);
- }
-
- /** Retrieves an Issuing {@code DisputeSettlementDetail} object. */
- public static DisputeSettlementDetail retrieve(
- String disputeSettlementDetail, RequestOptions options) throws StripeException {
- return retrieve(disputeSettlementDetail, (Map