diff --git a/CHANGELOG.md b/CHANGELOG.md
index e1a735937d5..71e703488a8 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,12 @@
# Changelog
+## 26.12.0 - 2024-09-18
+* [#1866](https://github.com/stripe/stripe-java/pull/1866) Update generated code
+ * Add support for `payer_details` on `Charge.payment_method_details.klarna`
+ * Add support for `amazon_pay` on `Dispute.payment_method_details`
+ * Add support for `automatically_finalizes_at` on `Invoice`
+ * Add support for `state_sales_tax` on `Tax.Registration.country_options.us` and `tax.RegistrationCreateParams.country_options.us`
+
## 26.12.0-beta.1 - 2024-09-13
* [#1862](https://github.com/stripe/stripe-java/pull/1862) Update generated code for beta
* Add support for new resources `Issuing.DisputeSettlementDetail` and `Issuing.Settlement`
@@ -9,6 +16,14 @@
* Add support for `settlement` on `Issuing.Transaction` and `issuing.TransactionListParams`
* Add support for new values `issuing_dispute_settlement_detail.created`, `issuing_dispute_settlement_detail.updated`, `issuing_settlement.created`, and `issuing_settlement.updated` on enums `WebhookEndpointCreateParams.enabled_events[]` and `WebhookEndpointUpdateParams.enabled_events[]`
+## 26.11.0 - 2024-09-12
+* [#1864](https://github.com/stripe/stripe-java/pull/1864) Update generated code
+ * Add support for new resource `InvoiceRenderingTemplate`
+ * Add support for `archive`, `list`, `retrieve`, and `unarchive` methods on resource `InvoiceRenderingTemplate`
+ * Add support for `required` on `Checkout.Session.tax_id_collection`, `PaymentLink.tax_id_collection`, `PaymentLinkCreateParams.tax_id_collection`, `PaymentLinkUpdateParams.tax_id_collection`, and `checkout.SessionCreateParams.tax_id_collection`
+ * Add support for `template` on `Customer.invoice_settings.rendering_options`, `CustomerCreateParams.invoice_settings.rendering_options`, `CustomerUpdateParams.invoice_settings.rendering_options`, `Invoice.rendering`, `InvoiceCreateParams.rendering`, and `InvoiceUpdateParams.rendering`
+ * Add support for `template_version` on `Invoice.rendering`, `InvoiceCreateParams.rendering`, and `InvoiceUpdateParams.rendering`
+
## 26.11.0-beta.1 - 2024-09-05
* [#1859](https://github.com/stripe/stripe-java/pull/1859) Update generated code for beta
* Add support for `recipients` on `AccountSessionCreateParams.components`
diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION
index b39b96e3790..5f5b311191b 100644
--- a/OPENAPI_VERSION
+++ b/OPENAPI_VERSION
@@ -1 +1 @@
-v1259
\ No newline at end of file
+v1267
\ No newline at end of file
diff --git a/src/main/java/com/stripe/ApiVersion.java b/src/main/java/com/stripe/ApiVersion.java
index 3687a0cb43a..5563049c180 100644
--- a/src/main/java/com/stripe/ApiVersion.java
+++ b/src/main/java/com/stripe/ApiVersion.java
@@ -3,5 +3,5 @@
final class ApiVersion {
public static final String CURRENT = "2024-06-20";
- public static final String PREVIEW_CURRENT = "2024-09-05.preview-v2";
+ public static final String PREVIEW_CURRENT = "cs_ubb_launch";
}
diff --git a/src/main/java/com/stripe/StripeClient.java b/src/main/java/com/stripe/StripeClient.java
index e558af63b41..3e6e79b14f6 100644
--- a/src/main/java/com/stripe/StripeClient.java
+++ b/src/main/java/com/stripe/StripeClient.java
@@ -275,10 +275,6 @@ public com.stripe.service.PromotionCodeService promotionCodes() {
return new com.stripe.service.PromotionCodeService(this.getResponseGetter());
}
- public com.stripe.service.QuotePhaseService quotePhases() {
- return new com.stripe.service.QuotePhaseService(this.getResponseGetter());
- }
-
public com.stripe.service.QuoteService quotes() {
return new com.stripe.service.QuoteService(this.getResponseGetter());
}
diff --git a/src/main/java/com/stripe/model/Account.java b/src/main/java/com/stripe/model/Account.java
index c2a6fb660ea..aa90f203959 100644
--- a/src/main/java/com/stripe/model/Account.java
+++ b/src/main/java/com/stripe/model/Account.java
@@ -1854,8 +1854,9 @@ public static class Errors extends StripeObject {
* verification_failed_residential_address}, {@code verification_failed_tax_id_match}, {@code
* verification_failed_tax_id_not_issued}, {@code verification_missing_directors}, {@code
* verification_missing_executives}, {@code verification_missing_owners}, {@code
- * verification_requires_additional_memorandum_of_associations}, or {@code
- * verification_requires_additional_proof_of_registration}.
+ * verification_requires_additional_memorandum_of_associations}, {@code
+ * verification_requires_additional_proof_of_registration}, or {@code
+ * verification_supportability}.
*/
@SerializedName("code")
String code;
@@ -2022,8 +2023,9 @@ public static class Errors extends StripeObject {
* verification_failed_residential_address}, {@code verification_failed_tax_id_match}, {@code
* verification_failed_tax_id_not_issued}, {@code verification_missing_directors}, {@code
* verification_missing_executives}, {@code verification_missing_owners}, {@code
- * verification_requires_additional_memorandum_of_associations}, or {@code
- * verification_requires_additional_proof_of_registration}.
+ * verification_requires_additional_memorandum_of_associations}, {@code
+ * verification_requires_additional_proof_of_registration}, or {@code
+ * verification_supportability}.
*/
@SerializedName("code")
String code;
diff --git a/src/main/java/com/stripe/model/BankAccount.java b/src/main/java/com/stripe/model/BankAccount.java
index a6b6e5a44ca..c0ee9156f8b 100644
--- a/src/main/java/com/stripe/model/BankAccount.java
+++ b/src/main/java/com/stripe/model/BankAccount.java
@@ -589,8 +589,9 @@ public static class Errors extends StripeObject {
* verification_failed_residential_address}, {@code verification_failed_tax_id_match}, {@code
* verification_failed_tax_id_not_issued}, {@code verification_missing_directors}, {@code
* verification_missing_executives}, {@code verification_missing_owners}, {@code
- * verification_requires_additional_memorandum_of_associations}, or {@code
- * verification_requires_additional_proof_of_registration}.
+ * verification_requires_additional_memorandum_of_associations}, {@code
+ * verification_requires_additional_proof_of_registration}, or {@code
+ * verification_supportability}.
*/
@SerializedName("code")
String code;
@@ -706,8 +707,9 @@ public static class Errors extends StripeObject {
* verification_failed_residential_address}, {@code verification_failed_tax_id_match}, {@code
* verification_failed_tax_id_not_issued}, {@code verification_missing_directors}, {@code
* verification_missing_executives}, {@code verification_missing_owners}, {@code
- * verification_requires_additional_memorandum_of_associations}, or {@code
- * verification_requires_additional_proof_of_registration}.
+ * verification_requires_additional_memorandum_of_associations}, {@code
+ * verification_requires_additional_proof_of_registration}, or {@code
+ * verification_supportability}.
*/
@SerializedName("code")
String code;
diff --git a/src/main/java/com/stripe/model/Capability.java b/src/main/java/com/stripe/model/Capability.java
index 38866e2689a..3d62d9f46a8 100644
--- a/src/main/java/com/stripe/model/Capability.java
+++ b/src/main/java/com/stripe/model/Capability.java
@@ -285,8 +285,9 @@ public static class Errors extends StripeObject {
* verification_failed_residential_address}, {@code verification_failed_tax_id_match}, {@code
* verification_failed_tax_id_not_issued}, {@code verification_missing_directors}, {@code
* verification_missing_executives}, {@code verification_missing_owners}, {@code
- * verification_requires_additional_memorandum_of_associations}, or {@code
- * verification_requires_additional_proof_of_registration}.
+ * verification_requires_additional_memorandum_of_associations}, {@code
+ * verification_requires_additional_proof_of_registration}, or {@code
+ * verification_supportability}.
*/
@SerializedName("code")
String code;
@@ -454,8 +455,9 @@ public static class Errors extends StripeObject {
* verification_failed_residential_address}, {@code verification_failed_tax_id_match}, {@code
* verification_failed_tax_id_not_issued}, {@code verification_missing_directors}, {@code
* verification_missing_executives}, {@code verification_missing_owners}, {@code
- * verification_requires_additional_memorandum_of_associations}, or {@code
- * verification_requires_additional_proof_of_registration}.
+ * verification_requires_additional_memorandum_of_associations}, {@code
+ * verification_requires_additional_proof_of_registration}, or {@code
+ * verification_supportability}.
*/
@SerializedName("code")
String code;
diff --git a/src/main/java/com/stripe/model/Charge.java b/src/main/java/com/stripe/model/Charge.java
index 8a8abd66e1b..ebf0a046d32 100644
--- a/src/main/java/com/stripe/model/Charge.java
+++ b/src/main/java/com/stripe/model/Charge.java
@@ -927,7 +927,7 @@ public Charge update(ChargeUpdateParams params, RequestOptions options) throws S
public static class BillingDetails extends StripeObject {
/** Billing address. */
@SerializedName("address")
- Address address;
+ com.stripe.model.Address address;
/** Email address. */
@SerializedName("email")
@@ -1987,7 +1987,7 @@ public static class Masterpass extends StripeObject {
* or mutated.
*/
@SerializedName("billing_address")
- Address billingAddress;
+ com.stripe.model.Address billingAddress;
/**
* Owner's verified email. Values are verified or provided by the wallet directly (if
@@ -2009,7 +2009,7 @@ public static class Masterpass extends StripeObject {
* or mutated.
*/
@SerializedName("shipping_address")
- Address shippingAddress;
+ com.stripe.model.Address shippingAddress;
}
@Getter
@@ -2027,7 +2027,7 @@ public static class VisaCheckout extends StripeObject {
* or mutated.
*/
@SerializedName("billing_address")
- Address billingAddress;
+ com.stripe.model.Address billingAddress;
/**
* Owner's verified email. Values are verified or provided by the wallet directly (if
@@ -2049,7 +2049,7 @@ public static class VisaCheckout extends StripeObject {
* or mutated.
*/
@SerializedName("shipping_address")
- Address shippingAddress;
+ com.stripe.model.Address shippingAddress;
}
}
}
@@ -2686,6 +2686,10 @@ public static class Receipt extends StripeObject {
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Klarna extends StripeObject {
+ /** The payer details for this transaction. */
+ @SerializedName("payer_details")
+ PayerDetails payerDetails;
+
/**
* The Klarna payment method used for this transaction. Can be one of {@code pay_later},
* {@code pay_now}, {@code pay_with_financing}, or {@code pay_in_installments}
@@ -2706,6 +2710,24 @@ public static class Klarna extends StripeObject {
*/
@SerializedName("preferred_locale")
String preferredLocale;
+
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class PayerDetails extends StripeObject {
+ /** The payer's address. */
+ @SerializedName("address")
+ com.stripe.model.Charge.PaymentMethodDetails.Klarna.PayerDetails.Address address;
+
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Address extends StripeObject {
+ /** The payer address country. */
+ @SerializedName("country")
+ String country;
+ }
+ }
}
@Getter
@@ -2880,7 +2902,7 @@ public static class Paypal extends StripeObject {
* address on the PaymentIntent after the PaymentIntent was successfully confirmed.
*/
@SerializedName("shipping")
- Address shipping;
+ com.stripe.model.Address shipping;
/** A unique ID generated by PayPal for this transaction. */
@SerializedName("transaction_id")
@@ -2892,7 +2914,7 @@ public static class Paypal extends StripeObject {
* address on the PaymentIntent after the PaymentIntent was successfully confirmed.
*/
@SerializedName("verified_address")
- Address verifiedAddress;
+ com.stripe.model.Address verifiedAddress;
/**
* Owner's verified email. Values are verified or provided by PayPal directly (if supported)
diff --git a/src/main/java/com/stripe/model/Dispute.java b/src/main/java/com/stripe/model/Dispute.java
index 41e2295a301..8e35cedf086 100644
--- a/src/main/java/com/stripe/model/Dispute.java
+++ b/src/main/java/com/stripe/model/Dispute.java
@@ -1022,6 +1022,9 @@ public static class VisaCompellingEvidence3 extends StripeObject {
@Setter
@EqualsAndHashCode(callSuper = false)
public static class PaymentMethodDetails extends StripeObject {
+ @SerializedName("amazon_pay")
+ AmazonPay amazonPay;
+
@SerializedName("card")
Card card;
@@ -1034,11 +1037,24 @@ public static class PaymentMethodDetails extends StripeObject {
/**
* Payment method type.
*
- *
One of {@code card}, {@code klarna}, or {@code paypal}.
+ *
One of {@code amazon_pay}, {@code card}, {@code klarna}, or {@code paypal}.
*/
@SerializedName("type")
String type;
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class AmazonPay extends StripeObject {
+ /**
+ * The AmazonPay dispute type, chargeback or claim
+ *
+ *
One of {@code chargeback}, or {@code claim}.
+ */
+ @SerializedName("dispute_type")
+ String disputeType;
+ }
+
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
diff --git a/src/main/java/com/stripe/model/EventDataClassLookup.java b/src/main/java/com/stripe/model/EventDataClassLookup.java
index 95687d4d0f6..6145aba4d02 100644
--- a/src/main/java/com/stripe/model/EventDataClassLookup.java
+++ b/src/main/java/com/stripe/model/EventDataClassLookup.java
@@ -69,7 +69,6 @@ final class EventDataClassLookup {
classLookup.put("promotion_code", PromotionCode.class);
classLookup.put("quote", Quote.class);
classLookup.put("quote_line", QuoteLine.class);
- classLookup.put("quote_phase", QuotePhase.class);
classLookup.put("quote_preview_invoice", QuotePreviewInvoice.class);
classLookup.put("quote_preview_subscription_schedule", QuotePreviewSubscriptionSchedule.class);
classLookup.put("refund", Refund.class);
diff --git a/src/main/java/com/stripe/model/Invoice.java b/src/main/java/com/stripe/model/Invoice.java
index d696f657bfd..9f1583fce7c 100644
--- a/src/main/java/com/stripe/model/Invoice.java
+++ b/src/main/java/com/stripe/model/Invoice.java
@@ -165,6 +165,15 @@ public class Invoice extends ApiResource implements HasId, MetadataStoredocumentation.
- *
- * Equal to {@code reset}.
- */
- @SerializedName("billing_cycle_anchor")
- String 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}.
- *
- *
One of {@code charge_automatically}, or {@code send_invoice}.
- */
- @SerializedName("collection_method")
- String collectionMethod;
-
- /** The default tax rates to apply to the subscription during this phase of the quote. */
- @SerializedName("default_tax_rates")
- List> defaultTaxRates;
-
- /**
- * The stackable discounts that will be applied to the subscription on this phase. Subscription
- * item discounts are applied before subscription discounts.
- */
- @SerializedName("discounts")
- List> discounts;
-
- /** The end of this phase of the quote. */
- @SerializedName("end_date")
- Long endDate;
-
- /** Unique identifier for the object. */
- @Getter(onMethod_ = {@Override})
- @SerializedName("id")
- String id;
-
- /** The invoice settings applicable during this phase. */
- @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}.
- */
- @SerializedName("iterations")
- Long iterations;
-
- /** A list of items the customer is being quoted for. */
- @SerializedName("line_items")
- LineItemCollection lineItems;
-
- /**
- * Set of key-value pairs that will
- * declaratively set metadata on the subscription schedule's phases when the quote is accepted.
- */
- @SerializedName("metadata")
- Map metadata;
-
- /**
- * String representing the object's type. Objects of the same type share the same value.
- *
- * Equal to {@code quote_phase}.
- */
- @SerializedName("object")
- String object;
-
- /**
- * If the quote will prorate when transitioning to this phase. Possible values are {@code
- * create_prorations} and {@code none}.
- *
- *
One of {@code always_invoice}, {@code create_prorations}, or {@code none}.
- */
- @SerializedName("proration_behavior")
- String prorationBehavior;
-
- @SerializedName("total_details")
- TotalDetails totalDetails;
-
- /**
- * If set to true the entire phase is counted as a trial and the customer will not be charged for
- * any recurring fees.
- */
- @SerializedName("trial")
- Boolean trial;
-
- /** When the trial ends within the phase. */
- @SerializedName("trial_end")
- Long trialEnd;
-
- /** Get IDs of expandable {@code defaultTaxRates} object list. */
- public List getDefaultTaxRates() {
- return (this.defaultTaxRates != null)
- ? this.defaultTaxRates.stream().map(x -> x.getId()).collect(Collectors.toList())
- : null;
- }
-
- public void setDefaultTaxRates(List ids) {
- if (ids == null) {
- this.defaultTaxRates = null;
- return;
- }
- if (this.defaultTaxRates != null
- && this.defaultTaxRates.stream()
- .map(x -> x.getId())
- .collect(Collectors.toList())
- .equals(ids)) {
- // noop if the ids are equal to what are already present
- return;
- }
- this.defaultTaxRates =
- (ids != null)
- ? ids.stream()
- .map(id -> new ExpandableField(id, null))
- .collect(Collectors.toList())
- : null;
- }
-
- /** Get expanded {@code defaultTaxRates}. */
- public List getDefaultTaxRateObjects() {
- return (this.defaultTaxRates != null)
- ? this.defaultTaxRates.stream().map(x -> x.getExpanded()).collect(Collectors.toList())
- : null;
- }
-
- public void setDefaultTaxRateObjects(List objs) {
- this.defaultTaxRates =
- objs != null
- ? objs.stream()
- .map(x -> new ExpandableField(x.getId(), x))
- .collect(Collectors.toList())
- : null;
- }
-
- /** Get IDs of expandable {@code discounts} object list. */
- public List getDiscounts() {
- return (this.discounts != null)
- ? this.discounts.stream().map(x -> x.getId()).collect(Collectors.toList())
- : null;
- }
-
- public void setDiscounts(List ids) {
- if (ids == null) {
- this.discounts = null;
- return;
- }
- if (this.discounts != null
- && this.discounts.stream().map(x -> x.getId()).collect(Collectors.toList()).equals(ids)) {
- // noop if the ids are equal to what are already present
- return;
- }
- this.discounts =
- (ids != null)
- ? ids.stream()
- .map(id -> new ExpandableField(id, null))
- .collect(Collectors.toList())
- : null;
- }
-
- /** Get expanded {@code discounts}. */
- public List getDiscountObjects() {
- return (this.discounts != null)
- ? this.discounts.stream().map(x -> x.getExpanded()).collect(Collectors.toList())
- : null;
- }
-
- public void setDiscountObjects(List objs) {
- this.discounts =
- objs != null
- ? objs.stream()
- .map(x -> new ExpandableField(x.getId(), x))
- .collect(Collectors.toList())
- : null;
- }
-
- /**
- * When retrieving a quote phase, there is an includable line_items property
- * containing the first handful of those items. There is also a URL where you can retrieve the
- * full (paginated) list of line items.
- */
- public LineItemCollection listLineItems() throws StripeException {
- return listLineItems((Map) null, (RequestOptions) null);
- }
-
- /**
- * When retrieving a quote phase, there is an includable line_items property
- * containing the first handful of those items. There is also a URL where you can retrieve the
- * full (paginated) list of line items.
- */
- public LineItemCollection listLineItems(Map params) throws StripeException {
- return listLineItems(params, (RequestOptions) null);
- }
-
- /**
- * When retrieving a quote phase, there is an includable line_items property
- * containing the first handful of those items. There is also a URL where you can retrieve the
- * full (paginated) list of line items.
- */
- public LineItemCollection listLineItems(Map params, RequestOptions options)
- throws StripeException {
- String path =
- String.format("/v1/quote_phases/%s/line_items", ApiResource.urlEncodeId(this.getId()));
- ApiRequest request =
- new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.GET, path, params, options);
- return getResponseGetter().request(request, LineItemCollection.class);
- }
-
- /**
- * When retrieving a quote phase, there is an includable line_items property
- * containing the first handful of those items. There is also a URL where you can retrieve the
- * full (paginated) list of line items.
- */
- public LineItemCollection listLineItems(QuotePhaseListLineItemsParams params)
- throws StripeException {
- return listLineItems(params, (RequestOptions) null);
- }
-
- /**
- * When retrieving a quote phase, there is an includable line_items property
- * containing the first handful of those items. There is also a URL where you can retrieve the
- * full (paginated) list of line items.
- */
- public LineItemCollection listLineItems(
- QuotePhaseListLineItemsParams params, RequestOptions options) throws StripeException {
- String path =
- String.format("/v1/quote_phases/%s/line_items", ApiResource.urlEncodeId(this.getId()));
- ApiResource.checkNullTypedParams(path, params);
- ApiRequest request =
- new ApiRequest(
- BaseAddress.API,
- ApiResource.RequestMethod.GET,
- path,
- ApiRequestParams.paramsToMap(params),
- options);
- return getResponseGetter().request(request, LineItemCollection.class);
- }
-
- /** Retrieves the quote phase with the given ID. */
- public static QuotePhase retrieve(String quotePhase) throws StripeException {
- return retrieve(quotePhase, (Map) null, (RequestOptions) null);
- }
-
- /** Retrieves the quote phase with the given ID. */
- public static QuotePhase retrieve(String quotePhase, RequestOptions options)
- throws StripeException {
- return retrieve(quotePhase, (Map) null, options);
- }
-
- /** Retrieves the quote phase with the given ID. */
- public static QuotePhase retrieve(
- String quotePhase, Map params, RequestOptions options)
- throws StripeException {
- String path = String.format("/v1/quote_phases/%s", ApiResource.urlEncodeId(quotePhase));
- ApiRequest request =
- new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.GET, path, params, options);
- return getGlobalResponseGetter().request(request, QuotePhase.class);
- }
-
- /** Retrieves the quote phase with the given ID. */
- public static QuotePhase retrieve(
- String quotePhase, QuotePhaseRetrieveParams params, RequestOptions options)
- throws StripeException {
- String path = String.format("/v1/quote_phases/%s", ApiResource.urlEncodeId(quotePhase));
- ApiResource.checkNullTypedParams(path, params);
- ApiRequest request =
- new ApiRequest(
- BaseAddress.API,
- ApiResource.RequestMethod.GET,
- path,
- ApiRequestParams.paramsToMap(params),
- options);
- return getGlobalResponseGetter().request(request, QuotePhase.class);
- }
-
- @Getter
- @Setter
- @EqualsAndHashCode(callSuper = false)
- public static class InvoiceSettings extends StripeObject {
- /**
- * 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;
- }
-
- @Getter
- @Setter
- @EqualsAndHashCode(callSuper = false)
- public static class TotalDetails extends StripeObject {
- /** This is the sum of all the discounts. */
- @SerializedName("amount_discount")
- Long amountDiscount;
-
- /** This is the sum of all the shipping amounts. */
- @SerializedName("amount_shipping")
- Long amountShipping;
-
- /** This is the sum of all the tax amounts. */
- @SerializedName("amount_tax")
- Long amountTax;
-
- @SerializedName("breakdown")
- Breakdown breakdown;
-
- @Getter
- @Setter
- @EqualsAndHashCode(callSuper = false)
- public static class Breakdown extends StripeObject {
- /** The aggregated discounts. */
- @SerializedName("discounts")
- List discounts;
-
- /** The aggregated tax amounts by rate. */
- @SerializedName("taxes")
- List taxes;
-
- @Getter
- @Setter
- @EqualsAndHashCode(callSuper = false)
- public static class Discount extends StripeObject {
- /** The amount discounted. */
- @SerializedName("amount")
- Long amount;
-
- /**
- * A discount represents the actual application of a coupon or promotion code. It contains
- * information about when the discount began, when it will end, and what it is applied to.
- *
- * Related guide: Applying discounts to
- * subscriptions
- */
- @SerializedName("discount")
- com.stripe.model.Discount discount;
- }
-
- @Getter
- @Setter
- @EqualsAndHashCode(callSuper = false)
- public static class Tax extends StripeObject {
- /** Amount of tax applied for this rate. */
- @SerializedName("amount")
- Long amount;
-
- /**
- * Tax rates can be applied to invoices, subscriptions and Checkout
- * Sessions to collect tax.
- *
- *
Related guide: Tax rates
- */
- @SerializedName("rate")
- TaxRate rate;
-
- /**
- * The reasoning behind this tax, for example, if the product is tax exempt. The possible
- * values for this field may be extended as new tax rules are supported.
- *
- *
One of {@code customer_exempt}, {@code not_collecting}, {@code not_subject_to_tax},
- * {@code not_supported}, {@code portion_product_exempt}, {@code portion_reduced_rated},
- * {@code portion_standard_rated}, {@code product_exempt}, {@code product_exempt_holiday},
- * {@code proportionally_rated}, {@code reduced_rated}, {@code reverse_charge}, {@code
- * standard_rated}, {@code taxable_basis_reduced}, or {@code zero_rated}.
- */
- @SerializedName("taxability_reason")
- String taxabilityReason;
-
- /** The amount on which tax is calculated, in cents (or local equivalent). */
- @SerializedName("taxable_amount")
- Long taxableAmount;
- }
- }
- }
-
- @Override
- public void setResponseGetter(StripeResponseGetter responseGetter) {
- super.setResponseGetter(responseGetter);
- trySetResponseGetter(invoiceSettings, responseGetter);
- trySetResponseGetter(lineItems, responseGetter);
- trySetResponseGetter(totalDetails, responseGetter);
- }
-}
diff --git a/src/main/java/com/stripe/model/QuotePreviewInvoice.java b/src/main/java/com/stripe/model/QuotePreviewInvoice.java
index a6f5ca41c19..9a36401f734 100644
--- a/src/main/java/com/stripe/model/QuotePreviewInvoice.java
+++ b/src/main/java/com/stripe/model/QuotePreviewInvoice.java
@@ -142,6 +142,15 @@ public class QuotePreviewInvoice extends ApiResource implements HasId {
@SerializedName("automatic_tax")
AutomaticTax automaticTax;
+ /**
+ * The time when this invoice is currently scheduled to be automatically finalized. The field will
+ * be {@code null} if the invoice is not scheduled to finalize in the future. If the invoice is
+ * not in the draft state, this field will always be {@code null} - see {@code finalized_at} for
+ * the time when an already-finalized invoice was finalized.
+ */
+ @SerializedName("automatically_finalizes_at")
+ Long automaticallyFinalizesAt;
+
/**
* Indicates the reason why the invoice was created.
*
diff --git a/src/main/java/com/stripe/model/StripeError.java b/src/main/java/com/stripe/model/StripeError.java
index 0a5fd744812..8766dbf1968 100644
--- a/src/main/java/com/stripe/model/StripeError.java
+++ b/src/main/java/com/stripe/model/StripeError.java
@@ -92,10 +92,10 @@ public class StripeError extends StripeObject {
* status_transition_invalid}, {@code stripe_tax_inactive}, {@code tax_id_invalid}, {@code
* taxes_calculation_failed}, {@code terminal_location_country_unsupported}, {@code
* terminal_reader_busy}, {@code terminal_reader_collected_data_invalid}, {@code
- * terminal_reader_hardware_fault}, {@code terminal_reader_invalid_location_for_payment}, {@code
- * terminal_reader_offline}, {@code terminal_reader_timeout}, {@code testmode_charges_only},
- * {@code tls_version_unsupported}, {@code token_already_used}, {@code
- * token_card_network_invalid}, {@code token_in_use}, {@code
+ * terminal_reader_hardware_fault}, {@code terminal_reader_invalid_location_for_activation},
+ * {@code terminal_reader_invalid_location_for_payment}, {@code terminal_reader_offline}, {@code
+ * terminal_reader_timeout}, {@code testmode_charges_only}, {@code tls_version_unsupported},
+ * {@code token_already_used}, {@code token_card_network_invalid}, {@code token_in_use}, {@code
* transfer_source_balance_parameters_mismatch}, {@code transfers_not_allowed}, or {@code
* url_invalid}.
*/
diff --git a/src/main/java/com/stripe/model/tax/Registration.java b/src/main/java/com/stripe/model/tax/Registration.java
index 392449de0e0..280d7e594b7 100644
--- a/src/main/java/com/stripe/model/tax/Registration.java
+++ b/src/main/java/com/stripe/model/tax/Registration.java
@@ -15,6 +15,7 @@
import com.stripe.param.tax.RegistrationListParams;
import com.stripe.param.tax.RegistrationRetrieveParams;
import com.stripe.param.tax.RegistrationUpdateParams;
+import java.util.List;
import java.util.Map;
import lombok.EqualsAndHashCode;
import lombok.Getter;
@@ -1571,6 +1572,9 @@ public static class Us extends StripeObject {
@SerializedName("state")
String state;
+ @SerializedName("state_sales_tax")
+ StateSalesTax stateSalesTax;
+
/**
* Type of registration in the US.
*
@@ -1603,6 +1607,36 @@ public static class LocalLeaseTax extends StripeObject {
@SerializedName("jurisdiction")
String jurisdiction;
}
+
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class StateSalesTax extends StripeObject {
+ /** Elections for the state sales tax registration. */
+ @SerializedName("elections")
+ List elections;
+
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Election extends StripeObject {
+ /**
+ * A FIPS code
+ * representing the local jurisdiction.
+ */
+ @SerializedName("jurisdiction")
+ String jurisdiction;
+
+ /**
+ * The type of the election for the state sales tax registration.
+ *
+ * One of {@code local_use_tax}, {@code simplified_sellers_use_tax}, or {@code
+ * single_local_use_tax}.
+ */
+ @SerializedName("type")
+ String type;
+ }
+ }
}
@Getter
diff --git a/src/main/java/com/stripe/model/treasury/ReceivedDebit.java b/src/main/java/com/stripe/model/treasury/ReceivedDebit.java
index 0bf2786a21b..640cddd2881 100644
--- a/src/main/java/com/stripe/model/treasury/ReceivedDebit.java
+++ b/src/main/java/com/stripe/model/treasury/ReceivedDebit.java
@@ -53,8 +53,8 @@ public class ReceivedDebit extends ApiResource implements HasId {
* Reason for the failure. A ReceivedDebit might fail because the FinancialAccount doesn't have
* sufficient funds, is closed, or is frozen.
*
- *
One of {@code account_closed}, {@code account_frozen}, {@code insufficient_funds}, or {@code
- * other}.
+ *
One of {@code account_closed}, {@code account_frozen}, {@code insufficient_funds}, {@code
+ * international_transaction}, or {@code other}.
*/
@SerializedName("failure_code")
String failureCode;
diff --git a/src/main/java/com/stripe/param/AccountSessionCreateParams.java b/src/main/java/com/stripe/param/AccountSessionCreateParams.java
index 6a94df6e93b..a954dcae0b0 100644
--- a/src/main/java/com/stripe/param/AccountSessionCreateParams.java
+++ b/src/main/java/com/stripe/param/AccountSessionCreateParams.java
@@ -2345,13 +2345,25 @@ public static class Features {
@SerializedName("money_movement")
Boolean moneyMovement;
+ /** Whether to allow sending money. */
+ @SerializedName("send_money")
+ Boolean sendMoney;
+
+ /** Whether to allow transferring balance. */
+ @SerializedName("transfer_balance")
+ Boolean transferBalance;
+
private Features(
Boolean externalAccountCollection,
Map extraParams,
- Boolean moneyMovement) {
+ Boolean moneyMovement,
+ Boolean sendMoney,
+ Boolean transferBalance) {
this.externalAccountCollection = externalAccountCollection;
this.extraParams = extraParams;
this.moneyMovement = moneyMovement;
+ this.sendMoney = sendMoney;
+ this.transferBalance = transferBalance;
}
public static Builder builder() {
@@ -2365,10 +2377,18 @@ public static class Builder {
private Boolean moneyMovement;
+ private Boolean sendMoney;
+
+ private Boolean transferBalance;
+
/** Finalize and obtain parameter instance from this builder. */
public AccountSessionCreateParams.Components.FinancialAccount.Features build() {
return new AccountSessionCreateParams.Components.FinancialAccount.Features(
- this.externalAccountCollection, this.extraParams, this.moneyMovement);
+ this.externalAccountCollection,
+ this.extraParams,
+ this.moneyMovement,
+ this.sendMoney,
+ this.transferBalance);
}
/** Whether to allow external accounts to be linked for money transfer. */
@@ -2412,6 +2432,18 @@ public Builder setMoneyMovement(Boolean moneyMovement) {
this.moneyMovement = moneyMovement;
return this;
}
+
+ /** Whether to allow sending money. */
+ public Builder setSendMoney(Boolean sendMoney) {
+ this.sendMoney = sendMoney;
+ return this;
+ }
+
+ /** Whether to allow transferring balance. */
+ public Builder setTransferBalance(Boolean transferBalance) {
+ this.transferBalance = transferBalance;
+ return this;
+ }
}
}
}
diff --git a/src/main/java/com/stripe/param/PaymentLinkCreateParams.java b/src/main/java/com/stripe/param/PaymentLinkCreateParams.java
index dc15ddfc3cf..fd1383f5764 100644
--- a/src/main/java/com/stripe/param/PaymentLinkCreateParams.java
+++ b/src/main/java/com/stripe/param/PaymentLinkCreateParams.java
@@ -5762,6 +5762,9 @@ public enum PaymentMethodType implements ApiRequestParams.EnumParam {
@SerializedName("promptpay")
PROMPTPAY("promptpay"),
+ @SerializedName("rechnung")
+ RECHNUNG("rechnung"),
+
@SerializedName("sepa_debit")
SEPA_DEBIT("sepa_debit"),
diff --git a/src/main/java/com/stripe/param/PaymentLinkUpdateParams.java b/src/main/java/com/stripe/param/PaymentLinkUpdateParams.java
index 24aa8d2426f..0f3de5ee6a1 100644
--- a/src/main/java/com/stripe/param/PaymentLinkUpdateParams.java
+++ b/src/main/java/com/stripe/param/PaymentLinkUpdateParams.java
@@ -5211,6 +5211,9 @@ public enum PaymentMethodType implements ApiRequestParams.EnumParam {
@SerializedName("promptpay")
PROMPTPAY("promptpay"),
+ @SerializedName("rechnung")
+ RECHNUNG("rechnung"),
+
@SerializedName("sepa_debit")
SEPA_DEBIT("sepa_debit"),
diff --git a/src/main/java/com/stripe/param/QuotePhaseListLineItemsParams.java b/src/main/java/com/stripe/param/QuotePhaseListLineItemsParams.java
deleted file mode 100644
index d47f00ef218..00000000000
--- a/src/main/java/com/stripe/param/QuotePhaseListLineItemsParams.java
+++ /dev/null
@@ -1,169 +0,0 @@
-// File generated from our OpenAPI spec
-package com.stripe.param;
-
-import com.google.gson.annotations.SerializedName;
-import com.stripe.net.ApiRequestParams;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import lombok.Getter;
-
-@Getter
-public class QuotePhaseListLineItemsParams extends ApiRequestParams {
- /**
- * A cursor for use in pagination. {@code ending_before} is an object ID that defines your place
- * in the list. For instance, if you make a list request and receive 100 objects, starting with
- * {@code obj_bar}, your subsequent call can include {@code ending_before=obj_bar} in order to
- * fetch the previous page of the list.
- */
- @SerializedName("ending_before")
- String endingBefore;
-
- /** Specifies which fields in the response should be expanded. */
- @SerializedName("expand")
- List expand;
-
- /**
- * Map of extra parameters for custom features not available in this client library. The content
- * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each
- * key/value pair is serialized as if the key is a root-level field (serialized) name in this
- * param object. Effectively, this map is flattened to its parent instance.
- */
- @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
- Map extraParams;
-
- /**
- * A limit on the number of objects to be returned. Limit can range between 1 and 100, and the
- * default is 10.
- */
- @SerializedName("limit")
- Long limit;
-
- /**
- * A cursor for use in pagination. {@code starting_after} is an object ID that defines your place
- * in the list. For instance, if you make a list request and receive 100 objects, ending with
- * {@code obj_foo}, your subsequent call can include {@code starting_after=obj_foo} in order to
- * fetch the next page of the list.
- */
- @SerializedName("starting_after")
- String startingAfter;
-
- private QuotePhaseListLineItemsParams(
- String endingBefore,
- List expand,
- Map extraParams,
- Long limit,
- String startingAfter) {
- this.endingBefore = endingBefore;
- this.expand = expand;
- this.extraParams = extraParams;
- this.limit = limit;
- this.startingAfter = startingAfter;
- }
-
- public static Builder builder() {
- return new Builder();
- }
-
- public static class Builder {
- private String endingBefore;
-
- private List expand;
-
- private Map extraParams;
-
- private Long limit;
-
- private String startingAfter;
-
- /** Finalize and obtain parameter instance from this builder. */
- public QuotePhaseListLineItemsParams build() {
- return new QuotePhaseListLineItemsParams(
- this.endingBefore, this.expand, this.extraParams, this.limit, this.startingAfter);
- }
-
- /**
- * A cursor for use in pagination. {@code ending_before} is an object ID that defines your place
- * in the list. For instance, if you make a list request and receive 100 objects, starting with
- * {@code obj_bar}, your subsequent call can include {@code ending_before=obj_bar} in order to
- * fetch the previous page of the list.
- */
- public Builder setEndingBefore(String endingBefore) {
- this.endingBefore = endingBefore;
- return this;
- }
-
- /**
- * Add an element to `expand` list. A list is initialized for the first `add/addAll` call, and
- * subsequent calls adds additional elements to the original list. See {@link
- * QuotePhaseListLineItemsParams#expand} for the field documentation.
- */
- public Builder addExpand(String element) {
- if (this.expand == null) {
- this.expand = new ArrayList<>();
- }
- this.expand.add(element);
- return this;
- }
-
- /**
- * Add all elements to `expand` list. A list is initialized for the first `add/addAll` call, and
- * subsequent calls adds additional elements to the original list. See {@link
- * QuotePhaseListLineItemsParams#expand} for the field documentation.
- */
- public Builder addAllExpand(List elements) {
- if (this.expand == null) {
- this.expand = new ArrayList<>();
- }
- this.expand.addAll(elements);
- return this;
- }
-
- /**
- * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
- * call, and subsequent calls add additional key/value pairs to the original map. See {@link
- * QuotePhaseListLineItemsParams#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 QuotePhaseListLineItemsParams#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 limit on the number of objects to be returned. Limit can range between 1 and 100, and the
- * default is 10.
- */
- public Builder setLimit(Long limit) {
- this.limit = limit;
- return this;
- }
-
- /**
- * A cursor for use in pagination. {@code starting_after} is an object ID that defines your
- * place in the list. For instance, if you make a list request and receive 100 objects, ending
- * with {@code obj_foo}, your subsequent call can include {@code starting_after=obj_foo} in
- * order to fetch the next page of the list.
- */
- public Builder setStartingAfter(String startingAfter) {
- this.startingAfter = startingAfter;
- return this;
- }
- }
-}
diff --git a/src/main/java/com/stripe/param/QuotePhaseRetrieveParams.java b/src/main/java/com/stripe/param/QuotePhaseRetrieveParams.java
deleted file mode 100644
index ad8a5982329..00000000000
--- a/src/main/java/com/stripe/param/QuotePhaseRetrieveParams.java
+++ /dev/null
@@ -1,98 +0,0 @@
-// File generated from our OpenAPI spec
-package com.stripe.param;
-
-import com.google.gson.annotations.SerializedName;
-import com.stripe.net.ApiRequestParams;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import lombok.Getter;
-
-@Getter
-public class QuotePhaseRetrieveParams extends ApiRequestParams {
- /** Specifies which fields in the response should be expanded. */
- @SerializedName("expand")
- List expand;
-
- /**
- * Map of extra parameters for custom features not available in this client library. The content
- * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each
- * key/value pair is serialized as if the key is a root-level field (serialized) name in this
- * param object. Effectively, this map is flattened to its parent instance.
- */
- @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
- Map extraParams;
-
- private QuotePhaseRetrieveParams(List expand, Map extraParams) {
- this.expand = expand;
- this.extraParams = extraParams;
- }
-
- public static Builder builder() {
- return new Builder();
- }
-
- public static class Builder {
- private List expand;
-
- private Map extraParams;
-
- /** Finalize and obtain parameter instance from this builder. */
- public QuotePhaseRetrieveParams build() {
- return new QuotePhaseRetrieveParams(this.expand, this.extraParams);
- }
-
- /**
- * Add an element to `expand` list. A list is initialized for the first `add/addAll` call, and
- * subsequent calls adds additional elements to the original list. See {@link
- * QuotePhaseRetrieveParams#expand} for the field documentation.
- */
- public Builder addExpand(String element) {
- if (this.expand == null) {
- this.expand = new ArrayList<>();
- }
- this.expand.add(element);
- return this;
- }
-
- /**
- * Add all elements to `expand` list. A list is initialized for the first `add/addAll` call, and
- * subsequent calls adds additional elements to the original list. See {@link
- * QuotePhaseRetrieveParams#expand} for the field documentation.
- */
- public Builder addAllExpand(List elements) {
- if (this.expand == null) {
- this.expand = new ArrayList<>();
- }
- this.expand.addAll(elements);
- return this;
- }
-
- /**
- * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
- * call, and subsequent calls add additional key/value pairs to the original map. See {@link
- * QuotePhaseRetrieveParams#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 QuotePhaseRetrieveParams#extraParams} for the field documentation.
- */
- public Builder putAllExtraParam(Map map) {
- if (this.extraParams == null) {
- this.extraParams = new HashMap<>();
- }
- this.extraParams.putAll(map);
- return this;
- }
- }
-}
diff --git a/src/main/java/com/stripe/param/tax/RegistrationCreateParams.java b/src/main/java/com/stripe/param/tax/RegistrationCreateParams.java
index e0d288d9d1a..4aa133fe8bc 100644
--- a/src/main/java/com/stripe/param/tax/RegistrationCreateParams.java
+++ b/src/main/java/com/stripe/param/tax/RegistrationCreateParams.java
@@ -8698,6 +8698,10 @@ public static class Us {
@SerializedName("state")
String state;
+ /** Options for the state sales tax registration. */
+ @SerializedName("state_sales_tax")
+ StateSalesTax stateSalesTax;
+
/** Required. Type of registration to be created in the US. */
@SerializedName("type")
Type type;
@@ -8707,11 +8711,13 @@ private Us(
LocalAmusementTax localAmusementTax,
LocalLeaseTax localLeaseTax,
String state,
+ StateSalesTax stateSalesTax,
Type type) {
this.extraParams = extraParams;
this.localAmusementTax = localAmusementTax;
this.localLeaseTax = localLeaseTax;
this.state = state;
+ this.stateSalesTax = stateSalesTax;
this.type = type;
}
@@ -8728,12 +8734,19 @@ public static class Builder {
private String state;
+ private StateSalesTax stateSalesTax;
+
private Type type;
/** Finalize and obtain parameter instance from this builder. */
public RegistrationCreateParams.CountryOptions.Us build() {
return new RegistrationCreateParams.CountryOptions.Us(
- this.extraParams, this.localAmusementTax, this.localLeaseTax, this.state, this.type);
+ this.extraParams,
+ this.localAmusementTax,
+ this.localLeaseTax,
+ this.state,
+ this.stateSalesTax,
+ this.type);
}
/**
@@ -8787,6 +8800,13 @@ public Builder setState(String state) {
return this;
}
+ /** Options for the state sales tax registration. */
+ public Builder setStateSalesTax(
+ RegistrationCreateParams.CountryOptions.Us.StateSalesTax stateSalesTax) {
+ this.stateSalesTax = stateSalesTax;
+ return this;
+ }
+
/** Required. Type of registration to be created in the US. */
public Builder setType(RegistrationCreateParams.CountryOptions.Us.Type type) {
this.type = type;
@@ -8960,6 +8980,224 @@ public Builder setJurisdiction(String jurisdiction) {
}
}
+ @Getter
+ public static class StateSalesTax {
+ /** Required. Elections for the state sales tax registration. */
+ @SerializedName("elections")
+ List elections;
+
+ /**
+ * 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 StateSalesTax(
+ List elections,
+ Map extraParams) {
+ this.elections = elections;
+ this.extraParams = extraParams;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private List elections;
+
+ private Map extraParams;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public RegistrationCreateParams.CountryOptions.Us.StateSalesTax build() {
+ return new RegistrationCreateParams.CountryOptions.Us.StateSalesTax(
+ this.elections, this.extraParams);
+ }
+
+ /**
+ * Add an element to `elections` list. A list is initialized for the first `add/addAll`
+ * call, and subsequent calls adds additional elements to the original list. See {@link
+ * RegistrationCreateParams.CountryOptions.Us.StateSalesTax#elections} for the field
+ * documentation.
+ */
+ public Builder addElection(
+ RegistrationCreateParams.CountryOptions.Us.StateSalesTax.Election element) {
+ if (this.elections == null) {
+ this.elections = new ArrayList<>();
+ }
+ this.elections.add(element);
+ return this;
+ }
+
+ /**
+ * Add all elements to `elections` list. A list is initialized for the first `add/addAll`
+ * call, and subsequent calls adds additional elements to the original list. See {@link
+ * RegistrationCreateParams.CountryOptions.Us.StateSalesTax#elections} for the field
+ * documentation.
+ */
+ public Builder addAllElection(
+ List elements) {
+ if (this.elections == null) {
+ this.elections = new ArrayList<>();
+ }
+ this.elections.addAll(elements);
+ return this;
+ }
+
+ /**
+ * Add a key/value pair to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
+ * map. See {@link RegistrationCreateParams.CountryOptions.Us.StateSalesTax#extraParams}
+ * for the field documentation.
+ */
+ public Builder putExtraParam(String key, Object value) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.put(key, value);
+ return this;
+ }
+
+ /**
+ * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
+ * map. See {@link RegistrationCreateParams.CountryOptions.Us.StateSalesTax#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 Election {
+ /**
+ * 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 FIPS code
+ * representing the local jurisdiction. Supported FIPS codes are: {@code 003} (Allegheny
+ * County) and {@code 60000} (Philadelphia City).
+ */
+ @SerializedName("jurisdiction")
+ String jurisdiction;
+
+ /**
+ * Required. The type of the election for the state sales tax
+ * registration.
+ */
+ @SerializedName("type")
+ Type type;
+
+ private Election(Map extraParams, String jurisdiction, Type type) {
+ this.extraParams = extraParams;
+ this.jurisdiction = jurisdiction;
+ this.type = type;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Map extraParams;
+
+ private String jurisdiction;
+
+ private Type type;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public RegistrationCreateParams.CountryOptions.Us.StateSalesTax.Election build() {
+ return new RegistrationCreateParams.CountryOptions.Us.StateSalesTax.Election(
+ this.extraParams, this.jurisdiction, this.type);
+ }
+
+ /**
+ * Add a key/value pair to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the
+ * original map. See {@link
+ * RegistrationCreateParams.CountryOptions.Us.StateSalesTax.Election#extraParams} for
+ * the field documentation.
+ */
+ public Builder putExtraParam(String key, Object value) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.put(key, value);
+ return this;
+ }
+
+ /**
+ * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the
+ * original map. See {@link
+ * RegistrationCreateParams.CountryOptions.Us.StateSalesTax.Election#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 FIPS
+ * code representing the local jurisdiction. Supported FIPS codes are: {@code 003}
+ * (Allegheny County) and {@code 60000} (Philadelphia City).
+ */
+ public Builder setJurisdiction(String jurisdiction) {
+ this.jurisdiction = jurisdiction;
+ return this;
+ }
+
+ /**
+ * Required. The type of the election for the state sales tax
+ * registration.
+ */
+ public Builder setType(
+ RegistrationCreateParams.CountryOptions.Us.StateSalesTax.Election.Type type) {
+ this.type = type;
+ return this;
+ }
+ }
+
+ public enum Type implements ApiRequestParams.EnumParam {
+ @SerializedName("local_use_tax")
+ LOCAL_USE_TAX("local_use_tax"),
+
+ @SerializedName("simplified_sellers_use_tax")
+ SIMPLIFIED_SELLERS_USE_TAX("simplified_sellers_use_tax"),
+
+ @SerializedName("single_local_use_tax")
+ SINGLE_LOCAL_USE_TAX("single_local_use_tax");
+
+ @Getter(onMethod_ = {@Override})
+ private final String value;
+
+ Type(String value) {
+ this.value = value;
+ }
+ }
+ }
+ }
+
public enum Type implements ApiRequestParams.EnumParam {
@SerializedName("local_amusement_tax")
LOCAL_AMUSEMENT_TAX("local_amusement_tax"),
diff --git a/src/main/java/com/stripe/service/QuotePhaseService.java b/src/main/java/com/stripe/service/QuotePhaseService.java
deleted file mode 100644
index 8d5a6e52142..00000000000
--- a/src/main/java/com/stripe/service/QuotePhaseService.java
+++ /dev/null
@@ -1,96 +0,0 @@
-// File generated from our OpenAPI spec
-package com.stripe.service;
-
-import com.google.gson.reflect.TypeToken;
-import com.stripe.exception.StripeException;
-import com.stripe.model.LineItem;
-import com.stripe.model.QuotePhase;
-import com.stripe.model.StripeCollection;
-import com.stripe.net.ApiRequest;
-import com.stripe.net.ApiRequestParams;
-import com.stripe.net.ApiResource;
-import com.stripe.net.ApiService;
-import com.stripe.net.BaseAddress;
-import com.stripe.net.RequestOptions;
-import com.stripe.net.StripeResponseGetter;
-import com.stripe.param.QuotePhaseListLineItemsParams;
-import com.stripe.param.QuotePhaseRetrieveParams;
-
-public final class QuotePhaseService extends ApiService {
- public QuotePhaseService(StripeResponseGetter responseGetter) {
- super(responseGetter);
- }
-
- /** Retrieves the quote phase with the given ID. */
- public QuotePhase retrieve(String quotePhase, QuotePhaseRetrieveParams params)
- throws StripeException {
- return retrieve(quotePhase, params, (RequestOptions) null);
- }
- /** Retrieves the quote phase with the given ID. */
- public QuotePhase retrieve(String quotePhase, RequestOptions options) throws StripeException {
- return retrieve(quotePhase, (QuotePhaseRetrieveParams) null, options);
- }
- /** Retrieves the quote phase with the given ID. */
- public QuotePhase retrieve(String quotePhase) throws StripeException {
- return retrieve(quotePhase, (QuotePhaseRetrieveParams) null, (RequestOptions) null);
- }
- /** Retrieves the quote phase with the given ID. */
- public QuotePhase retrieve(
- String quotePhase, QuotePhaseRetrieveParams params, RequestOptions options)
- throws StripeException {
- String path = String.format("/v1/quote_phases/%s", ApiResource.urlEncodeId(quotePhase));
- ApiRequest request =
- new ApiRequest(
- BaseAddress.API,
- ApiResource.RequestMethod.GET,
- path,
- ApiRequestParams.paramsToMap(params),
- options);
- return this.request(request, QuotePhase.class);
- }
- /**
- * When retrieving a quote phase, there is an includable line_items property
- * containing the first handful of those items. There is also a URL where you can retrieve the
- * full (paginated) list of line items.
- */
- public StripeCollection listLineItems(
- String quotePhase, QuotePhaseListLineItemsParams params) throws StripeException {
- return listLineItems(quotePhase, params, (RequestOptions) null);
- }
- /**
- * When retrieving a quote phase, there is an includable line_items property
- * containing the first handful of those items. There is also a URL where you can retrieve the
- * full (paginated) list of line items.
- */
- public StripeCollection listLineItems(String quotePhase, RequestOptions options)
- throws StripeException {
- return listLineItems(quotePhase, (QuotePhaseListLineItemsParams) null, options);
- }
- /**
- * When retrieving a quote phase, there is an includable line_items property
- * containing the first handful of those items. There is also a URL where you can retrieve the
- * full (paginated) list of line items.
- */
- public StripeCollection listLineItems(String quotePhase) throws StripeException {
- return listLineItems(quotePhase, (QuotePhaseListLineItemsParams) null, (RequestOptions) null);
- }
- /**
- * When retrieving a quote phase, there is an includable line_items property
- * containing the first handful of those items. There is also a URL where you can retrieve the
- * full (paginated) list of line items.
- */
- public StripeCollection listLineItems(
- String quotePhase, QuotePhaseListLineItemsParams params, RequestOptions options)
- throws StripeException {
- String path =
- String.format("/v1/quote_phases/%s/line_items", ApiResource.urlEncodeId(quotePhase));
- ApiRequest request =
- new ApiRequest(
- BaseAddress.API,
- ApiResource.RequestMethod.GET,
- path,
- ApiRequestParams.paramsToMap(params),
- options);
- return this.request(request, new TypeToken>() {}.getType());
- }
-}