diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION
index 3c1d2e64d9b..0ad25f52ebc 100644
--- a/OPENAPI_VERSION
+++ b/OPENAPI_VERSION
@@ -1 +1 @@
-v2022
\ No newline at end of file
+v2023
\ No newline at end of file
diff --git a/src/main/java/com/stripe/events/V2BillingBillSettingUpdatedEvent.java b/src/main/java/com/stripe/events/V2BillingBillSettingUpdatedEvent.java
new file mode 100644
index 00000000000..21fa0a13c73
--- /dev/null
+++ b/src/main/java/com/stripe/events/V2BillingBillSettingUpdatedEvent.java
@@ -0,0 +1,35 @@
+// File generated from our OpenAPI spec
+package com.stripe.events;
+
+import com.google.gson.annotations.SerializedName;
+import com.stripe.exception.StripeException;
+import com.stripe.model.v2.Event;
+import com.stripe.model.v2.billing.BillSetting;
+import java.time.Instant;
+import lombok.Getter;
+import lombok.Setter;
+
+@Getter
+public final class V2BillingBillSettingUpdatedEvent extends Event {
+ /** Data for the v2.billing.bill_setting.updated event. */
+ @SerializedName("data")
+ V2BillingBillSettingUpdatedEvent.EventData data;
+
+ @Getter
+ @Setter
+ public static final class EventData {
+ /** Timestamp of when the object was updated. */
+ @SerializedName("updated")
+ Instant updated;
+ }
+
+ @SerializedName("related_object")
+
+ /** Object containing the reference to API resource relevant to the event. */
+ RelatedObject relatedObject;
+
+ /** Retrieves the related object from the API. Make an API request on every call. */
+ public BillSetting fetchRelatedObject() throws StripeException {
+ return (BillSetting) super.fetchRelatedObject(this.relatedObject);
+ }
+}
diff --git a/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationStorerCapabilityStatusUpdatedEvent.java b/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationStorerCapabilityStatusUpdatedEvent.java
index 52c041f9338..e18e72ec8e8 100644
--- a/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationStorerCapabilityStatusUpdatedEvent.java
+++ b/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationStorerCapabilityStatusUpdatedEvent.java
@@ -21,11 +21,13 @@ public static final class EventData {
/**
* Open Enum. The capability which had its status updated.
*
- *
One of {@code financial_addressses.bank_accounts}, {@code holds_currencies.eur}, {@code
- * holds_currencies.gbp}, {@code holds_currencies.usd}, {@code inbound_transfers.bank_accounts},
- * {@code outbound_payments.bank_accounts}, {@code outbound_payments.cards}, {@code
- * outbound_payments.financial_accounts}, {@code outbound_transfers.bank_accounts}, or {@code
- * outbound_transfers.financial_accounts}.
+ *
One of {@code financial_addressses.bank_accounts}, {@code
+ * financial_addressses.crypto_wallets}, {@code holds_currencies.eur}, {@code
+ * holds_currencies.gbp}, {@code holds_currencies.usd}, {@code holds_currencies.usdc}, {@code
+ * inbound_transfers.bank_accounts}, {@code outbound_payments.bank_accounts}, {@code
+ * outbound_payments.cards}, {@code outbound_payments.crypto_wallets}, {@code
+ * outbound_payments.financial_accounts}, {@code outbound_transfers.bank_accounts}, {@code
+ * outbound_transfers.crypto_wallets}, or {@code outbound_transfers.financial_accounts}.
*/
@SerializedName("updated_capability")
String updatedCapability;
diff --git a/src/main/java/com/stripe/exception/StripeException.java b/src/main/java/com/stripe/exception/StripeException.java
index d677c3cf252..ebd21d25afb 100644
--- a/src/main/java/com/stripe/exception/StripeException.java
+++ b/src/main/java/com/stripe/exception/StripeException.java
@@ -146,6 +146,9 @@ public static StripeException parseV2Exception(
case "quota_exceeded":
return com.stripe.exception.QuotaExceededException.parse(
body, statusCode, requestId, responseGetter);
+ case "rate_limit":
+ return com.stripe.exception.RateLimitException.parse(
+ body, statusCode, requestId, responseGetter);
case "recipient_not_notifiable":
return com.stripe.exception.RecipientNotNotifiableException.parse(
body, statusCode, requestId, responseGetter);
diff --git a/src/main/java/com/stripe/model/Dispute.java b/src/main/java/com/stripe/model/Dispute.java
index fcf6f667b98..a5dbd0f7613 100644
--- a/src/main/java/com/stripe/model/Dispute.java
+++ b/src/main/java/com/stripe/model/Dispute.java
@@ -150,8 +150,8 @@ public class Dispute extends ApiResource
* warning_under_review}, {@code warning_closed}, {@code needs_response}, {@code under_review},
* {@code won}, {@code lost}, or {@code prevented}.
*
- *
One of {@code lost}, {@code needs_response}, {@code under_review}, {@code warning_closed},
- * {@code warning_needs_response}, {@code warning_under_review}, or {@code won}.
+ *
One of {@code lost}, {@code needs_response}, {@code prevented}, {@code under_review}, {@code
+ * warning_closed}, {@code warning_needs_response}, {@code warning_under_review}, or {@code won}.
*/
@SerializedName("status")
String status;
diff --git a/src/main/java/com/stripe/model/v2/EventDataClassLookup.java b/src/main/java/com/stripe/model/v2/EventDataClassLookup.java
index c08e50db0c8..fcbdf4e516a 100644
--- a/src/main/java/com/stripe/model/v2/EventDataClassLookup.java
+++ b/src/main/java/com/stripe/model/v2/EventDataClassLookup.java
@@ -27,12 +27,22 @@ public final class EventDataClassLookup {
classLookup.put("v2.core.event", com.stripe.model.v2.Event.class);
classLookup.put("v2.core.event_destination", com.stripe.model.v2.EventDestination.class);
+ classLookup.put("v2.billing.bill_setting", com.stripe.model.v2.billing.BillSetting.class);
+ classLookup.put(
+ "v2.billing.bill_setting_version", com.stripe.model.v2.billing.BillSettingVersion.class);
+ classLookup.put("v2.billing.cadence", com.stripe.model.v2.billing.Cadence.class);
+ classLookup.put(
+ "v2.billing.collection_setting", com.stripe.model.v2.billing.CollectionSetting.class);
+ classLookup.put(
+ "v2.billing.collection_setting_version",
+ com.stripe.model.v2.billing.CollectionSettingVersion.class);
classLookup.put("v2.billing.meter_event", com.stripe.model.v2.billing.MeterEvent.class);
classLookup.put(
"v2.billing.meter_event_adjustment",
com.stripe.model.v2.billing.MeterEventAdjustment.class);
classLookup.put(
"v2.billing.meter_event_session", com.stripe.model.v2.billing.MeterEventSession.class);
+ classLookup.put("v2.billing.profile", com.stripe.model.v2.billing.Profile.class);
classLookup.put("v2.core.account", com.stripe.model.v2.core.Account.class);
classLookup.put("v2.core.account_link", com.stripe.model.v2.core.AccountLink.class);
@@ -92,6 +102,9 @@ public final class EventDataClassLookup {
com.stripe.events.V1BillingMeterErrorReportTriggeredEvent.class);
eventClassLookup.put(
"v1.billing.meter.no_meter_found", com.stripe.events.V1BillingMeterNoMeterFoundEvent.class);
+ eventClassLookup.put(
+ "v2.billing.bill_setting.updated",
+ com.stripe.events.V2BillingBillSettingUpdatedEvent.class);
eventClassLookup.put(
"v2.core.account.closed", com.stripe.events.V2CoreAccountClosedEvent.class);
eventClassLookup.put(
diff --git a/src/main/java/com/stripe/model/v2/billing/BillSetting.java b/src/main/java/com/stripe/model/v2/billing/BillSetting.java
new file mode 100644
index 00000000000..822aeafce24
--- /dev/null
+++ b/src/main/java/com/stripe/model/v2/billing/BillSetting.java
@@ -0,0 +1,138 @@
+// File generated from our OpenAPI spec
+package com.stripe.model.v2.billing;
+
+import com.google.gson.annotations.SerializedName;
+import com.stripe.model.HasId;
+import com.stripe.model.StripeObject;
+import java.time.Instant;
+import lombok.EqualsAndHashCode;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * BillSetting is responsible for settings which dictate generating bills, which include settings
+ * for calculating totals on bills, tax on bill items, as well as how to generate and present
+ * invoices.
+ */
+@Getter
+@Setter
+@EqualsAndHashCode(callSuper = false)
+public class BillSetting extends StripeObject implements HasId {
+ /** Settings related to calculating a bill. */
+ @SerializedName("calculation")
+ Calculation calculation;
+
+ /** Timestamp of when the object was created. */
+ @SerializedName("created")
+ Instant created;
+
+ /** An optional field for adding a display name for the BillSetting object. */
+ @SerializedName("display_name")
+ String displayName;
+
+ /** The ID of the BillSetting object. */
+ @Getter(onMethod_ = {@Override})
+ @SerializedName("id")
+ String id;
+
+ /** Settings related to invoice behavior. */
+ @SerializedName("invoice")
+ Invoice invoice;
+
+ /** The ID of the invoice rendering template to be used when generating invoices. */
+ @SerializedName("invoice_rendering_template")
+ String invoiceRenderingTemplate;
+
+ /**
+ * The latest version of the current settings object. This will be Updated every time an attribute
+ * of the settings is updated.
+ */
+ @SerializedName("latest_version")
+ String latestVersion;
+
+ /**
+ * The current live version of the settings object. This can be different from latest_version if
+ * settings are updated without setting live_version='latest'.
+ */
+ @SerializedName("live_version")
+ String liveVersion;
+
+ /**
+ * 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;
+
+ /**
+ * A lookup key used to retrieve settings dynamically from a static string. This may be up to 200
+ * characters.
+ */
+ @SerializedName("lookup_key")
+ String lookupKey;
+
+ /**
+ * String representing the object's type. Objects of the same type share the same value of the
+ * object field.
+ *
+ *
Equal to {@code v2.billing.bill_setting}.
+ */
+ @SerializedName("object")
+ String object;
+
+ /** Settings related to calculating a bill. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Calculation extends StripeObject {
+ /** Settings for calculating tax. */
+ @SerializedName("tax")
+ Tax tax;
+
+ /** Settings for calculating tax. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Tax extends StripeObject {
+ /**
+ * Determines if tax will be calculated automatically based on a PTC or manually based on
+ * rules defined by the merchant. Defaults to "manual".
+ *
+ *
One of {@code automatic}, or {@code manual}.
+ */
+ @SerializedName("type")
+ String type;
+ }
+ }
+
+ /** Settings related to invoice behavior. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Invoice extends StripeObject {
+ /** The amount of time until the invoice will be overdue for payment. */
+ @SerializedName("time_until_due")
+ TimeUntilDue timeUntilDue;
+
+ /** The amount of time until the invoice will be overdue for payment. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class TimeUntilDue extends StripeObject {
+ /**
+ * The interval unit for the time until due.
+ *
+ *
One of {@code day}, {@code month}, {@code week}, or {@code year}.
+ */
+ @SerializedName("interval")
+ String interval;
+
+ /**
+ * The number of interval units. For example, if interval=day and interval_count=30, the
+ * invoice will be due in 30 days.
+ */
+ @SerializedName("interval_count")
+ Long intervalCount;
+ }
+ }
+}
diff --git a/src/main/java/com/stripe/model/v2/billing/BillSettingVersion.java b/src/main/java/com/stripe/model/v2/billing/BillSettingVersion.java
new file mode 100644
index 00000000000..8824e58fa93
--- /dev/null
+++ b/src/main/java/com/stripe/model/v2/billing/BillSettingVersion.java
@@ -0,0 +1,108 @@
+// File generated from our OpenAPI spec
+package com.stripe.model.v2.billing;
+
+import com.google.gson.annotations.SerializedName;
+import com.stripe.model.HasId;
+import com.stripe.model.StripeObject;
+import java.time.Instant;
+import lombok.EqualsAndHashCode;
+import lombok.Getter;
+import lombok.Setter;
+
+@Getter
+@Setter
+@EqualsAndHashCode(callSuper = false)
+public class BillSettingVersion extends StripeObject implements HasId {
+ /** Settings related to calculating a bill. */
+ @SerializedName("calculation")
+ Calculation calculation;
+
+ /** Timestamp of when the object was created. */
+ @SerializedName("created")
+ Instant created;
+
+ /** The ID of the BillSettingVersion object. */
+ @Getter(onMethod_ = {@Override})
+ @SerializedName("id")
+ String id;
+
+ /** Settings related to invoice behavior. */
+ @SerializedName("invoice")
+ Invoice invoice;
+
+ /** The ID of the invoice rendering template to be used when generating invoices. */
+ @SerializedName("invoice_rendering_template")
+ String invoiceRenderingTemplate;
+
+ /**
+ * 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;
+
+ /**
+ * String representing the object's type. Objects of the same type share the same value of the
+ * object field.
+ *
+ *
Equal to {@code v2.billing.bill_setting_version}.
+ */
+ @SerializedName("object")
+ String object;
+
+ /** Settings related to calculating a bill. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Calculation extends StripeObject {
+ /** Settings for calculating tax. */
+ @SerializedName("tax")
+ Tax tax;
+
+ /** Settings for calculating tax. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Tax extends StripeObject {
+ /**
+ * Determines if tax will be calculated automatically based on a PTC or manually based on
+ * rules defined by the merchant. Defaults to "manual".
+ *
+ *
One of {@code automatic}, or {@code manual}.
+ */
+ @SerializedName("type")
+ String type;
+ }
+ }
+
+ /** Settings related to invoice behavior. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Invoice extends StripeObject {
+ /** The amount of time until the invoice will be overdue for payment. */
+ @SerializedName("time_until_due")
+ TimeUntilDue timeUntilDue;
+
+ /** The amount of time until the invoice will be overdue for payment. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class TimeUntilDue extends StripeObject {
+ /**
+ * The interval unit for the time until due.
+ *
+ *
One of {@code day}, {@code month}, {@code week}, or {@code year}.
+ */
+ @SerializedName("interval")
+ String interval;
+
+ /**
+ * The number of interval units. For example, if interval=day and interval_count=30, the
+ * invoice will be due in 30 days.
+ */
+ @SerializedName("interval_count")
+ Long intervalCount;
+ }
+ }
+}
diff --git a/src/main/java/com/stripe/model/v2/billing/Cadence.java b/src/main/java/com/stripe/model/v2/billing/Cadence.java
new file mode 100644
index 00000000000..d2ee08750fe
--- /dev/null
+++ b/src/main/java/com/stripe/model/v2/billing/Cadence.java
@@ -0,0 +1,794 @@
+// File generated from our OpenAPI spec
+package com.stripe.model.v2.billing;
+
+import com.google.gson.annotations.SerializedName;
+import com.stripe.model.HasId;
+import com.stripe.model.StripeObject;
+import java.time.Instant;
+import java.util.List;
+import java.util.Map;
+import lombok.EqualsAndHashCode;
+import lombok.Getter;
+import lombok.Setter;
+
+@Getter
+@Setter
+@EqualsAndHashCode(callSuper = false)
+public class Cadence extends StripeObject implements HasId {
+ /** The billing cycle is the object that defines future billing cycle dates. */
+ @SerializedName("billing_cycle")
+ BillingCycle billingCycle;
+
+ /** Timestamp of when the object was created. */
+ @SerializedName("created")
+ Instant created;
+
+ /** Unique identifier for the object. */
+ @Getter(onMethod_ = {@Override})
+ @SerializedName("id")
+ String id;
+
+ /**
+ * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
+ * object exists in test mode.
+ */
+ @SerializedName("livemode")
+ Boolean livemode;
+
+ /**
+ * A lookup key used to retrieve cadences dynamically from a static string. Maximum length of 200
+ * characters.
+ */
+ @SerializedName("lookup_key")
+ String lookupKey;
+
+ /**
+ * Set of key-value pairs that you can attach
+ * to an object. This can be useful for storing additional information about the object in a
+ * structured format.
+ */
+ @SerializedName("metadata")
+ Map metadata;
+
+ /** The date that the billing cadence will next bill. Null if the cadence is not active. */
+ @SerializedName("next_billing_date")
+ Instant nextBillingDate;
+
+ /**
+ * String representing the object's type. Objects of the same type share the same value of the
+ * object field.
+ *
+ * Equal to {@code v2.billing.cadence}.
+ */
+ @SerializedName("object")
+ String object;
+
+ /** The payer determines the entity financially responsible for the bill. */
+ @SerializedName("payer")
+ Payer payer;
+
+ /** The settings associated with the cadence. */
+ @SerializedName("settings")
+ Settings settings;
+
+ /** Settings data that contains expanded billing settings configuration with actual values. */
+ @SerializedName("settings_data")
+ SettingsData settingsData;
+
+ /**
+ * The current status of the cadence.
+ *
+ *
One of {@code active}, or {@code canceled}.
+ */
+ @SerializedName("status")
+ String status;
+
+ /** The ID of the Test Clock. */
+ @SerializedName("test_clock")
+ String testClock;
+
+ /** The billing cycle is the object that defines future billing cycle dates. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class BillingCycle extends StripeObject {
+ /** Specific configuration for determining billing dates when type=day. */
+ @SerializedName("day")
+ Day day;
+
+ /**
+ * The number of intervals (specified in the interval attribute) between cadence billings. For
+ * example, type=month and interval_count=3 bills every 3 months.
+ */
+ @SerializedName("interval_count")
+ Long intervalCount;
+
+ /** Specific configuration for determining billing dates when type=month. */
+ @SerializedName("month")
+ Month month;
+
+ /**
+ * The frequency at which a cadence bills.
+ *
+ *
One of {@code day}, {@code month}, {@code week}, or {@code year}.
+ */
+ @SerializedName("type")
+ String type;
+
+ /** Specific configuration for determining billing dates when type=week. */
+ @SerializedName("week")
+ Week week;
+
+ /** Specific configuration for determining billing dates when type=year. */
+ @SerializedName("year")
+ Year year;
+
+ /** Specific configuration for determining billing dates when type=day. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Day extends StripeObject {
+ /** The time at which the billing cycle ends. */
+ @SerializedName("time")
+ Time time;
+
+ /** The time at which the billing cycle ends. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Time extends StripeObject {
+ /**
+ * The hour at which the billing cycle ends. This must be an integer between 0 and 23,
+ * inclusive. 0 represents midnight, and 23 represents 11 PM.
+ */
+ @SerializedName("hour")
+ Long hour;
+
+ /**
+ * The minute at which the billing cycle ends. Must be an integer between 0 and 59,
+ * inclusive.
+ */
+ @SerializedName("minute")
+ Long minute;
+
+ /**
+ * The second at which the billing cycle ends. Must be an integer between 0 and 59,
+ * inclusive.
+ */
+ @SerializedName("second")
+ Long second;
+ }
+ }
+
+ /** Specific configuration for determining billing dates when type=month. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Month extends StripeObject {
+ /**
+ * The day to anchor the billing on for a type="month" billing cycle from 1-31. If
+ * this number is greater than the number of days in the month being billed, this will anchor
+ * to the last day of the month.
+ */
+ @SerializedName("day_of_month")
+ Long dayOfMonth;
+
+ /**
+ * The month to anchor the billing on for a type="month" billing cycle from 1-12.
+ * Occurrences are calculated from the month anchor.
+ */
+ @SerializedName("month_of_year")
+ Long monthOfYear;
+
+ /** The time at which the billing cycle ends. */
+ @SerializedName("time")
+ Time time;
+
+ /** The time at which the billing cycle ends. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Time extends StripeObject {
+ /**
+ * The hour at which the billing cycle ends. This must be an integer between 0 and 23,
+ * inclusive. 0 represents midnight, and 23 represents 11 PM.
+ */
+ @SerializedName("hour")
+ Long hour;
+
+ /**
+ * The minute at which the billing cycle ends. Must be an integer between 0 and 59,
+ * inclusive.
+ */
+ @SerializedName("minute")
+ Long minute;
+
+ /**
+ * The second at which the billing cycle ends. Must be an integer between 0 and 59,
+ * inclusive.
+ */
+ @SerializedName("second")
+ Long second;
+ }
+ }
+
+ /** Specific configuration for determining billing dates when type=week. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Week extends StripeObject {
+ /**
+ * The day of the week to bill the type=week billing cycle on. Numbered from 1-7 for Monday to
+ * Sunday respectively, based on the ISO-8601 week day numbering.
+ */
+ @SerializedName("day_of_week")
+ Long dayOfWeek;
+
+ /** The time at which the billing cycle ends. */
+ @SerializedName("time")
+ Time time;
+
+ /** The time at which the billing cycle ends. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Time extends StripeObject {
+ /**
+ * The hour at which the billing cycle ends. This must be an integer between 0 and 23,
+ * inclusive. 0 represents midnight, and 23 represents 11 PM.
+ */
+ @SerializedName("hour")
+ Long hour;
+
+ /**
+ * The minute at which the billing cycle ends. Must be an integer between 0 and 59,
+ * inclusive.
+ */
+ @SerializedName("minute")
+ Long minute;
+
+ /**
+ * The second at which the billing cycle ends. Must be an integer between 0 and 59,
+ * inclusive.
+ */
+ @SerializedName("second")
+ Long second;
+ }
+ }
+
+ /** Specific configuration for determining billing dates when type=year. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Year extends StripeObject {
+ /**
+ * The day to anchor the billing on for a type="month" billing cycle from 1-31. If
+ * this number is greater than the number of days in the month being billed, this will anchor
+ * to the last day of the month.
+ */
+ @SerializedName("day_of_month")
+ Long dayOfMonth;
+
+ /**
+ * The month to bill on from 1-12. If not provided, this will default to the month the cadence
+ * was created.
+ */
+ @SerializedName("month_of_year")
+ Long monthOfYear;
+
+ /** The time at which the billing cycle ends. */
+ @SerializedName("time")
+ Time time;
+
+ /** The time at which the billing cycle ends. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Time extends StripeObject {
+ /**
+ * The hour at which the billing cycle ends. This must be an integer between 0 and 23,
+ * inclusive. 0 represents midnight, and 23 represents 11 PM.
+ */
+ @SerializedName("hour")
+ Long hour;
+
+ /**
+ * The minute at which the billing cycle ends. Must be an integer between 0 and 59,
+ * inclusive.
+ */
+ @SerializedName("minute")
+ Long minute;
+
+ /**
+ * The second at which the billing cycle ends. Must be an integer between 0 and 59,
+ * inclusive.
+ */
+ @SerializedName("second")
+ Long second;
+ }
+ }
+ }
+
+ /** The payer determines the entity financially responsible for the bill. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Payer extends StripeObject {
+ /** The ID of the Billing Profile object which determines how a bill will be paid. */
+ @SerializedName("billing_profile")
+ String billingProfile;
+
+ /** The ID of the Customer object. */
+ @SerializedName("customer")
+ String customer;
+
+ /**
+ * A string identifying the type of the payer. Currently the only supported value is {@code
+ * customer}.
+ *
+ *
Equal to {@code customer}.
+ */
+ @SerializedName("type")
+ String type;
+ }
+
+ /** The settings associated with the cadence. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Settings extends StripeObject {
+ /**
+ * Settings that configure bills generation, which includes calculating totals, tax, and
+ * presenting invoices.
+ */
+ @SerializedName("bill")
+ Bill bill;
+
+ /** Settings that configure and manage the behavior of collecting payments. */
+ @SerializedName("collection")
+ Collection collection;
+
+ /**
+ * Settings that configure bills generation, which includes calculating totals, tax, and
+ * presenting invoices.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Bill extends StripeObject implements HasId {
+ /** The ID of the referenced settings object. */
+ @Getter(onMethod_ = {@Override})
+ @SerializedName("id")
+ String id;
+
+ /** Returns the Settings Version when the cadence is pinned to a specific version. */
+ @SerializedName("version")
+ String version;
+ }
+
+ /** Settings that configure and manage the behavior of collecting payments. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Collection extends StripeObject implements HasId {
+ /** The ID of the referenced settings object. */
+ @Getter(onMethod_ = {@Override})
+ @SerializedName("id")
+ String id;
+
+ /** Returns the Settings Version when the cadence is pinned to a specific version. */
+ @SerializedName("version")
+ String version;
+ }
+ }
+
+ /** Settings data that contains expanded billing settings configuration with actual values. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class SettingsData extends StripeObject {
+ /** Expanded bill settings data with actual configuration values. */
+ @SerializedName("bill")
+ Bill bill;
+
+ /** Expanded collection settings data with actual configuration values. */
+ @SerializedName("collection")
+ Collection collection;
+
+ /** Expanded bill settings data with actual configuration values. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Bill extends StripeObject {
+ /** Settings related to calculating a bill. */
+ @SerializedName("calculation")
+ Calculation calculation;
+
+ /** Settings related to invoice behavior. */
+ @SerializedName("invoice")
+ Invoice invoice;
+
+ /** The ID of the invoice rendering template to be used when generating invoices. */
+ @SerializedName("invoice_rendering_template")
+ String invoiceRenderingTemplate;
+
+ /** Settings related to calculating a bill. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Calculation extends StripeObject {
+ /** Settings for calculating tax. */
+ @SerializedName("tax")
+ Tax tax;
+
+ /** Settings for calculating tax. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Tax extends StripeObject {
+ /**
+ * Determines if tax will be calculated automatically based on a PTC or manually based on
+ * rules defined by the merchant. Defaults to "manual".
+ *
+ *
One of {@code automatic}, or {@code manual}.
+ */
+ @SerializedName("type")
+ String type;
+ }
+ }
+
+ /** Settings related to invoice behavior. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Invoice extends StripeObject {
+ /** The amount of time until the invoice will be overdue for payment. */
+ @SerializedName("time_until_due")
+ TimeUntilDue timeUntilDue;
+
+ /** The amount of time until the invoice will be overdue for payment. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class TimeUntilDue extends StripeObject {
+ /**
+ * The interval unit for the time until due.
+ *
+ *
One of {@code day}, {@code month}, {@code week}, or {@code year}.
+ */
+ @SerializedName("interval")
+ String interval;
+
+ /**
+ * The number of interval units. For example, if interval=day and interval_count=30, the
+ * invoice will be due in 30 days.
+ */
+ @SerializedName("interval_count")
+ Long intervalCount;
+ }
+ }
+ }
+
+ /** Expanded collection settings data with actual configuration values. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Collection extends StripeObject {
+ /**
+ * Either automatic, or send_invoice. When charging automatically, Stripe will attempt to pay
+ * this bill at the end of the period using the payment method attached to the payer profile.
+ * When sending an invoice, Stripe will email your payer profile an invoice with payment
+ * instructions. Defaults to automatic.
+ *
+ *
One of {@code automatic}, or {@code send_invoice}.
+ */
+ @SerializedName("collection_method")
+ String collectionMethod;
+
+ /** Email delivery settings. */
+ @SerializedName("email_delivery")
+ EmailDelivery emailDelivery;
+
+ /**
+ * The ID of the PaymentMethodConfiguration object, which controls which payment methods are
+ * displayed to your customers.
+ */
+ @SerializedName("payment_method_configuration")
+ String paymentMethodConfiguration;
+
+ /** Payment Method specific configuration stored on the object. */
+ @SerializedName("payment_method_options")
+ PaymentMethodOptions paymentMethodOptions;
+
+ /** Email delivery settings. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class EmailDelivery extends StripeObject {
+ /**
+ * Controls emails for when the payment is due. For example after the invoice is finilized
+ * and transition to Open state.
+ */
+ @SerializedName("payment_due")
+ PaymentDue paymentDue;
+
+ /**
+ * Controls emails for when the payment is due. For example after the invoice is finilized
+ * and transition to Open state.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class PaymentDue extends StripeObject {
+ /** If true an email for the invoice would be generated and sent out. */
+ @SerializedName("enabled")
+ Boolean enabled;
+
+ /**
+ * If true the payment link to hosted invocie page would be included in email and PDF of
+ * the invoice.
+ */
+ @SerializedName("include_payment_link")
+ Boolean includePaymentLink;
+ }
+ }
+
+ /** Payment Method specific configuration stored on the object. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class PaymentMethodOptions extends StripeObject {
+ /**
+ * This sub-hash contains details about the Canadian pre-authorized debit payment method
+ * options.
+ */
+ @SerializedName("acss_debit")
+ AcssDebit acssDebit;
+
+ /** This sub-hash contains details about the Bancontact payment method. */
+ @SerializedName("bancontact")
+ Bancontact bancontact;
+
+ /** This sub-hash contains details about the Card payment method options. */
+ @SerializedName("card")
+ Card card;
+
+ /** This sub-hash contains details about the Bank transfer payment method options. */
+ @SerializedName("customer_balance")
+ CustomerBalance customerBalance;
+
+ /** This sub-hash contains details about the Konbini payment method options. */
+ @SerializedName("konbini")
+ Map konbini;
+
+ /** This sub-hash contains details about the SEPA Direct Debit payment method options. */
+ @SerializedName("sepa_debit")
+ Map sepaDebit;
+
+ /** This sub-hash contains details about the ACH direct debit payment method options. */
+ @SerializedName("us_bank_account")
+ UsBankAccount usBankAccount;
+
+ /**
+ * This sub-hash contains details about the Canadian pre-authorized debit payment method
+ * options.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class AcssDebit extends StripeObject {
+ /** Additional fields for Mandate creation. */
+ @SerializedName("mandate_options")
+ MandateOptions mandateOptions;
+
+ /**
+ * Verification method.
+ *
+ * One of {@code automatic}, {@code instant}, or {@code microdeposits}.
+ */
+ @SerializedName("verification_method")
+ String verificationMethod;
+
+ /** Additional fields for Mandate creation. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class MandateOptions extends StripeObject {
+ /**
+ * Transaction type of the mandate.
+ *
+ *
One of {@code business}, or {@code personal}.
+ */
+ @SerializedName("transaction_type")
+ String transactionType;
+ }
+ }
+
+ /** This sub-hash contains details about the Bancontact payment method. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Bancontact extends StripeObject {
+ /**
+ * Preferred language of the Bancontact authorization page that the customer is redirected
+ * to.
+ *
+ *
One of {@code de}, {@code en}, {@code fr}, or {@code nl}.
+ */
+ @SerializedName("preferred_language")
+ String preferredLanguage;
+ }
+
+ /** This sub-hash contains details about the Card payment method options. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Card extends StripeObject {
+ /** Configuration options for setting up an eMandate for cards issued in India. */
+ @SerializedName("mandate_options")
+ MandateOptions mandateOptions;
+
+ /**
+ * Selected network to process the payment on. Depends on the available networks of the
+ * card.
+ */
+ @SerializedName("network")
+ String network;
+
+ /**
+ * An advanced option 3D Secure. We strongly recommend that you rely on our SCA Engine to
+ * automatically prompt your customers for authentication based on risk level and other
+ * requirements. However, if you wish to request 3D Secure based on logic from your
+ * own fraud engine, provide this option. Read our guide on manually
+ * requesting 3D Secure for more information on how this configuration interacts with
+ * Radar and our SCA Engine.
+ *
+ *
One of {@code any}, {@code automatic}, or {@code challenge}.
+ */
+ @SerializedName("request_three_d_secure")
+ String requestThreeDSecure;
+
+ /** Configuration options for setting up an eMandate for cards issued in India. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class MandateOptions extends StripeObject {
+ /** Amount to be charged for future payments. */
+ @SerializedName("amount")
+ Long amount;
+
+ /** The AmountType for the mandate. One of {@code fixed} or {@code maximum}. */
+ @SerializedName("amount_type")
+ String amountType;
+
+ /** A description of the mandate that is meant to be displayed to the customer. */
+ @SerializedName("description")
+ String description;
+ }
+ }
+
+ /** This sub-hash contains details about the Bank transfer payment method options. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class CustomerBalance extends StripeObject {
+ /**
+ * Configuration for the bank transfer funding type, if the {@code funding_type} is set to
+ * {@code bank_transfer}.
+ */
+ @SerializedName("bank_transfer")
+ BankTransfer bankTransfer;
+
+ /**
+ * The funding method type to be used when there are not enough funds in the customer
+ * balance. Currently the only supported value is {@code bank_transfer}.
+ *
+ *
Equal to {@code bank_transfer}.
+ */
+ @SerializedName("funding_type")
+ String fundingType;
+
+ /**
+ * Configuration for the bank transfer funding type, if the {@code funding_type} is set to
+ * {@code bank_transfer}.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class BankTransfer extends StripeObject {
+ /**
+ * Configuration for {@code eu_bank_transfer} funding type. Required if {@code type} is
+ * {@code eu_bank_transfer}.
+ */
+ @SerializedName("eu_bank_transfer")
+ EuBankTransfer euBankTransfer;
+
+ /**
+ * The bank transfer type that can be used for funding.
+ *
+ *
One of {@code eu_bank_transfer}, {@code gb_bank_transfer}, {@code
+ * jp_bank_transfer}, {@code mx_bank_transfer}, or {@code us_bank_transfer}.
+ */
+ @SerializedName("type")
+ String type;
+
+ /**
+ * Configuration for {@code eu_bank_transfer} funding type. Required if {@code type} is
+ * {@code eu_bank_transfer}.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class EuBankTransfer extends StripeObject {
+ /**
+ * The desired country code of the bank account information.
+ *
+ *
One of {@code BE}, {@code DE}, {@code ES}, {@code FR}, {@code IE}, or {@code
+ * NL}.
+ */
+ @SerializedName("country")
+ String country;
+ }
+ }
+ }
+
+ /** This sub-hash contains details about the ACH direct debit payment method options. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class UsBankAccount extends StripeObject {
+ /** Additional fields for Financial Connections Session creation. */
+ @SerializedName("financial_connections")
+ FinancialConnections financialConnections;
+
+ /**
+ * Verification method.
+ *
+ *
One of {@code automatic}, {@code instant}, or {@code microdeposits}.
+ */
+ @SerializedName("verification_method")
+ String verificationMethod;
+
+ /** Additional fields for Financial Connections Session creation. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class FinancialConnections extends StripeObject {
+ /**
+ * Provide filters for the linked accounts that the customer can select for the payment
+ * method.
+ */
+ @SerializedName("filters")
+ Filters filters;
+
+ /**
+ * The list of permissions to request. If this parameter is passed, the {@code
+ * payment_method} permission must be included.
+ */
+ @SerializedName("permissions")
+ List permissions;
+
+ /** List of data features that you would like to retrieve upon account creation. */
+ @SerializedName("prefetch")
+ List prefetch;
+
+ /**
+ * Provide filters for the linked accounts that the customer can select for the payment
+ * method.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Filters extends StripeObject {
+ /** The account subcategories to use to filter for selectable accounts. */
+ @SerializedName("account_subcategories")
+ List accountSubcategories;
+ }
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/src/main/java/com/stripe/model/v2/billing/CollectionSetting.java b/src/main/java/com/stripe/model/v2/billing/CollectionSetting.java
new file mode 100644
index 00000000000..5825c0a88b5
--- /dev/null
+++ b/src/main/java/com/stripe/model/v2/billing/CollectionSetting.java
@@ -0,0 +1,381 @@
+// File generated from our OpenAPI spec
+package com.stripe.model.v2.billing;
+
+import com.google.gson.annotations.SerializedName;
+import com.stripe.model.HasId;
+import com.stripe.model.StripeObject;
+import java.time.Instant;
+import java.util.List;
+import java.util.Map;
+import lombok.EqualsAndHashCode;
+import lombok.Getter;
+import lombok.Setter;
+
+/** Settings that configure and manage the behavior of collecting payments. */
+@Getter
+@Setter
+@EqualsAndHashCode(callSuper = false)
+public class CollectionSetting extends StripeObject implements HasId {
+ /**
+ * Either automatic, or send_invoice. When charging automatically, Stripe will attempt to pay this
+ * bill at the end of the period using the payment method attached to the payer profile. When
+ * sending an invoice, Stripe will email your payer profile an invoice with payment instructions.
+ * Defaults to automatic.
+ *
+ * One of {@code automatic}, or {@code send_invoice}.
+ */
+ @SerializedName("collection_method")
+ String collectionMethod;
+
+ /** Timestamp of when the object was created. */
+ @SerializedName("created")
+ Instant created;
+
+ /** An optional field for adding a display name for the CollectionSetting object. */
+ @SerializedName("display_name")
+ String displayName;
+
+ /** Email delivery settings. */
+ @SerializedName("email_delivery")
+ EmailDelivery emailDelivery;
+
+ /** The ID of the CollectionSetting. */
+ @Getter(onMethod_ = {@Override})
+ @SerializedName("id")
+ String id;
+
+ /**
+ * The latest version of the current settings object. This will be Updated every time an attribute
+ * of the settings is updated.
+ */
+ @SerializedName("latest_version")
+ String latestVersion;
+
+ /**
+ * The current live version of the settings object. This can be different from latest_version if
+ * settings are updated without setting live_version='latest'.
+ */
+ @SerializedName("live_version")
+ String liveVersion;
+
+ /**
+ * 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;
+
+ /**
+ * A lookup key used to retrieve settings dynamically from a static string. This may be up to 200
+ * characters.
+ */
+ @SerializedName("lookup_key")
+ String lookupKey;
+
+ /**
+ * String representing the object's type. Objects of the same type share the same value of the
+ * object field.
+ *
+ *
Equal to {@code v2.billing.collection_setting}.
+ */
+ @SerializedName("object")
+ String object;
+
+ /**
+ * The ID of the PaymentMethodConfiguration object, which controls which payment methods are
+ * displayed to your customers.
+ */
+ @SerializedName("payment_method_configuration")
+ String paymentMethodConfiguration;
+
+ /** Payment Method specific configuration stored on the object. */
+ @SerializedName("payment_method_options")
+ PaymentMethodOptions paymentMethodOptions;
+
+ /** Email delivery settings. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class EmailDelivery extends StripeObject {
+ /**
+ * Controls emails for when the payment is due. For example after the invoice is finilized and
+ * transition to Open state.
+ */
+ @SerializedName("payment_due")
+ PaymentDue paymentDue;
+
+ /**
+ * Controls emails for when the payment is due. For example after the invoice is finilized and
+ * transition to Open state.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class PaymentDue extends StripeObject {
+ /** If true an email for the invoice would be generated and sent out. */
+ @SerializedName("enabled")
+ Boolean enabled;
+
+ /**
+ * If true the payment link to hosted invocie page would be included in email and PDF of the
+ * invoice.
+ */
+ @SerializedName("include_payment_link")
+ Boolean includePaymentLink;
+ }
+ }
+
+ /** Payment Method specific configuration stored on the object. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class PaymentMethodOptions extends StripeObject {
+ /**
+ * This sub-hash contains details about the Canadian pre-authorized debit payment method
+ * options.
+ */
+ @SerializedName("acss_debit")
+ AcssDebit acssDebit;
+
+ /** This sub-hash contains details about the Bancontact payment method. */
+ @SerializedName("bancontact")
+ Bancontact bancontact;
+
+ /** This sub-hash contains details about the Card payment method options. */
+ @SerializedName("card")
+ Card card;
+
+ /** This sub-hash contains details about the Bank transfer payment method options. */
+ @SerializedName("customer_balance")
+ CustomerBalance customerBalance;
+
+ /** This sub-hash contains details about the Konbini payment method options. */
+ @SerializedName("konbini")
+ Map konbini;
+
+ /** This sub-hash contains details about the SEPA Direct Debit payment method options. */
+ @SerializedName("sepa_debit")
+ Map sepaDebit;
+
+ /** This sub-hash contains details about the ACH direct debit payment method options. */
+ @SerializedName("us_bank_account")
+ UsBankAccount usBankAccount;
+
+ /**
+ * This sub-hash contains details about the Canadian pre-authorized debit payment method
+ * options.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class AcssDebit extends StripeObject {
+ /** Additional fields for Mandate creation. */
+ @SerializedName("mandate_options")
+ MandateOptions mandateOptions;
+
+ /**
+ * Verification method.
+ *
+ * One of {@code automatic}, {@code instant}, or {@code microdeposits}.
+ */
+ @SerializedName("verification_method")
+ String verificationMethod;
+
+ /** Additional fields for Mandate creation. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class MandateOptions extends StripeObject {
+ /**
+ * Transaction type of the mandate.
+ *
+ *
One of {@code business}, or {@code personal}.
+ */
+ @SerializedName("transaction_type")
+ String transactionType;
+ }
+ }
+
+ /** This sub-hash contains details about the Bancontact payment method. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Bancontact extends StripeObject {
+ /**
+ * Preferred language of the Bancontact authorization page that the customer is redirected to.
+ *
+ *
One of {@code de}, {@code en}, {@code fr}, or {@code nl}.
+ */
+ @SerializedName("preferred_language")
+ String preferredLanguage;
+ }
+
+ /** This sub-hash contains details about the Card payment method options. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Card extends StripeObject {
+ /** Configuration options for setting up an eMandate for cards issued in India. */
+ @SerializedName("mandate_options")
+ MandateOptions mandateOptions;
+
+ /**
+ * Selected network to process the payment on. Depends on the available networks of the card.
+ */
+ @SerializedName("network")
+ String network;
+
+ /**
+ * An advanced option 3D Secure. We strongly recommend that you rely on our SCA Engine to
+ * automatically prompt your customers for authentication based on risk level and other requirements.
+ * However, if you wish to request 3D Secure based on logic from your own fraud engine,
+ * provide this option. Read our guide on manually
+ * requesting 3D Secure for more information on how this configuration interacts with
+ * Radar and our SCA Engine.
+ *
+ *
One of {@code any}, {@code automatic}, or {@code challenge}.
+ */
+ @SerializedName("request_three_d_secure")
+ String requestThreeDSecure;
+
+ /** Configuration options for setting up an eMandate for cards issued in India. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class MandateOptions extends StripeObject {
+ /** Amount to be charged for future payments. */
+ @SerializedName("amount")
+ Long amount;
+
+ /** The AmountType for the mandate. One of {@code fixed} or {@code maximum}. */
+ @SerializedName("amount_type")
+ String amountType;
+
+ /** A description of the mandate that is meant to be displayed to the customer. */
+ @SerializedName("description")
+ String description;
+ }
+ }
+
+ /** This sub-hash contains details about the Bank transfer payment method options. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class CustomerBalance extends StripeObject {
+ /**
+ * Configuration for the bank transfer funding type, if the {@code funding_type} is set to
+ * {@code bank_transfer}.
+ */
+ @SerializedName("bank_transfer")
+ BankTransfer bankTransfer;
+
+ /**
+ * The funding method type to be used when there are not enough funds in the customer balance.
+ * Currently the only supported value is {@code bank_transfer}.
+ *
+ *
Equal to {@code bank_transfer}.
+ */
+ @SerializedName("funding_type")
+ String fundingType;
+
+ /**
+ * Configuration for the bank transfer funding type, if the {@code funding_type} is set to
+ * {@code bank_transfer}.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class BankTransfer extends StripeObject {
+ /**
+ * Configuration for {@code eu_bank_transfer} funding type. Required if {@code type} is
+ * {@code eu_bank_transfer}.
+ */
+ @SerializedName("eu_bank_transfer")
+ EuBankTransfer euBankTransfer;
+
+ /**
+ * The bank transfer type that can be used for funding.
+ *
+ *
One of {@code eu_bank_transfer}, {@code gb_bank_transfer}, {@code jp_bank_transfer},
+ * {@code mx_bank_transfer}, or {@code us_bank_transfer}.
+ */
+ @SerializedName("type")
+ String type;
+
+ /**
+ * Configuration for {@code eu_bank_transfer} funding type. Required if {@code type} is
+ * {@code eu_bank_transfer}.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class EuBankTransfer extends StripeObject {
+ /**
+ * The desired country code of the bank account information.
+ *
+ *
One of {@code BE}, {@code DE}, {@code ES}, {@code FR}, {@code IE}, or {@code NL}.
+ */
+ @SerializedName("country")
+ String country;
+ }
+ }
+ }
+
+ /** This sub-hash contains details about the ACH direct debit payment method options. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class UsBankAccount extends StripeObject {
+ /** Additional fields for Financial Connections Session creation. */
+ @SerializedName("financial_connections")
+ FinancialConnections financialConnections;
+
+ /**
+ * Verification method.
+ *
+ *
One of {@code automatic}, {@code instant}, or {@code microdeposits}.
+ */
+ @SerializedName("verification_method")
+ String verificationMethod;
+
+ /** Additional fields for Financial Connections Session creation. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class FinancialConnections extends StripeObject {
+ /**
+ * Provide filters for the linked accounts that the customer can select for the payment
+ * method.
+ */
+ @SerializedName("filters")
+ Filters filters;
+
+ /**
+ * The list of permissions to request. If this parameter is passed, the {@code
+ * payment_method} permission must be included.
+ */
+ @SerializedName("permissions")
+ List permissions;
+
+ /** List of data features that you would like to retrieve upon account creation. */
+ @SerializedName("prefetch")
+ List prefetch;
+
+ /**
+ * Provide filters for the linked accounts that the customer can select for the payment
+ * method.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Filters extends StripeObject {
+ /** The account subcategories to use to filter for selectable accounts. */
+ @SerializedName("account_subcategories")
+ List accountSubcategories;
+ }
+ }
+ }
+ }
+}
diff --git a/src/main/java/com/stripe/model/v2/billing/CollectionSettingVersion.java b/src/main/java/com/stripe/model/v2/billing/CollectionSettingVersion.java
new file mode 100644
index 00000000000..d111fb5721c
--- /dev/null
+++ b/src/main/java/com/stripe/model/v2/billing/CollectionSettingVersion.java
@@ -0,0 +1,355 @@
+// File generated from our OpenAPI spec
+package com.stripe.model.v2.billing;
+
+import com.google.gson.annotations.SerializedName;
+import com.stripe.model.HasId;
+import com.stripe.model.StripeObject;
+import java.time.Instant;
+import java.util.List;
+import java.util.Map;
+import lombok.EqualsAndHashCode;
+import lombok.Getter;
+import lombok.Setter;
+
+@Getter
+@Setter
+@EqualsAndHashCode(callSuper = false)
+public class CollectionSettingVersion extends StripeObject implements HasId {
+ /**
+ * Either automatic, or send_invoice. When charging automatically, Stripe will attempt to pay this
+ * bill at the end of the period using the payment method attached to the payer profile. When
+ * sending an invoice, Stripe will email your payer profile an invoice with payment instructions.
+ * Defaults to automatic.
+ *
+ * One of {@code automatic}, or {@code send_invoice}.
+ */
+ @SerializedName("collection_method")
+ String collectionMethod;
+
+ /** Timestamp of when the object was created. */
+ @SerializedName("created")
+ Instant created;
+
+ /** Email delivery settings. */
+ @SerializedName("email_delivery")
+ EmailDelivery emailDelivery;
+
+ /** The ID of the CollectionSettingVersion object. */
+ @Getter(onMethod_ = {@Override})
+ @SerializedName("id")
+ String id;
+
+ /**
+ * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
+ * object exists in test mode.
+ */
+ @SerializedName("livemode")
+ Boolean livemode;
+
+ /**
+ * String representing the object's type. Objects of the same type share the same value of the
+ * object field.
+ *
+ *
Equal to {@code v2.billing.collection_setting_version}.
+ */
+ @SerializedName("object")
+ String object;
+
+ /**
+ * The ID of the PaymentMethodConfiguration object, which controls which payment methods are
+ * displayed to your customers.
+ */
+ @SerializedName("payment_method_configuration")
+ String paymentMethodConfiguration;
+
+ /** Payment Method specific configuration stored on the object. */
+ @SerializedName("payment_method_options")
+ PaymentMethodOptions paymentMethodOptions;
+
+ /** Email delivery settings. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class EmailDelivery extends StripeObject {
+ /**
+ * Controls emails for when the payment is due. For example after the invoice is finilized and
+ * transition to Open state.
+ */
+ @SerializedName("payment_due")
+ PaymentDue paymentDue;
+
+ /**
+ * Controls emails for when the payment is due. For example after the invoice is finilized and
+ * transition to Open state.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class PaymentDue extends StripeObject {
+ /** If true an email for the invoice would be generated and sent out. */
+ @SerializedName("enabled")
+ Boolean enabled;
+
+ /**
+ * If true the payment link to hosted invocie page would be included in email and PDF of the
+ * invoice.
+ */
+ @SerializedName("include_payment_link")
+ Boolean includePaymentLink;
+ }
+ }
+
+ /** Payment Method specific configuration stored on the object. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class PaymentMethodOptions extends StripeObject {
+ /**
+ * This sub-hash contains details about the Canadian pre-authorized debit payment method
+ * options.
+ */
+ @SerializedName("acss_debit")
+ AcssDebit acssDebit;
+
+ /** This sub-hash contains details about the Bancontact payment method. */
+ @SerializedName("bancontact")
+ Bancontact bancontact;
+
+ /** This sub-hash contains details about the Card payment method options. */
+ @SerializedName("card")
+ Card card;
+
+ /** This sub-hash contains details about the Bank transfer payment method options. */
+ @SerializedName("customer_balance")
+ CustomerBalance customerBalance;
+
+ /** This sub-hash contains details about the Konbini payment method options. */
+ @SerializedName("konbini")
+ Map konbini;
+
+ /** This sub-hash contains details about the SEPA Direct Debit payment method options. */
+ @SerializedName("sepa_debit")
+ Map sepaDebit;
+
+ /** This sub-hash contains details about the ACH direct debit payment method options. */
+ @SerializedName("us_bank_account")
+ UsBankAccount usBankAccount;
+
+ /**
+ * This sub-hash contains details about the Canadian pre-authorized debit payment method
+ * options.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class AcssDebit extends StripeObject {
+ /** Additional fields for Mandate creation. */
+ @SerializedName("mandate_options")
+ MandateOptions mandateOptions;
+
+ /**
+ * Verification method.
+ *
+ * One of {@code automatic}, {@code instant}, or {@code microdeposits}.
+ */
+ @SerializedName("verification_method")
+ String verificationMethod;
+
+ /** Additional fields for Mandate creation. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class MandateOptions extends StripeObject {
+ /**
+ * Transaction type of the mandate.
+ *
+ *
One of {@code business}, or {@code personal}.
+ */
+ @SerializedName("transaction_type")
+ String transactionType;
+ }
+ }
+
+ /** This sub-hash contains details about the Bancontact payment method. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Bancontact extends StripeObject {
+ /**
+ * Preferred language of the Bancontact authorization page that the customer is redirected to.
+ *
+ *
One of {@code de}, {@code en}, {@code fr}, or {@code nl}.
+ */
+ @SerializedName("preferred_language")
+ String preferredLanguage;
+ }
+
+ /** This sub-hash contains details about the Card payment method options. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Card extends StripeObject {
+ /** Configuration options for setting up an eMandate for cards issued in India. */
+ @SerializedName("mandate_options")
+ MandateOptions mandateOptions;
+
+ /**
+ * Selected network to process the payment on. Depends on the available networks of the card.
+ */
+ @SerializedName("network")
+ String network;
+
+ /**
+ * An advanced option 3D Secure. We strongly recommend that you rely on our SCA Engine to
+ * automatically prompt your customers for authentication based on risk level and other requirements.
+ * However, if you wish to request 3D Secure based on logic from your own fraud engine,
+ * provide this option. Read our guide on manually
+ * requesting 3D Secure for more information on how this configuration interacts with
+ * Radar and our SCA Engine.
+ *
+ *
One of {@code any}, {@code automatic}, or {@code challenge}.
+ */
+ @SerializedName("request_three_d_secure")
+ String requestThreeDSecure;
+
+ /** Configuration options for setting up an eMandate for cards issued in India. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class MandateOptions extends StripeObject {
+ /** Amount to be charged for future payments. */
+ @SerializedName("amount")
+ Long amount;
+
+ /** The AmountType for the mandate. One of {@code fixed} or {@code maximum}. */
+ @SerializedName("amount_type")
+ String amountType;
+
+ /** A description of the mandate that is meant to be displayed to the customer. */
+ @SerializedName("description")
+ String description;
+ }
+ }
+
+ /** This sub-hash contains details about the Bank transfer payment method options. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class CustomerBalance extends StripeObject {
+ /**
+ * Configuration for the bank transfer funding type, if the {@code funding_type} is set to
+ * {@code bank_transfer}.
+ */
+ @SerializedName("bank_transfer")
+ BankTransfer bankTransfer;
+
+ /**
+ * The funding method type to be used when there are not enough funds in the customer balance.
+ * Currently the only supported value is {@code bank_transfer}.
+ *
+ *
Equal to {@code bank_transfer}.
+ */
+ @SerializedName("funding_type")
+ String fundingType;
+
+ /**
+ * Configuration for the bank transfer funding type, if the {@code funding_type} is set to
+ * {@code bank_transfer}.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class BankTransfer extends StripeObject {
+ /**
+ * Configuration for {@code eu_bank_transfer} funding type. Required if {@code type} is
+ * {@code eu_bank_transfer}.
+ */
+ @SerializedName("eu_bank_transfer")
+ EuBankTransfer euBankTransfer;
+
+ /**
+ * The bank transfer type that can be used for funding.
+ *
+ *
One of {@code eu_bank_transfer}, {@code gb_bank_transfer}, {@code jp_bank_transfer},
+ * {@code mx_bank_transfer}, or {@code us_bank_transfer}.
+ */
+ @SerializedName("type")
+ String type;
+
+ /**
+ * Configuration for {@code eu_bank_transfer} funding type. Required if {@code type} is
+ * {@code eu_bank_transfer}.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class EuBankTransfer extends StripeObject {
+ /**
+ * The desired country code of the bank account information.
+ *
+ *
One of {@code BE}, {@code DE}, {@code ES}, {@code FR}, {@code IE}, or {@code NL}.
+ */
+ @SerializedName("country")
+ String country;
+ }
+ }
+ }
+
+ /** This sub-hash contains details about the ACH direct debit payment method options. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class UsBankAccount extends StripeObject {
+ /** Additional fields for Financial Connections Session creation. */
+ @SerializedName("financial_connections")
+ FinancialConnections financialConnections;
+
+ /**
+ * Verification method.
+ *
+ *
One of {@code automatic}, {@code instant}, or {@code microdeposits}.
+ */
+ @SerializedName("verification_method")
+ String verificationMethod;
+
+ /** Additional fields for Financial Connections Session creation. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class FinancialConnections extends StripeObject {
+ /**
+ * Provide filters for the linked accounts that the customer can select for the payment
+ * method.
+ */
+ @SerializedName("filters")
+ Filters filters;
+
+ /**
+ * The list of permissions to request. If this parameter is passed, the {@code
+ * payment_method} permission must be included.
+ */
+ @SerializedName("permissions")
+ List permissions;
+
+ /** List of data features that you would like to retrieve upon account creation. */
+ @SerializedName("prefetch")
+ List prefetch;
+
+ /**
+ * Provide filters for the linked accounts that the customer can select for the payment
+ * method.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Filters extends StripeObject {
+ /** The account subcategories to use to filter for selectable accounts. */
+ @SerializedName("account_subcategories")
+ List accountSubcategories;
+ }
+ }
+ }
+ }
+}
diff --git a/src/main/java/com/stripe/model/v2/billing/Profile.java b/src/main/java/com/stripe/model/v2/billing/Profile.java
new file mode 100644
index 00000000000..3daf425ea3c
--- /dev/null
+++ b/src/main/java/com/stripe/model/v2/billing/Profile.java
@@ -0,0 +1,75 @@
+// File generated from our OpenAPI spec
+package com.stripe.model.v2.billing;
+
+import com.google.gson.annotations.SerializedName;
+import com.stripe.model.HasId;
+import com.stripe.model.StripeObject;
+import java.time.Instant;
+import java.util.Map;
+import lombok.EqualsAndHashCode;
+import lombok.Getter;
+import lombok.Setter;
+
+@Getter
+@Setter
+@EqualsAndHashCode(callSuper = false)
+public class Profile extends StripeObject implements HasId {
+ /** Timestamp of when the object was created. */
+ @SerializedName("created")
+ Instant created;
+
+ /** The ID of the customer object. */
+ @SerializedName("customer")
+ String customer;
+
+ /** The ID of the payment method object. */
+ @SerializedName("default_payment_method")
+ String defaultPaymentMethod;
+
+ /** A customer-facing name for the billing profile. Maximum length of 250 characters. */
+ @SerializedName("display_name")
+ String displayName;
+
+ /** The ID of the billing profile object. */
+ @Getter(onMethod_ = {@Override})
+ @SerializedName("id")
+ String id;
+
+ /**
+ * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
+ * object exists in test mode.
+ */
+ @SerializedName("livemode")
+ Boolean livemode;
+
+ /**
+ * An internal key you can use to search for a particular billing profile. Maximum length of 200
+ * characters.
+ */
+ @SerializedName("lookup_key")
+ String lookupKey;
+
+ /**
+ * Set of key-value pairs that you can attach to an object. This can be useful for storing
+ * additional information about the object in a structured format.
+ */
+ @SerializedName("metadata")
+ Map metadata;
+
+ /**
+ * String representing the object's type. Objects of the same type share the same value of the
+ * object field.
+ *
+ * Equal to {@code v2.billing.profile}.
+ */
+ @SerializedName("object")
+ String object;
+
+ /**
+ * The current status of the billing profile.
+ *
+ *
One of {@code active}, or {@code inactive}.
+ */
+ @SerializedName("status")
+ String status;
+}
diff --git a/src/main/java/com/stripe/model/v2/core/Account.java b/src/main/java/com/stripe/model/v2/core/Account.java
index 073e0293c5d..a16cbb7b410 100644
--- a/src/main/java/com/stripe/model/v2/core/Account.java
+++ b/src/main/java/com/stripe/model/v2/core/Account.java
@@ -3376,7 +3376,7 @@ public static class Recipient extends StripeObject {
/**
* The payout method to be used as a default outbound destination. This will allow the
- * PayoutMethod to be omitted on OutboundPayments made through the dashboard.
+ * PayoutMethod to be omitted on OutboundPayments made through the dashboard or APIs.
*/
@SerializedName("default_outbound_destination")
DefaultOutboundDestination defaultOutboundDestination;
@@ -3719,7 +3719,7 @@ public static class StatusDetail extends StripeObject {
/**
* The payout method to be used as a default outbound destination. This will allow the
- * PayoutMethod to be omitted on OutboundPayments made through the dashboard.
+ * PayoutMethod to be omitted on OutboundPayments made through the dashboard or APIs.
*/
@Getter
@Setter
@@ -3736,23 +3736,23 @@ public static class DefaultOutboundDestination extends StripeObject implements H
*
One of {@code at_bank_account}, {@code au_bank_account}, {@code ba_bank_account},
* {@code be_bank_account}, {@code bg_bank_account}, {@code bj_bank_account}, {@code
* bs_bank_account}, {@code card}, {@code ca_bank_account}, {@code ch_bank_account}, {@code
- * ci_bank_account}, {@code cy_bank_account}, {@code cz_bank_account}, {@code
- * de_bank_account}, {@code dk_bank_account}, {@code ec_bank_account}, {@code
- * ee_bank_account}, {@code es_bank_account}, {@code et_bank_account}, {@code
- * fi_bank_account}, {@code fr_bank_account}, {@code gb_bank_account}, {@code
- * gr_bank_account}, {@code hr_bank_account}, {@code hu_bank_account}, {@code
- * id_bank_account}, {@code ie_bank_account}, {@code il_bank_account}, {@code
- * in_bank_account}, {@code is_bank_account}, {@code it_bank_account}, {@code
- * ke_bank_account}, {@code li_bank_account}, {@code lt_bank_account}, {@code
- * lu_bank_account}, {@code lv_bank_account}, {@code mn_bank_account}, {@code
- * mt_bank_account}, {@code mu_bank_account}, {@code mx_bank_account}, {@code
- * na_bank_account}, {@code nl_bank_account}, {@code no_bank_account}, {@code
- * nz_bank_account}, {@code pa_bank_account}, {@code ph_bank_account}, {@code
- * pl_bank_account}, {@code pt_bank_account}, {@code ro_bank_account}, {@code
- * rs_bank_account}, {@code se_bank_account}, {@code sg_bank_account}, {@code
- * si_bank_account}, {@code sk_bank_account}, {@code sn_bank_account}, {@code
- * sv_bank_account}, {@code tn_bank_account}, {@code tr_bank_account}, {@code
- * us_bank_account}, or {@code za_bank_account}.
+ * ci_bank_account}, {@code crypto_wallet}, {@code cy_bank_account}, {@code
+ * cz_bank_account}, {@code de_bank_account}, {@code dk_bank_account}, {@code
+ * ec_bank_account}, {@code ee_bank_account}, {@code es_bank_account}, {@code
+ * et_bank_account}, {@code fi_bank_account}, {@code fr_bank_account}, {@code
+ * gb_bank_account}, {@code gr_bank_account}, {@code hr_bank_account}, {@code
+ * hu_bank_account}, {@code id_bank_account}, {@code ie_bank_account}, {@code
+ * il_bank_account}, {@code in_bank_account}, {@code is_bank_account}, {@code
+ * it_bank_account}, {@code ke_bank_account}, {@code li_bank_account}, {@code
+ * lt_bank_account}, {@code lu_bank_account}, {@code lv_bank_account}, {@code
+ * mn_bank_account}, {@code mt_bank_account}, {@code mu_bank_account}, {@code
+ * mx_bank_account}, {@code na_bank_account}, {@code nl_bank_account}, {@code
+ * no_bank_account}, {@code nz_bank_account}, {@code pa_bank_account}, {@code
+ * ph_bank_account}, {@code pl_bank_account}, {@code pt_bank_account}, {@code
+ * ro_bank_account}, {@code rs_bank_account}, {@code se_bank_account}, {@code
+ * sg_bank_account}, {@code si_bank_account}, {@code sk_bank_account}, {@code
+ * sn_bank_account}, {@code sv_bank_account}, {@code tn_bank_account}, {@code
+ * tr_bank_account}, {@code us_bank_account}, or {@code za_bank_account}.
*/
@SerializedName("type")
String type;
@@ -4365,10 +4365,35 @@ public static class Defaults extends StripeObject {
@SerializedName("locales")
List locales;
+ /** Account profile information. */
+ @SerializedName("profile")
+ Profile profile;
+
/** Default responsibilities held by either Stripe or the platform. */
@SerializedName("responsibilities")
Responsibilities responsibilities;
+ /** Account profile information. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Profile extends StripeObject {
+ /** The business's publicly-available website. */
+ @SerializedName("business_url")
+ String businessUrl;
+
+ /** The company’s legal name. */
+ @SerializedName("doing_business_as")
+ String doingBusinessAs;
+
+ /**
+ * Internal-only description of the product sold or service provided by the business. It's
+ * used by Stripe for risk and underwriting purposes.
+ */
+ @SerializedName("product_description")
+ String productDescription;
+ }
+
/** Default responsibilities held by either Stripe or the platform. */
@Getter
@Setter
@@ -4640,10 +4665,6 @@ public static class BusinessDetails extends StripeObject {
@SerializedName("documents")
Documents documents;
- /** The company’s legal name. */
- @SerializedName("doing_business_as")
- String doingBusinessAs;
-
/**
* An estimated upper bound of employees, contractors, vendors, etc. currently working for the
* business.
@@ -4663,13 +4684,6 @@ public static class BusinessDetails extends StripeObject {
@SerializedName("phone")
String phone;
- /**
- * Internal-only description of the product sold or service provided by the business. It’s
- * used by Stripe for risk and underwriting purposes.
- */
- @SerializedName("product_description")
- String productDescription;
-
/** The business legal name. */
@SerializedName("registered_name")
String registeredName;
@@ -4699,10 +4713,6 @@ public static class BusinessDetails extends StripeObject {
@SerializedName("structure")
String structure;
- /** The business's publicly available website. */
- @SerializedName("url")
- String url;
-
/** The company’s primary address. */
@Getter
@Setter
diff --git a/src/main/java/com/stripe/model/v2/moneymanagement/FinancialAddress.java b/src/main/java/com/stripe/model/v2/moneymanagement/FinancialAddress.java
index 84d42e783d5..a7b8fc6a1fc 100644
--- a/src/main/java/com/stripe/model/v2/moneymanagement/FinancialAddress.java
+++ b/src/main/java/com/stripe/model/v2/moneymanagement/FinancialAddress.java
@@ -59,6 +59,10 @@ public class FinancialAddress extends StripeObject implements HasId {
@SerializedName("object")
String object;
+ /** Open Enum. The currency the FinancialAddress settles into the FinancialAccount. */
+ @SerializedName("settlement_currency")
+ String settlementCurrency;
+
/**
* Closed Enum. An enum representing the status of the FinancialAddress. This indicates whether or
* not the FinancialAddress can be used for any money movement flows.
@@ -85,10 +89,17 @@ public static class Credentials extends StripeObject {
@SerializedName("gb_bank_account")
GbBankAccount gbBankAccount;
+ /**
+ * The credentials of the SEPA Bank Account for the FinancialAddress. This contains unique
+ * banking details such as the IBAN, BIC, etc. of a SEPA bank account.
+ */
+ @SerializedName("sepa_bank_account")
+ SepaBankAccount sepaBankAccount;
+
/**
* Open Enum. The type of Credentials that are provisioned for the FinancialAddress.
*
- * One of {@code gb_bank_account}, or {@code us_bank_account}.
+ *
One of {@code gb_bank_account}, {@code sepa_bank_account}, or {@code us_bank_account}.
*/
@SerializedName("type")
String type;
@@ -129,6 +140,43 @@ public static class GbBankAccount extends StripeObject {
String sortCode;
}
+ /**
+ * The credentials of the SEPA Bank Account for the FinancialAddress. This contains unique
+ * banking details such as the IBAN, BIC, etc. of a SEPA bank account.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class SepaBankAccount extends StripeObject {
+ /** The account holder name to be used during bank transfers. */
+ @SerializedName("account_holder_name")
+ String accountHolderName;
+
+ /** The name of the Bank. */
+ @SerializedName("bank_name")
+ String bankName;
+
+ /** The BIC of the SEPA Bank Account. */
+ @SerializedName("bic")
+ String bic;
+
+ /** The originating country of the SEPA Bank account. */
+ @SerializedName("country")
+ String country;
+
+ /** The IBAN of the SEPA Bank Account. */
+ @SerializedName("iban")
+ String iban;
+
+ /**
+ * The last four digits of the SEPA Bank Account number. This will always be returned. To view
+ * the full account number when retrieving or listing FinancialAddresses, use the {@code
+ * include} request parameter.
+ */
+ @SerializedName("last4")
+ String last4;
+ }
+
/**
* The credentials of the US Bank Account for the FinancialAddress. This contains unique banking
* details such as the routing number, account number, etc. of a US bank account.
diff --git a/src/main/java/com/stripe/model/v2/moneymanagement/OutboundPaymentQuote.java b/src/main/java/com/stripe/model/v2/moneymanagement/OutboundPaymentQuote.java
index 07e925b9171..aedc34af7ed 100644
--- a/src/main/java/com/stripe/model/v2/moneymanagement/OutboundPaymentQuote.java
+++ b/src/main/java/com/stripe/model/v2/moneymanagement/OutboundPaymentQuote.java
@@ -129,22 +129,25 @@ public static class From extends StripeObject {
public static class FxQuote extends StripeObject {
/**
* The duration the exchange rate lock remains valid from creation time. Allowed value is
- * five_minutes.
+ * five_minutes or none.
*
- *
Equal to {@code five_minutes}.
+ *
One of {@code five_minutes}, or {@code none}.
*/
@SerializedName("lock_duration")
String lockDuration;
- /** Time at which the rate lock will expire, measured in seconds since the Unix epoch. */
+ /**
+ * Time at which the rate lock will expire, measured in seconds since the Unix epoch. Null when
+ * rate locking is not supported.
+ */
@SerializedName("lock_expires_at")
Instant lockExpiresAt;
/**
* Lock status of the quote. Transitions from active to expired once past the lock_expires_at
- * timestamp. Value can be active or expired.
+ * timestamp. Value can be active, expired or none.
*
- *
One of {@code active}, or {@code expired}.
+ *
One of {@code active}, {@code expired}, or {@code none}.
*/
@SerializedName("lock_status")
String lockStatus;
diff --git a/src/main/java/com/stripe/model/v2/moneymanagement/PayoutMethod.java b/src/main/java/com/stripe/model/v2/moneymanagement/PayoutMethod.java
index 4d2af2abd08..fb276a6d89d 100644
--- a/src/main/java/com/stripe/model/v2/moneymanagement/PayoutMethod.java
+++ b/src/main/java/com/stripe/model/v2/moneymanagement/PayoutMethod.java
@@ -59,7 +59,7 @@ public class PayoutMethod extends StripeObject implements HasId {
/**
* Closed Enum. The type of payout method.
*
- *
One of {@code bank_account}, or {@code card}.
+ *
One of {@code bank_account}, {@code card}, or {@code crypto_wallet}.
*/
@SerializedName("type")
String type;
diff --git a/src/main/java/com/stripe/model/v2/moneymanagement/ReceivedCredit.java b/src/main/java/com/stripe/model/v2/moneymanagement/ReceivedCredit.java
index a1f7fbb28fd..06ad381d4bd 100644
--- a/src/main/java/com/stripe/model/v2/moneymanagement/ReceivedCredit.java
+++ b/src/main/java/com/stripe/model/v2/moneymanagement/ReceivedCredit.java
@@ -31,7 +31,7 @@ public class ReceivedCredit extends StripeObject implements HasId {
/**
* This object stores details about the originating banking transaction that resulted in the
- * ReceivedCredit. Present if {@code type} field value is {@code external_credit}.
+ * ReceivedCredit. Present if {@code type} field value is {@code bank_transfer}.
*/
@SerializedName("bank_transfer")
BankTransfer bankTransfer;
@@ -141,7 +141,7 @@ public static class BalanceTransfer extends StripeObject {
/**
* This object stores details about the originating banking transaction that resulted in the
- * ReceivedCredit. Present if {@code type} field value is {@code external_credit}.
+ * ReceivedCredit. Present if {@code type} field value is {@code bank_transfer}.
*/
@Getter
@Setter
@@ -152,34 +152,41 @@ public static class BankTransfer extends StripeObject {
String financialAddress;
/**
- * Hash containing the transaction bank details. Present if {@code payment_method_type} field
- * value is {@code gb_bank_account}.
+ * Hash containing the transaction bank details. Present if {@code origin_type} field value is
+ * {@code gb_bank_account}.
*/
@SerializedName("gb_bank_account")
GbBankAccount gbBankAccount;
/**
- * Open Enum. Indicates the type of source via from which external funds originated.
+ * Open Enum. Indicates the origin of source from which external funds originated from.
*
- *
One of {@code gb_bank_account}, or {@code us_bank_account}.
+ *
One of {@code gb_bank_account}, {@code sepa_bank_account}, or {@code us_bank_account}.
*/
- @SerializedName("payment_method_type")
- String paymentMethodType;
+ @SerializedName("origin_type")
+ String originType;
+
+ /**
+ * Hash containing the transaction bank details. Present if {@code origin_type} field value is
+ * {@code sepa_bank_account}.
+ */
+ @SerializedName("sepa_bank_account")
+ SepaBankAccount sepaBankAccount;
/** Freeform string set by originator of the external ReceivedCredit. */
@SerializedName("statement_descriptor")
String statementDescriptor;
/**
- * Hash containing the transaction bank details. Present if {@code payment_method_type} field
- * value is {@code us_bank_account}.
+ * Hash containing the transaction bank details. Present if {@code origin_type} field value is
+ * {@code us_bank_account}.
*/
@SerializedName("us_bank_account")
UsBankAccount usBankAccount;
/**
- * Hash containing the transaction bank details. Present if {@code payment_method_type} field
- * value is {@code gb_bank_account}.
+ * Hash containing the transaction bank details. Present if {@code origin_type} field value is
+ * {@code gb_bank_account}.
*/
@Getter
@Setter
@@ -211,8 +218,45 @@ public static class GbBankAccount extends StripeObject {
}
/**
- * Hash containing the transaction bank details. Present if {@code payment_method_type} field
- * value is {@code us_bank_account}.
+ * Hash containing the transaction bank details. Present if {@code origin_type} field value is
+ * {@code sepa_bank_account}.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class SepaBankAccount extends StripeObject {
+ /** The account holder name of the bank account the transfer was received from. */
+ @SerializedName("account_holder_name")
+ String accountHolderName;
+
+ /** The bank name the transfer was received from. */
+ @SerializedName("bank_name")
+ String bankName;
+
+ /** The BIC of the SEPA account. */
+ @SerializedName("bic")
+ String bic;
+
+ /** The origination country of the bank transfer. */
+ @SerializedName("country")
+ String country;
+
+ /** The IBAN that originated the transfer. */
+ @SerializedName("iban")
+ String iban;
+
+ /**
+ * The money transmission network used to send funds for this ReceivedCredit.
+ *
+ *
Equal to {@code sepa_credit_transfer}.
+ */
+ @SerializedName("network")
+ String network;
+ }
+
+ /**
+ * Hash containing the transaction bank details. Present if {@code origin_type} field value is
+ * {@code us_bank_account}.
*/
@Getter
@Setter
diff --git a/src/main/java/com/stripe/model/v2/payments/OffSessionPayment.java b/src/main/java/com/stripe/model/v2/payments/OffSessionPayment.java
index 0d26e1c7c28..594c0caa161 100644
--- a/src/main/java/com/stripe/model/v2/payments/OffSessionPayment.java
+++ b/src/main/java/com/stripe/model/v2/payments/OffSessionPayment.java
@@ -6,6 +6,7 @@
import com.stripe.model.StripeObject;
import com.stripe.v2.Amount;
import java.time.Instant;
+import java.util.List;
import java.util.Map;
import lombok.EqualsAndHashCode;
import lombok.Getter;
@@ -16,6 +17,10 @@
@Setter
@EqualsAndHashCode(callSuper = false)
public class OffSessionPayment extends StripeObject implements HasId {
+ /** Provides industry-specific information about the amount. */
+ @SerializedName("amount_details")
+ AmountDetails amountDetails;
+
/** The “presentment amount” to be collected from the customer. */
@SerializedName("amount_requested")
Amount amountRequested;
@@ -46,12 +51,13 @@ public class OffSessionPayment extends StripeObject implements HasId {
/**
* The reason why the OffSessionPayment failed.
*
- *
One of {@code rejected_by_partner}, or {@code retries_exhausted}.
+ *
One of {@code authorization_expired}, {@code rejected_by_partner}, or {@code
+ * retries_exhausted}.
*/
@SerializedName("failure_reason")
String failureReason;
- /** Unique identifier for the object.. */
+ /** Unique identifier for the object. */
@Getter(onMethod_ = {@Override})
@SerializedName("id")
String id;
@@ -102,6 +108,10 @@ public class OffSessionPayment extends StripeObject implements HasId {
@SerializedName("payment_record")
String paymentRecord;
+ /** Details about the payments orchestration configuration. */
+ @SerializedName("payments_orchestration")
+ PaymentsOrchestration paymentsOrchestration;
+
/** Details about the OffSessionPayment retries. */
@SerializedName("retry_details")
RetryDetails retryDetails;
@@ -144,6 +154,115 @@ public class OffSessionPayment extends StripeObject implements HasId {
@SerializedName("transfer_data")
TransferData transferData;
+ /** Provides industry-specific information about the amount. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class AmountDetails extends StripeObject {
+ /** The amount the total transaction was discounted for. */
+ @SerializedName("discount_amount")
+ Long discountAmount;
+
+ /**
+ * A list of line items, each containing information about a product in the PaymentIntent. There
+ * is a maximum of 100 line items.
+ */
+ @SerializedName("line_items")
+ List lineItems;
+
+ /** Contains information about the shipping portion of the amount. */
+ @SerializedName("shipping")
+ Shipping shipping;
+
+ /** Contains information about the tax portion of the amount. */
+ @SerializedName("tax")
+ Tax tax;
+
+ /**
+ * For more details about LineItem, please refer to the API Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class LineItem extends StripeObject {
+ /** The amount an item was discounted for. Positive integer. */
+ @SerializedName("discount_amount")
+ Long discountAmount;
+
+ /** Unique identifier of the product. At most 12 characters long. */
+ @SerializedName("product_code")
+ String productCode;
+
+ /** Name of the product. At most 100 characters long. */
+ @SerializedName("product_name")
+ String productName;
+
+ /** Number of items of the product. Positive integer. */
+ @SerializedName("quantity")
+ Long quantity;
+
+ /** Contains information about the tax on the item. */
+ @SerializedName("tax")
+ Tax tax;
+
+ /** Cost of the product. Non-negative integer. */
+ @SerializedName("unit_cost")
+ Long unitCost;
+
+ /** Contains information about the tax on the item. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Tax extends StripeObject {
+ /** Total portion of the amount that is for tax. */
+ @SerializedName("total_tax_amount")
+ Long totalTaxAmount;
+ }
+ }
+
+ /** Contains information about the shipping portion of the amount. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Shipping extends StripeObject {
+ /** Portion of the amount that is for shipping. */
+ @SerializedName("amount")
+ Long amount;
+
+ /** The postal code that represents the shipping source. */
+ @SerializedName("from_postal_code")
+ String fromPostalCode;
+
+ /** The postal code that represents the shipping destination. */
+ @SerializedName("to_postal_code")
+ String toPostalCode;
+ }
+
+ /** Contains information about the tax portion of the amount. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Tax extends StripeObject {
+ /** Total portion of the amount that is for tax. */
+ @SerializedName("total_tax_amount")
+ Long totalTaxAmount;
+ }
+ }
+
+ /** Details about the payments orchestration configuration. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class PaymentsOrchestration extends StripeObject {
+ /**
+ * True when you want to enable payments orchestration for this off-session payment. False
+ * otherwise.
+ */
+ @SerializedName("enabled")
+ Boolean enabled;
+ }
+
/** Details about the OffSessionPayment retries. */
@Getter
@Setter
@@ -153,10 +272,14 @@ public static class RetryDetails extends StripeObject {
@SerializedName("attempts")
Long attempts;
+ /** The pre-configured retry policy to use for the payment. */
+ @SerializedName("retry_policy")
+ String retryPolicy;
+
/**
* Indicates the strategy for how you want Stripe to retry the payment.
*
- * One of {@code none}, or {@code smart}.
+ *
One of {@code heuristic}, {@code none}, {@code scheduled}, or {@code smart}.
*/
@SerializedName("retry_strategy")
String retryStrategy;
diff --git a/src/main/java/com/stripe/param/v2/billing/BillSettingCreateParams.java b/src/main/java/com/stripe/param/v2/billing/BillSettingCreateParams.java
new file mode 100644
index 00000000000..606585fd130
--- /dev/null
+++ b/src/main/java/com/stripe/param/v2/billing/BillSettingCreateParams.java
@@ -0,0 +1,496 @@
+// File generated from our OpenAPI spec
+package com.stripe.param.v2.billing;
+
+import com.google.gson.annotations.SerializedName;
+import com.stripe.net.ApiRequestParams;
+import java.util.HashMap;
+import java.util.Map;
+import lombok.EqualsAndHashCode;
+import lombok.Getter;
+
+@Getter
+@EqualsAndHashCode(callSuper = false)
+public class BillSettingCreateParams extends ApiRequestParams {
+ /** Settings related to calculating a bill. */
+ @SerializedName("calculation")
+ Calculation calculation;
+
+ /**
+ * An optional customer-facing display name for the CollectionSetting object. Maximum length of
+ * 250 characters.
+ */
+ @SerializedName("display_name")
+ String displayName;
+
+ /**
+ * 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;
+
+ /** Settings related to invoice behavior. */
+ @SerializedName("invoice")
+ Invoice invoice;
+
+ /** The ID of the invoice rendering template to be used when generating invoices. */
+ @SerializedName("invoice_rendering_template")
+ String invoiceRenderingTemplate;
+
+ /**
+ * A lookup key used to retrieve settings dynamically from a static string. This may be up to 200
+ * characters.
+ */
+ @SerializedName("lookup_key")
+ String lookupKey;
+
+ private BillSettingCreateParams(
+ Calculation calculation,
+ String displayName,
+ Map extraParams,
+ Invoice invoice,
+ String invoiceRenderingTemplate,
+ String lookupKey) {
+ this.calculation = calculation;
+ this.displayName = displayName;
+ this.extraParams = extraParams;
+ this.invoice = invoice;
+ this.invoiceRenderingTemplate = invoiceRenderingTemplate;
+ this.lookupKey = lookupKey;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Calculation calculation;
+
+ private String displayName;
+
+ private Map extraParams;
+
+ private Invoice invoice;
+
+ private String invoiceRenderingTemplate;
+
+ private String lookupKey;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public BillSettingCreateParams build() {
+ return new BillSettingCreateParams(
+ this.calculation,
+ this.displayName,
+ this.extraParams,
+ this.invoice,
+ this.invoiceRenderingTemplate,
+ this.lookupKey);
+ }
+
+ /** Settings related to calculating a bill. */
+ public Builder setCalculation(BillSettingCreateParams.Calculation calculation) {
+ this.calculation = calculation;
+ return this;
+ }
+
+ /**
+ * An optional customer-facing display name for the CollectionSetting object. Maximum length of
+ * 250 characters.
+ */
+ public Builder setDisplayName(String displayName) {
+ this.displayName = displayName;
+ 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
+ * BillSettingCreateParams#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 BillSettingCreateParams#extraParams} for the field documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+
+ /** Settings related to invoice behavior. */
+ public Builder setInvoice(BillSettingCreateParams.Invoice invoice) {
+ this.invoice = invoice;
+ return this;
+ }
+
+ /** The ID of the invoice rendering template to be used when generating invoices. */
+ public Builder setInvoiceRenderingTemplate(String invoiceRenderingTemplate) {
+ this.invoiceRenderingTemplate = invoiceRenderingTemplate;
+ return this;
+ }
+
+ /**
+ * A lookup key used to retrieve settings dynamically from a static string. This may be up to
+ * 200 characters.
+ */
+ public Builder setLookupKey(String lookupKey) {
+ this.lookupKey = lookupKey;
+ return this;
+ }
+ }
+
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Calculation {
+ /**
+ * 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;
+
+ /** Settings for calculating tax. */
+ @SerializedName("tax")
+ Tax tax;
+
+ private Calculation(Map extraParams, Tax tax) {
+ this.extraParams = extraParams;
+ this.tax = tax;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Map extraParams;
+
+ private Tax tax;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public BillSettingCreateParams.Calculation build() {
+ return new BillSettingCreateParams.Calculation(this.extraParams, this.tax);
+ }
+
+ /**
+ * 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
+ * BillSettingCreateParams.Calculation#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 BillSettingCreateParams.Calculation#extraParams} for the field documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+
+ /** Settings for calculating tax. */
+ public Builder setTax(BillSettingCreateParams.Calculation.Tax tax) {
+ this.tax = tax;
+ return this;
+ }
+ }
+
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Tax {
+ /**
+ * 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. Determines if tax will be calculated automatically based on a
+ * PTC or manually based on rules defined by the merchant. Defaults to "manual".
+ */
+ @SerializedName("type")
+ Type type;
+
+ private Tax(Map extraParams, Type type) {
+ this.extraParams = extraParams;
+ this.type = type;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Map extraParams;
+
+ private Type type;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public BillSettingCreateParams.Calculation.Tax build() {
+ return new BillSettingCreateParams.Calculation.Tax(this.extraParams, 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 BillSettingCreateParams.Calculation.Tax#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 BillSettingCreateParams.Calculation.Tax#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. Determines if tax will be calculated automatically based on a
+ * PTC or manually based on rules defined by the merchant. Defaults to "manual".
+ */
+ public Builder setType(BillSettingCreateParams.Calculation.Tax.Type type) {
+ this.type = type;
+ return this;
+ }
+ }
+
+ public enum Type implements ApiRequestParams.EnumParam {
+ @SerializedName("automatic")
+ AUTOMATIC("automatic"),
+
+ @SerializedName("manual")
+ MANUAL("manual");
+
+ @Getter(onMethod_ = {@Override})
+ private final String value;
+
+ Type(String value) {
+ this.value = value;
+ }
+ }
+ }
+ }
+
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Invoice {
+ /**
+ * 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 amount of time until the invoice will be overdue for payment. */
+ @SerializedName("time_until_due")
+ TimeUntilDue timeUntilDue;
+
+ private Invoice(Map extraParams, TimeUntilDue timeUntilDue) {
+ this.extraParams = extraParams;
+ this.timeUntilDue = timeUntilDue;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Map extraParams;
+
+ private TimeUntilDue timeUntilDue;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public BillSettingCreateParams.Invoice build() {
+ return new BillSettingCreateParams.Invoice(this.extraParams, this.timeUntilDue);
+ }
+
+ /**
+ * 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
+ * BillSettingCreateParams.Invoice#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 BillSettingCreateParams.Invoice#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 amount of time until the invoice will be overdue for payment. */
+ public Builder setTimeUntilDue(BillSettingCreateParams.Invoice.TimeUntilDue timeUntilDue) {
+ this.timeUntilDue = timeUntilDue;
+ return this;
+ }
+ }
+
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class TimeUntilDue {
+ /**
+ * 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 interval unit for the time until due. */
+ @SerializedName("interval")
+ Interval interval;
+
+ /**
+ * Required. The number of interval units. For example, if interval=day and
+ * interval_count=30, the invoice will be due in 30 days.
+ */
+ @SerializedName("interval_count")
+ Long intervalCount;
+
+ private TimeUntilDue(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 BillSettingCreateParams.Invoice.TimeUntilDue build() {
+ return new BillSettingCreateParams.Invoice.TimeUntilDue(
+ 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 BillSettingCreateParams.Invoice.TimeUntilDue#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 BillSettingCreateParams.Invoice.TimeUntilDue#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 interval unit for the time until due. */
+ public Builder setInterval(BillSettingCreateParams.Invoice.TimeUntilDue.Interval interval) {
+ this.interval = interval;
+ return this;
+ }
+
+ /**
+ * Required. The number of interval units. For example, if interval=day and
+ * interval_count=30, the invoice will be due in 30 days.
+ */
+ 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;
+ }
+ }
+ }
+ }
+}
diff --git a/src/main/java/com/stripe/param/v2/billing/BillSettingListParams.java b/src/main/java/com/stripe/param/v2/billing/BillSettingListParams.java
new file mode 100644
index 00000000000..b972c7ab601
--- /dev/null
+++ b/src/main/java/com/stripe/param/v2/billing/BillSettingListParams.java
@@ -0,0 +1,117 @@
+// File generated from our OpenAPI spec
+package com.stripe.param.v2.billing;
+
+import com.google.gson.annotations.SerializedName;
+import com.stripe.net.ApiRequestParams;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import lombok.EqualsAndHashCode;
+import lombok.Getter;
+
+@Getter
+@EqualsAndHashCode(callSuper = false)
+public class BillSettingListParams extends ApiRequestParams {
+ /**
+ * 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;
+
+ /** Optionally set the maximum number of results per page. Defaults to 20. */
+ @SerializedName("limit")
+ Long limit;
+
+ /**
+ * Only return the settings with these lookup_keys, if any exist. You can specify up to 10
+ * lookup_keys.
+ */
+ @SerializedName("lookup_keys")
+ List lookupKeys;
+
+ private BillSettingListParams(
+ Map extraParams, Long limit, List lookupKeys) {
+ this.extraParams = extraParams;
+ this.limit = limit;
+ this.lookupKeys = lookupKeys;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Map extraParams;
+
+ private Long limit;
+
+ private List lookupKeys;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public BillSettingListParams build() {
+ return new BillSettingListParams(this.extraParams, this.limit, this.lookupKeys);
+ }
+
+ /**
+ * 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
+ * BillSettingListParams#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 BillSettingListParams#extraParams} for the field documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+
+ /** Optionally set the maximum number of results per page. Defaults to 20. */
+ public Builder setLimit(Long limit) {
+ this.limit = limit;
+ return this;
+ }
+
+ /**
+ * Add an element to `lookupKeys` list. A list is initialized for the first `add/addAll` call,
+ * and subsequent calls adds additional elements to the original list. See {@link
+ * BillSettingListParams#lookupKeys} for the field documentation.
+ */
+ public Builder addLookupKey(String element) {
+ if (this.lookupKeys == null) {
+ this.lookupKeys = new ArrayList<>();
+ }
+ this.lookupKeys.add(element);
+ return this;
+ }
+
+ /**
+ * Add all elements to `lookupKeys` list. A list is initialized for the first `add/addAll` call,
+ * and subsequent calls adds additional elements to the original list. See {@link
+ * BillSettingListParams#lookupKeys} for the field documentation.
+ */
+ public Builder addAllLookupKey(List elements) {
+ if (this.lookupKeys == null) {
+ this.lookupKeys = new ArrayList<>();
+ }
+ this.lookupKeys.addAll(elements);
+ return this;
+ }
+ }
+}
diff --git a/src/main/java/com/stripe/param/v2/billing/BillSettingUpdateParams.java b/src/main/java/com/stripe/param/v2/billing/BillSettingUpdateParams.java
new file mode 100644
index 00000000000..e9aeba82b85
--- /dev/null
+++ b/src/main/java/com/stripe/param/v2/billing/BillSettingUpdateParams.java
@@ -0,0 +1,551 @@
+// File generated from our OpenAPI spec
+package com.stripe.param.v2.billing;
+
+import com.google.gson.annotations.SerializedName;
+import com.stripe.net.ApiRequestParams;
+import com.stripe.param.common.EmptyParam;
+import java.util.HashMap;
+import java.util.Map;
+import lombok.EqualsAndHashCode;
+import lombok.Getter;
+
+@Getter
+@EqualsAndHashCode(callSuper = false)
+public class BillSettingUpdateParams extends ApiRequestParams {
+ /** Settings related to calculating a bill. */
+ @SerializedName("calculation")
+ Calculation calculation;
+
+ /**
+ * An optional customer-facing display name for the BillSetting object. To remove the display
+ * name, set it to an empty string in the request. Maximum length of 250 characters.
+ */
+ @SerializedName("display_name")
+ Object displayName;
+
+ /**
+ * 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;
+
+ /** Settings related to invoice behavior. */
+ @SerializedName("invoice")
+ Invoice invoice;
+
+ /** The ID of the invoice rendering template to be used when generating invoices. */
+ @SerializedName("invoice_rendering_template")
+ Object invoiceRenderingTemplate;
+
+ /**
+ * Optionally change the live version of the BillSetting. Providing {@code live_version =
+ * "latest"} will set the BillSetting' {@code live_version} to its latest version.
+ */
+ @SerializedName("live_version")
+ Object liveVersion;
+
+ /**
+ * A lookup key used to retrieve settings dynamically from a static string. This may be up to 200
+ * characters.
+ */
+ @SerializedName("lookup_key")
+ Object lookupKey;
+
+ private BillSettingUpdateParams(
+ Calculation calculation,
+ Object displayName,
+ Map extraParams,
+ Invoice invoice,
+ Object invoiceRenderingTemplate,
+ Object liveVersion,
+ Object lookupKey) {
+ this.calculation = calculation;
+ this.displayName = displayName;
+ this.extraParams = extraParams;
+ this.invoice = invoice;
+ this.invoiceRenderingTemplate = invoiceRenderingTemplate;
+ this.liveVersion = liveVersion;
+ this.lookupKey = lookupKey;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Calculation calculation;
+
+ private Object displayName;
+
+ private Map extraParams;
+
+ private Invoice invoice;
+
+ private Object invoiceRenderingTemplate;
+
+ private Object liveVersion;
+
+ private Object lookupKey;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public BillSettingUpdateParams build() {
+ return new BillSettingUpdateParams(
+ this.calculation,
+ this.displayName,
+ this.extraParams,
+ this.invoice,
+ this.invoiceRenderingTemplate,
+ this.liveVersion,
+ this.lookupKey);
+ }
+
+ /** Settings related to calculating a bill. */
+ public Builder setCalculation(BillSettingUpdateParams.Calculation calculation) {
+ this.calculation = calculation;
+ return this;
+ }
+
+ /**
+ * An optional customer-facing display name for the BillSetting object. To remove the display
+ * name, set it to an empty string in the request. Maximum length of 250 characters.
+ */
+ public Builder setDisplayName(String displayName) {
+ this.displayName = displayName;
+ return this;
+ }
+
+ /**
+ * An optional customer-facing display name for the BillSetting object. To remove the display
+ * name, set it to an empty string in the request. Maximum length of 250 characters.
+ */
+ public Builder setDisplayName(EmptyParam displayName) {
+ this.displayName = displayName;
+ 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
+ * BillSettingUpdateParams#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 BillSettingUpdateParams#extraParams} for the field documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+
+ /** Settings related to invoice behavior. */
+ public Builder setInvoice(BillSettingUpdateParams.Invoice invoice) {
+ this.invoice = invoice;
+ return this;
+ }
+
+ /** The ID of the invoice rendering template to be used when generating invoices. */
+ public Builder setInvoiceRenderingTemplate(String invoiceRenderingTemplate) {
+ this.invoiceRenderingTemplate = invoiceRenderingTemplate;
+ return this;
+ }
+
+ /** The ID of the invoice rendering template to be used when generating invoices. */
+ public Builder setInvoiceRenderingTemplate(EmptyParam invoiceRenderingTemplate) {
+ this.invoiceRenderingTemplate = invoiceRenderingTemplate;
+ return this;
+ }
+
+ /**
+ * Optionally change the live version of the BillSetting. Providing {@code live_version =
+ * "latest"} will set the BillSetting' {@code live_version} to its latest version.
+ */
+ public Builder setLiveVersion(String liveVersion) {
+ this.liveVersion = liveVersion;
+ return this;
+ }
+
+ /**
+ * Optionally change the live version of the BillSetting. Providing {@code live_version =
+ * "latest"} will set the BillSetting' {@code live_version} to its latest version.
+ */
+ public Builder setLiveVersion(EmptyParam liveVersion) {
+ this.liveVersion = liveVersion;
+ return this;
+ }
+
+ /**
+ * A lookup key used to retrieve settings dynamically from a static string. This may be up to
+ * 200 characters.
+ */
+ public Builder setLookupKey(String lookupKey) {
+ this.lookupKey = lookupKey;
+ return this;
+ }
+
+ /**
+ * A lookup key used to retrieve settings dynamically from a static string. This may be up to
+ * 200 characters.
+ */
+ public Builder setLookupKey(EmptyParam lookupKey) {
+ this.lookupKey = lookupKey;
+ return this;
+ }
+ }
+
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Calculation {
+ /**
+ * 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;
+
+ /** Settings for calculating tax. */
+ @SerializedName("tax")
+ Tax tax;
+
+ private Calculation(Map extraParams, Tax tax) {
+ this.extraParams = extraParams;
+ this.tax = tax;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Map extraParams;
+
+ private Tax tax;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public BillSettingUpdateParams.Calculation build() {
+ return new BillSettingUpdateParams.Calculation(this.extraParams, this.tax);
+ }
+
+ /**
+ * 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
+ * BillSettingUpdateParams.Calculation#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 BillSettingUpdateParams.Calculation#extraParams} for the field documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+
+ /** Settings for calculating tax. */
+ public Builder setTax(BillSettingUpdateParams.Calculation.Tax tax) {
+ this.tax = tax;
+ return this;
+ }
+ }
+
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Tax {
+ /**
+ * 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. Determines if tax will be calculated automatically based on a
+ * PTC or manually based on rules defined by the merchant. Defaults to "manual".
+ */
+ @SerializedName("type")
+ Type type;
+
+ private Tax(Map extraParams, Type type) {
+ this.extraParams = extraParams;
+ this.type = type;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Map extraParams;
+
+ private Type type;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public BillSettingUpdateParams.Calculation.Tax build() {
+ return new BillSettingUpdateParams.Calculation.Tax(this.extraParams, 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 BillSettingUpdateParams.Calculation.Tax#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 BillSettingUpdateParams.Calculation.Tax#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. Determines if tax will be calculated automatically based on a
+ * PTC or manually based on rules defined by the merchant. Defaults to "manual".
+ */
+ public Builder setType(BillSettingUpdateParams.Calculation.Tax.Type type) {
+ this.type = type;
+ return this;
+ }
+ }
+
+ public enum Type implements ApiRequestParams.EnumParam {
+ @SerializedName("automatic")
+ AUTOMATIC("automatic"),
+
+ @SerializedName("manual")
+ MANUAL("manual");
+
+ @Getter(onMethod_ = {@Override})
+ private final String value;
+
+ Type(String value) {
+ this.value = value;
+ }
+ }
+ }
+ }
+
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Invoice {
+ /**
+ * 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 amount of time until the invoice will be overdue for payment. */
+ @SerializedName("time_until_due")
+ TimeUntilDue timeUntilDue;
+
+ private Invoice(Map extraParams, TimeUntilDue timeUntilDue) {
+ this.extraParams = extraParams;
+ this.timeUntilDue = timeUntilDue;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Map extraParams;
+
+ private TimeUntilDue timeUntilDue;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public BillSettingUpdateParams.Invoice build() {
+ return new BillSettingUpdateParams.Invoice(this.extraParams, this.timeUntilDue);
+ }
+
+ /**
+ * 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
+ * BillSettingUpdateParams.Invoice#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 BillSettingUpdateParams.Invoice#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 amount of time until the invoice will be overdue for payment. */
+ public Builder setTimeUntilDue(BillSettingUpdateParams.Invoice.TimeUntilDue timeUntilDue) {
+ this.timeUntilDue = timeUntilDue;
+ return this;
+ }
+ }
+
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class TimeUntilDue {
+ /**
+ * 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 interval unit for the time until due. */
+ @SerializedName("interval")
+ Interval interval;
+
+ /**
+ * Required. The number of interval units. For example, if interval=day and
+ * interval_count=30, the invoice will be due in 30 days.
+ */
+ @SerializedName("interval_count")
+ Long intervalCount;
+
+ private TimeUntilDue(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 BillSettingUpdateParams.Invoice.TimeUntilDue build() {
+ return new BillSettingUpdateParams.Invoice.TimeUntilDue(
+ 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 BillSettingUpdateParams.Invoice.TimeUntilDue#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 BillSettingUpdateParams.Invoice.TimeUntilDue#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 interval unit for the time until due. */
+ public Builder setInterval(BillSettingUpdateParams.Invoice.TimeUntilDue.Interval interval) {
+ this.interval = interval;
+ return this;
+ }
+
+ /**
+ * Required. The number of interval units. For example, if interval=day and
+ * interval_count=30, the invoice will be due in 30 days.
+ */
+ 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;
+ }
+ }
+ }
+ }
+}
diff --git a/src/main/java/com/stripe/param/v2/billing/CadenceCreateParams.java b/src/main/java/com/stripe/param/v2/billing/CadenceCreateParams.java
new file mode 100644
index 00000000000..47cc41179bc
--- /dev/null
+++ b/src/main/java/com/stripe/param/v2/billing/CadenceCreateParams.java
@@ -0,0 +1,1606 @@
+// File generated from our OpenAPI spec
+package com.stripe.param.v2.billing;
+
+import com.google.gson.annotations.SerializedName;
+import com.stripe.net.ApiRequestParams;
+import java.util.HashMap;
+import java.util.Map;
+import lombok.EqualsAndHashCode;
+import lombok.Getter;
+
+@Getter
+@EqualsAndHashCode(callSuper = false)
+public class CadenceCreateParams extends ApiRequestParams {
+ /**
+ * Required. The billing cycle is the object that defines future billing cycle
+ * dates.
+ */
+ @SerializedName("billing_cycle")
+ BillingCycle billingCycle;
+
+ /**
+ * 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 lookup key used to retrieve cadences dynamically from a static string. Maximum length of 200
+ * characters.
+ */
+ @SerializedName("lookup_key")
+ String lookupKey;
+
+ /**
+ * Set of key-value pairs that you can attach
+ * to an object. This can be useful for storing additional information about the object in a
+ * structured format.
+ */
+ @SerializedName("metadata")
+ Map metadata;
+
+ /**
+ * Required. The payer determines the entity financially responsible for the
+ * bill.
+ */
+ @SerializedName("payer")
+ Payer payer;
+
+ /** The settings associated with the cadence. */
+ @SerializedName("settings")
+ Settings settings;
+
+ private CadenceCreateParams(
+ BillingCycle billingCycle,
+ Map extraParams,
+ String lookupKey,
+ Map metadata,
+ Payer payer,
+ Settings settings) {
+ this.billingCycle = billingCycle;
+ this.extraParams = extraParams;
+ this.lookupKey = lookupKey;
+ this.metadata = metadata;
+ this.payer = payer;
+ this.settings = settings;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private BillingCycle billingCycle;
+
+ private Map extraParams;
+
+ private String lookupKey;
+
+ private Map metadata;
+
+ private Payer payer;
+
+ private Settings settings;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public CadenceCreateParams build() {
+ return new CadenceCreateParams(
+ this.billingCycle,
+ this.extraParams,
+ this.lookupKey,
+ this.metadata,
+ this.payer,
+ this.settings);
+ }
+
+ /**
+ * Required. The billing cycle is the object that defines future billing cycle
+ * dates.
+ */
+ public Builder setBillingCycle(CadenceCreateParams.BillingCycle billingCycle) {
+ this.billingCycle = billingCycle;
+ 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
+ * CadenceCreateParams#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 CadenceCreateParams#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 lookup key used to retrieve cadences dynamically from a static string. Maximum length of
+ * 200 characters.
+ */
+ public Builder setLookupKey(String lookupKey) {
+ this.lookupKey = lookupKey;
+ 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
+ * CadenceCreateParams#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 CadenceCreateParams#metadata} for the field documentation.
+ */
+ public Builder putAllMetadata(Map map) {
+ if (this.metadata == null) {
+ this.metadata = new HashMap<>();
+ }
+ this.metadata.putAll(map);
+ return this;
+ }
+
+ /**
+ * Required. The payer determines the entity financially responsible for the
+ * bill.
+ */
+ public Builder setPayer(CadenceCreateParams.Payer payer) {
+ this.payer = payer;
+ return this;
+ }
+
+ /** The settings associated with the cadence. */
+ public Builder setSettings(CadenceCreateParams.Settings settings) {
+ this.settings = settings;
+ return this;
+ }
+ }
+
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class BillingCycle {
+ /** Specific configuration for determining billing dates when type=day. */
+ @SerializedName("day")
+ Day day;
+
+ /**
+ * 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 number of intervals (specified in the interval attribute) between cadence billings. For
+ * example, type=month and interval_count=3 bills every 3 months. If this is not provided, it
+ * will default to 1.
+ */
+ @SerializedName("interval_count")
+ Long intervalCount;
+
+ /** Specific configuration for determining billing dates when type=month. */
+ @SerializedName("month")
+ Month month;
+
+ /** Required. The frequency at which a cadence bills. */
+ @SerializedName("type")
+ Type type;
+
+ /** Specific configuration for determining billing dates when type=week. */
+ @SerializedName("week")
+ Week week;
+
+ /** Specific configuration for determining billing dates when type=year. */
+ @SerializedName("year")
+ Year year;
+
+ private BillingCycle(
+ Day day,
+ Map extraParams,
+ Long intervalCount,
+ Month month,
+ Type type,
+ Week week,
+ Year year) {
+ this.day = day;
+ this.extraParams = extraParams;
+ this.intervalCount = intervalCount;
+ this.month = month;
+ this.type = type;
+ this.week = week;
+ this.year = year;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Day day;
+
+ private Map extraParams;
+
+ private Long intervalCount;
+
+ private Month month;
+
+ private Type type;
+
+ private Week week;
+
+ private Year year;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public CadenceCreateParams.BillingCycle build() {
+ return new CadenceCreateParams.BillingCycle(
+ this.day,
+ this.extraParams,
+ this.intervalCount,
+ this.month,
+ this.type,
+ this.week,
+ this.year);
+ }
+
+ /** Specific configuration for determining billing dates when type=day. */
+ public Builder setDay(CadenceCreateParams.BillingCycle.Day day) {
+ this.day = day;
+ 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
+ * CadenceCreateParams.BillingCycle#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 CadenceCreateParams.BillingCycle#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 number of intervals (specified in the interval attribute) between cadence billings. For
+ * example, type=month and interval_count=3 bills every 3 months. If this is not provided, it
+ * will default to 1.
+ */
+ public Builder setIntervalCount(Long intervalCount) {
+ this.intervalCount = intervalCount;
+ return this;
+ }
+
+ /** Specific configuration for determining billing dates when type=month. */
+ public Builder setMonth(CadenceCreateParams.BillingCycle.Month month) {
+ this.month = month;
+ return this;
+ }
+
+ /** Required. The frequency at which a cadence bills. */
+ public Builder setType(CadenceCreateParams.BillingCycle.Type type) {
+ this.type = type;
+ return this;
+ }
+
+ /** Specific configuration for determining billing dates when type=week. */
+ public Builder setWeek(CadenceCreateParams.BillingCycle.Week week) {
+ this.week = week;
+ return this;
+ }
+
+ /** Specific configuration for determining billing dates when type=year. */
+ public Builder setYear(CadenceCreateParams.BillingCycle.Year year) {
+ this.year = year;
+ return this;
+ }
+ }
+
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Day {
+ /**
+ * 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 time at which the billing cycle ends. This field is optional, and if not provided, it
+ * will default to the time at which the cadence was created in UTC timezone.
+ */
+ @SerializedName("time")
+ Time time;
+
+ private Day(Map extraParams, Time time) {
+ this.extraParams = extraParams;
+ this.time = time;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Map extraParams;
+
+ private Time time;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public CadenceCreateParams.BillingCycle.Day build() {
+ return new CadenceCreateParams.BillingCycle.Day(this.extraParams, this.time);
+ }
+
+ /**
+ * 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 CadenceCreateParams.BillingCycle.Day#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 CadenceCreateParams.BillingCycle.Day#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 time at which the billing cycle ends. This field is optional, and if not provided, it
+ * will default to the time at which the cadence was created in UTC timezone.
+ */
+ public Builder setTime(CadenceCreateParams.BillingCycle.Day.Time time) {
+ this.time = time;
+ return this;
+ }
+ }
+
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Time {
+ /**
+ * 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 hour at which the billing cycle ends. This must be an
+ * integer between 0 and 23, inclusive. 0 represents midnight, and 23 represents 11 PM.
+ */
+ @SerializedName("hour")
+ Long hour;
+
+ /**
+ * Required. The minute at which the billing cycle ends. Must be an integer
+ * between 0 and 59, inclusive.
+ */
+ @SerializedName("minute")
+ Long minute;
+
+ /**
+ * Required. The second at which the billing cycle ends. Must be an integer
+ * between 0 and 59, inclusive.
+ */
+ @SerializedName("second")
+ Long second;
+
+ private Time(Map extraParams, Long hour, Long minute, Long second) {
+ this.extraParams = extraParams;
+ this.hour = hour;
+ this.minute = minute;
+ this.second = second;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Map extraParams;
+
+ private Long hour;
+
+ private Long minute;
+
+ private Long second;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public CadenceCreateParams.BillingCycle.Day.Time build() {
+ return new CadenceCreateParams.BillingCycle.Day.Time(
+ this.extraParams, this.hour, this.minute, this.second);
+ }
+
+ /**
+ * 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 CadenceCreateParams.BillingCycle.Day.Time#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 CadenceCreateParams.BillingCycle.Day.Time#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 hour at which the billing cycle ends. This must be an
+ * integer between 0 and 23, inclusive. 0 represents midnight, and 23 represents 11 PM.
+ */
+ public Builder setHour(Long hour) {
+ this.hour = hour;
+ return this;
+ }
+
+ /**
+ * Required. The minute at which the billing cycle ends. Must be an
+ * integer between 0 and 59, inclusive.
+ */
+ public Builder setMinute(Long minute) {
+ this.minute = minute;
+ return this;
+ }
+
+ /**
+ * Required. The second at which the billing cycle ends. Must be an
+ * integer between 0 and 59, inclusive.
+ */
+ public Builder setSecond(Long second) {
+ this.second = second;
+ return this;
+ }
+ }
+ }
+ }
+
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Month {
+ /**
+ * Required. The day to anchor the billing on for a type="month"
+ * billing cycle from 1-31. If this number is greater than the number of days in the month
+ * being billed, this will anchor to the last day of the month. If not provided, this will
+ * default to the day the cadence was created.
+ */
+ @SerializedName("day_of_month")
+ Long dayOfMonth;
+
+ /**
+ * 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 month to anchor the billing on for a type="month" billing cycle from 1-12. If
+ * not provided, this will default to the month the cadence was created. This setting can only
+ * be used for monthly billing cycles with {@code interval_count} of 2, 3, 4 or 6. All
+ * occurrences will be calculated from month provided.
+ */
+ @SerializedName("month_of_year")
+ Long monthOfYear;
+
+ /**
+ * The time at which the billing cycle ends. This field is optional, and if not provided, it
+ * will default to the time at which the cadence was created in UTC timezone.
+ */
+ @SerializedName("time")
+ Time time;
+
+ private Month(Long dayOfMonth, Map extraParams, Long monthOfYear, Time time) {
+ this.dayOfMonth = dayOfMonth;
+ this.extraParams = extraParams;
+ this.monthOfYear = monthOfYear;
+ this.time = time;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Long dayOfMonth;
+
+ private Map extraParams;
+
+ private Long monthOfYear;
+
+ private Time time;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public CadenceCreateParams.BillingCycle.Month build() {
+ return new CadenceCreateParams.BillingCycle.Month(
+ this.dayOfMonth, this.extraParams, this.monthOfYear, this.time);
+ }
+
+ /**
+ * Required. The day to anchor the billing on for a type="month"
+ * billing cycle from 1-31. If this number is greater than the number of days in the month
+ * being billed, this will anchor to the last day of the month. If not provided, this will
+ * default to the day the cadence was created.
+ */
+ public Builder setDayOfMonth(Long dayOfMonth) {
+ this.dayOfMonth = dayOfMonth;
+ 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 CadenceCreateParams.BillingCycle.Month#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 CadenceCreateParams.BillingCycle.Month#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 month to anchor the billing on for a type="month" billing cycle from 1-12.
+ * If not provided, this will default to the month the cadence was created. This setting can
+ * only be used for monthly billing cycles with {@code interval_count} of 2, 3, 4 or 6. All
+ * occurrences will be calculated from month provided.
+ */
+ public Builder setMonthOfYear(Long monthOfYear) {
+ this.monthOfYear = monthOfYear;
+ return this;
+ }
+
+ /**
+ * The time at which the billing cycle ends. This field is optional, and if not provided, it
+ * will default to the time at which the cadence was created in UTC timezone.
+ */
+ public Builder setTime(CadenceCreateParams.BillingCycle.Month.Time time) {
+ this.time = time;
+ return this;
+ }
+ }
+
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Time {
+ /**
+ * 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 hour at which the billing cycle ends. This must be an
+ * integer between 0 and 23, inclusive. 0 represents midnight, and 23 represents 11 PM.
+ */
+ @SerializedName("hour")
+ Long hour;
+
+ /**
+ * Required. The minute at which the billing cycle ends. Must be an integer
+ * between 0 and 59, inclusive.
+ */
+ @SerializedName("minute")
+ Long minute;
+
+ /**
+ * Required. The second at which the billing cycle ends. Must be an integer
+ * between 0 and 59, inclusive.
+ */
+ @SerializedName("second")
+ Long second;
+
+ private Time(Map extraParams, Long hour, Long minute, Long second) {
+ this.extraParams = extraParams;
+ this.hour = hour;
+ this.minute = minute;
+ this.second = second;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Map extraParams;
+
+ private Long hour;
+
+ private Long minute;
+
+ private Long second;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public CadenceCreateParams.BillingCycle.Month.Time build() {
+ return new CadenceCreateParams.BillingCycle.Month.Time(
+ this.extraParams, this.hour, this.minute, this.second);
+ }
+
+ /**
+ * 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 CadenceCreateParams.BillingCycle.Month.Time#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 CadenceCreateParams.BillingCycle.Month.Time#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 hour at which the billing cycle ends. This must be an
+ * integer between 0 and 23, inclusive. 0 represents midnight, and 23 represents 11 PM.
+ */
+ public Builder setHour(Long hour) {
+ this.hour = hour;
+ return this;
+ }
+
+ /**
+ * Required. The minute at which the billing cycle ends. Must be an
+ * integer between 0 and 59, inclusive.
+ */
+ public Builder setMinute(Long minute) {
+ this.minute = minute;
+ return this;
+ }
+
+ /**
+ * Required. The second at which the billing cycle ends. Must be an
+ * integer between 0 and 59, inclusive.
+ */
+ public Builder setSecond(Long second) {
+ this.second = second;
+ return this;
+ }
+ }
+ }
+ }
+
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Week {
+ /**
+ * Required. The day of the week to bill the type=week billing cycle on.
+ * Numbered from 1-7 for Monday to Sunday respectively, based on the ISO-8601 week day
+ * numbering. If not provided, this will default to the day the cadence was created.
+ */
+ @SerializedName("day_of_week")
+ Long dayOfWeek;
+
+ /**
+ * 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 time at which the billing cycle ends. This field is optional, and if not provided, it
+ * will default to the time at which the cadence was created in UTC timezone.
+ */
+ @SerializedName("time")
+ Time time;
+
+ private Week(Long dayOfWeek, Map extraParams, Time time) {
+ this.dayOfWeek = dayOfWeek;
+ this.extraParams = extraParams;
+ this.time = time;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Long dayOfWeek;
+
+ private Map extraParams;
+
+ private Time time;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public CadenceCreateParams.BillingCycle.Week build() {
+ return new CadenceCreateParams.BillingCycle.Week(
+ this.dayOfWeek, this.extraParams, this.time);
+ }
+
+ /**
+ * Required. The day of the week to bill the type=week billing cycle on.
+ * Numbered from 1-7 for Monday to Sunday respectively, based on the ISO-8601 week day
+ * numbering. If not provided, this will default to the day the cadence was created.
+ */
+ public Builder setDayOfWeek(Long dayOfWeek) {
+ this.dayOfWeek = dayOfWeek;
+ 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 CadenceCreateParams.BillingCycle.Week#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 CadenceCreateParams.BillingCycle.Week#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 time at which the billing cycle ends. This field is optional, and if not provided, it
+ * will default to the time at which the cadence was created in UTC timezone.
+ */
+ public Builder setTime(CadenceCreateParams.BillingCycle.Week.Time time) {
+ this.time = time;
+ return this;
+ }
+ }
+
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Time {
+ /**
+ * 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 hour at which the billing cycle ends. This must be an
+ * integer between 0 and 23, inclusive. 0 represents midnight, and 23 represents 11 PM.
+ */
+ @SerializedName("hour")
+ Long hour;
+
+ /**
+ * Required. The minute at which the billing cycle ends. Must be an integer
+ * between 0 and 59, inclusive.
+ */
+ @SerializedName("minute")
+ Long minute;
+
+ /**
+ * Required. The second at which the billing cycle ends. Must be an integer
+ * between 0 and 59, inclusive.
+ */
+ @SerializedName("second")
+ Long second;
+
+ private Time(Map extraParams, Long hour, Long minute, Long second) {
+ this.extraParams = extraParams;
+ this.hour = hour;
+ this.minute = minute;
+ this.second = second;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Map extraParams;
+
+ private Long hour;
+
+ private Long minute;
+
+ private Long second;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public CadenceCreateParams.BillingCycle.Week.Time build() {
+ return new CadenceCreateParams.BillingCycle.Week.Time(
+ this.extraParams, this.hour, this.minute, this.second);
+ }
+
+ /**
+ * 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 CadenceCreateParams.BillingCycle.Week.Time#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 CadenceCreateParams.BillingCycle.Week.Time#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 hour at which the billing cycle ends. This must be an
+ * integer between 0 and 23, inclusive. 0 represents midnight, and 23 represents 11 PM.
+ */
+ public Builder setHour(Long hour) {
+ this.hour = hour;
+ return this;
+ }
+
+ /**
+ * Required. The minute at which the billing cycle ends. Must be an
+ * integer between 0 and 59, inclusive.
+ */
+ public Builder setMinute(Long minute) {
+ this.minute = minute;
+ return this;
+ }
+
+ /**
+ * Required. The second at which the billing cycle ends. Must be an
+ * integer between 0 and 59, inclusive.
+ */
+ public Builder setSecond(Long second) {
+ this.second = second;
+ return this;
+ }
+ }
+ }
+ }
+
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Year {
+ /**
+ * The day to anchor the billing on for a type="month" billing cycle from 1-31. If
+ * this number is greater than the number of days in the month being billed, this will anchor
+ * to the last day of the month. If not provided, this will default to the day the cadence was
+ * created.
+ */
+ @SerializedName("day_of_month")
+ Long dayOfMonth;
+
+ /**
+ * 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 month to bill on from 1-12. If not provided, this will default to the month the cadence
+ * was created.
+ */
+ @SerializedName("month_of_year")
+ Long monthOfYear;
+
+ /**
+ * The time at which the billing cycle ends. This field is optional, and if not provided, it
+ * will default to the time at which the cadence was created in UTC timezone.
+ */
+ @SerializedName("time")
+ Time time;
+
+ private Year(Long dayOfMonth, Map extraParams, Long monthOfYear, Time time) {
+ this.dayOfMonth = dayOfMonth;
+ this.extraParams = extraParams;
+ this.monthOfYear = monthOfYear;
+ this.time = time;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Long dayOfMonth;
+
+ private Map extraParams;
+
+ private Long monthOfYear;
+
+ private Time time;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public CadenceCreateParams.BillingCycle.Year build() {
+ return new CadenceCreateParams.BillingCycle.Year(
+ this.dayOfMonth, this.extraParams, this.monthOfYear, this.time);
+ }
+
+ /**
+ * The day to anchor the billing on for a type="month" billing cycle from 1-31. If
+ * this number is greater than the number of days in the month being billed, this will
+ * anchor to the last day of the month. If not provided, this will default to the day the
+ * cadence was created.
+ */
+ public Builder setDayOfMonth(Long dayOfMonth) {
+ this.dayOfMonth = dayOfMonth;
+ 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 CadenceCreateParams.BillingCycle.Year#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 CadenceCreateParams.BillingCycle.Year#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 month to bill on from 1-12. If not provided, this will default to the month the
+ * cadence was created.
+ */
+ public Builder setMonthOfYear(Long monthOfYear) {
+ this.monthOfYear = monthOfYear;
+ return this;
+ }
+
+ /**
+ * The time at which the billing cycle ends. This field is optional, and if not provided, it
+ * will default to the time at which the cadence was created in UTC timezone.
+ */
+ public Builder setTime(CadenceCreateParams.BillingCycle.Year.Time time) {
+ this.time = time;
+ return this;
+ }
+ }
+
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Time {
+ /**
+ * 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 hour at which the billing cycle ends. This must be an
+ * integer between 0 and 23, inclusive. 0 represents midnight, and 23 represents 11 PM.
+ */
+ @SerializedName("hour")
+ Long hour;
+
+ /**
+ * Required. The minute at which the billing cycle ends. Must be an integer
+ * between 0 and 59, inclusive.
+ */
+ @SerializedName("minute")
+ Long minute;
+
+ /**
+ * Required. The second at which the billing cycle ends. Must be an integer
+ * between 0 and 59, inclusive.
+ */
+ @SerializedName("second")
+ Long second;
+
+ private Time(Map extraParams, Long hour, Long minute, Long second) {
+ this.extraParams = extraParams;
+ this.hour = hour;
+ this.minute = minute;
+ this.second = second;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Map extraParams;
+
+ private Long hour;
+
+ private Long minute;
+
+ private Long second;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public CadenceCreateParams.BillingCycle.Year.Time build() {
+ return new CadenceCreateParams.BillingCycle.Year.Time(
+ this.extraParams, this.hour, this.minute, this.second);
+ }
+
+ /**
+ * 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 CadenceCreateParams.BillingCycle.Year.Time#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 CadenceCreateParams.BillingCycle.Year.Time#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 hour at which the billing cycle ends. This must be an
+ * integer between 0 and 23, inclusive. 0 represents midnight, and 23 represents 11 PM.
+ */
+ public Builder setHour(Long hour) {
+ this.hour = hour;
+ return this;
+ }
+
+ /**
+ * Required. The minute at which the billing cycle ends. Must be an
+ * integer between 0 and 59, inclusive.
+ */
+ public Builder setMinute(Long minute) {
+ this.minute = minute;
+ return this;
+ }
+
+ /**
+ * Required. The second at which the billing cycle ends. Must be an
+ * integer between 0 and 59, inclusive.
+ */
+ public Builder setSecond(Long second) {
+ this.second = second;
+ return this;
+ }
+ }
+ }
+ }
+
+ public enum Type 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;
+
+ Type(String value) {
+ this.value = value;
+ }
+ }
+ }
+
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Payer {
+ /**
+ * Required. The ID of the Billing Profile object which determines how a bill
+ * will be paid.
+ */
+ @SerializedName("billing_profile")
+ String billingProfile;
+
+ /**
+ * 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 Payer(String billingProfile, Map extraParams) {
+ this.billingProfile = billingProfile;
+ this.extraParams = extraParams;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private String billingProfile;
+
+ private Map extraParams;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public CadenceCreateParams.Payer build() {
+ return new CadenceCreateParams.Payer(this.billingProfile, this.extraParams);
+ }
+
+ /**
+ * Required. The ID of the Billing Profile object which determines how a bill
+ * will be paid.
+ */
+ public Builder setBillingProfile(String billingProfile) {
+ this.billingProfile = billingProfile;
+ 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
+ * CadenceCreateParams.Payer#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 CadenceCreateParams.Payer#extraParams} for the field documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+ }
+ }
+
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Settings {
+ /**
+ * Settings that configure bill generation, which includes calculating totals, tax, and
+ * presenting invoices. If no setting is provided here, the settings from the customer
+ * referenced on the payer will be used. If no customer settings are present, the merchant
+ * default settings will be used.
+ */
+ @SerializedName("bill")
+ Bill bill;
+
+ /**
+ * Settings that configure and manage the behavior of collecting payments. If no setting is
+ * provided here, the settings from the customer referenced from the payer will be used if they
+ * exist. If no customer settings are present, the merchant default settings will be used.
+ */
+ @SerializedName("collection")
+ Collection collection;
+
+ /**
+ * 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 Settings(Bill bill, Collection collection, Map extraParams) {
+ this.bill = bill;
+ this.collection = collection;
+ this.extraParams = extraParams;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Bill bill;
+
+ private Collection collection;
+
+ private Map extraParams;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public CadenceCreateParams.Settings build() {
+ return new CadenceCreateParams.Settings(this.bill, this.collection, this.extraParams);
+ }
+
+ /**
+ * Settings that configure bill generation, which includes calculating totals, tax, and
+ * presenting invoices. If no setting is provided here, the settings from the customer
+ * referenced on the payer will be used. If no customer settings are present, the merchant
+ * default settings will be used.
+ */
+ public Builder setBill(CadenceCreateParams.Settings.Bill bill) {
+ this.bill = bill;
+ return this;
+ }
+
+ /**
+ * Settings that configure and manage the behavior of collecting payments. If no setting is
+ * provided here, the settings from the customer referenced from the payer will be used if
+ * they exist. If no customer settings are present, the merchant default settings will be
+ * used.
+ */
+ public Builder setCollection(CadenceCreateParams.Settings.Collection collection) {
+ this.collection = collection;
+ 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
+ * CadenceCreateParams.Settings#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 CadenceCreateParams.Settings#extraParams} for the field documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+ }
+
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Bill {
+ /**
+ * 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 referenced settings object. */
+ @SerializedName("id")
+ String id;
+
+ /**
+ * An optional field to specify the version of the Settings to use. If not provided, this will
+ * always default to the live version any time the settings are used.
+ */
+ @SerializedName("version")
+ String version;
+
+ private Bill(Map extraParams, String id, String version) {
+ this.extraParams = extraParams;
+ this.id = id;
+ this.version = version;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Map extraParams;
+
+ private String id;
+
+ private String version;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public CadenceCreateParams.Settings.Bill build() {
+ return new CadenceCreateParams.Settings.Bill(this.extraParams, this.id, this.version);
+ }
+
+ /**
+ * 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 CadenceCreateParams.Settings.Bill#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 CadenceCreateParams.Settings.Bill#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 referenced settings object. */
+ public Builder setId(String id) {
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * An optional field to specify the version of the Settings to use. If not provided, this
+ * will always default to the live version any time the settings are used.
+ */
+ public Builder setVersion(String version) {
+ this.version = version;
+ return this;
+ }
+ }
+ }
+
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Collection {
+ /**
+ * 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 referenced settings object. */
+ @SerializedName("id")
+ String id;
+
+ /**
+ * An optional field to specify the version of the Settings to use. If not provided, this will
+ * always default to the live version any time the settings are used.
+ */
+ @SerializedName("version")
+ String version;
+
+ private Collection(Map extraParams, String id, String version) {
+ this.extraParams = extraParams;
+ this.id = id;
+ this.version = version;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Map extraParams;
+
+ private String id;
+
+ private String version;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public CadenceCreateParams.Settings.Collection build() {
+ return new CadenceCreateParams.Settings.Collection(
+ this.extraParams, this.id, this.version);
+ }
+
+ /**
+ * 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 CadenceCreateParams.Settings.Collection#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 CadenceCreateParams.Settings.Collection#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 referenced settings object. */
+ public Builder setId(String id) {
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * An optional field to specify the version of the Settings to use. If not provided, this
+ * will always default to the live version any time the settings are used.
+ */
+ public Builder setVersion(String version) {
+ this.version = version;
+ return this;
+ }
+ }
+ }
+ }
+}
diff --git a/src/main/java/com/stripe/param/v2/billing/CadenceListParams.java b/src/main/java/com/stripe/param/v2/billing/CadenceListParams.java
new file mode 100644
index 00000000000..035c6b37d13
--- /dev/null
+++ b/src/main/java/com/stripe/param/v2/billing/CadenceListParams.java
@@ -0,0 +1,312 @@
+// File generated from our OpenAPI spec
+package com.stripe.param.v2.billing;
+
+import com.google.gson.annotations.SerializedName;
+import com.stripe.net.ApiRequestParams;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import lombok.EqualsAndHashCode;
+import lombok.Getter;
+
+@Getter
+@EqualsAndHashCode(callSuper = false)
+public class CadenceListParams extends ApiRequestParams {
+ /**
+ * 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 resource to include in the response. */
+ @SerializedName("include")
+ List include;
+
+ /** Optionally set the maximum number of results per page. Defaults to 20. */
+ @SerializedName("limit")
+ Long limit;
+
+ /**
+ * Only return the cadences with these lookup_keys, if any exist. You can specify up to 10
+ * lookup_keys. Mutually exclusive with {@code test_clock} and {@code payer}.
+ */
+ @SerializedName("lookup_keys")
+ List lookupKeys;
+
+ /**
+ * If provided, only cadences that specifically reference the payer will be returned. Mutually
+ * exclusive with {@code test_clock} and {@code lookup_keys}.
+ */
+ @SerializedName("payer")
+ Payer payer;
+
+ /**
+ * If provided, only cadences that specifically reference the provided test clock ID (via the
+ * customer's test clock) will be returned. Mutually exclusive with {@code payer}.
+ */
+ @SerializedName("test_clock")
+ String testClock;
+
+ private CadenceListParams(
+ Map extraParams,
+ List include,
+ Long limit,
+ List lookupKeys,
+ Payer payer,
+ String testClock) {
+ this.extraParams = extraParams;
+ this.include = include;
+ this.limit = limit;
+ this.lookupKeys = lookupKeys;
+ this.payer = payer;
+ this.testClock = testClock;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Map extraParams;
+
+ private List include;
+
+ private Long limit;
+
+ private List lookupKeys;
+
+ private Payer payer;
+
+ private String testClock;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public CadenceListParams build() {
+ return new CadenceListParams(
+ this.extraParams, this.include, this.limit, this.lookupKeys, this.payer, this.testClock);
+ }
+
+ /**
+ * 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
+ * CadenceListParams#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 CadenceListParams#extraParams} for the field documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+
+ /**
+ * Add an element to `include` list. A list is initialized for the first `add/addAll` call, and
+ * subsequent calls adds additional elements to the original list. See {@link
+ * CadenceListParams#include} for the field documentation.
+ */
+ public Builder addInclude(CadenceListParams.Include element) {
+ if (this.include == null) {
+ this.include = new ArrayList<>();
+ }
+ this.include.add(element);
+ return this;
+ }
+
+ /**
+ * Add all elements to `include` list. A list is initialized for the first `add/addAll` call,
+ * and subsequent calls adds additional elements to the original list. See {@link
+ * CadenceListParams#include} for the field documentation.
+ */
+ public Builder addAllInclude(List elements) {
+ if (this.include == null) {
+ this.include = new ArrayList<>();
+ }
+ this.include.addAll(elements);
+ return this;
+ }
+
+ /** Optionally set the maximum number of results per page. Defaults to 20. */
+ public Builder setLimit(Long limit) {
+ this.limit = limit;
+ return this;
+ }
+
+ /**
+ * Add an element to `lookupKeys` list. A list is initialized for the first `add/addAll` call,
+ * and subsequent calls adds additional elements to the original list. See {@link
+ * CadenceListParams#lookupKeys} for the field documentation.
+ */
+ public Builder addLookupKey(String element) {
+ if (this.lookupKeys == null) {
+ this.lookupKeys = new ArrayList<>();
+ }
+ this.lookupKeys.add(element);
+ return this;
+ }
+
+ /**
+ * Add all elements to `lookupKeys` list. A list is initialized for the first `add/addAll` call,
+ * and subsequent calls adds additional elements to the original list. See {@link
+ * CadenceListParams#lookupKeys} for the field documentation.
+ */
+ public Builder addAllLookupKey(List elements) {
+ if (this.lookupKeys == null) {
+ this.lookupKeys = new ArrayList<>();
+ }
+ this.lookupKeys.addAll(elements);
+ return this;
+ }
+
+ /**
+ * If provided, only cadences that specifically reference the payer will be returned. Mutually
+ * exclusive with {@code test_clock} and {@code lookup_keys}.
+ */
+ public Builder setPayer(CadenceListParams.Payer payer) {
+ this.payer = payer;
+ return this;
+ }
+
+ /**
+ * If provided, only cadences that specifically reference the provided test clock ID (via the
+ * customer's test clock) will be returned. Mutually exclusive with {@code payer}.
+ */
+ public Builder setTestClock(String testClock) {
+ this.testClock = testClock;
+ return this;
+ }
+ }
+
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Payer {
+ /**
+ * The ID of the Customer object. If provided, only cadences that specifically reference the
+ * provided customer ID will be returned.
+ */
+ @SerializedName("customer")
+ String customer;
+
+ /**
+ * Map of extra parameters for custom features not available in this client library. The content
+ * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each
+ * key/value pair is serialized as if the key is a root-level field (serialized) name in this
+ * param object. Effectively, this map is flattened to its parent instance.
+ */
+ @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
+ Map extraParams;
+
+ /**
+ * Required. A string identifying the type of the payer. Currently the only
+ * supported value is {@code customer}.
+ */
+ @SerializedName("type")
+ Type type;
+
+ private Payer(String customer, Map extraParams, Type type) {
+ this.customer = customer;
+ this.extraParams = extraParams;
+ this.type = type;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private String customer;
+
+ private Map extraParams;
+
+ private Type type;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public CadenceListParams.Payer build() {
+ return new CadenceListParams.Payer(this.customer, this.extraParams, this.type);
+ }
+
+ /**
+ * The ID of the Customer object. If provided, only cadences that specifically reference the
+ * provided customer ID will be returned.
+ */
+ public Builder setCustomer(String customer) {
+ this.customer = customer;
+ return this;
+ }
+
+ /**
+ * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
+ * call, and subsequent calls add additional key/value pairs to the original map. See {@link
+ * CadenceListParams.Payer#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 CadenceListParams.Payer#extraParams} for the field documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+
+ /**
+ * Required. A string identifying the type of the payer. Currently the only
+ * supported value is {@code customer}.
+ */
+ public Builder setType(CadenceListParams.Payer.Type type) {
+ this.type = type;
+ return this;
+ }
+ }
+
+ public enum Type implements ApiRequestParams.EnumParam {
+ @SerializedName("customer")
+ CUSTOMER("customer");
+
+ @Getter(onMethod_ = {@Override})
+ private final String value;
+
+ Type(String value) {
+ this.value = value;
+ }
+ }
+ }
+
+ public enum Include implements ApiRequestParams.EnumParam {
+ @SerializedName("settings_data")
+ SETTINGS_DATA("settings_data");
+
+ @Getter(onMethod_ = {@Override})
+ private final String value;
+
+ Include(String value) {
+ this.value = value;
+ }
+ }
+}
diff --git a/src/main/java/com/stripe/param/v2/billing/CadenceRetrieveParams.java b/src/main/java/com/stripe/param/v2/billing/CadenceRetrieveParams.java
new file mode 100644
index 00000000000..1f3f91bcb5e
--- /dev/null
+++ b/src/main/java/com/stripe/param/v2/billing/CadenceRetrieveParams.java
@@ -0,0 +1,113 @@
+// File generated from our OpenAPI spec
+package com.stripe.param.v2.billing;
+
+import com.google.gson.annotations.SerializedName;
+import com.stripe.net.ApiRequestParams;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import lombok.EqualsAndHashCode;
+import lombok.Getter;
+
+@Getter
+@EqualsAndHashCode(callSuper = false)
+public class CadenceRetrieveParams extends ApiRequestParams {
+ /**
+ * 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 resource to include in the response. */
+ @SerializedName("include")
+ List include;
+
+ private CadenceRetrieveParams(
+ Map extraParams, List include) {
+ this.extraParams = extraParams;
+ this.include = include;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Map extraParams;
+
+ private List include;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public CadenceRetrieveParams build() {
+ return new CadenceRetrieveParams(this.extraParams, this.include);
+ }
+
+ /**
+ * 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
+ * CadenceRetrieveParams#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 CadenceRetrieveParams#extraParams} for the field documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+
+ /**
+ * Add an element to `include` list. A list is initialized for the first `add/addAll` call, and
+ * subsequent calls adds additional elements to the original list. See {@link
+ * CadenceRetrieveParams#include} for the field documentation.
+ */
+ public Builder addInclude(CadenceRetrieveParams.Include element) {
+ if (this.include == null) {
+ this.include = new ArrayList<>();
+ }
+ this.include.add(element);
+ return this;
+ }
+
+ /**
+ * Add all elements to `include` list. A list is initialized for the first `add/addAll` call,
+ * and subsequent calls adds additional elements to the original list. See {@link
+ * CadenceRetrieveParams#include} for the field documentation.
+ */
+ public Builder addAllInclude(List elements) {
+ if (this.include == null) {
+ this.include = new ArrayList<>();
+ }
+ this.include.addAll(elements);
+ return this;
+ }
+ }
+
+ public enum Include implements ApiRequestParams.EnumParam {
+ @SerializedName("settings_data")
+ SETTINGS_DATA("settings_data");
+
+ @Getter(onMethod_ = {@Override})
+ private final String value;
+
+ Include(String value) {
+ this.value = value;
+ }
+ }
+}
diff --git a/src/main/java/com/stripe/param/v2/billing/CadenceUpdateParams.java b/src/main/java/com/stripe/param/v2/billing/CadenceUpdateParams.java
new file mode 100644
index 00000000000..25d57dff2cd
--- /dev/null
+++ b/src/main/java/com/stripe/param/v2/billing/CadenceUpdateParams.java
@@ -0,0 +1,575 @@
+// File generated from our OpenAPI spec
+package com.stripe.param.v2.billing;
+
+import com.google.gson.annotations.SerializedName;
+import com.stripe.net.ApiRequestParams;
+import com.stripe.param.common.EmptyParam;
+import java.util.HashMap;
+import java.util.Map;
+import lombok.EqualsAndHashCode;
+import lombok.Getter;
+
+@Getter
+@EqualsAndHashCode(callSuper = false)
+public class CadenceUpdateParams extends ApiRequestParams {
+ /**
+ * 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 lookup key used to retrieve cadences dynamically from a static string. Maximum length of 200
+ * characters.
+ */
+ @SerializedName("lookup_key")
+ Object lookupKey;
+
+ /**
+ * Set of key-value pairs that you can attach
+ * to an object. This can be useful for storing additional information about the object in a
+ * structured format.
+ */
+ @SerializedName("metadata")
+ Map metadata;
+
+ /** The payer determines the entity financially responsible for the bill. */
+ @SerializedName("payer")
+ Payer payer;
+
+ /** The settings associated with the cadence. */
+ @SerializedName("settings")
+ Settings settings;
+
+ private CadenceUpdateParams(
+ Map extraParams,
+ Object lookupKey,
+ Map metadata,
+ Payer payer,
+ Settings settings) {
+ this.extraParams = extraParams;
+ this.lookupKey = lookupKey;
+ this.metadata = metadata;
+ this.payer = payer;
+ this.settings = settings;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Map extraParams;
+
+ private Object lookupKey;
+
+ private Map metadata;
+
+ private Payer payer;
+
+ private Settings settings;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public CadenceUpdateParams build() {
+ return new CadenceUpdateParams(
+ this.extraParams, this.lookupKey, this.metadata, this.payer, this.settings);
+ }
+
+ /**
+ * 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
+ * CadenceUpdateParams#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 CadenceUpdateParams#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 lookup key used to retrieve cadences dynamically from a static string. Maximum length of
+ * 200 characters.
+ */
+ public Builder setLookupKey(String lookupKey) {
+ this.lookupKey = lookupKey;
+ return this;
+ }
+
+ /**
+ * A lookup key used to retrieve cadences dynamically from a static string. Maximum length of
+ * 200 characters.
+ */
+ public Builder setLookupKey(EmptyParam lookupKey) {
+ this.lookupKey = lookupKey;
+ 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
+ * CadenceUpdateParams#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 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
+ * CadenceUpdateParams#metadata} for the field documentation.
+ */
+ public Builder putMetadata(String key, EmptyParam 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.
+ * Map values can only be one of the following types: `String`, `EmptyParam`. See {@link
+ * CadenceUpdateParams#metadata} for the field documentation.
+ */
+ public Builder putAllMetadata(Map map) {
+ if (!map.values().stream().allMatch(v -> v instanceof String || v instanceof EmptyParam)) {
+ throw new IllegalArgumentException(
+ "All map values must one of the following types: String, EmptyParam");
+ }
+ if (this.metadata == null) {
+ this.metadata = new HashMap<>();
+ }
+ this.metadata.putAll(map);
+ return this;
+ }
+
+ /** The payer determines the entity financially responsible for the bill. */
+ public Builder setPayer(CadenceUpdateParams.Payer payer) {
+ this.payer = payer;
+ return this;
+ }
+
+ /** The settings associated with the cadence. */
+ public Builder setSettings(CadenceUpdateParams.Settings settings) {
+ this.settings = settings;
+ return this;
+ }
+ }
+
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Payer {
+ /** The ID of the Billing Profile object which determines how a bill will be paid. */
+ @SerializedName("billing_profile")
+ Object billingProfile;
+
+ /**
+ * 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 Payer(Object billingProfile, Map extraParams) {
+ this.billingProfile = billingProfile;
+ this.extraParams = extraParams;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Object billingProfile;
+
+ private Map extraParams;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public CadenceUpdateParams.Payer build() {
+ return new CadenceUpdateParams.Payer(this.billingProfile, this.extraParams);
+ }
+
+ /** The ID of the Billing Profile object which determines how a bill will be paid. */
+ public Builder setBillingProfile(String billingProfile) {
+ this.billingProfile = billingProfile;
+ return this;
+ }
+
+ /** The ID of the Billing Profile object which determines how a bill will be paid. */
+ public Builder setBillingProfile(EmptyParam billingProfile) {
+ this.billingProfile = billingProfile;
+ 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
+ * CadenceUpdateParams.Payer#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 CadenceUpdateParams.Payer#extraParams} for the field documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+ }
+ }
+
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Settings {
+ /**
+ * Settings that configure bills generation, which includes calculating totals, tax, and
+ * presenting invoices. If null is provided, the current bill settings will be removed from the
+ * billing cadence.
+ */
+ @SerializedName("bill")
+ Bill bill;
+
+ /**
+ * Settings that configure and manage the behavior of collecting payments. If null is provided,
+ * the current collection settings will be removed from the billing cadence.
+ */
+ @SerializedName("collection")
+ Collection collection;
+
+ /**
+ * 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 Settings(Bill bill, Collection collection, Map extraParams) {
+ this.bill = bill;
+ this.collection = collection;
+ this.extraParams = extraParams;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Bill bill;
+
+ private Collection collection;
+
+ private Map extraParams;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public CadenceUpdateParams.Settings build() {
+ return new CadenceUpdateParams.Settings(this.bill, this.collection, this.extraParams);
+ }
+
+ /**
+ * Settings that configure bills generation, which includes calculating totals, tax, and
+ * presenting invoices. If null is provided, the current bill settings will be removed from
+ * the billing cadence.
+ */
+ public Builder setBill(CadenceUpdateParams.Settings.Bill bill) {
+ this.bill = bill;
+ return this;
+ }
+
+ /**
+ * Settings that configure and manage the behavior of collecting payments. If null is
+ * provided, the current collection settings will be removed from the billing cadence.
+ */
+ public Builder setCollection(CadenceUpdateParams.Settings.Collection collection) {
+ this.collection = collection;
+ 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
+ * CadenceUpdateParams.Settings#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 CadenceUpdateParams.Settings#extraParams} for the field documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+ }
+
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Bill {
+ /**
+ * 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 referenced settings object. */
+ @SerializedName("id")
+ Object id;
+
+ /**
+ * An optional field to specify the version of Settings to use. If not provided, this will
+ * always default to the {@code live_version} specified on the setting, any time the settings
+ * are used. Using a specific version here will prevent the settings from updating, and is
+ * discouraged for cadences. To clear a pinned version, set the version to null.
+ */
+ @SerializedName("version")
+ Object version;
+
+ private Bill(Map extraParams, Object id, Object version) {
+ this.extraParams = extraParams;
+ this.id = id;
+ this.version = version;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Map extraParams;
+
+ private Object id;
+
+ private Object version;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public CadenceUpdateParams.Settings.Bill build() {
+ return new CadenceUpdateParams.Settings.Bill(this.extraParams, this.id, this.version);
+ }
+
+ /**
+ * 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 CadenceUpdateParams.Settings.Bill#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 CadenceUpdateParams.Settings.Bill#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 referenced settings object. */
+ public Builder setId(String id) {
+ this.id = id;
+ return this;
+ }
+
+ /** Required. The ID of the referenced settings object. */
+ public Builder setId(EmptyParam id) {
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * An optional field to specify the version of Settings to use. If not provided, this will
+ * always default to the {@code live_version} specified on the setting, any time the
+ * settings are used. Using a specific version here will prevent the settings from updating,
+ * and is discouraged for cadences. To clear a pinned version, set the version to null.
+ */
+ public Builder setVersion(String version) {
+ this.version = version;
+ return this;
+ }
+
+ /**
+ * An optional field to specify the version of Settings to use. If not provided, this will
+ * always default to the {@code live_version} specified on the setting, any time the
+ * settings are used. Using a specific version here will prevent the settings from updating,
+ * and is discouraged for cadences. To clear a pinned version, set the version to null.
+ */
+ public Builder setVersion(EmptyParam version) {
+ this.version = version;
+ return this;
+ }
+ }
+ }
+
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Collection {
+ /**
+ * 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 referenced settings object. */
+ @SerializedName("id")
+ Object id;
+
+ /**
+ * An optional field to specify the version of Settings to use. If not provided, this will
+ * always default to the {@code live_version} specified on the setting, any time the settings
+ * are used. Using a specific version here will prevent the settings from updating, and is
+ * discouraged for cadences. To clear a pinned version, set the version to null.
+ */
+ @SerializedName("version")
+ Object version;
+
+ private Collection(Map extraParams, Object id, Object version) {
+ this.extraParams = extraParams;
+ this.id = id;
+ this.version = version;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Map extraParams;
+
+ private Object id;
+
+ private Object version;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public CadenceUpdateParams.Settings.Collection build() {
+ return new CadenceUpdateParams.Settings.Collection(
+ this.extraParams, this.id, this.version);
+ }
+
+ /**
+ * 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 CadenceUpdateParams.Settings.Collection#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 CadenceUpdateParams.Settings.Collection#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 referenced settings object. */
+ public Builder setId(String id) {
+ this.id = id;
+ return this;
+ }
+
+ /** Required. The ID of the referenced settings object. */
+ public Builder setId(EmptyParam id) {
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * An optional field to specify the version of Settings to use. If not provided, this will
+ * always default to the {@code live_version} specified on the setting, any time the
+ * settings are used. Using a specific version here will prevent the settings from updating,
+ * and is discouraged for cadences. To clear a pinned version, set the version to null.
+ */
+ public Builder setVersion(String version) {
+ this.version = version;
+ return this;
+ }
+
+ /**
+ * An optional field to specify the version of Settings to use. If not provided, this will
+ * always default to the {@code live_version} specified on the setting, any time the
+ * settings are used. Using a specific version here will prevent the settings from updating,
+ * and is discouraged for cadences. To clear a pinned version, set the version to null.
+ */
+ public Builder setVersion(EmptyParam version) {
+ this.version = version;
+ return this;
+ }
+ }
+ }
+ }
+}
diff --git a/src/main/java/com/stripe/param/v2/billing/CollectionSettingCreateParams.java b/src/main/java/com/stripe/param/v2/billing/CollectionSettingCreateParams.java
new file mode 100644
index 00000000000..1e5d4125b6f
--- /dev/null
+++ b/src/main/java/com/stripe/param/v2/billing/CollectionSettingCreateParams.java
@@ -0,0 +1,2008 @@
+// File generated from our OpenAPI spec
+package com.stripe.param.v2.billing;
+
+import com.google.gson.annotations.SerializedName;
+import com.stripe.net.ApiRequestParams;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import lombok.EqualsAndHashCode;
+import lombok.Getter;
+
+@Getter
+@EqualsAndHashCode(callSuper = false)
+public class CollectionSettingCreateParams extends ApiRequestParams {
+ /**
+ * Either automatic, or send_invoice. When charging automatically, Stripe will attempt to pay this
+ * bill at the end of the period using the payment method attached to the payer profile. When
+ * sending an invoice, Stripe will email your payer profile an invoice with payment instructions.
+ * Defaults to automatic.
+ */
+ @SerializedName("collection_method")
+ CollectionMethod collectionMethod;
+
+ /**
+ * An optional customer-facing display name for the CollectionSetting object. Maximum length of
+ * 250 characters.
+ */
+ @SerializedName("display_name")
+ String displayName;
+
+ /** Email delivery setting. */
+ @SerializedName("email_delivery")
+ EmailDelivery emailDelivery;
+
+ /**
+ * 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 lookup key used to retrieve settings dynamically from a static string. This may be up to 200
+ * characters.
+ */
+ @SerializedName("lookup_key")
+ String lookupKey;
+
+ /**
+ * The ID of the PaymentMethodConfiguration object, which controls which payment methods are
+ * displayed to your customers.
+ */
+ @SerializedName("payment_method_configuration")
+ String paymentMethodConfiguration;
+
+ /** Payment Method specific configuration to be stored on the object. */
+ @SerializedName("payment_method_options")
+ PaymentMethodOptions paymentMethodOptions;
+
+ private CollectionSettingCreateParams(
+ CollectionMethod collectionMethod,
+ String displayName,
+ EmailDelivery emailDelivery,
+ Map extraParams,
+ String lookupKey,
+ String paymentMethodConfiguration,
+ PaymentMethodOptions paymentMethodOptions) {
+ this.collectionMethod = collectionMethod;
+ this.displayName = displayName;
+ this.emailDelivery = emailDelivery;
+ this.extraParams = extraParams;
+ this.lookupKey = lookupKey;
+ this.paymentMethodConfiguration = paymentMethodConfiguration;
+ this.paymentMethodOptions = paymentMethodOptions;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private CollectionMethod collectionMethod;
+
+ private String displayName;
+
+ private EmailDelivery emailDelivery;
+
+ private Map extraParams;
+
+ private String lookupKey;
+
+ private String paymentMethodConfiguration;
+
+ private PaymentMethodOptions paymentMethodOptions;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public CollectionSettingCreateParams build() {
+ return new CollectionSettingCreateParams(
+ this.collectionMethod,
+ this.displayName,
+ this.emailDelivery,
+ this.extraParams,
+ this.lookupKey,
+ this.paymentMethodConfiguration,
+ this.paymentMethodOptions);
+ }
+
+ /**
+ * Either automatic, or send_invoice. When charging automatically, Stripe will attempt to pay
+ * this bill at the end of the period using the payment method attached to the payer profile.
+ * When sending an invoice, Stripe will email your payer profile an invoice with payment
+ * instructions. Defaults to automatic.
+ */
+ public Builder setCollectionMethod(
+ CollectionSettingCreateParams.CollectionMethod collectionMethod) {
+ this.collectionMethod = collectionMethod;
+ return this;
+ }
+
+ /**
+ * An optional customer-facing display name for the CollectionSetting object. Maximum length of
+ * 250 characters.
+ */
+ public Builder setDisplayName(String displayName) {
+ this.displayName = displayName;
+ return this;
+ }
+
+ /** Email delivery setting. */
+ public Builder setEmailDelivery(CollectionSettingCreateParams.EmailDelivery emailDelivery) {
+ this.emailDelivery = emailDelivery;
+ 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
+ * CollectionSettingCreateParams#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 CollectionSettingCreateParams#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 lookup key used to retrieve settings dynamically from a static string. This may be up to
+ * 200 characters.
+ */
+ public Builder setLookupKey(String lookupKey) {
+ this.lookupKey = lookupKey;
+ return this;
+ }
+
+ /**
+ * The ID of the PaymentMethodConfiguration object, which controls which payment methods are
+ * displayed to your customers.
+ */
+ public Builder setPaymentMethodConfiguration(String paymentMethodConfiguration) {
+ this.paymentMethodConfiguration = paymentMethodConfiguration;
+ return this;
+ }
+
+ /** Payment Method specific configuration to be stored on the object. */
+ public Builder setPaymentMethodOptions(
+ CollectionSettingCreateParams.PaymentMethodOptions paymentMethodOptions) {
+ this.paymentMethodOptions = paymentMethodOptions;
+ return this;
+ }
+ }
+
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class EmailDelivery {
+ /**
+ * 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;
+
+ /**
+ * Controls emails for when the payment is due. For example after the invoice is finilized and
+ * transition to Open state.
+ */
+ @SerializedName("payment_due")
+ PaymentDue paymentDue;
+
+ private EmailDelivery(Map extraParams, PaymentDue paymentDue) {
+ this.extraParams = extraParams;
+ this.paymentDue = paymentDue;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Map extraParams;
+
+ private PaymentDue paymentDue;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public CollectionSettingCreateParams.EmailDelivery build() {
+ return new CollectionSettingCreateParams.EmailDelivery(this.extraParams, this.paymentDue);
+ }
+
+ /**
+ * 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
+ * CollectionSettingCreateParams.EmailDelivery#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 CollectionSettingCreateParams.EmailDelivery#extraParams} for the field
+ * documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+
+ /**
+ * Controls emails for when the payment is due. For example after the invoice is finilized and
+ * transition to Open state.
+ */
+ public Builder setPaymentDue(
+ CollectionSettingCreateParams.EmailDelivery.PaymentDue paymentDue) {
+ this.paymentDue = paymentDue;
+ return this;
+ }
+ }
+
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class PaymentDue {
+ /**
+ * Required. If true an email for the invoice would be generated and sent
+ * out.
+ */
+ @SerializedName("enabled")
+ Boolean enabled;
+
+ /**
+ * 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. If true the payment link to hosted invocie page would be
+ * included in email and PDF of the invoice.
+ */
+ @SerializedName("include_payment_link")
+ Boolean includePaymentLink;
+
+ private PaymentDue(
+ Boolean enabled, Map extraParams, Boolean includePaymentLink) {
+ this.enabled = enabled;
+ this.extraParams = extraParams;
+ this.includePaymentLink = includePaymentLink;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Boolean enabled;
+
+ private Map extraParams;
+
+ private Boolean includePaymentLink;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public CollectionSettingCreateParams.EmailDelivery.PaymentDue build() {
+ return new CollectionSettingCreateParams.EmailDelivery.PaymentDue(
+ this.enabled, this.extraParams, this.includePaymentLink);
+ }
+
+ /**
+ * Required. If true an email for the invoice would be generated and sent
+ * out.
+ */
+ public Builder setEnabled(Boolean enabled) {
+ this.enabled = enabled;
+ 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 CollectionSettingCreateParams.EmailDelivery.PaymentDue#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 CollectionSettingCreateParams.EmailDelivery.PaymentDue#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. If true the payment link to hosted invocie page would be
+ * included in email and PDF of the invoice.
+ */
+ public Builder setIncludePaymentLink(Boolean includePaymentLink) {
+ this.includePaymentLink = includePaymentLink;
+ return this;
+ }
+ }
+ }
+ }
+
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class PaymentMethodOptions {
+ /**
+ * This sub-hash contains details about the Canadian pre-authorized debit payment method
+ * options.
+ */
+ @SerializedName("acss_debit")
+ AcssDebit acssDebit;
+
+ /** This sub-hash contains details about the Bancontact payment method. */
+ @SerializedName("bancontact")
+ Bancontact bancontact;
+
+ /** This sub-hash contains details about the Card payment method options. */
+ @SerializedName("card")
+ Card card;
+
+ /** This sub-hash contains details about the Bank transfer payment method options. */
+ @SerializedName("customer_balance")
+ CustomerBalance customerBalance;
+
+ /**
+ * 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;
+
+ /** This sub-hash contains details about the Konbini payment method options. */
+ @SerializedName("konbini")
+ Map konbini;
+
+ /** This sub-hash contains details about the SEPA Direct Debit payment method options. */
+ @SerializedName("sepa_debit")
+ Map sepaDebit;
+
+ /** This sub-hash contains details about the ACH direct debit payment method options. */
+ @SerializedName("us_bank_account")
+ UsBankAccount usBankAccount;
+
+ private PaymentMethodOptions(
+ AcssDebit acssDebit,
+ Bancontact bancontact,
+ Card card,
+ CustomerBalance customerBalance,
+ Map extraParams,
+ Map konbini,
+ Map sepaDebit,
+ UsBankAccount usBankAccount) {
+ this.acssDebit = acssDebit;
+ this.bancontact = bancontact;
+ this.card = card;
+ this.customerBalance = customerBalance;
+ this.extraParams = extraParams;
+ this.konbini = konbini;
+ this.sepaDebit = sepaDebit;
+ this.usBankAccount = usBankAccount;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private AcssDebit acssDebit;
+
+ private Bancontact bancontact;
+
+ private Card card;
+
+ private CustomerBalance customerBalance;
+
+ private Map extraParams;
+
+ private Map konbini;
+
+ private Map sepaDebit;
+
+ private UsBankAccount usBankAccount;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public CollectionSettingCreateParams.PaymentMethodOptions build() {
+ return new CollectionSettingCreateParams.PaymentMethodOptions(
+ this.acssDebit,
+ this.bancontact,
+ this.card,
+ this.customerBalance,
+ this.extraParams,
+ this.konbini,
+ this.sepaDebit,
+ this.usBankAccount);
+ }
+
+ /**
+ * This sub-hash contains details about the Canadian pre-authorized debit payment method
+ * options.
+ */
+ public Builder setAcssDebit(
+ CollectionSettingCreateParams.PaymentMethodOptions.AcssDebit acssDebit) {
+ this.acssDebit = acssDebit;
+ return this;
+ }
+
+ /** This sub-hash contains details about the Bancontact payment method. */
+ public Builder setBancontact(
+ CollectionSettingCreateParams.PaymentMethodOptions.Bancontact bancontact) {
+ this.bancontact = bancontact;
+ return this;
+ }
+
+ /** This sub-hash contains details about the Card payment method options. */
+ public Builder setCard(CollectionSettingCreateParams.PaymentMethodOptions.Card card) {
+ this.card = card;
+ return this;
+ }
+
+ /** This sub-hash contains details about the Bank transfer payment method options. */
+ public Builder setCustomerBalance(
+ CollectionSettingCreateParams.PaymentMethodOptions.CustomerBalance customerBalance) {
+ this.customerBalance = customerBalance;
+ 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
+ * CollectionSettingCreateParams.PaymentMethodOptions#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 CollectionSettingCreateParams.PaymentMethodOptions#extraParams} for the field
+ * documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+
+ /**
+ * Add a key/value pair to `konbini` map. A map is initialized for the first `put/putAll`
+ * call, and subsequent calls add additional key/value pairs to the original map. See {@link
+ * CollectionSettingCreateParams.PaymentMethodOptions#konbini} for the field documentation.
+ */
+ public Builder putKonbini(String key, Object value) {
+ if (this.konbini == null) {
+ this.konbini = new HashMap<>();
+ }
+ this.konbini.put(key, value);
+ return this;
+ }
+
+ /**
+ * Add all map key/value pairs to `konbini` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
+ * See {@link CollectionSettingCreateParams.PaymentMethodOptions#konbini} for the field
+ * documentation.
+ */
+ public Builder putAllKonbini(Map map) {
+ if (this.konbini == null) {
+ this.konbini = new HashMap<>();
+ }
+ this.konbini.putAll(map);
+ return this;
+ }
+
+ /**
+ * Add a key/value pair to `sepaDebit` map. A map is initialized for the first `put/putAll`
+ * call, and subsequent calls add additional key/value pairs to the original map. See {@link
+ * CollectionSettingCreateParams.PaymentMethodOptions#sepaDebit} for the field documentation.
+ */
+ public Builder putSepaDebit(String key, Object value) {
+ if (this.sepaDebit == null) {
+ this.sepaDebit = new HashMap<>();
+ }
+ this.sepaDebit.put(key, value);
+ return this;
+ }
+
+ /**
+ * Add all map key/value pairs to `sepaDebit` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
+ * See {@link CollectionSettingCreateParams.PaymentMethodOptions#sepaDebit} for the field
+ * documentation.
+ */
+ public Builder putAllSepaDebit(Map map) {
+ if (this.sepaDebit == null) {
+ this.sepaDebit = new HashMap<>();
+ }
+ this.sepaDebit.putAll(map);
+ return this;
+ }
+
+ /** This sub-hash contains details about the ACH direct debit payment method options. */
+ public Builder setUsBankAccount(
+ CollectionSettingCreateParams.PaymentMethodOptions.UsBankAccount usBankAccount) {
+ this.usBankAccount = usBankAccount;
+ return this;
+ }
+ }
+
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class AcssDebit {
+ /**
+ * 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;
+
+ /** Verification method. */
+ @SerializedName("verification_method")
+ VerificationMethod verificationMethod;
+
+ private AcssDebit(
+ Map extraParams,
+ MandateOptions mandateOptions,
+ VerificationMethod verificationMethod) {
+ this.extraParams = extraParams;
+ this.mandateOptions = mandateOptions;
+ this.verificationMethod = verificationMethod;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Map extraParams;
+
+ private MandateOptions mandateOptions;
+
+ private VerificationMethod verificationMethod;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public CollectionSettingCreateParams.PaymentMethodOptions.AcssDebit build() {
+ return new CollectionSettingCreateParams.PaymentMethodOptions.AcssDebit(
+ this.extraParams, this.mandateOptions, this.verificationMethod);
+ }
+
+ /**
+ * 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 CollectionSettingCreateParams.PaymentMethodOptions.AcssDebit#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 CollectionSettingCreateParams.PaymentMethodOptions.AcssDebit#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(
+ CollectionSettingCreateParams.PaymentMethodOptions.AcssDebit.MandateOptions
+ mandateOptions) {
+ this.mandateOptions = mandateOptions;
+ return this;
+ }
+
+ /** Verification method. */
+ public Builder setVerificationMethod(
+ CollectionSettingCreateParams.PaymentMethodOptions.AcssDebit.VerificationMethod
+ verificationMethod) {
+ this.verificationMethod = verificationMethod;
+ return this;
+ }
+ }
+
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ 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;
+
+ /** Transaction type of the mandate. */
+ @SerializedName("transaction_type")
+ TransactionType transactionType;
+
+ private MandateOptions(Map extraParams, TransactionType transactionType) {
+ this.extraParams = extraParams;
+ this.transactionType = transactionType;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Map extraParams;
+
+ private TransactionType transactionType;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public CollectionSettingCreateParams.PaymentMethodOptions.AcssDebit.MandateOptions
+ build() {
+ return new CollectionSettingCreateParams.PaymentMethodOptions.AcssDebit.MandateOptions(
+ this.extraParams, this.transactionType);
+ }
+
+ /**
+ * 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
+ * CollectionSettingCreateParams.PaymentMethodOptions.AcssDebit.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
+ * CollectionSettingCreateParams.PaymentMethodOptions.AcssDebit.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;
+ }
+
+ /** Transaction type of the mandate. */
+ public Builder setTransactionType(
+ CollectionSettingCreateParams.PaymentMethodOptions.AcssDebit.MandateOptions
+ .TransactionType
+ transactionType) {
+ this.transactionType = transactionType;
+ return this;
+ }
+ }
+
+ public enum TransactionType implements ApiRequestParams.EnumParam {
+ @SerializedName("business")
+ BUSINESS("business"),
+
+ @SerializedName("personal")
+ PERSONAL("personal");
+
+ @Getter(onMethod_ = {@Override})
+ private final String value;
+
+ TransactionType(String value) {
+ this.value = value;
+ }
+ }
+ }
+
+ public enum VerificationMethod implements ApiRequestParams.EnumParam {
+ @SerializedName("automatic")
+ AUTOMATIC("automatic"),
+
+ @SerializedName("instant")
+ INSTANT("instant"),
+
+ @SerializedName("microdeposits")
+ MICRODEPOSITS("microdeposits");
+
+ @Getter(onMethod_ = {@Override})
+ private final String value;
+
+ VerificationMethod(String value) {
+ this.value = value;
+ }
+ }
+ }
+
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Bancontact {
+ /**
+ * 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;
+
+ /**
+ * Preferred language of the Bancontact authorization page that the customer is redirected to.
+ */
+ @SerializedName("preferred_language")
+ PreferredLanguage preferredLanguage;
+
+ private Bancontact(Map extraParams, PreferredLanguage preferredLanguage) {
+ this.extraParams = extraParams;
+ this.preferredLanguage = preferredLanguage;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Map extraParams;
+
+ private PreferredLanguage preferredLanguage;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public CollectionSettingCreateParams.PaymentMethodOptions.Bancontact build() {
+ return new CollectionSettingCreateParams.PaymentMethodOptions.Bancontact(
+ this.extraParams, this.preferredLanguage);
+ }
+
+ /**
+ * 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
+ * CollectionSettingCreateParams.PaymentMethodOptions.Bancontact#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
+ * CollectionSettingCreateParams.PaymentMethodOptions.Bancontact#extraParams} for the field
+ * documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+
+ /**
+ * Preferred language of the Bancontact authorization page that the customer is redirected
+ * to.
+ */
+ public Builder setPreferredLanguage(
+ CollectionSettingCreateParams.PaymentMethodOptions.Bancontact.PreferredLanguage
+ preferredLanguage) {
+ this.preferredLanguage = preferredLanguage;
+ return this;
+ }
+ }
+
+ public enum PreferredLanguage implements ApiRequestParams.EnumParam {
+ @SerializedName("de")
+ DE("de"),
+
+ @SerializedName("en")
+ EN("en"),
+
+ @SerializedName("fr")
+ FR("fr"),
+
+ @SerializedName("nl")
+ NL("nl");
+
+ @Getter(onMethod_ = {@Override})
+ private final String value;
+
+ PreferredLanguage(String value) {
+ this.value = value;
+ }
+ }
+ }
+
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Card {
+ /**
+ * Map of extra parameters for custom features not available in this client library. The
+ * content in this map is not serialized under this field's {@code @SerializedName} value.
+ * Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
+ * name in this param object. Effectively, this map is flattened to its parent instance.
+ */
+ @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
+ Map extraParams;
+
+ /** Configuration options for setting up an eMandate for cards issued in India. */
+ @SerializedName("mandate_options")
+ MandateOptions mandateOptions;
+
+ /**
+ * Selected network to process the payment on. Depends on the available networks of the card.
+ */
+ @SerializedName("network")
+ String network;
+
+ /**
+ * An advanced option 3D Secure. We strongly recommend that you rely on our SCA Engine to
+ * automatically prompt your customers for authentication based on risk level and other requirements.
+ * However, if you wish to request 3D Secure based on logic from your own fraud engine,
+ * provide this option. Read our guide on manually
+ * requesting 3D Secure for more information on how this configuration interacts with
+ * Radar and our SCA Engine.
+ */
+ @SerializedName("request_three_d_secure")
+ RequestThreeDSecure requestThreeDSecure;
+
+ private Card(
+ Map extraParams,
+ MandateOptions mandateOptions,
+ String network,
+ RequestThreeDSecure requestThreeDSecure) {
+ this.extraParams = extraParams;
+ this.mandateOptions = mandateOptions;
+ this.network = network;
+ this.requestThreeDSecure = requestThreeDSecure;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Map extraParams;
+
+ private MandateOptions mandateOptions;
+
+ private String network;
+
+ private RequestThreeDSecure requestThreeDSecure;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public CollectionSettingCreateParams.PaymentMethodOptions.Card build() {
+ return new CollectionSettingCreateParams.PaymentMethodOptions.Card(
+ this.extraParams, this.mandateOptions, this.network, this.requestThreeDSecure);
+ }
+
+ /**
+ * 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 CollectionSettingCreateParams.PaymentMethodOptions.Card#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 CollectionSettingCreateParams.PaymentMethodOptions.Card#extraParams} for
+ * the field documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+
+ /** Configuration options for setting up an eMandate for cards issued in India. */
+ public Builder setMandateOptions(
+ CollectionSettingCreateParams.PaymentMethodOptions.Card.MandateOptions mandateOptions) {
+ this.mandateOptions = mandateOptions;
+ return this;
+ }
+
+ /**
+ * Selected network to process the payment on. Depends on the available networks of the
+ * card.
+ */
+ public Builder setNetwork(String network) {
+ this.network = network;
+ return this;
+ }
+
+ /**
+ * An advanced option 3D Secure. We strongly recommend that you rely on our SCA Engine to
+ * automatically prompt your customers for authentication based on risk level and other
+ * requirements. However, if you wish to request 3D Secure based on logic from your own
+ * fraud engine, provide this option. Read our guide on manually
+ * requesting 3D Secure for more information on how this configuration interacts with
+ * Radar and our SCA Engine.
+ */
+ public Builder setRequestThreeDSecure(
+ CollectionSettingCreateParams.PaymentMethodOptions.Card.RequestThreeDSecure
+ requestThreeDSecure) {
+ this.requestThreeDSecure = requestThreeDSecure;
+ return this;
+ }
+ }
+
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class MandateOptions {
+ /** Amount to be charged for future payments. */
+ @SerializedName("amount")
+ Long amount;
+
+ /** The AmountType for the mandate. One of {@code fixed} or {@code maximum}. */
+ @SerializedName("amount_type")
+ AmountType amountType;
+
+ /** A description of the mandate that is meant to be displayed to the customer. */
+ @SerializedName("description")
+ String description;
+
+ /**
+ * Map of extra parameters for custom features not available in this client library. The
+ * content in this map is not serialized under this field's {@code @SerializedName} value.
+ * Instead, each key/value pair is serialized as if the key is a root-level field
+ * (serialized) name in this param object. Effectively, this map is flattened to its parent
+ * instance.
+ */
+ @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
+ Map extraParams;
+
+ private MandateOptions(
+ Long amount,
+ AmountType amountType,
+ String description,
+ Map extraParams) {
+ this.amount = amount;
+ this.amountType = amountType;
+ this.description = description;
+ this.extraParams = extraParams;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Long amount;
+
+ private AmountType amountType;
+
+ private String description;
+
+ private Map extraParams;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public CollectionSettingCreateParams.PaymentMethodOptions.Card.MandateOptions build() {
+ return new CollectionSettingCreateParams.PaymentMethodOptions.Card.MandateOptions(
+ this.amount, this.amountType, this.description, this.extraParams);
+ }
+
+ /** Amount to be charged for future payments. */
+ public Builder setAmount(Long amount) {
+ this.amount = amount;
+ return this;
+ }
+
+ /** The AmountType for the mandate. One of {@code fixed} or {@code maximum}. */
+ public Builder setAmountType(
+ CollectionSettingCreateParams.PaymentMethodOptions.Card.MandateOptions.AmountType
+ amountType) {
+ this.amountType = amountType;
+ return this;
+ }
+
+ /** A description of the mandate that is meant to be displayed to the customer. */
+ public Builder setDescription(String description) {
+ this.description = description;
+ 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
+ * CollectionSettingCreateParams.PaymentMethodOptions.Card.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
+ * CollectionSettingCreateParams.PaymentMethodOptions.Card.MandateOptions#extraParams} for
+ * the field documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+ }
+
+ public enum AmountType implements ApiRequestParams.EnumParam {
+ @SerializedName("fixed")
+ FIXED("fixed"),
+
+ @SerializedName("maximum")
+ MAXIMUM("maximum");
+
+ @Getter(onMethod_ = {@Override})
+ private final String value;
+
+ AmountType(String value) {
+ this.value = value;
+ }
+ }
+ }
+
+ public enum RequestThreeDSecure implements ApiRequestParams.EnumParam {
+ @SerializedName("any")
+ ANY("any"),
+
+ @SerializedName("automatic")
+ AUTOMATIC("automatic"),
+
+ @SerializedName("challenge")
+ CHALLENGE("challenge");
+
+ @Getter(onMethod_ = {@Override})
+ private final String value;
+
+ RequestThreeDSecure(String value) {
+ this.value = value;
+ }
+ }
+ }
+
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class CustomerBalance {
+ /**
+ * Configuration for the bank transfer funding type, if the {@code funding_type} is set to
+ * {@code bank_transfer}.
+ */
+ @SerializedName("bank_transfer")
+ BankTransfer bankTransfer;
+
+ /**
+ * 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 funding method type to be used when there are not enough funds in the customer balance.
+ * Currently the only supported value is {@code bank_transfer}.
+ */
+ @SerializedName("funding_type")
+ FundingType fundingType;
+
+ private CustomerBalance(
+ BankTransfer bankTransfer, Map extraParams, FundingType fundingType) {
+ this.bankTransfer = bankTransfer;
+ this.extraParams = extraParams;
+ this.fundingType = fundingType;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private BankTransfer bankTransfer;
+
+ private Map extraParams;
+
+ private FundingType fundingType;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public CollectionSettingCreateParams.PaymentMethodOptions.CustomerBalance build() {
+ return new CollectionSettingCreateParams.PaymentMethodOptions.CustomerBalance(
+ this.bankTransfer, this.extraParams, this.fundingType);
+ }
+
+ /**
+ * Configuration for the bank transfer funding type, if the {@code funding_type} is set to
+ * {@code bank_transfer}.
+ */
+ public Builder setBankTransfer(
+ CollectionSettingCreateParams.PaymentMethodOptions.CustomerBalance.BankTransfer
+ bankTransfer) {
+ this.bankTransfer = bankTransfer;
+ 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
+ * CollectionSettingCreateParams.PaymentMethodOptions.CustomerBalance#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
+ * CollectionSettingCreateParams.PaymentMethodOptions.CustomerBalance#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 funding method type to be used when there are not enough funds in the customer
+ * balance. Currently the only supported value is {@code bank_transfer}.
+ */
+ public Builder setFundingType(
+ CollectionSettingCreateParams.PaymentMethodOptions.CustomerBalance.FundingType
+ fundingType) {
+ this.fundingType = fundingType;
+ return this;
+ }
+ }
+
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class BankTransfer {
+ /**
+ * Configuration for {@code eu_bank_transfer} funding type. Required if {@code type} is
+ * {@code eu_bank_transfer}.
+ */
+ @SerializedName("eu_bank_transfer")
+ EuBankTransfer euBankTransfer;
+
+ /**
+ * 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 bank transfer type that can be used for funding. */
+ @SerializedName("type")
+ Type type;
+
+ private BankTransfer(
+ EuBankTransfer euBankTransfer, Map extraParams, Type type) {
+ this.euBankTransfer = euBankTransfer;
+ this.extraParams = extraParams;
+ this.type = type;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private EuBankTransfer euBankTransfer;
+
+ private Map extraParams;
+
+ private Type type;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public CollectionSettingCreateParams.PaymentMethodOptions.CustomerBalance.BankTransfer
+ build() {
+ return new CollectionSettingCreateParams.PaymentMethodOptions.CustomerBalance
+ .BankTransfer(this.euBankTransfer, this.extraParams, this.type);
+ }
+
+ /**
+ * Configuration for {@code eu_bank_transfer} funding type. Required if {@code type} is
+ * {@code eu_bank_transfer}.
+ */
+ public Builder setEuBankTransfer(
+ CollectionSettingCreateParams.PaymentMethodOptions.CustomerBalance.BankTransfer
+ .EuBankTransfer
+ euBankTransfer) {
+ this.euBankTransfer = euBankTransfer;
+ 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
+ * CollectionSettingCreateParams.PaymentMethodOptions.CustomerBalance.BankTransfer#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
+ * CollectionSettingCreateParams.PaymentMethodOptions.CustomerBalance.BankTransfer#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 bank transfer type that can be used for funding. */
+ public Builder setType(
+ CollectionSettingCreateParams.PaymentMethodOptions.CustomerBalance.BankTransfer.Type
+ type) {
+ this.type = type;
+ return this;
+ }
+ }
+
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class EuBankTransfer {
+ /**
+ * Required. The desired country code of the bank account information.
+ */
+ @SerializedName("country")
+ Country country;
+
+ /**
+ * Map of extra parameters for custom features not available in this client library. The
+ * content in this map is not serialized under this field's {@code @SerializedName} value.
+ * Instead, each key/value pair is serialized as if the key is a root-level field
+ * (serialized) name in this param object. Effectively, this map is flattened to its
+ * parent instance.
+ */
+ @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
+ Map extraParams;
+
+ private EuBankTransfer(Country country, Map extraParams) {
+ this.country = country;
+ this.extraParams = extraParams;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Country country;
+
+ private Map extraParams;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public CollectionSettingCreateParams.PaymentMethodOptions.CustomerBalance.BankTransfer
+ .EuBankTransfer
+ build() {
+ return new CollectionSettingCreateParams.PaymentMethodOptions.CustomerBalance
+ .BankTransfer.EuBankTransfer(this.country, this.extraParams);
+ }
+
+ /**
+ * Required. The desired country code of the bank account information.
+ */
+ public Builder setCountry(
+ CollectionSettingCreateParams.PaymentMethodOptions.CustomerBalance.BankTransfer
+ .EuBankTransfer.Country
+ country) {
+ this.country = country;
+ return this;
+ }
+
+ /**
+ * Add a key/value pair to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the
+ * original map. See {@link
+ * CollectionSettingCreateParams.PaymentMethodOptions.CustomerBalance.BankTransfer.EuBankTransfer#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
+ * CollectionSettingCreateParams.PaymentMethodOptions.CustomerBalance.BankTransfer.EuBankTransfer#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 Country implements ApiRequestParams.EnumParam {
+ @SerializedName("BE")
+ BE("BE"),
+
+ @SerializedName("DE")
+ DE("DE"),
+
+ @SerializedName("ES")
+ ES("ES"),
+
+ @SerializedName("FR")
+ FR("FR"),
+
+ @SerializedName("IE")
+ IE("IE"),
+
+ @SerializedName("NL")
+ NL("NL");
+
+ @Getter(onMethod_ = {@Override})
+ private final String value;
+
+ Country(String value) {
+ this.value = value;
+ }
+ }
+ }
+
+ public enum Type implements ApiRequestParams.EnumParam {
+ @SerializedName("eu_bank_transfer")
+ EU_BANK_TRANSFER("eu_bank_transfer"),
+
+ @SerializedName("gb_bank_transfer")
+ GB_BANK_TRANSFER("gb_bank_transfer"),
+
+ @SerializedName("jp_bank_transfer")
+ JP_BANK_TRANSFER("jp_bank_transfer"),
+
+ @SerializedName("mx_bank_transfer")
+ MX_BANK_TRANSFER("mx_bank_transfer"),
+
+ @SerializedName("us_bank_transfer")
+ US_BANK_TRANSFER("us_bank_transfer");
+
+ @Getter(onMethod_ = {@Override})
+ private final String value;
+
+ Type(String value) {
+ this.value = value;
+ }
+ }
+ }
+
+ public enum FundingType implements ApiRequestParams.EnumParam {
+ @SerializedName("bank_transfer")
+ BANK_TRANSFER("bank_transfer");
+
+ @Getter(onMethod_ = {@Override})
+ private final String value;
+
+ FundingType(String value) {
+ this.value = value;
+ }
+ }
+ }
+
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class UsBankAccount {
+ /**
+ * 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. Additional fields for Financial Connections Session creation.
+ */
+ @SerializedName("financial_connections")
+ FinancialConnections financialConnections;
+
+ /** Required. Verification method. */
+ @SerializedName("verification_method")
+ VerificationMethod verificationMethod;
+
+ private UsBankAccount(
+ Map extraParams,
+ FinancialConnections financialConnections,
+ VerificationMethod verificationMethod) {
+ this.extraParams = extraParams;
+ this.financialConnections = financialConnections;
+ this.verificationMethod = verificationMethod;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Map extraParams;
+
+ private FinancialConnections financialConnections;
+
+ private VerificationMethod verificationMethod;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public CollectionSettingCreateParams.PaymentMethodOptions.UsBankAccount build() {
+ return new CollectionSettingCreateParams.PaymentMethodOptions.UsBankAccount(
+ this.extraParams, this.financialConnections, this.verificationMethod);
+ }
+
+ /**
+ * 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
+ * CollectionSettingCreateParams.PaymentMethodOptions.UsBankAccount#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
+ * CollectionSettingCreateParams.PaymentMethodOptions.UsBankAccount#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. Additional fields for Financial Connections Session creation.
+ */
+ public Builder setFinancialConnections(
+ CollectionSettingCreateParams.PaymentMethodOptions.UsBankAccount.FinancialConnections
+ financialConnections) {
+ this.financialConnections = financialConnections;
+ return this;
+ }
+
+ /** Required. Verification method. */
+ public Builder setVerificationMethod(
+ CollectionSettingCreateParams.PaymentMethodOptions.UsBankAccount.VerificationMethod
+ verificationMethod) {
+ this.verificationMethod = verificationMethod;
+ return this;
+ }
+ }
+
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class FinancialConnections {
+ /**
+ * 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;
+
+ /**
+ * Provide filters for the linked accounts that the customer can select for the payment
+ * method.
+ */
+ @SerializedName("filters")
+ Filters filters;
+
+ /**
+ * The list of permissions to request. If this parameter is passed, the {@code
+ * payment_method} permission must be included.
+ */
+ @SerializedName("permissions")
+ List<
+ CollectionSettingCreateParams.PaymentMethodOptions.UsBankAccount
+ .FinancialConnections.Permission>
+ permissions;
+
+ /** List of data features that you would like to retrieve upon account creation. */
+ @SerializedName("prefetch")
+ List<
+ CollectionSettingCreateParams.PaymentMethodOptions.UsBankAccount
+ .FinancialConnections.Prefetch>
+ prefetch;
+
+ private FinancialConnections(
+ Map extraParams,
+ Filters filters,
+ List<
+ CollectionSettingCreateParams.PaymentMethodOptions.UsBankAccount
+ .FinancialConnections.Permission>
+ permissions,
+ List<
+ CollectionSettingCreateParams.PaymentMethodOptions.UsBankAccount
+ .FinancialConnections.Prefetch>
+ prefetch) {
+ this.extraParams = extraParams;
+ this.filters = filters;
+ this.permissions = permissions;
+ this.prefetch = prefetch;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Map extraParams;
+
+ private Filters filters;
+
+ private List<
+ CollectionSettingCreateParams.PaymentMethodOptions.UsBankAccount
+ .FinancialConnections.Permission>
+ permissions;
+
+ private List<
+ CollectionSettingCreateParams.PaymentMethodOptions.UsBankAccount
+ .FinancialConnections.Prefetch>
+ prefetch;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public CollectionSettingCreateParams.PaymentMethodOptions.UsBankAccount
+ .FinancialConnections
+ build() {
+ return new CollectionSettingCreateParams.PaymentMethodOptions.UsBankAccount
+ .FinancialConnections(
+ this.extraParams, this.filters, this.permissions, this.prefetch);
+ }
+
+ /**
+ * 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
+ * CollectionSettingCreateParams.PaymentMethodOptions.UsBankAccount.FinancialConnections#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
+ * CollectionSettingCreateParams.PaymentMethodOptions.UsBankAccount.FinancialConnections#extraParams}
+ * for the field documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+
+ /**
+ * Provide filters for the linked accounts that the customer can select for the payment
+ * method.
+ */
+ public Builder setFilters(
+ CollectionSettingCreateParams.PaymentMethodOptions.UsBankAccount.FinancialConnections
+ .Filters
+ filters) {
+ this.filters = filters;
+ return this;
+ }
+
+ /**
+ * Add an element to `permissions` list. A list is initialized for the first `add/addAll`
+ * call, and subsequent calls adds additional elements to the original list. See {@link
+ * CollectionSettingCreateParams.PaymentMethodOptions.UsBankAccount.FinancialConnections#permissions}
+ * for the field documentation.
+ */
+ public Builder addPermission(
+ CollectionSettingCreateParams.PaymentMethodOptions.UsBankAccount.FinancialConnections
+ .Permission
+ element) {
+ if (this.permissions == null) {
+ this.permissions = new ArrayList<>();
+ }
+ this.permissions.add(element);
+ return this;
+ }
+
+ /**
+ * Add all elements to `permissions` list. A list is initialized for the first
+ * `add/addAll` call, and subsequent calls adds additional elements to the original list.
+ * See {@link
+ * CollectionSettingCreateParams.PaymentMethodOptions.UsBankAccount.FinancialConnections#permissions}
+ * for the field documentation.
+ */
+ public Builder addAllPermission(
+ List<
+ CollectionSettingCreateParams.PaymentMethodOptions.UsBankAccount
+ .FinancialConnections.Permission>
+ elements) {
+ if (this.permissions == null) {
+ this.permissions = new ArrayList<>();
+ }
+ this.permissions.addAll(elements);
+ return this;
+ }
+
+ /**
+ * Add an element to `prefetch` list. A list is initialized for the first `add/addAll`
+ * call, and subsequent calls adds additional elements to the original list. See {@link
+ * CollectionSettingCreateParams.PaymentMethodOptions.UsBankAccount.FinancialConnections#prefetch}
+ * for the field documentation.
+ */
+ public Builder addPrefetch(
+ CollectionSettingCreateParams.PaymentMethodOptions.UsBankAccount.FinancialConnections
+ .Prefetch
+ element) {
+ if (this.prefetch == null) {
+ this.prefetch = new ArrayList<>();
+ }
+ this.prefetch.add(element);
+ return this;
+ }
+
+ /**
+ * Add all elements to `prefetch` list. A list is initialized for the first `add/addAll`
+ * call, and subsequent calls adds additional elements to the original list. See {@link
+ * CollectionSettingCreateParams.PaymentMethodOptions.UsBankAccount.FinancialConnections#prefetch}
+ * for the field documentation.
+ */
+ public Builder addAllPrefetch(
+ List<
+ CollectionSettingCreateParams.PaymentMethodOptions.UsBankAccount
+ .FinancialConnections.Prefetch>
+ elements) {
+ if (this.prefetch == null) {
+ this.prefetch = new ArrayList<>();
+ }
+ this.prefetch.addAll(elements);
+ return this;
+ }
+ }
+
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Filters {
+ /** The account subcategories to use to filter for selectable accounts. */
+ @SerializedName("account_subcategories")
+ List<
+ CollectionSettingCreateParams.PaymentMethodOptions.UsBankAccount
+ .FinancialConnections.Filters.AccountSubcategory>
+ accountSubcategories;
+
+ /**
+ * 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 Filters(
+ List<
+ CollectionSettingCreateParams.PaymentMethodOptions.UsBankAccount
+ .FinancialConnections.Filters.AccountSubcategory>
+ accountSubcategories,
+ Map extraParams) {
+ this.accountSubcategories = accountSubcategories;
+ this.extraParams = extraParams;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private List<
+ CollectionSettingCreateParams.PaymentMethodOptions.UsBankAccount
+ .FinancialConnections.Filters.AccountSubcategory>
+ accountSubcategories;
+
+ private Map extraParams;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public CollectionSettingCreateParams.PaymentMethodOptions.UsBankAccount
+ .FinancialConnections.Filters
+ build() {
+ return new CollectionSettingCreateParams.PaymentMethodOptions.UsBankAccount
+ .FinancialConnections.Filters(this.accountSubcategories, this.extraParams);
+ }
+
+ /**
+ * Add an element to `accountSubcategories` list. A list is initialized for the first
+ * `add/addAll` call, and subsequent calls adds additional elements to the original
+ * list. See {@link
+ * CollectionSettingCreateParams.PaymentMethodOptions.UsBankAccount.FinancialConnections.Filters#accountSubcategories}
+ * for the field documentation.
+ */
+ public Builder addAccountSubcategory(
+ CollectionSettingCreateParams.PaymentMethodOptions.UsBankAccount
+ .FinancialConnections.Filters.AccountSubcategory
+ element) {
+ if (this.accountSubcategories == null) {
+ this.accountSubcategories = new ArrayList<>();
+ }
+ this.accountSubcategories.add(element);
+ return this;
+ }
+
+ /**
+ * Add all elements to `accountSubcategories` list. A list is initialized for the first
+ * `add/addAll` call, and subsequent calls adds additional elements to the original
+ * list. See {@link
+ * CollectionSettingCreateParams.PaymentMethodOptions.UsBankAccount.FinancialConnections.Filters#accountSubcategories}
+ * for the field documentation.
+ */
+ public Builder addAllAccountSubcategory(
+ List<
+ CollectionSettingCreateParams.PaymentMethodOptions.UsBankAccount
+ .FinancialConnections.Filters.AccountSubcategory>
+ elements) {
+ if (this.accountSubcategories == null) {
+ this.accountSubcategories = new ArrayList<>();
+ }
+ this.accountSubcategories.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
+ * CollectionSettingCreateParams.PaymentMethodOptions.UsBankAccount.FinancialConnections.Filters#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
+ * CollectionSettingCreateParams.PaymentMethodOptions.UsBankAccount.FinancialConnections.Filters#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 AccountSubcategory implements ApiRequestParams.EnumParam {
+ @SerializedName("checking")
+ CHECKING("checking"),
+
+ @SerializedName("savings")
+ SAVINGS("savings");
+
+ @Getter(onMethod_ = {@Override})
+ private final String value;
+
+ AccountSubcategory(String value) {
+ this.value = value;
+ }
+ }
+ }
+
+ public enum Permission implements ApiRequestParams.EnumParam {
+ @SerializedName("balances")
+ BALANCES("balances"),
+
+ @SerializedName("ownership")
+ OWNERSHIP("ownership"),
+
+ @SerializedName("payment_method")
+ PAYMENT_METHOD("payment_method"),
+
+ @SerializedName("transactions")
+ TRANSACTIONS("transactions");
+
+ @Getter(onMethod_ = {@Override})
+ private final String value;
+
+ Permission(String value) {
+ this.value = value;
+ }
+ }
+
+ public enum Prefetch implements ApiRequestParams.EnumParam {
+ @SerializedName("balances")
+ BALANCES("balances"),
+
+ @SerializedName("ownership")
+ OWNERSHIP("ownership"),
+
+ @SerializedName("transactions")
+ TRANSACTIONS("transactions");
+
+ @Getter(onMethod_ = {@Override})
+ private final String value;
+
+ Prefetch(String value) {
+ this.value = value;
+ }
+ }
+ }
+
+ public enum VerificationMethod implements ApiRequestParams.EnumParam {
+ @SerializedName("automatic")
+ AUTOMATIC("automatic"),
+
+ @SerializedName("instant")
+ INSTANT("instant"),
+
+ @SerializedName("microdeposits")
+ MICRODEPOSITS("microdeposits");
+
+ @Getter(onMethod_ = {@Override})
+ private final String value;
+
+ VerificationMethod(String value) {
+ this.value = value;
+ }
+ }
+ }
+ }
+
+ public enum CollectionMethod implements ApiRequestParams.EnumParam {
+ @SerializedName("automatic")
+ AUTOMATIC("automatic"),
+
+ @SerializedName("send_invoice")
+ SEND_INVOICE("send_invoice");
+
+ @Getter(onMethod_ = {@Override})
+ private final String value;
+
+ CollectionMethod(String value) {
+ this.value = value;
+ }
+ }
+}
diff --git a/src/main/java/com/stripe/param/v2/billing/CollectionSettingListParams.java b/src/main/java/com/stripe/param/v2/billing/CollectionSettingListParams.java
new file mode 100644
index 00000000000..e08cd2d1289
--- /dev/null
+++ b/src/main/java/com/stripe/param/v2/billing/CollectionSettingListParams.java
@@ -0,0 +1,117 @@
+// File generated from our OpenAPI spec
+package com.stripe.param.v2.billing;
+
+import com.google.gson.annotations.SerializedName;
+import com.stripe.net.ApiRequestParams;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import lombok.EqualsAndHashCode;
+import lombok.Getter;
+
+@Getter
+@EqualsAndHashCode(callSuper = false)
+public class CollectionSettingListParams extends ApiRequestParams {
+ /**
+ * 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