diff --git a/CHANGELOG.md b/CHANGELOG.md index 0787062a8b4..78b994463a9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,11 @@ * [#1909](https://github.com/stripe/stripe-java/pull/1909) Do not allow setting Stripe.stripeVersion * `Stripe.stripeVersion` is no longer settable. If you were using this to set the beta headers, use the helper method `Stripe.addBetaVersion()` instead. +## 28.0.1 - 2024-11-06 +* [#1919](https://github.com/stripe/stripe-java/pull/1919) Catch `JsonSyntaxException` when processing all errors +* [#1916](https://github.com/stripe/stripe-java/pull/1916) Restore `testReportsRawRequestUsageTelemetry` test +* [#1915](https://github.com/stripe/stripe-java/pull/1915) add major version blurb to changelog + ## 28.0.0 - 2024-10-29 Historically, when upgrading webhooks to a new API version, you also had to upgrade your SDK version. Your webhook's API version needed to match the API version pinned by the SDK you were using to ensure successful deserialization of events. With the `2024-09-30.acacia` release, Stripe follows a [new API release process](https://stripe.com/blog/introducing-stripes-new-api-release-process). As a result, you can safely upgrade your webhook endpoints to any API version within a biannual release (like `acacia`) without upgrading the SDK. diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 10859b1ceaf..b9cb5323fbe 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1332 \ No newline at end of file +v1333 \ No newline at end of file diff --git a/src/main/java/com/stripe/model/FundingInstructions.java b/src/main/java/com/stripe/model/FundingInstructions.java index 67ab75417e5..17db7de5395 100644 --- a/src/main/java/com/stripe/model/FundingInstructions.java +++ b/src/main/java/com/stripe/model/FundingInstructions.java @@ -124,10 +124,24 @@ public static class FinancialAddress extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class Aba extends StripeObject { + @SerializedName("account_holder_address") + Address accountHolderAddress; + + /** The account holder name. */ + @SerializedName("account_holder_name") + String accountHolderName; + /** The ABA account number. */ @SerializedName("account_number") String accountNumber; + /** The account type. */ + @SerializedName("account_type") + String accountType; + + @SerializedName("bank_address") + Address bankAddress; + /** The bank name. */ @SerializedName("bank_name") String bankName; @@ -203,10 +217,24 @@ public static class Spei extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class Swift extends StripeObject { + @SerializedName("account_holder_address") + Address accountHolderAddress; + + /** The account holder name. */ + @SerializedName("account_holder_name") + String accountHolderName; + /** The account number. */ @SerializedName("account_number") String accountNumber; + /** The account type. */ + @SerializedName("account_type") + String accountType; + + @SerializedName("bank_address") + Address bankAddress; + /** The bank name. */ @SerializedName("bank_name") String bankName; diff --git a/src/main/java/com/stripe/model/Invoice.java b/src/main/java/com/stripe/model/Invoice.java index 59f2cddd01f..df33d46c724 100644 --- a/src/main/java/com/stripe/model/Invoice.java +++ b/src/main/java/com/stripe/model/Invoice.java @@ -102,6 +102,13 @@ public class Invoice extends ApiResource implements HasId, MetadataStore { + /** + * Settings for price localization with Adaptive Pricing. + */ + @SerializedName("adaptive_pricing") + AdaptivePricing adaptivePricing; + /** When set, provides configuration for actions to take if this Checkout Session expires. */ @SerializedName("after_expiration") AfterExpiration afterExpiration; @@ -814,6 +821,19 @@ public Session update(SessionUpdateParams params, RequestOptions options) throws return getResponseGetter().request(request, Session.class); } + /** + * For more details about AdaptivePricing, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class AdaptivePricing extends StripeObject { + /** Whether Adaptive Pricing is enabled. */ + @SerializedName("enabled") + Boolean enabled; + } + /** * For more details about AfterExpiration, please refer to the API Reference. @@ -977,14 +997,14 @@ public static class TaxId extends StripeObject { * no_vat}, {@code no_voec}, {@code za_vat}, {@code ch_vat}, {@code mx_rfc}, {@code sg_uen}, * {@code ru_inn}, {@code ru_kpp}, {@code ca_bn}, {@code hk_br}, {@code es_cif}, {@code * tw_vat}, {@code th_vat}, {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, {@code li_uid}, - * {@code my_itn}, {@code us_ein}, {@code kr_brn}, {@code ca_qst}, {@code ca_gst_hst}, {@code - * ca_pst_bc}, {@code ca_pst_mb}, {@code ca_pst_sk}, {@code my_sst}, {@code sg_gst}, {@code - * ae_trn}, {@code cl_tin}, {@code sa_vat}, {@code id_npwp}, {@code my_frp}, {@code il_vat}, - * {@code ge_vat}, {@code ua_vat}, {@code is_vat}, {@code bg_uic}, {@code hu_tin}, {@code - * si_tin}, {@code ke_pin}, {@code tr_tin}, {@code eg_tin}, {@code ph_tin}, {@code bh_vat}, - * {@code kz_bin}, {@code ng_tin}, {@code om_vat}, {@code de_stn}, {@code ch_uid}, {@code - * tz_vat}, {@code uz_vat}, {@code uz_tin}, {@code md_vat}, {@code ma_vat}, {@code by_tin}, or - * {@code unknown}. + * {@code li_vat}, {@code my_itn}, {@code us_ein}, {@code kr_brn}, {@code ca_qst}, {@code + * ca_gst_hst}, {@code ca_pst_bc}, {@code ca_pst_mb}, {@code ca_pst_sk}, {@code my_sst}, + * {@code sg_gst}, {@code ae_trn}, {@code cl_tin}, {@code sa_vat}, {@code id_npwp}, {@code + * my_frp}, {@code il_vat}, {@code ge_vat}, {@code ua_vat}, {@code is_vat}, {@code bg_uic}, + * {@code hu_tin}, {@code si_tin}, {@code ke_pin}, {@code tr_tin}, {@code eg_tin}, {@code + * ph_tin}, {@code bh_vat}, {@code kz_bin}, {@code ng_tin}, {@code om_vat}, {@code de_stn}, + * {@code ch_uid}, {@code tz_vat}, {@code uz_vat}, {@code uz_tin}, {@code md_vat}, {@code + * ma_vat}, {@code by_tin}, or {@code unknown}. */ @SerializedName("type") String type; @@ -1402,14 +1422,14 @@ public static class TaxId extends StripeObject { * no_vat}, {@code no_voec}, {@code za_vat}, {@code ch_vat}, {@code mx_rfc}, {@code sg_uen}, * {@code ru_inn}, {@code ru_kpp}, {@code ca_bn}, {@code hk_br}, {@code es_cif}, {@code * tw_vat}, {@code th_vat}, {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, {@code li_uid}, - * {@code my_itn}, {@code us_ein}, {@code kr_brn}, {@code ca_qst}, {@code ca_gst_hst}, {@code - * ca_pst_bc}, {@code ca_pst_mb}, {@code ca_pst_sk}, {@code my_sst}, {@code sg_gst}, {@code - * ae_trn}, {@code cl_tin}, {@code sa_vat}, {@code id_npwp}, {@code my_frp}, {@code il_vat}, - * {@code ge_vat}, {@code ua_vat}, {@code is_vat}, {@code bg_uic}, {@code hu_tin}, {@code - * si_tin}, {@code ke_pin}, {@code tr_tin}, {@code eg_tin}, {@code ph_tin}, {@code bh_vat}, - * {@code kz_bin}, {@code ng_tin}, {@code om_vat}, {@code de_stn}, {@code ch_uid}, {@code - * tz_vat}, {@code uz_vat}, {@code uz_tin}, {@code md_vat}, {@code ma_vat}, {@code by_tin}, or - * {@code unknown}. + * {@code li_vat}, {@code my_itn}, {@code us_ein}, {@code kr_brn}, {@code ca_qst}, {@code + * ca_gst_hst}, {@code ca_pst_bc}, {@code ca_pst_mb}, {@code ca_pst_sk}, {@code my_sst}, + * {@code sg_gst}, {@code ae_trn}, {@code cl_tin}, {@code sa_vat}, {@code id_npwp}, {@code + * my_frp}, {@code il_vat}, {@code ge_vat}, {@code ua_vat}, {@code is_vat}, {@code bg_uic}, + * {@code hu_tin}, {@code si_tin}, {@code ke_pin}, {@code tr_tin}, {@code eg_tin}, {@code + * ph_tin}, {@code bh_vat}, {@code kz_bin}, {@code ng_tin}, {@code om_vat}, {@code de_stn}, + * {@code ch_uid}, {@code tz_vat}, {@code uz_vat}, {@code uz_tin}, {@code md_vat}, {@code + * ma_vat}, {@code by_tin}, or {@code unknown}. */ @SerializedName("type") String type; @@ -3172,6 +3192,9 @@ public static class SamsungPay extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class SepaDebit extends StripeObject { + @SerializedName("mandate_options") + MandateOptions mandateOptions; + /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * @@ -3195,6 +3218,15 @@ public static class SepaDebit extends StripeObject { */ @SerializedName("setup_future_usage") String setupFutureUsage; + + /** + * For more details about MandateOptions, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class MandateOptions extends StripeObject {} } /** @@ -3727,6 +3759,7 @@ public static class Tax extends StripeObject { @Override public void setResponseGetter(StripeResponseGetter responseGetter) { super.setResponseGetter(responseGetter); + trySetResponseGetter(adaptivePricing, responseGetter); trySetResponseGetter(afterExpiration, responseGetter); trySetResponseGetter(automaticTax, responseGetter); trySetResponseGetter(collectedInformation, responseGetter); diff --git a/src/main/java/com/stripe/model/issuing/Authorization.java b/src/main/java/com/stripe/model/issuing/Authorization.java index 8c9da51055c..5a707bd60b1 100644 --- a/src/main/java/com/stripe/model/issuing/Authorization.java +++ b/src/main/java/com/stripe/model/issuing/Authorization.java @@ -80,8 +80,8 @@ public class Authorization extends ApiResource List balanceTransactions; /** - * You can create physical or virtual cards - * that are issued to cardholders. + * You can create physical or virtual cards that are + * issued to cardholders. */ @SerializedName("card") Card card; diff --git a/src/main/java/com/stripe/model/issuing/Card.java b/src/main/java/com/stripe/model/issuing/Card.java index 1a0a8afac24..aa88a7c6149 100644 --- a/src/main/java/com/stripe/model/issuing/Card.java +++ b/src/main/java/com/stripe/model/issuing/Card.java @@ -30,8 +30,8 @@ import lombok.Setter; /** - * You can create physical or virtual cards that - * are issued to cardholders. + * You can create physical or virtual cards that are + * issued to cardholders. */ @Getter @Setter diff --git a/src/main/java/com/stripe/model/tax/Calculation.java b/src/main/java/com/stripe/model/tax/Calculation.java index 744945f8f30..916eaf99ba6 100644 --- a/src/main/java/com/stripe/model/tax/Calculation.java +++ b/src/main/java/com/stripe/model/tax/Calculation.java @@ -327,14 +327,14 @@ public static class TaxId extends StripeObject { * no_vat}, {@code no_voec}, {@code za_vat}, {@code ch_vat}, {@code mx_rfc}, {@code sg_uen}, * {@code ru_inn}, {@code ru_kpp}, {@code ca_bn}, {@code hk_br}, {@code es_cif}, {@code * tw_vat}, {@code th_vat}, {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, {@code li_uid}, - * {@code my_itn}, {@code us_ein}, {@code kr_brn}, {@code ca_qst}, {@code ca_gst_hst}, {@code - * ca_pst_bc}, {@code ca_pst_mb}, {@code ca_pst_sk}, {@code my_sst}, {@code sg_gst}, {@code - * ae_trn}, {@code cl_tin}, {@code sa_vat}, {@code id_npwp}, {@code my_frp}, {@code il_vat}, - * {@code ge_vat}, {@code ua_vat}, {@code is_vat}, {@code bg_uic}, {@code hu_tin}, {@code - * si_tin}, {@code ke_pin}, {@code tr_tin}, {@code eg_tin}, {@code ph_tin}, {@code bh_vat}, - * {@code kz_bin}, {@code ng_tin}, {@code om_vat}, {@code de_stn}, {@code ch_uid}, {@code - * tz_vat}, {@code uz_vat}, {@code uz_tin}, {@code md_vat}, {@code ma_vat}, {@code by_tin}, or - * {@code unknown}. + * {@code li_vat}, {@code my_itn}, {@code us_ein}, {@code kr_brn}, {@code ca_qst}, {@code + * ca_gst_hst}, {@code ca_pst_bc}, {@code ca_pst_mb}, {@code ca_pst_sk}, {@code my_sst}, + * {@code sg_gst}, {@code ae_trn}, {@code cl_tin}, {@code sa_vat}, {@code id_npwp}, {@code + * my_frp}, {@code il_vat}, {@code ge_vat}, {@code ua_vat}, {@code is_vat}, {@code bg_uic}, + * {@code hu_tin}, {@code si_tin}, {@code ke_pin}, {@code tr_tin}, {@code eg_tin}, {@code + * ph_tin}, {@code bh_vat}, {@code kz_bin}, {@code ng_tin}, {@code om_vat}, {@code de_stn}, + * {@code ch_uid}, {@code tz_vat}, {@code uz_vat}, {@code uz_tin}, {@code md_vat}, {@code + * ma_vat}, {@code by_tin}, or {@code unknown}. */ @SerializedName("type") String type; diff --git a/src/main/java/com/stripe/model/tax/Transaction.java b/src/main/java/com/stripe/model/tax/Transaction.java index 718a73b9080..cbb0832d0c2 100644 --- a/src/main/java/com/stripe/model/tax/Transaction.java +++ b/src/main/java/com/stripe/model/tax/Transaction.java @@ -372,14 +372,14 @@ public static class TaxId extends StripeObject { * no_vat}, {@code no_voec}, {@code za_vat}, {@code ch_vat}, {@code mx_rfc}, {@code sg_uen}, * {@code ru_inn}, {@code ru_kpp}, {@code ca_bn}, {@code hk_br}, {@code es_cif}, {@code * tw_vat}, {@code th_vat}, {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, {@code li_uid}, - * {@code my_itn}, {@code us_ein}, {@code kr_brn}, {@code ca_qst}, {@code ca_gst_hst}, {@code - * ca_pst_bc}, {@code ca_pst_mb}, {@code ca_pst_sk}, {@code my_sst}, {@code sg_gst}, {@code - * ae_trn}, {@code cl_tin}, {@code sa_vat}, {@code id_npwp}, {@code my_frp}, {@code il_vat}, - * {@code ge_vat}, {@code ua_vat}, {@code is_vat}, {@code bg_uic}, {@code hu_tin}, {@code - * si_tin}, {@code ke_pin}, {@code tr_tin}, {@code eg_tin}, {@code ph_tin}, {@code bh_vat}, - * {@code kz_bin}, {@code ng_tin}, {@code om_vat}, {@code de_stn}, {@code ch_uid}, {@code - * tz_vat}, {@code uz_vat}, {@code uz_tin}, {@code md_vat}, {@code ma_vat}, {@code by_tin}, or - * {@code unknown}. + * {@code li_vat}, {@code my_itn}, {@code us_ein}, {@code kr_brn}, {@code ca_qst}, {@code + * ca_gst_hst}, {@code ca_pst_bc}, {@code ca_pst_mb}, {@code ca_pst_sk}, {@code my_sst}, + * {@code sg_gst}, {@code ae_trn}, {@code cl_tin}, {@code sa_vat}, {@code id_npwp}, {@code + * my_frp}, {@code il_vat}, {@code ge_vat}, {@code ua_vat}, {@code is_vat}, {@code bg_uic}, + * {@code hu_tin}, {@code si_tin}, {@code ke_pin}, {@code tr_tin}, {@code eg_tin}, {@code + * ph_tin}, {@code bh_vat}, {@code kz_bin}, {@code ng_tin}, {@code om_vat}, {@code de_stn}, + * {@code ch_uid}, {@code tz_vat}, {@code uz_vat}, {@code uz_tin}, {@code md_vat}, {@code + * ma_vat}, {@code by_tin}, or {@code unknown}. */ @SerializedName("type") String type; diff --git a/src/main/java/com/stripe/net/LiveStripeResponseGetter.java b/src/main/java/com/stripe/net/LiveStripeResponseGetter.java index 91d9d8f4860..76b88830be3 100644 --- a/src/main/java/com/stripe/net/LiveStripeResponseGetter.java +++ b/src/main/java/com/stripe/net/LiveStripeResponseGetter.java @@ -6,7 +6,6 @@ import com.google.gson.JsonSyntaxException; import com.stripe.Stripe; import com.stripe.exception.*; -import com.stripe.exception.ApiKeyMissingException; import com.stripe.exception.oauth.InvalidClientException; import com.stripe.exception.oauth.InvalidGrantException; import com.stripe.exception.oauth.InvalidScopeException; @@ -288,22 +287,25 @@ private StripeError parseStripeError( } private void handleError(StripeResponse response, ApiMode apiMode) throws StripeException { - JsonObject responseBody = ApiResource.GSON.fromJson(response.body(), JsonObject.class); - - /* - OAuth errors are JSON objects where `error` is a string. In - contrast, in API errors, `error` is a hash with sub-keys. We use - this property to distinguish between OAuth and API errors. - */ - if (responseBody.has("error") && responseBody.get("error").isJsonPrimitive()) { - JsonPrimitive error = responseBody.getAsJsonPrimitive("error"); - if (error.isString()) { - handleOAuthError(response); + try { + /* + OAuth errors are JSON objects where `error` is a string. In + contrast, in API errors, `error` is a hash with sub-keys. We use + this property to distinguish between OAuth and API errors. + */ + JsonObject responseBody = ApiResource.GSON.fromJson(response.body(), JsonObject.class); + if (responseBody.has("error") && responseBody.get("error").isJsonPrimitive()) { + JsonPrimitive error = responseBody.getAsJsonPrimitive("error"); + if (error.isString()) { + handleOAuthError(response); + } + } else if (apiMode == ApiMode.V2) { + handleV2ApiError(response); + } else { + handleV1ApiError(response); } - } else if (apiMode == ApiMode.V2) { - handleV2ApiError(response); - } else { - handleV1ApiError(response); + } catch (JsonSyntaxException e) { + throw makeMalformedJsonError(response.body(), response.code(), response.requestId(), e); } } diff --git a/src/main/java/com/stripe/param/CustomerCreateParams.java b/src/main/java/com/stripe/param/CustomerCreateParams.java index 7c6f21300d5..7f09c119bc9 100644 --- a/src/main/java/com/stripe/param/CustomerCreateParams.java +++ b/src/main/java/com/stripe/param/CustomerCreateParams.java @@ -1689,13 +1689,13 @@ public static class TaxIdData { * eu_vat}, {@code gb_vat}, {@code ge_vat}, {@code hk_br}, {@code hr_oib}, {@code hu_tin}, * {@code id_npwp}, {@code il_vat}, {@code in_gst}, {@code is_vat}, {@code jp_cn}, {@code * jp_rn}, {@code jp_trn}, {@code ke_pin}, {@code kr_brn}, {@code kz_bin}, {@code li_uid}, - * {@code ma_vat}, {@code md_vat}, {@code mx_rfc}, {@code my_frp}, {@code my_itn}, {@code - * my_sst}, {@code ng_tin}, {@code no_vat}, {@code no_voec}, {@code nz_gst}, {@code om_vat}, - * {@code pe_ruc}, {@code ph_tin}, {@code ro_tin}, {@code rs_pib}, {@code ru_inn}, {@code - * ru_kpp}, {@code sa_vat}, {@code sg_gst}, {@code sg_uen}, {@code si_tin}, {@code sv_nit}, - * {@code th_vat}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, {@code ua_vat}, {@code - * us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code ve_rif}, {@code vn_tin}, or - * {@code za_vat} + * {@code li_vat}, {@code ma_vat}, {@code md_vat}, {@code mx_rfc}, {@code my_frp}, {@code + * my_itn}, {@code my_sst}, {@code ng_tin}, {@code no_vat}, {@code no_voec}, {@code nz_gst}, + * {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, {@code ro_tin}, {@code rs_pib}, {@code + * ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code sg_gst}, {@code sg_uen}, {@code si_tin}, + * {@code sv_nit}, {@code th_vat}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, {@code + * ua_vat}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code ve_rif}, + * {@code vn_tin}, or {@code za_vat} */ @SerializedName("type") Type type; @@ -1762,13 +1762,13 @@ public Builder putAllExtraParam(Map map) { * {@code eu_oss_vat}, {@code eu_vat}, {@code gb_vat}, {@code ge_vat}, {@code hk_br}, {@code * hr_oib}, {@code hu_tin}, {@code id_npwp}, {@code il_vat}, {@code in_gst}, {@code is_vat}, * {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, {@code ke_pin}, {@code kr_brn}, {@code - * kz_bin}, {@code li_uid}, {@code ma_vat}, {@code md_vat}, {@code mx_rfc}, {@code my_frp}, - * {@code my_itn}, {@code my_sst}, {@code ng_tin}, {@code no_vat}, {@code no_voec}, {@code - * nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, {@code ro_tin}, {@code rs_pib}, - * {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code sg_gst}, {@code sg_uen}, {@code - * si_tin}, {@code sv_nit}, {@code th_vat}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, - * {@code ua_vat}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code - * ve_rif}, {@code vn_tin}, or {@code za_vat} + * kz_bin}, {@code li_uid}, {@code li_vat}, {@code ma_vat}, {@code md_vat}, {@code mx_rfc}, + * {@code my_frp}, {@code my_itn}, {@code my_sst}, {@code ng_tin}, {@code no_vat}, {@code + * no_voec}, {@code nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, {@code ro_tin}, + * {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code sg_gst}, {@code + * sg_uen}, {@code si_tin}, {@code sv_nit}, {@code th_vat}, {@code tr_tin}, {@code tw_vat}, + * {@code tz_vat}, {@code ua_vat}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code + * uz_vat}, {@code ve_rif}, {@code vn_tin}, or {@code za_vat} */ public Builder setType(CustomerCreateParams.TaxIdData.Type type) { this.type = type; @@ -1921,6 +1921,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("li_uid") LI_UID("li_uid"), + @SerializedName("li_vat") + LI_VAT("li_vat"), + @SerializedName("ma_vat") MA_VAT("ma_vat"), diff --git a/src/main/java/com/stripe/param/CustomerTaxIdCreateParams.java b/src/main/java/com/stripe/param/CustomerTaxIdCreateParams.java index c96f11f9110..dbc72bfabe0 100644 --- a/src/main/java/com/stripe/param/CustomerTaxIdCreateParams.java +++ b/src/main/java/com/stripe/param/CustomerTaxIdCreateParams.java @@ -33,13 +33,13 @@ public class CustomerTaxIdCreateParams extends ApiRequestParams { * do_rcn}, {@code ec_ruc}, {@code eg_tin}, {@code es_cif}, {@code eu_oss_vat}, {@code eu_vat}, * {@code gb_vat}, {@code ge_vat}, {@code hk_br}, {@code hr_oib}, {@code hu_tin}, {@code id_npwp}, * {@code il_vat}, {@code in_gst}, {@code is_vat}, {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, - * {@code ke_pin}, {@code kr_brn}, {@code kz_bin}, {@code li_uid}, {@code ma_vat}, {@code md_vat}, - * {@code mx_rfc}, {@code my_frp}, {@code my_itn}, {@code my_sst}, {@code ng_tin}, {@code no_vat}, - * {@code no_voec}, {@code nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, {@code - * ro_tin}, {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code sg_gst}, {@code - * sg_uen}, {@code si_tin}, {@code sv_nit}, {@code th_vat}, {@code tr_tin}, {@code tw_vat}, {@code - * tz_vat}, {@code ua_vat}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code - * ve_rif}, {@code vn_tin}, or {@code za_vat} + * {@code ke_pin}, {@code kr_brn}, {@code kz_bin}, {@code li_uid}, {@code li_vat}, {@code ma_vat}, + * {@code md_vat}, {@code mx_rfc}, {@code my_frp}, {@code my_itn}, {@code my_sst}, {@code ng_tin}, + * {@code no_vat}, {@code no_voec}, {@code nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code + * ph_tin}, {@code ro_tin}, {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code + * sg_gst}, {@code sg_uen}, {@code si_tin}, {@code sv_nit}, {@code th_vat}, {@code tr_tin}, {@code + * tw_vat}, {@code tz_vat}, {@code ua_vat}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code + * uz_vat}, {@code ve_rif}, {@code vn_tin}, or {@code za_vat} */ @SerializedName("type") Type type; @@ -136,13 +136,13 @@ public Builder putAllExtraParam(Map map) { * eu_vat}, {@code gb_vat}, {@code ge_vat}, {@code hk_br}, {@code hr_oib}, {@code hu_tin}, * {@code id_npwp}, {@code il_vat}, {@code in_gst}, {@code is_vat}, {@code jp_cn}, {@code * jp_rn}, {@code jp_trn}, {@code ke_pin}, {@code kr_brn}, {@code kz_bin}, {@code li_uid}, - * {@code ma_vat}, {@code md_vat}, {@code mx_rfc}, {@code my_frp}, {@code my_itn}, {@code - * my_sst}, {@code ng_tin}, {@code no_vat}, {@code no_voec}, {@code nz_gst}, {@code om_vat}, - * {@code pe_ruc}, {@code ph_tin}, {@code ro_tin}, {@code rs_pib}, {@code ru_inn}, {@code - * ru_kpp}, {@code sa_vat}, {@code sg_gst}, {@code sg_uen}, {@code si_tin}, {@code sv_nit}, - * {@code th_vat}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, {@code ua_vat}, {@code - * us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code ve_rif}, {@code vn_tin}, or - * {@code za_vat} + * {@code li_vat}, {@code ma_vat}, {@code md_vat}, {@code mx_rfc}, {@code my_frp}, {@code + * my_itn}, {@code my_sst}, {@code ng_tin}, {@code no_vat}, {@code no_voec}, {@code nz_gst}, + * {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, {@code ro_tin}, {@code rs_pib}, {@code + * ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code sg_gst}, {@code sg_uen}, {@code si_tin}, + * {@code sv_nit}, {@code th_vat}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, {@code + * ua_vat}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code ve_rif}, + * {@code vn_tin}, or {@code za_vat} */ public Builder setType(CustomerTaxIdCreateParams.Type type) { this.type = type; @@ -295,6 +295,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("li_uid") LI_UID("li_uid"), + @SerializedName("li_vat") + LI_VAT("li_vat"), + @SerializedName("ma_vat") MA_VAT("ma_vat"), diff --git a/src/main/java/com/stripe/param/InvoiceCreatePreviewParams.java b/src/main/java/com/stripe/param/InvoiceCreatePreviewParams.java index 90f88603620..dd5ecfb7151 100644 --- a/src/main/java/com/stripe/param/InvoiceCreatePreviewParams.java +++ b/src/main/java/com/stripe/param/InvoiceCreatePreviewParams.java @@ -1364,13 +1364,13 @@ public static class TaxId { * {@code eu_oss_vat}, {@code eu_vat}, {@code gb_vat}, {@code ge_vat}, {@code hk_br}, {@code * hr_oib}, {@code hu_tin}, {@code id_npwp}, {@code il_vat}, {@code in_gst}, {@code is_vat}, * {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, {@code ke_pin}, {@code kr_brn}, {@code - * kz_bin}, {@code li_uid}, {@code ma_vat}, {@code md_vat}, {@code mx_rfc}, {@code my_frp}, - * {@code my_itn}, {@code my_sst}, {@code ng_tin}, {@code no_vat}, {@code no_voec}, {@code - * nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, {@code ro_tin}, {@code rs_pib}, - * {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code sg_gst}, {@code sg_uen}, {@code - * si_tin}, {@code sv_nit}, {@code th_vat}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, - * {@code ua_vat}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code - * ve_rif}, {@code vn_tin}, or {@code za_vat} + * kz_bin}, {@code li_uid}, {@code li_vat}, {@code ma_vat}, {@code md_vat}, {@code mx_rfc}, + * {@code my_frp}, {@code my_itn}, {@code my_sst}, {@code ng_tin}, {@code no_vat}, {@code + * no_voec}, {@code nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, {@code ro_tin}, + * {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code sg_gst}, {@code + * sg_uen}, {@code si_tin}, {@code sv_nit}, {@code th_vat}, {@code tr_tin}, {@code tw_vat}, + * {@code tz_vat}, {@code ua_vat}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code + * uz_vat}, {@code ve_rif}, {@code vn_tin}, or {@code za_vat} */ @SerializedName("type") Type type; @@ -1440,13 +1440,13 @@ public Builder putAllExtraParam(Map map) { * {@code eu_oss_vat}, {@code eu_vat}, {@code gb_vat}, {@code ge_vat}, {@code hk_br}, {@code * hr_oib}, {@code hu_tin}, {@code id_npwp}, {@code il_vat}, {@code in_gst}, {@code is_vat}, * {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, {@code ke_pin}, {@code kr_brn}, {@code - * kz_bin}, {@code li_uid}, {@code ma_vat}, {@code md_vat}, {@code mx_rfc}, {@code my_frp}, - * {@code my_itn}, {@code my_sst}, {@code ng_tin}, {@code no_vat}, {@code no_voec}, {@code - * nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, {@code ro_tin}, {@code rs_pib}, - * {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code sg_gst}, {@code sg_uen}, {@code - * si_tin}, {@code sv_nit}, {@code th_vat}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, - * {@code ua_vat}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code - * ve_rif}, {@code vn_tin}, or {@code za_vat} + * kz_bin}, {@code li_uid}, {@code li_vat}, {@code ma_vat}, {@code md_vat}, {@code mx_rfc}, + * {@code my_frp}, {@code my_itn}, {@code my_sst}, {@code ng_tin}, {@code no_vat}, {@code + * no_voec}, {@code nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, {@code ro_tin}, + * {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code sg_gst}, {@code + * sg_uen}, {@code si_tin}, {@code sv_nit}, {@code th_vat}, {@code tr_tin}, {@code tw_vat}, + * {@code tz_vat}, {@code ua_vat}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code + * uz_vat}, {@code ve_rif}, {@code vn_tin}, or {@code za_vat} */ public Builder setType(InvoiceCreatePreviewParams.CustomerDetails.TaxId.Type type) { this.type = type; @@ -1599,6 +1599,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("li_uid") LI_UID("li_uid"), + @SerializedName("li_vat") + LI_VAT("li_vat"), + @SerializedName("ma_vat") MA_VAT("ma_vat"), diff --git a/src/main/java/com/stripe/param/InvoiceUpcomingLinesListParams.java b/src/main/java/com/stripe/param/InvoiceUpcomingLinesListParams.java index ca929767349..f06241927a4 100644 --- a/src/main/java/com/stripe/param/InvoiceUpcomingLinesListParams.java +++ b/src/main/java/com/stripe/param/InvoiceUpcomingLinesListParams.java @@ -1878,13 +1878,13 @@ public static class TaxId { * {@code eu_oss_vat}, {@code eu_vat}, {@code gb_vat}, {@code ge_vat}, {@code hk_br}, {@code * hr_oib}, {@code hu_tin}, {@code id_npwp}, {@code il_vat}, {@code in_gst}, {@code is_vat}, * {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, {@code ke_pin}, {@code kr_brn}, {@code - * kz_bin}, {@code li_uid}, {@code ma_vat}, {@code md_vat}, {@code mx_rfc}, {@code my_frp}, - * {@code my_itn}, {@code my_sst}, {@code ng_tin}, {@code no_vat}, {@code no_voec}, {@code - * nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, {@code ro_tin}, {@code rs_pib}, - * {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code sg_gst}, {@code sg_uen}, {@code - * si_tin}, {@code sv_nit}, {@code th_vat}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, - * {@code ua_vat}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code - * ve_rif}, {@code vn_tin}, or {@code za_vat} + * kz_bin}, {@code li_uid}, {@code li_vat}, {@code ma_vat}, {@code md_vat}, {@code mx_rfc}, + * {@code my_frp}, {@code my_itn}, {@code my_sst}, {@code ng_tin}, {@code no_vat}, {@code + * no_voec}, {@code nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, {@code ro_tin}, + * {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code sg_gst}, {@code + * sg_uen}, {@code si_tin}, {@code sv_nit}, {@code th_vat}, {@code tr_tin}, {@code tw_vat}, + * {@code tz_vat}, {@code ua_vat}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code + * uz_vat}, {@code ve_rif}, {@code vn_tin}, or {@code za_vat} */ @SerializedName("type") Type type; @@ -1954,13 +1954,13 @@ public Builder putAllExtraParam(Map map) { * {@code eu_oss_vat}, {@code eu_vat}, {@code gb_vat}, {@code ge_vat}, {@code hk_br}, {@code * hr_oib}, {@code hu_tin}, {@code id_npwp}, {@code il_vat}, {@code in_gst}, {@code is_vat}, * {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, {@code ke_pin}, {@code kr_brn}, {@code - * kz_bin}, {@code li_uid}, {@code ma_vat}, {@code md_vat}, {@code mx_rfc}, {@code my_frp}, - * {@code my_itn}, {@code my_sst}, {@code ng_tin}, {@code no_vat}, {@code no_voec}, {@code - * nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, {@code ro_tin}, {@code rs_pib}, - * {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code sg_gst}, {@code sg_uen}, {@code - * si_tin}, {@code sv_nit}, {@code th_vat}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, - * {@code ua_vat}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code - * ve_rif}, {@code vn_tin}, or {@code za_vat} + * kz_bin}, {@code li_uid}, {@code li_vat}, {@code ma_vat}, {@code md_vat}, {@code mx_rfc}, + * {@code my_frp}, {@code my_itn}, {@code my_sst}, {@code ng_tin}, {@code no_vat}, {@code + * no_voec}, {@code nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, {@code ro_tin}, + * {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code sg_gst}, {@code + * sg_uen}, {@code si_tin}, {@code sv_nit}, {@code th_vat}, {@code tr_tin}, {@code tw_vat}, + * {@code tz_vat}, {@code ua_vat}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code + * uz_vat}, {@code ve_rif}, {@code vn_tin}, or {@code za_vat} */ public Builder setType(InvoiceUpcomingLinesListParams.CustomerDetails.TaxId.Type type) { this.type = type; @@ -2113,6 +2113,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("li_uid") LI_UID("li_uid"), + @SerializedName("li_vat") + LI_VAT("li_vat"), + @SerializedName("ma_vat") MA_VAT("ma_vat"), diff --git a/src/main/java/com/stripe/param/InvoiceUpcomingLinesParams.java b/src/main/java/com/stripe/param/InvoiceUpcomingLinesParams.java index 1f0470c0d69..417d08b74b8 100644 --- a/src/main/java/com/stripe/param/InvoiceUpcomingLinesParams.java +++ b/src/main/java/com/stripe/param/InvoiceUpcomingLinesParams.java @@ -1870,13 +1870,13 @@ public static class TaxId { * {@code eu_oss_vat}, {@code eu_vat}, {@code gb_vat}, {@code ge_vat}, {@code hk_br}, {@code * hr_oib}, {@code hu_tin}, {@code id_npwp}, {@code il_vat}, {@code in_gst}, {@code is_vat}, * {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, {@code ke_pin}, {@code kr_brn}, {@code - * kz_bin}, {@code li_uid}, {@code ma_vat}, {@code md_vat}, {@code mx_rfc}, {@code my_frp}, - * {@code my_itn}, {@code my_sst}, {@code ng_tin}, {@code no_vat}, {@code no_voec}, {@code - * nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, {@code ro_tin}, {@code rs_pib}, - * {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code sg_gst}, {@code sg_uen}, {@code - * si_tin}, {@code sv_nit}, {@code th_vat}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, - * {@code ua_vat}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code - * ve_rif}, {@code vn_tin}, or {@code za_vat} + * kz_bin}, {@code li_uid}, {@code li_vat}, {@code ma_vat}, {@code md_vat}, {@code mx_rfc}, + * {@code my_frp}, {@code my_itn}, {@code my_sst}, {@code ng_tin}, {@code no_vat}, {@code + * no_voec}, {@code nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, {@code ro_tin}, + * {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code sg_gst}, {@code + * sg_uen}, {@code si_tin}, {@code sv_nit}, {@code th_vat}, {@code tr_tin}, {@code tw_vat}, + * {@code tz_vat}, {@code ua_vat}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code + * uz_vat}, {@code ve_rif}, {@code vn_tin}, or {@code za_vat} */ @SerializedName("type") Type type; @@ -1946,13 +1946,13 @@ public Builder putAllExtraParam(Map map) { * {@code eu_oss_vat}, {@code eu_vat}, {@code gb_vat}, {@code ge_vat}, {@code hk_br}, {@code * hr_oib}, {@code hu_tin}, {@code id_npwp}, {@code il_vat}, {@code in_gst}, {@code is_vat}, * {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, {@code ke_pin}, {@code kr_brn}, {@code - * kz_bin}, {@code li_uid}, {@code ma_vat}, {@code md_vat}, {@code mx_rfc}, {@code my_frp}, - * {@code my_itn}, {@code my_sst}, {@code ng_tin}, {@code no_vat}, {@code no_voec}, {@code - * nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, {@code ro_tin}, {@code rs_pib}, - * {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code sg_gst}, {@code sg_uen}, {@code - * si_tin}, {@code sv_nit}, {@code th_vat}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, - * {@code ua_vat}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code - * ve_rif}, {@code vn_tin}, or {@code za_vat} + * kz_bin}, {@code li_uid}, {@code li_vat}, {@code ma_vat}, {@code md_vat}, {@code mx_rfc}, + * {@code my_frp}, {@code my_itn}, {@code my_sst}, {@code ng_tin}, {@code no_vat}, {@code + * no_voec}, {@code nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, {@code ro_tin}, + * {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code sg_gst}, {@code + * sg_uen}, {@code si_tin}, {@code sv_nit}, {@code th_vat}, {@code tr_tin}, {@code tw_vat}, + * {@code tz_vat}, {@code ua_vat}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code + * uz_vat}, {@code ve_rif}, {@code vn_tin}, or {@code za_vat} */ public Builder setType(InvoiceUpcomingLinesParams.CustomerDetails.TaxId.Type type) { this.type = type; @@ -2105,6 +2105,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("li_uid") LI_UID("li_uid"), + @SerializedName("li_vat") + LI_VAT("li_vat"), + @SerializedName("ma_vat") MA_VAT("ma_vat"), diff --git a/src/main/java/com/stripe/param/InvoiceUpcomingParams.java b/src/main/java/com/stripe/param/InvoiceUpcomingParams.java index bc406e80a75..fc1a35e0679 100644 --- a/src/main/java/com/stripe/param/InvoiceUpcomingParams.java +++ b/src/main/java/com/stripe/param/InvoiceUpcomingParams.java @@ -1792,13 +1792,13 @@ public static class TaxId { * {@code eu_oss_vat}, {@code eu_vat}, {@code gb_vat}, {@code ge_vat}, {@code hk_br}, {@code * hr_oib}, {@code hu_tin}, {@code id_npwp}, {@code il_vat}, {@code in_gst}, {@code is_vat}, * {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, {@code ke_pin}, {@code kr_brn}, {@code - * kz_bin}, {@code li_uid}, {@code ma_vat}, {@code md_vat}, {@code mx_rfc}, {@code my_frp}, - * {@code my_itn}, {@code my_sst}, {@code ng_tin}, {@code no_vat}, {@code no_voec}, {@code - * nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, {@code ro_tin}, {@code rs_pib}, - * {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code sg_gst}, {@code sg_uen}, {@code - * si_tin}, {@code sv_nit}, {@code th_vat}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, - * {@code ua_vat}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code - * ve_rif}, {@code vn_tin}, or {@code za_vat} + * kz_bin}, {@code li_uid}, {@code li_vat}, {@code ma_vat}, {@code md_vat}, {@code mx_rfc}, + * {@code my_frp}, {@code my_itn}, {@code my_sst}, {@code ng_tin}, {@code no_vat}, {@code + * no_voec}, {@code nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, {@code ro_tin}, + * {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code sg_gst}, {@code + * sg_uen}, {@code si_tin}, {@code sv_nit}, {@code th_vat}, {@code tr_tin}, {@code tw_vat}, + * {@code tz_vat}, {@code ua_vat}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code + * uz_vat}, {@code ve_rif}, {@code vn_tin}, or {@code za_vat} */ @SerializedName("type") Type type; @@ -1868,13 +1868,13 @@ public Builder putAllExtraParam(Map map) { * {@code eu_oss_vat}, {@code eu_vat}, {@code gb_vat}, {@code ge_vat}, {@code hk_br}, {@code * hr_oib}, {@code hu_tin}, {@code id_npwp}, {@code il_vat}, {@code in_gst}, {@code is_vat}, * {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, {@code ke_pin}, {@code kr_brn}, {@code - * kz_bin}, {@code li_uid}, {@code ma_vat}, {@code md_vat}, {@code mx_rfc}, {@code my_frp}, - * {@code my_itn}, {@code my_sst}, {@code ng_tin}, {@code no_vat}, {@code no_voec}, {@code - * nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, {@code ro_tin}, {@code rs_pib}, - * {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code sg_gst}, {@code sg_uen}, {@code - * si_tin}, {@code sv_nit}, {@code th_vat}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, - * {@code ua_vat}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code - * ve_rif}, {@code vn_tin}, or {@code za_vat} + * kz_bin}, {@code li_uid}, {@code li_vat}, {@code ma_vat}, {@code md_vat}, {@code mx_rfc}, + * {@code my_frp}, {@code my_itn}, {@code my_sst}, {@code ng_tin}, {@code no_vat}, {@code + * no_voec}, {@code nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, {@code ro_tin}, + * {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code sg_gst}, {@code + * sg_uen}, {@code si_tin}, {@code sv_nit}, {@code th_vat}, {@code tr_tin}, {@code tw_vat}, + * {@code tz_vat}, {@code ua_vat}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code + * uz_vat}, {@code ve_rif}, {@code vn_tin}, or {@code za_vat} */ public Builder setType(InvoiceUpcomingParams.CustomerDetails.TaxId.Type type) { this.type = type; @@ -2027,6 +2027,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("li_uid") LI_UID("li_uid"), + @SerializedName("li_vat") + LI_VAT("li_vat"), + @SerializedName("ma_vat") MA_VAT("ma_vat"), diff --git a/src/main/java/com/stripe/param/OrderCreateParams.java b/src/main/java/com/stripe/param/OrderCreateParams.java index aa3b354a701..c0500c14036 100644 --- a/src/main/java/com/stripe/param/OrderCreateParams.java +++ b/src/main/java/com/stripe/param/OrderCreateParams.java @@ -8449,13 +8449,13 @@ public static class TaxId { * {@code eu_oss_vat}, {@code eu_vat}, {@code gb_vat}, {@code ge_vat}, {@code hk_br}, {@code * hr_oib}, {@code hu_tin}, {@code id_npwp}, {@code il_vat}, {@code in_gst}, {@code is_vat}, * {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, {@code ke_pin}, {@code kr_brn}, {@code - * kz_bin}, {@code li_uid}, {@code ma_vat}, {@code md_vat}, {@code mx_rfc}, {@code my_frp}, - * {@code my_itn}, {@code my_sst}, {@code ng_tin}, {@code no_vat}, {@code no_voec}, {@code - * nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, {@code ro_tin}, {@code rs_pib}, - * {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code sg_gst}, {@code sg_uen}, {@code - * si_tin}, {@code sv_nit}, {@code th_vat}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, - * {@code ua_vat}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code - * ve_rif}, {@code vn_tin}, or {@code za_vat} + * kz_bin}, {@code li_uid}, {@code li_vat}, {@code ma_vat}, {@code md_vat}, {@code mx_rfc}, + * {@code my_frp}, {@code my_itn}, {@code my_sst}, {@code ng_tin}, {@code no_vat}, {@code + * no_voec}, {@code nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, {@code ro_tin}, + * {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code sg_gst}, {@code + * sg_uen}, {@code si_tin}, {@code sv_nit}, {@code th_vat}, {@code tr_tin}, {@code tw_vat}, + * {@code tz_vat}, {@code ua_vat}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code + * uz_vat}, {@code ve_rif}, {@code vn_tin}, or {@code za_vat} */ @SerializedName("type") Type type; @@ -8524,13 +8524,13 @@ public Builder putAllExtraParam(Map map) { * {@code eu_oss_vat}, {@code eu_vat}, {@code gb_vat}, {@code ge_vat}, {@code hk_br}, {@code * hr_oib}, {@code hu_tin}, {@code id_npwp}, {@code il_vat}, {@code in_gst}, {@code is_vat}, * {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, {@code ke_pin}, {@code kr_brn}, {@code - * kz_bin}, {@code li_uid}, {@code ma_vat}, {@code md_vat}, {@code mx_rfc}, {@code my_frp}, - * {@code my_itn}, {@code my_sst}, {@code ng_tin}, {@code no_vat}, {@code no_voec}, {@code - * nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, {@code ro_tin}, {@code rs_pib}, - * {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code sg_gst}, {@code sg_uen}, {@code - * si_tin}, {@code sv_nit}, {@code th_vat}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, - * {@code ua_vat}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code - * ve_rif}, {@code vn_tin}, or {@code za_vat} + * kz_bin}, {@code li_uid}, {@code li_vat}, {@code ma_vat}, {@code md_vat}, {@code mx_rfc}, + * {@code my_frp}, {@code my_itn}, {@code my_sst}, {@code ng_tin}, {@code no_vat}, {@code + * no_voec}, {@code nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, {@code ro_tin}, + * {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code sg_gst}, {@code + * sg_uen}, {@code si_tin}, {@code sv_nit}, {@code th_vat}, {@code tr_tin}, {@code tw_vat}, + * {@code tz_vat}, {@code ua_vat}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code + * uz_vat}, {@code ve_rif}, {@code vn_tin}, or {@code za_vat} */ public Builder setType(OrderCreateParams.TaxDetails.TaxId.Type type) { this.type = type; @@ -8683,6 +8683,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("li_uid") LI_UID("li_uid"), + @SerializedName("li_vat") + LI_VAT("li_vat"), + @SerializedName("ma_vat") MA_VAT("ma_vat"), diff --git a/src/main/java/com/stripe/param/OrderUpdateParams.java b/src/main/java/com/stripe/param/OrderUpdateParams.java index 1d56c297758..1faa055f741 100644 --- a/src/main/java/com/stripe/param/OrderUpdateParams.java +++ b/src/main/java/com/stripe/param/OrderUpdateParams.java @@ -9082,13 +9082,13 @@ public static class TaxId { * {@code eu_oss_vat}, {@code eu_vat}, {@code gb_vat}, {@code ge_vat}, {@code hk_br}, {@code * hr_oib}, {@code hu_tin}, {@code id_npwp}, {@code il_vat}, {@code in_gst}, {@code is_vat}, * {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, {@code ke_pin}, {@code kr_brn}, {@code - * kz_bin}, {@code li_uid}, {@code ma_vat}, {@code md_vat}, {@code mx_rfc}, {@code my_frp}, - * {@code my_itn}, {@code my_sst}, {@code ng_tin}, {@code no_vat}, {@code no_voec}, {@code - * nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, {@code ro_tin}, {@code rs_pib}, - * {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code sg_gst}, {@code sg_uen}, {@code - * si_tin}, {@code sv_nit}, {@code th_vat}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, - * {@code ua_vat}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code - * ve_rif}, {@code vn_tin}, or {@code za_vat} + * kz_bin}, {@code li_uid}, {@code li_vat}, {@code ma_vat}, {@code md_vat}, {@code mx_rfc}, + * {@code my_frp}, {@code my_itn}, {@code my_sst}, {@code ng_tin}, {@code no_vat}, {@code + * no_voec}, {@code nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, {@code ro_tin}, + * {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code sg_gst}, {@code + * sg_uen}, {@code si_tin}, {@code sv_nit}, {@code th_vat}, {@code tr_tin}, {@code tw_vat}, + * {@code tz_vat}, {@code ua_vat}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code + * uz_vat}, {@code ve_rif}, {@code vn_tin}, or {@code za_vat} */ @SerializedName("type") Type type; @@ -9157,13 +9157,13 @@ public Builder putAllExtraParam(Map map) { * {@code eu_oss_vat}, {@code eu_vat}, {@code gb_vat}, {@code ge_vat}, {@code hk_br}, {@code * hr_oib}, {@code hu_tin}, {@code id_npwp}, {@code il_vat}, {@code in_gst}, {@code is_vat}, * {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, {@code ke_pin}, {@code kr_brn}, {@code - * kz_bin}, {@code li_uid}, {@code ma_vat}, {@code md_vat}, {@code mx_rfc}, {@code my_frp}, - * {@code my_itn}, {@code my_sst}, {@code ng_tin}, {@code no_vat}, {@code no_voec}, {@code - * nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, {@code ro_tin}, {@code rs_pib}, - * {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code sg_gst}, {@code sg_uen}, {@code - * si_tin}, {@code sv_nit}, {@code th_vat}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, - * {@code ua_vat}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code - * ve_rif}, {@code vn_tin}, or {@code za_vat} + * kz_bin}, {@code li_uid}, {@code li_vat}, {@code ma_vat}, {@code md_vat}, {@code mx_rfc}, + * {@code my_frp}, {@code my_itn}, {@code my_sst}, {@code ng_tin}, {@code no_vat}, {@code + * no_voec}, {@code nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, {@code ro_tin}, + * {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code sg_gst}, {@code + * sg_uen}, {@code si_tin}, {@code sv_nit}, {@code th_vat}, {@code tr_tin}, {@code tw_vat}, + * {@code tz_vat}, {@code ua_vat}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code + * uz_vat}, {@code ve_rif}, {@code vn_tin}, or {@code za_vat} */ public Builder setType(OrderUpdateParams.TaxDetails.TaxId.Type type) { this.type = type; @@ -9322,6 +9322,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("li_uid") LI_UID("li_uid"), + @SerializedName("li_vat") + LI_VAT("li_vat"), + @SerializedName("ma_vat") MA_VAT("ma_vat"), diff --git a/src/main/java/com/stripe/param/PaymentIntentIncrementAuthorizationParams.java b/src/main/java/com/stripe/param/PaymentIntentIncrementAuthorizationParams.java index b89401237e3..6fab44e774c 100644 --- a/src/main/java/com/stripe/param/PaymentIntentIncrementAuthorizationParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentIncrementAuthorizationParams.java @@ -59,10 +59,6 @@ public class PaymentIntentIncrementAuthorizationParams extends ApiRequestParams @SerializedName("metadata") Map metadata; - /** Payment method-specific configuration for this PaymentIntent. */ - @SerializedName("payment_method_options") - PaymentMethodOptions paymentMethodOptions; - /** * Text that appears on the customer's statement as the statement descriptor for a non-card or * card charge. This value overrides the account's default statement descriptor. For information @@ -89,7 +85,6 @@ private PaymentIntentIncrementAuthorizationParams( List expand, Map extraParams, Map metadata, - PaymentMethodOptions paymentMethodOptions, String statementDescriptor, TransferData transferData) { this.amount = amount; @@ -99,7 +94,6 @@ private PaymentIntentIncrementAuthorizationParams( this.expand = expand; this.extraParams = extraParams; this.metadata = metadata; - this.paymentMethodOptions = paymentMethodOptions; this.statementDescriptor = statementDescriptor; this.transferData = transferData; } @@ -123,8 +117,6 @@ public static class Builder { private Map metadata; - private PaymentMethodOptions paymentMethodOptions; - private String statementDescriptor; private TransferData transferData; @@ -139,7 +131,6 @@ public PaymentIntentIncrementAuthorizationParams build() { this.expand, this.extraParams, this.metadata, - this.paymentMethodOptions, this.statementDescriptor, this.transferData); } @@ -257,13 +248,6 @@ public Builder putAllMetadata(Map map) { return this; } - /** Payment method-specific configuration for this PaymentIntent. */ - public Builder setPaymentMethodOptions( - PaymentIntentIncrementAuthorizationParams.PaymentMethodOptions paymentMethodOptions) { - this.paymentMethodOptions = paymentMethodOptions; - return this; - } - /** * Text that appears on the customer's statement as the statement descriptor for a non-card or * card charge. This value overrides the account's default statement descriptor. For information @@ -523,144 +507,6 @@ public Builder putAllExtraParam(Map map) { } } - @Getter - public static class PaymentMethodOptions { - /** Configuration for any card payments attempted on this PaymentIntent. */ - @SerializedName("card") - Object 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; - - private PaymentMethodOptions(Object card, Map extraParams) { - this.card = card; - this.extraParams = extraParams; - } - - public static Builder builder() { - return new Builder(); - } - - public static class Builder { - private Object card; - - private Map extraParams; - - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentIncrementAuthorizationParams.PaymentMethodOptions build() { - return new PaymentIntentIncrementAuthorizationParams.PaymentMethodOptions( - this.card, this.extraParams); - } - - /** Configuration for any card payments attempted on this PaymentIntent. */ - public Builder setCard( - PaymentIntentIncrementAuthorizationParams.PaymentMethodOptions.Card card) { - this.card = card; - return this; - } - - /** Configuration for any card payments attempted on this PaymentIntent. */ - public Builder setCard(EmptyParam card) { - this.card = card; - 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 - * PaymentIntentIncrementAuthorizationParams.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 PaymentIntentIncrementAuthorizationParams.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; - } - } - - @Getter - 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; - - private Card(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 PaymentIntentIncrementAuthorizationParams.PaymentMethodOptions.Card build() { - return new PaymentIntentIncrementAuthorizationParams.PaymentMethodOptions.Card( - 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 - * PaymentIntentIncrementAuthorizationParams.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 - * PaymentIntentIncrementAuthorizationParams.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; - } - } - } - } - @Getter public static class TransferData { /** The amount that will be transferred automatically when a charge succeeds. */ diff --git a/src/main/java/com/stripe/param/PaymentLinkCreateParams.java b/src/main/java/com/stripe/param/PaymentLinkCreateParams.java index 16611a2b192..56077d4fab8 100644 --- a/src/main/java/com/stripe/param/PaymentLinkCreateParams.java +++ b/src/main/java/com/stripe/param/PaymentLinkCreateParams.java @@ -4015,8 +4015,7 @@ public Builder setLimit(Long limit) { public static class ShippingAddressCollection { /** * Required. An array of two-letter ISO country codes representing which - * countries Checkout should provide as options for shipping locations. Unsupported country - * codes: {@code AS, CX, CC, CU, HM, IR, KP, MH, FM, NF, MP, PW, SD, SY, UM, VI}. + * countries Checkout should provide as options for shipping locations. */ @SerializedName("allowed_countries") List allowedCountries; diff --git a/src/main/java/com/stripe/param/PaymentLinkUpdateParams.java b/src/main/java/com/stripe/param/PaymentLinkUpdateParams.java index 7c39cb40899..5eb99ffd00e 100644 --- a/src/main/java/com/stripe/param/PaymentLinkUpdateParams.java +++ b/src/main/java/com/stripe/param/PaymentLinkUpdateParams.java @@ -3658,8 +3658,7 @@ public Builder setLimit(Long limit) { public static class ShippingAddressCollection { /** * Required. An array of two-letter ISO country codes representing which - * countries Checkout should provide as options for shipping locations. Unsupported country - * codes: {@code AS, CX, CC, CU, HM, IR, KP, MH, FM, NF, MP, PW, SD, SY, UM, VI}. + * countries Checkout should provide as options for shipping locations. */ @SerializedName("allowed_countries") List allowedCountries; diff --git a/src/main/java/com/stripe/param/TaxIdCollectionCreateParams.java b/src/main/java/com/stripe/param/TaxIdCollectionCreateParams.java index 467044f224f..24b2317f61d 100644 --- a/src/main/java/com/stripe/param/TaxIdCollectionCreateParams.java +++ b/src/main/java/com/stripe/param/TaxIdCollectionCreateParams.java @@ -33,13 +33,13 @@ public class TaxIdCollectionCreateParams extends ApiRequestParams { * do_rcn}, {@code ec_ruc}, {@code eg_tin}, {@code es_cif}, {@code eu_oss_vat}, {@code eu_vat}, * {@code gb_vat}, {@code ge_vat}, {@code hk_br}, {@code hr_oib}, {@code hu_tin}, {@code id_npwp}, * {@code il_vat}, {@code in_gst}, {@code is_vat}, {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, - * {@code ke_pin}, {@code kr_brn}, {@code kz_bin}, {@code li_uid}, {@code ma_vat}, {@code md_vat}, - * {@code mx_rfc}, {@code my_frp}, {@code my_itn}, {@code my_sst}, {@code ng_tin}, {@code no_vat}, - * {@code no_voec}, {@code nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, {@code - * ro_tin}, {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code sg_gst}, {@code - * sg_uen}, {@code si_tin}, {@code sv_nit}, {@code th_vat}, {@code tr_tin}, {@code tw_vat}, {@code - * tz_vat}, {@code ua_vat}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code - * ve_rif}, {@code vn_tin}, or {@code za_vat} + * {@code ke_pin}, {@code kr_brn}, {@code kz_bin}, {@code li_uid}, {@code li_vat}, {@code ma_vat}, + * {@code md_vat}, {@code mx_rfc}, {@code my_frp}, {@code my_itn}, {@code my_sst}, {@code ng_tin}, + * {@code no_vat}, {@code no_voec}, {@code nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code + * ph_tin}, {@code ro_tin}, {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code + * sg_gst}, {@code sg_uen}, {@code si_tin}, {@code sv_nit}, {@code th_vat}, {@code tr_tin}, {@code + * tw_vat}, {@code tz_vat}, {@code ua_vat}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code + * uz_vat}, {@code ve_rif}, {@code vn_tin}, or {@code za_vat} */ @SerializedName("type") Type type; @@ -136,13 +136,13 @@ public Builder putAllExtraParam(Map map) { * eu_vat}, {@code gb_vat}, {@code ge_vat}, {@code hk_br}, {@code hr_oib}, {@code hu_tin}, * {@code id_npwp}, {@code il_vat}, {@code in_gst}, {@code is_vat}, {@code jp_cn}, {@code * jp_rn}, {@code jp_trn}, {@code ke_pin}, {@code kr_brn}, {@code kz_bin}, {@code li_uid}, - * {@code ma_vat}, {@code md_vat}, {@code mx_rfc}, {@code my_frp}, {@code my_itn}, {@code - * my_sst}, {@code ng_tin}, {@code no_vat}, {@code no_voec}, {@code nz_gst}, {@code om_vat}, - * {@code pe_ruc}, {@code ph_tin}, {@code ro_tin}, {@code rs_pib}, {@code ru_inn}, {@code - * ru_kpp}, {@code sa_vat}, {@code sg_gst}, {@code sg_uen}, {@code si_tin}, {@code sv_nit}, - * {@code th_vat}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, {@code ua_vat}, {@code - * us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code ve_rif}, {@code vn_tin}, or - * {@code za_vat} + * {@code li_vat}, {@code ma_vat}, {@code md_vat}, {@code mx_rfc}, {@code my_frp}, {@code + * my_itn}, {@code my_sst}, {@code ng_tin}, {@code no_vat}, {@code no_voec}, {@code nz_gst}, + * {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, {@code ro_tin}, {@code rs_pib}, {@code + * ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code sg_gst}, {@code sg_uen}, {@code si_tin}, + * {@code sv_nit}, {@code th_vat}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, {@code + * ua_vat}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code ve_rif}, + * {@code vn_tin}, or {@code za_vat} */ public Builder setType(TaxIdCollectionCreateParams.Type type) { this.type = type; @@ -295,6 +295,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("li_uid") LI_UID("li_uid"), + @SerializedName("li_vat") + LI_VAT("li_vat"), + @SerializedName("ma_vat") MA_VAT("ma_vat"), diff --git a/src/main/java/com/stripe/param/TaxIdCreateParams.java b/src/main/java/com/stripe/param/TaxIdCreateParams.java index e8c04d77f6a..6a7dea021d0 100644 --- a/src/main/java/com/stripe/param/TaxIdCreateParams.java +++ b/src/main/java/com/stripe/param/TaxIdCreateParams.java @@ -37,13 +37,13 @@ public class TaxIdCreateParams extends ApiRequestParams { * do_rcn}, {@code ec_ruc}, {@code eg_tin}, {@code es_cif}, {@code eu_oss_vat}, {@code eu_vat}, * {@code gb_vat}, {@code ge_vat}, {@code hk_br}, {@code hr_oib}, {@code hu_tin}, {@code id_npwp}, * {@code il_vat}, {@code in_gst}, {@code is_vat}, {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, - * {@code ke_pin}, {@code kr_brn}, {@code kz_bin}, {@code li_uid}, {@code ma_vat}, {@code md_vat}, - * {@code mx_rfc}, {@code my_frp}, {@code my_itn}, {@code my_sst}, {@code ng_tin}, {@code no_vat}, - * {@code no_voec}, {@code nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, {@code - * ro_tin}, {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code sg_gst}, {@code - * sg_uen}, {@code si_tin}, {@code sv_nit}, {@code th_vat}, {@code tr_tin}, {@code tw_vat}, {@code - * tz_vat}, {@code ua_vat}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code - * ve_rif}, {@code vn_tin}, or {@code za_vat} + * {@code ke_pin}, {@code kr_brn}, {@code kz_bin}, {@code li_uid}, {@code li_vat}, {@code ma_vat}, + * {@code md_vat}, {@code mx_rfc}, {@code my_frp}, {@code my_itn}, {@code my_sst}, {@code ng_tin}, + * {@code no_vat}, {@code no_voec}, {@code nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code + * ph_tin}, {@code ro_tin}, {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code + * sg_gst}, {@code sg_uen}, {@code si_tin}, {@code sv_nit}, {@code th_vat}, {@code tr_tin}, {@code + * tw_vat}, {@code tz_vat}, {@code ua_vat}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code + * uz_vat}, {@code ve_rif}, {@code vn_tin}, or {@code za_vat} */ @SerializedName("type") Type type; @@ -150,13 +150,13 @@ public Builder setOwner(TaxIdCreateParams.Owner owner) { * eu_vat}, {@code gb_vat}, {@code ge_vat}, {@code hk_br}, {@code hr_oib}, {@code hu_tin}, * {@code id_npwp}, {@code il_vat}, {@code in_gst}, {@code is_vat}, {@code jp_cn}, {@code * jp_rn}, {@code jp_trn}, {@code ke_pin}, {@code kr_brn}, {@code kz_bin}, {@code li_uid}, - * {@code ma_vat}, {@code md_vat}, {@code mx_rfc}, {@code my_frp}, {@code my_itn}, {@code - * my_sst}, {@code ng_tin}, {@code no_vat}, {@code no_voec}, {@code nz_gst}, {@code om_vat}, - * {@code pe_ruc}, {@code ph_tin}, {@code ro_tin}, {@code rs_pib}, {@code ru_inn}, {@code - * ru_kpp}, {@code sa_vat}, {@code sg_gst}, {@code sg_uen}, {@code si_tin}, {@code sv_nit}, - * {@code th_vat}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, {@code ua_vat}, {@code - * us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code ve_rif}, {@code vn_tin}, or - * {@code za_vat} + * {@code li_vat}, {@code ma_vat}, {@code md_vat}, {@code mx_rfc}, {@code my_frp}, {@code + * my_itn}, {@code my_sst}, {@code ng_tin}, {@code no_vat}, {@code no_voec}, {@code nz_gst}, + * {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, {@code ro_tin}, {@code rs_pib}, {@code + * ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code sg_gst}, {@code sg_uen}, {@code si_tin}, + * {@code sv_nit}, {@code th_vat}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, {@code + * ua_vat}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code ve_rif}, + * {@code vn_tin}, or {@code za_vat} */ public Builder setType(TaxIdCreateParams.Type type) { this.type = type; @@ -425,6 +425,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("li_uid") LI_UID("li_uid"), + @SerializedName("li_vat") + LI_VAT("li_vat"), + @SerializedName("ma_vat") MA_VAT("ma_vat"), diff --git a/src/main/java/com/stripe/param/checkout/SessionCreateParams.java b/src/main/java/com/stripe/param/checkout/SessionCreateParams.java index c218bc18139..741a10291d6 100644 --- a/src/main/java/com/stripe/param/checkout/SessionCreateParams.java +++ b/src/main/java/com/stripe/param/checkout/SessionCreateParams.java @@ -13,6 +13,13 @@ @Getter public class SessionCreateParams extends ApiRequestParams { + /** + * Settings for price localization with Adaptive Pricing. + */ + @SerializedName("adaptive_pricing") + AdaptivePricing adaptivePricing; + /** Configure actions after a Checkout Session has expired. */ @SerializedName("after_expiration") AfterExpiration afterExpiration; @@ -352,6 +359,7 @@ public class SessionCreateParams extends ApiRequestParams { UiMode uiMode; private SessionCreateParams( + AdaptivePricing adaptivePricing, AfterExpiration afterExpiration, Boolean allowPromotionCodes, AutomaticTax automaticTax, @@ -394,6 +402,7 @@ private SessionCreateParams( String successUrl, TaxIdCollection taxIdCollection, UiMode uiMode) { + this.adaptivePricing = adaptivePricing; this.afterExpiration = afterExpiration; this.allowPromotionCodes = allowPromotionCodes; this.automaticTax = automaticTax; @@ -443,6 +452,8 @@ public static Builder builder() { } public static class Builder { + private AdaptivePricing adaptivePricing; + private AfterExpiration afterExpiration; private Boolean allowPromotionCodes; @@ -530,6 +541,7 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public SessionCreateParams build() { return new SessionCreateParams( + this.adaptivePricing, this.afterExpiration, this.allowPromotionCodes, this.automaticTax, @@ -574,6 +586,15 @@ public SessionCreateParams build() { this.uiMode); } + /** + * Settings for price localization with Adaptive Pricing. + */ + public Builder setAdaptivePricing(SessionCreateParams.AdaptivePricing adaptivePricing) { + this.adaptivePricing = adaptivePricing; + return this; + } + /** Configure actions after a Checkout Session has expired. */ public Builder setAfterExpiration(SessionCreateParams.AfterExpiration afterExpiration) { this.afterExpiration = afterExpiration; @@ -1124,6 +1145,84 @@ public Builder setUiMode(SessionCreateParams.UiMode uiMode) { } } + @Getter + public static class AdaptivePricing { + /** + * Set to {@code true} to enable Adaptive Pricing. + * Defaults to your dashboard + * setting. + */ + @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; + + private AdaptivePricing(Boolean enabled, Map extraParams) { + this.enabled = enabled; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Boolean enabled; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public SessionCreateParams.AdaptivePricing build() { + return new SessionCreateParams.AdaptivePricing(this.enabled, this.extraParams); + } + + /** + * Set to {@code true} to enable Adaptive Pricing. + * Defaults to your dashboard + * setting. + */ + 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 + * SessionCreateParams.AdaptivePricing#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 SessionCreateParams.AdaptivePricing#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 AfterExpiration { /** @@ -12228,6 +12327,10 @@ public static class SepaDebit { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** Additional fields for Mandate creation. */ + @SerializedName("mandate_options") + MandateOptions mandateOptions; + /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * @@ -12250,8 +12353,12 @@ public static class SepaDebit { @SerializedName("setup_future_usage") SetupFutureUsage setupFutureUsage; - private SepaDebit(Map extraParams, SetupFutureUsage setupFutureUsage) { + private SepaDebit( + Map extraParams, + MandateOptions mandateOptions, + SetupFutureUsage setupFutureUsage) { this.extraParams = extraParams; + this.mandateOptions = mandateOptions; this.setupFutureUsage = setupFutureUsage; } @@ -12262,12 +12369,14 @@ public static Builder builder() { public static class Builder { private Map extraParams; + private MandateOptions mandateOptions; + private SetupFutureUsage setupFutureUsage; /** Finalize and obtain parameter instance from this builder. */ public SessionCreateParams.PaymentMethodOptions.SepaDebit build() { return new SessionCreateParams.PaymentMethodOptions.SepaDebit( - this.extraParams, this.setupFutureUsage); + this.extraParams, this.mandateOptions, this.setupFutureUsage); } /** @@ -12298,6 +12407,13 @@ public Builder putAllExtraParam(Map map) { return this; } + /** Additional fields for Mandate creation. */ + public Builder setMandateOptions( + SessionCreateParams.PaymentMethodOptions.SepaDebit.MandateOptions mandateOptions) { + this.mandateOptions = mandateOptions; + return this; + } + /** * Indicates that you intend to make future payments with this PaymentIntent's payment * method. @@ -12325,6 +12441,67 @@ public Builder setSetupFutureUsage( } } + @Getter + public static class MandateOptions { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private MandateOptions(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public SessionCreateParams.PaymentMethodOptions.SepaDebit.MandateOptions build() { + return new SessionCreateParams.PaymentMethodOptions.SepaDebit.MandateOptions( + this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * SessionCreateParams.PaymentMethodOptions.SepaDebit.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 + * SessionCreateParams.PaymentMethodOptions.SepaDebit.MandateOptions#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @SerializedName("none") NONE("none"), @@ -13627,8 +13804,7 @@ public Builder setOnBehalfOf(String onBehalfOf) { public static class ShippingAddressCollection { /** * Required. An array of two-letter ISO country codes representing which - * countries Checkout should provide as options for shipping locations. Unsupported country - * codes: {@code AS, CX, CC, CU, HM, IR, KP, MH, FM, NF, MP, PW, SD, SY, UM, VI}. + * countries Checkout should provide as options for shipping locations. */ @SerializedName("allowed_countries") List allowedCountries; diff --git a/src/main/java/com/stripe/param/tax/CalculationCreateParams.java b/src/main/java/com/stripe/param/tax/CalculationCreateParams.java index a408d6ae5c3..5948d1f6023 100644 --- a/src/main/java/com/stripe/param/tax/CalculationCreateParams.java +++ b/src/main/java/com/stripe/param/tax/CalculationCreateParams.java @@ -634,13 +634,13 @@ public static class TaxId { * {@code eu_oss_vat}, {@code eu_vat}, {@code gb_vat}, {@code ge_vat}, {@code hk_br}, {@code * hr_oib}, {@code hu_tin}, {@code id_npwp}, {@code il_vat}, {@code in_gst}, {@code is_vat}, * {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, {@code ke_pin}, {@code kr_brn}, {@code - * kz_bin}, {@code li_uid}, {@code ma_vat}, {@code md_vat}, {@code mx_rfc}, {@code my_frp}, - * {@code my_itn}, {@code my_sst}, {@code ng_tin}, {@code no_vat}, {@code no_voec}, {@code - * nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, {@code ro_tin}, {@code rs_pib}, - * {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code sg_gst}, {@code sg_uen}, {@code - * si_tin}, {@code sv_nit}, {@code th_vat}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, - * {@code ua_vat}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code - * ve_rif}, {@code vn_tin}, or {@code za_vat} + * kz_bin}, {@code li_uid}, {@code li_vat}, {@code ma_vat}, {@code md_vat}, {@code mx_rfc}, + * {@code my_frp}, {@code my_itn}, {@code my_sst}, {@code ng_tin}, {@code no_vat}, {@code + * no_voec}, {@code nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, {@code ro_tin}, + * {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code sg_gst}, {@code + * sg_uen}, {@code si_tin}, {@code sv_nit}, {@code th_vat}, {@code tr_tin}, {@code tw_vat}, + * {@code tz_vat}, {@code ua_vat}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code + * uz_vat}, {@code ve_rif}, {@code vn_tin}, or {@code za_vat} */ @SerializedName("type") Type type; @@ -710,13 +710,13 @@ public Builder putAllExtraParam(Map map) { * {@code eu_oss_vat}, {@code eu_vat}, {@code gb_vat}, {@code ge_vat}, {@code hk_br}, {@code * hr_oib}, {@code hu_tin}, {@code id_npwp}, {@code il_vat}, {@code in_gst}, {@code is_vat}, * {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, {@code ke_pin}, {@code kr_brn}, {@code - * kz_bin}, {@code li_uid}, {@code ma_vat}, {@code md_vat}, {@code mx_rfc}, {@code my_frp}, - * {@code my_itn}, {@code my_sst}, {@code ng_tin}, {@code no_vat}, {@code no_voec}, {@code - * nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, {@code ro_tin}, {@code rs_pib}, - * {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code sg_gst}, {@code sg_uen}, {@code - * si_tin}, {@code sv_nit}, {@code th_vat}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, - * {@code ua_vat}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code - * ve_rif}, {@code vn_tin}, or {@code za_vat} + * kz_bin}, {@code li_uid}, {@code li_vat}, {@code ma_vat}, {@code md_vat}, {@code mx_rfc}, + * {@code my_frp}, {@code my_itn}, {@code my_sst}, {@code ng_tin}, {@code no_vat}, {@code + * no_voec}, {@code nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, {@code ro_tin}, + * {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code sg_gst}, {@code + * sg_uen}, {@code si_tin}, {@code sv_nit}, {@code th_vat}, {@code tr_tin}, {@code tw_vat}, + * {@code tz_vat}, {@code ua_vat}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code + * uz_vat}, {@code ve_rif}, {@code vn_tin}, or {@code za_vat} */ public Builder setType(CalculationCreateParams.CustomerDetails.TaxId.Type type) { this.type = type; @@ -869,6 +869,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("li_uid") LI_UID("li_uid"), + @SerializedName("li_vat") + LI_VAT("li_vat"), + @SerializedName("ma_vat") MA_VAT("ma_vat"), diff --git a/src/test/java/com/stripe/functional/LiveStripeResponseGetterTest.java b/src/test/java/com/stripe/functional/LiveStripeResponseGetterTest.java index afc1f623ff4..8a470940027 100644 --- a/src/test/java/com/stripe/functional/LiveStripeResponseGetterTest.java +++ b/src/test/java/com/stripe/functional/LiveStripeResponseGetterTest.java @@ -63,4 +63,19 @@ public void testIdempotencyError() throws StripeException { }); assertThat(exception.getMessage(), CoreMatchers.containsString("idempotency")); } + + @Test + public void testErrorWithJsonSyntaxException() throws Exception { + HttpClient spy = Mockito.spy(new HttpURLConnectionClient()); + StripeResponseGetter srg = new LiveStripeResponseGetter(spy); + ApiResource.setGlobalResponseGetter(srg); + StripeResponse response = + new StripeResponse(400, HttpHeaders.of(Collections.emptyMap()), "I am not JSON :)"); + Mockito.doReturn(response).when(spy).requestWithRetries(Mockito.any()); + assertThrows( + StripeException.class, + () -> { + Subscription.retrieve("sub_123"); + }); + } }