diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 793cc697557..0692ea66267 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1154 \ No newline at end of file +v1155 \ No newline at end of file diff --git a/src/main/java/com/stripe/model/AccountSession.java b/src/main/java/com/stripe/model/AccountSession.java index 36df32c8a1b..eecfa1d91e7 100644 --- a/src/main/java/com/stripe/model/AccountSession.java +++ b/src/main/java/com/stripe/model/AccountSession.java @@ -152,6 +152,12 @@ public static class Components extends StripeObject { @SerializedName("payouts_list") PayoutsList payoutsList; + @SerializedName("tax_registrations") + TaxRegistrations taxRegistrations; + + @SerializedName("tax_settings") + TaxSettings taxSettings; + @Getter @Setter @EqualsAndHashCode(callSuper = false) @@ -441,6 +447,40 @@ public static class PayoutsList extends StripeObject { @EqualsAndHashCode(callSuper = false) public static class Features extends StripeObject {} } + + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class TaxRegistrations extends StripeObject { + /** Whether the embedded component is enabled. */ + @SerializedName("enabled") + Boolean enabled; + + @SerializedName("features") + Features features; + + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Features extends StripeObject {} + } + + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class TaxSettings extends StripeObject { + /** Whether the embedded component is enabled. */ + @SerializedName("enabled") + Boolean enabled; + + @SerializedName("features") + Features features; + + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Features extends StripeObject {} + } } @Override diff --git a/src/main/java/com/stripe/param/AccountSessionCreateParams.java b/src/main/java/com/stripe/param/AccountSessionCreateParams.java index d3c0f4f5240..b9d44984449 100644 --- a/src/main/java/com/stripe/param/AccountSessionCreateParams.java +++ b/src/main/java/com/stripe/param/AccountSessionCreateParams.java @@ -179,6 +179,14 @@ public static class Components { @SerializedName("payouts_list") PayoutsList payoutsList; + /** Configuration for the tax registrations embedded component. */ + @SerializedName("tax_registrations") + TaxRegistrations taxRegistrations; + + /** Configuration for the tax settings embedded component. */ + @SerializedName("tax_settings") + TaxSettings taxSettings; + private Components( AccountManagement accountManagement, AccountOnboarding accountOnboarding, @@ -189,7 +197,9 @@ private Components( PaymentDetails paymentDetails, Payments payments, Payouts payouts, - PayoutsList payoutsList) { + PayoutsList payoutsList, + TaxRegistrations taxRegistrations, + TaxSettings taxSettings) { this.accountManagement = accountManagement; this.accountOnboarding = accountOnboarding; this.balances = balances; @@ -200,6 +210,8 @@ private Components( this.payments = payments; this.payouts = payouts; this.payoutsList = payoutsList; + this.taxRegistrations = taxRegistrations; + this.taxSettings = taxSettings; } public static Builder builder() { @@ -227,6 +239,10 @@ public static class Builder { private PayoutsList payoutsList; + private TaxRegistrations taxRegistrations; + + private TaxSettings taxSettings; + /** Finalize and obtain parameter instance from this builder. */ public AccountSessionCreateParams.Components build() { return new AccountSessionCreateParams.Components( @@ -239,7 +255,9 @@ public AccountSessionCreateParams.Components build() { this.paymentDetails, this.payments, this.payouts, - this.payoutsList); + this.payoutsList, + this.taxRegistrations, + this.taxSettings); } /** Configuration for the account management embedded component. */ @@ -325,6 +343,19 @@ public Builder setPayoutsList(AccountSessionCreateParams.Components.PayoutsList this.payoutsList = payoutsList; return this; } + + /** Configuration for the tax registrations embedded component. */ + public Builder setTaxRegistrations( + AccountSessionCreateParams.Components.TaxRegistrations taxRegistrations) { + this.taxRegistrations = taxRegistrations; + return this; + } + + /** Configuration for the tax settings embedded component. */ + public Builder setTaxSettings(AccountSessionCreateParams.Components.TaxSettings taxSettings) { + this.taxSettings = taxSettings; + return this; + } } @Getter @@ -2038,5 +2069,295 @@ public Builder putAllExtraParam(Map map) { } } } + + @Getter + public static class TaxRegistrations { + /** Required. Whether the embedded component is enabled. */ + @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; + + /** The list of features enabled in the embedded component. */ + @SerializedName("features") + Features features; + + private TaxRegistrations( + Boolean enabled, Map extraParams, Features features) { + this.enabled = enabled; + this.extraParams = extraParams; + this.features = features; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Boolean enabled; + + private Map extraParams; + + private Features features; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountSessionCreateParams.Components.TaxRegistrations build() { + return new AccountSessionCreateParams.Components.TaxRegistrations( + this.enabled, this.extraParams, this.features); + } + + /** Required. Whether the embedded component is enabled. */ + 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 AccountSessionCreateParams.Components.TaxRegistrations#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 AccountSessionCreateParams.Components.TaxRegistrations#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 list of features enabled in the embedded component. */ + public Builder setFeatures( + AccountSessionCreateParams.Components.TaxRegistrations.Features features) { + this.features = features; + return this; + } + } + + @Getter + public static class Features { + /** + * 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 Features(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountSessionCreateParams.Components.TaxRegistrations.Features build() { + return new AccountSessionCreateParams.Components.TaxRegistrations.Features( + this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountSessionCreateParams.Components.TaxRegistrations.Features#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 + * AccountSessionCreateParams.Components.TaxRegistrations.Features#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + } + + @Getter + public static class TaxSettings { + /** Required. Whether the embedded component is enabled. */ + @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; + + /** The list of features enabled in the embedded component. */ + @SerializedName("features") + Features features; + + private TaxSettings(Boolean enabled, Map extraParams, Features features) { + this.enabled = enabled; + this.extraParams = extraParams; + this.features = features; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Boolean enabled; + + private Map extraParams; + + private Features features; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountSessionCreateParams.Components.TaxSettings build() { + return new AccountSessionCreateParams.Components.TaxSettings( + this.enabled, this.extraParams, this.features); + } + + /** Required. Whether the embedded component is enabled. */ + 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 AccountSessionCreateParams.Components.TaxSettings#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 AccountSessionCreateParams.Components.TaxSettings#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 list of features enabled in the embedded component. */ + public Builder setFeatures( + AccountSessionCreateParams.Components.TaxSettings.Features features) { + this.features = features; + return this; + } + } + + @Getter + public static class Features { + /** + * 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 Features(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountSessionCreateParams.Components.TaxSettings.Features build() { + return new AccountSessionCreateParams.Components.TaxSettings.Features(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountSessionCreateParams.Components.TaxSettings.Features#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 AccountSessionCreateParams.Components.TaxSettings.Features#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + } } }