From cf6d05e2256cf1e48b43fbcd8844821250e1bfe0 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 22 Jan 2026 17:08:04 +0000 Subject: [PATCH] Update generated code for v2154 and --- CODEGEN_VERSION | 2 +- OPENAPI_VERSION | 2 +- src/main/java/com/stripe/ApiVersion.java | 2 +- .../java/com/stripe/model/AccountSession.java | 18 +- .../com/stripe/model/BalanceTransaction.java | 23 +- src/main/java/com/stripe/model/Charge.java | 22 +- .../com/stripe/model/ConfirmationToken.java | 20 +- .../stripe/model/EventDataClassLookup.java | 1 + src/main/java/com/stripe/model/Invoice.java | 46 +- .../stripe/model/PaymentAttemptRecord.java | 20 +- .../java/com/stripe/model/PaymentIntent.java | 33 +- .../java/com/stripe/model/PaymentLink.java | 2 +- .../java/com/stripe/model/PaymentMethod.java | 20 +- .../java/com/stripe/model/PaymentRecord.java | 20 +- .../java/com/stripe/model/SetupAttempt.java | 22 +- .../java/com/stripe/model/StripeError.java | 19 +- .../java/com/stripe/model/Subscription.java | 5 +- src/main/java/com/stripe/model/TaxId.java | 14 +- .../com/stripe/model/checkout/Session.java | 46 +- .../stripe/model/radar/PaymentEvaluation.java | 800 +++++++++ .../com/stripe/model/tax/Calculation.java | 28 +- .../com/stripe/model/tax/Transaction.java | 28 +- .../stripe/model/terminal/Configuration.java | 27 - .../stripe/model/treasury/ReceivedDebit.java | 7 + .../param/AccountSessionCreateParams.java | 36 +- .../param/BalanceTransactionListParams.java | 23 +- .../param/ConfirmationTokenCreateParams.java | 3 + .../com/stripe/param/CouponCreateParams.java | 10 +- .../stripe/param/CustomerCreateParams.java | 26 +- .../param/CustomerTaxIdCreateParams.java | 25 +- .../param/InvoiceCreatePreviewParams.java | 26 +- .../param/PaymentIntentCaptureParams.java | 43 +- .../param/PaymentIntentConfirmParams.java | 92 +- .../param/PaymentIntentCreateParams.java | 92 +- ...entIntentIncrementAuthorizationParams.java | 43 +- .../param/PaymentIntentUpdateParams.java | 92 +- .../stripe/param/PaymentLinkCreateParams.java | 22 +- .../stripe/param/PaymentLinkUpdateParams.java | 26 +- ...aymentMethodConfigurationCreateParams.java | 8 +- ...aymentMethodConfigurationUpdateParams.java | 8 +- .../param/PaymentMethodCreateParams.java | 3 + .../param/SetupIntentConfirmParams.java | 11 +- .../stripe/param/SetupIntentCreateParams.java | 11 +- .../stripe/param/SetupIntentUpdateParams.java | 11 +- .../param/TaxIdCollectionCreateParams.java | 25 +- .../com/stripe/param/TaxIdCreateParams.java | 25 +- .../param/checkout/SessionCreateParams.java | 72 +- .../radar/PaymentEvaluationCreateParams.java | 1483 +++++++++++++++++ .../param/tax/CalculationCreateParams.java | 26 +- .../terminal/ConfigurationCreateParams.java | 169 +- .../terminal/ConfigurationUpdateParams.java | 163 -- .../com/stripe/service/InvoiceService.java | 16 +- .../java/com/stripe/service/RadarService.java | 4 + .../service/checkout/SessionService.java | 16 +- .../radar/PaymentEvaluationService.java | 43 + 55 files changed, 3050 insertions(+), 830 deletions(-) create mode 100644 src/main/java/com/stripe/model/radar/PaymentEvaluation.java create mode 100644 src/main/java/com/stripe/param/radar/PaymentEvaluationCreateParams.java create mode 100644 src/main/java/com/stripe/service/radar/PaymentEvaluationService.java diff --git a/CODEGEN_VERSION b/CODEGEN_VERSION index 81e38dd3bef..f0d8c5cf5ee 100644 --- a/CODEGEN_VERSION +++ b/CODEGEN_VERSION @@ -1 +1 @@ -c250368ba89214c80bc8de3e4fc5d2094c5502cc \ No newline at end of file +8989becedb2153519066ec2233cbf5880b938188 \ No newline at end of file diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index ccb965af858..0ae8f96ced0 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v2152 \ No newline at end of file +v2154 \ No newline at end of file diff --git a/src/main/java/com/stripe/ApiVersion.java b/src/main/java/com/stripe/ApiVersion.java index 73206cf5c9e..e2e04d01544 100644 --- a/src/main/java/com/stripe/ApiVersion.java +++ b/src/main/java/com/stripe/ApiVersion.java @@ -2,6 +2,6 @@ package com.stripe; final class ApiVersion { - public static final String CURRENT = "2025-12-15.clover"; + public static final String CURRENT = "2026-01-28.clover"; public static final String CURRENT_MAJOR = "clover"; } diff --git a/src/main/java/com/stripe/model/AccountSession.java b/src/main/java/com/stripe/model/AccountSession.java index dee89664593..3c3d6afa5d6 100644 --- a/src/main/java/com/stripe/model/AccountSession.java +++ b/src/main/java/com/stripe/model/AccountSession.java @@ -322,9 +322,9 @@ public static class Features extends StripeObject { Boolean externalAccountCollection; /** - * Whether to allow creation of instant payouts. Defaults to {@code true} when {@code - * controller.losses.payments} is set to {@code stripe} for the account, otherwise {@code - * false}. + * Whether to allow creation of instant payouts. The default value is {@code enabled} when + * Stripe is responsible for negative account balances, and {@code use_dashboard_rules} + * otherwise. */ @SerializedName("instant_payouts") Boolean instantPayouts; @@ -538,9 +538,9 @@ public static class Features extends StripeObject { Boolean externalAccountCollection; /** - * Whether to allow creation of instant payouts. Defaults to {@code true} when {@code - * controller.losses.payments} is set to {@code stripe} for the account, otherwise {@code - * false}. + * Whether to allow creation of instant payouts. The default value is {@code enabled} when + * Stripe is responsible for negative account balances, and {@code use_dashboard_rules} + * otherwise. */ @SerializedName("instant_payouts") Boolean instantPayouts; @@ -902,9 +902,9 @@ public static class Features extends StripeObject { Boolean externalAccountCollection; /** - * Whether to allow creation of instant payouts. Defaults to {@code true} when {@code - * controller.losses.payments} is set to {@code stripe} for the account, otherwise {@code - * false}. + * Whether to allow creation of instant payouts. The default value is {@code enabled} when + * Stripe is responsible for negative account balances, and {@code use_dashboard_rules} + * otherwise. */ @SerializedName("instant_payouts") Boolean instantPayouts; diff --git a/src/main/java/com/stripe/model/BalanceTransaction.java b/src/main/java/com/stripe/model/BalanceTransaction.java index 85c7383900f..b8e639e7799 100644 --- a/src/main/java/com/stripe/model/BalanceTransaction.java +++ b/src/main/java/com/stripe/model/BalanceTransaction.java @@ -43,7 +43,8 @@ public class BalanceTransaction extends ApiResource implements HasId { /** * The balance that this transaction impacts. * - *

One of {@code issuing}, {@code payments}, or {@code refund_and_dispute_prefunding}. + *

One of {@code issuing}, {@code payments}, {@code refund_and_dispute_prefunding}, or {@code + * risk_reserved}. */ @SerializedName("balance_type") String balanceType; @@ -137,11 +138,11 @@ public class BalanceTransaction extends ApiResource implements HasId { * payment_network_reserve_release}, {@code payment_refund}, {@code payment_reversal}, {@code * payment_unreconciled}, {@code payout}, {@code payout_cancel}, {@code payout_failure}, {@code * payout_minimum_balance_hold}, {@code payout_minimum_balance_release}, {@code refund}, {@code - * refund_failure}, {@code reserve_transaction}, {@code reserved_funds}, {@code stripe_fee}, - * {@code stripe_fx_fee}, {@code stripe_balance_payment_debit}, {@code - * stripe_balance_payment_debit_reversal}, {@code tax_fee}, {@code topup}, {@code topup_reversal}, - * {@code transfer}, {@code transfer_cancel}, {@code transfer_failure}, or {@code - * transfer_refund}. Learn more about balance transaction types and * what they represent. To classify transactions for accounting purposes, consider {@code * reporting_category} instead. @@ -156,11 +157,11 @@ public class BalanceTransaction extends ApiResource implements HasId { * payment_network_reserve_release}, {@code payment_refund}, {@code payment_reversal}, {@code * payment_unreconciled}, {@code payout}, {@code payout_cancel}, {@code payout_failure}, {@code * payout_minimum_balance_hold}, {@code payout_minimum_balance_release}, {@code refund}, {@code - * refund_failure}, {@code reserve_transaction}, {@code reserved_funds}, {@code - * stripe_balance_payment_debit}, {@code stripe_balance_payment_debit_reversal}, {@code - * stripe_fee}, {@code stripe_fx_fee}, {@code tax_fee}, {@code topup}, {@code topup_reversal}, - * {@code transfer}, {@code transfer_cancel}, {@code transfer_failure}, or {@code - * transfer_refund}. + * refund_failure}, {@code reserve_hold}, {@code reserve_release}, {@code reserve_transaction}, + * {@code reserved_funds}, {@code stripe_balance_payment_debit}, {@code + * stripe_balance_payment_debit_reversal}, {@code stripe_fee}, {@code stripe_fx_fee}, {@code + * tax_fee}, {@code topup}, {@code topup_reversal}, {@code transfer}, {@code transfer_cancel}, + * {@code transfer_failure}, or {@code transfer_refund}. */ @SerializedName("type") String type; diff --git a/src/main/java/com/stripe/model/Charge.java b/src/main/java/com/stripe/model/Charge.java index 629e5bb1834..0152cd0599a 100644 --- a/src/main/java/com/stripe/model/Charge.java +++ b/src/main/java/com/stripe/model/Charge.java @@ -2218,7 +2218,7 @@ public static class ThreeDSecure extends StripeObject { /** * The version of 3D Secure that was used. * - *

One of {@code 1.0.2}, {@code 2.1.0}, or {@code 2.2.0}. + *

One of {@code 1.0.2}, {@code 2.1.0}, {@code 2.2.0}, {@code 2.3.0}, or {@code 2.3.1}. */ @SerializedName("version") String version; @@ -2851,11 +2851,11 @@ public static class Grabpay extends StripeObject { @EqualsAndHashCode(callSuper = false) public static class Ideal extends StripeObject { /** - * The customer's bank. Can be one of {@code abn_amro}, {@code asn_bank}, {@code bunq}, {@code - * buut}, {@code finom}, {@code handelsbanken}, {@code ing}, {@code knab}, {@code mollie}, - * {@code moneyou}, {@code n26}, {@code nn}, {@code rabobank}, {@code regiobank}, {@code - * revolut}, {@code sns_bank}, {@code triodos_bank}, {@code van_lanschot}, or {@code - * yoursafe}. + * The customer's bank. Can be one of {@code abn_amro}, {@code adyen}, {@code asn_bank}, + * {@code bunq}, {@code buut}, {@code finom}, {@code handelsbanken}, {@code ing}, {@code + * knab}, {@code mollie}, {@code moneyou}, {@code n26}, {@code nn}, {@code rabobank}, {@code + * regiobank}, {@code revolut}, {@code sns_bank}, {@code triodos_bank}, {@code van_lanschot}, + * or {@code yoursafe}. */ @SerializedName("bank") String bank; @@ -2863,11 +2863,11 @@ public static class Ideal extends StripeObject { /** * The Bank Identifier Code of the customer's bank. * - *

One of {@code ABNANL2A}, {@code ASNBNL21}, {@code BITSNL2A}, {@code BUNQNL2A}, {@code - * BUUTNL2A}, {@code FNOMNL22}, {@code FVLBNL22}, {@code HANDNL2A}, {@code INGBNL2A}, {@code - * KNABNL2H}, {@code MLLENL2A}, {@code MOYONL21}, {@code NNBANL2G}, {@code NTSBDEB1}, {@code - * RABONL2U}, {@code RBRBNL21}, {@code REVOIE23}, {@code REVOLT21}, {@code SNSBNL2A}, or - * {@code TRIONL2U}. + *

One of {@code ABNANL2A}, {@code ADYBNL2A}, {@code ASNBNL21}, {@code BITSNL2A}, {@code + * BUNQNL2A}, {@code BUUTNL2A}, {@code FNOMNL22}, {@code FVLBNL22}, {@code HANDNL2A}, {@code + * INGBNL2A}, {@code KNABNL2H}, {@code MLLENL2A}, {@code MOYONL21}, {@code NNBANL2G}, {@code + * NTSBDEB1}, {@code RABONL2U}, {@code RBRBNL21}, {@code REVOIE23}, {@code REVOLT21}, {@code + * SNSBNL2A}, or {@code TRIONL2U}. */ @SerializedName("bic") String bic; diff --git a/src/main/java/com/stripe/model/ConfirmationToken.java b/src/main/java/com/stripe/model/ConfirmationToken.java index ed10fcc1f40..4c4a570d1fe 100644 --- a/src/main/java/com/stripe/model/ConfirmationToken.java +++ b/src/main/java/com/stripe/model/ConfirmationToken.java @@ -1670,11 +1670,11 @@ public static class Grabpay extends StripeObject {} @EqualsAndHashCode(callSuper = false) public static class Ideal extends StripeObject { /** - * The customer's bank, if provided. Can be one of {@code abn_amro}, {@code asn_bank}, {@code - * bunq}, {@code buut}, {@code finom}, {@code handelsbanken}, {@code ing}, {@code knab}, - * {@code mollie}, {@code moneyou}, {@code n26}, {@code nn}, {@code rabobank}, {@code - * regiobank}, {@code revolut}, {@code sns_bank}, {@code triodos_bank}, {@code van_lanschot}, - * or {@code yoursafe}. + * The customer's bank, if provided. Can be one of {@code abn_amro}, {@code adyen}, {@code + * asn_bank}, {@code bunq}, {@code buut}, {@code finom}, {@code handelsbanken}, {@code ing}, + * {@code knab}, {@code mollie}, {@code moneyou}, {@code n26}, {@code nn}, {@code rabobank}, + * {@code regiobank}, {@code revolut}, {@code sns_bank}, {@code triodos_bank}, {@code + * van_lanschot}, or {@code yoursafe}. */ @SerializedName("bank") String bank; @@ -1682,11 +1682,11 @@ public static class Ideal extends StripeObject { /** * The Bank Identifier Code of the customer's bank, if the bank was provided. * - *

One of {@code ABNANL2A}, {@code ASNBNL21}, {@code BITSNL2A}, {@code BUNQNL2A}, {@code - * BUUTNL2A}, {@code FNOMNL22}, {@code FVLBNL22}, {@code HANDNL2A}, {@code INGBNL2A}, {@code - * KNABNL2H}, {@code MLLENL2A}, {@code MOYONL21}, {@code NNBANL2G}, {@code NTSBDEB1}, {@code - * RABONL2U}, {@code RBRBNL21}, {@code REVOIE23}, {@code REVOLT21}, {@code SNSBNL2A}, or - * {@code TRIONL2U}. + *

One of {@code ABNANL2A}, {@code ADYBNL2A}, {@code ASNBNL21}, {@code BITSNL2A}, {@code + * BUNQNL2A}, {@code BUUTNL2A}, {@code FNOMNL22}, {@code FVLBNL22}, {@code HANDNL2A}, {@code + * INGBNL2A}, {@code KNABNL2H}, {@code MLLENL2A}, {@code MOYONL21}, {@code NNBANL2G}, {@code + * NTSBDEB1}, {@code RABONL2U}, {@code RBRBNL21}, {@code REVOIE23}, {@code REVOLT21}, {@code + * SNSBNL2A}, or {@code TRIONL2U}. */ @SerializedName("bic") String bic; diff --git a/src/main/java/com/stripe/model/EventDataClassLookup.java b/src/main/java/com/stripe/model/EventDataClassLookup.java index 7796bfcb3b7..0d55bf2b35e 100644 --- a/src/main/java/com/stripe/model/EventDataClassLookup.java +++ b/src/main/java/com/stripe/model/EventDataClassLookup.java @@ -166,6 +166,7 @@ public final class EventDataClassLookup { classLookup.put("issuing.transaction", com.stripe.model.issuing.Transaction.class); classLookup.put("radar.early_fraud_warning", com.stripe.model.radar.EarlyFraudWarning.class); + classLookup.put("radar.payment_evaluation", com.stripe.model.radar.PaymentEvaluation.class); classLookup.put("radar.value_list", com.stripe.model.radar.ValueList.class); classLookup.put("radar.value_list_item", com.stripe.model.radar.ValueListItem.class); diff --git a/src/main/java/com/stripe/model/Invoice.java b/src/main/java/com/stripe/model/Invoice.java index 6fecb44be1f..5ee18bcf717 100644 --- a/src/main/java/com/stripe/model/Invoice.java +++ b/src/main/java/com/stripe/model/Invoice.java @@ -975,8 +975,8 @@ public Invoice attachPayment(InvoiceAttachPaymentParams params, RequestOptions o /** * This endpoint creates a draft invoice for a given customer. The invoice remains a draft until * you finalize the invoice, which - * allows you to pay or send the invoice to your customers. + * allows you to pay or send the invoice to your customers. */ public static Invoice create(Map params) throws StripeException { return create(params, (RequestOptions) null); @@ -985,8 +985,8 @@ public static Invoice create(Map params) throws StripeException /** * This endpoint creates a draft invoice for a given customer. The invoice remains a draft until * you finalize the invoice, which - * allows you to pay or send the invoice to your customers. + * allows you to pay or send the invoice to your customers. */ public static Invoice create(Map params, RequestOptions options) throws StripeException { @@ -999,8 +999,8 @@ public static Invoice create(Map params, RequestOptions options) /** * This endpoint creates a draft invoice for a given customer. The invoice remains a draft until * you finalize the invoice, which - * allows you to pay or send the invoice to your customers. + * allows you to pay or send the invoice to your customers. */ public static Invoice create(InvoiceCreateParams params) throws StripeException { return create(params, (RequestOptions) null); @@ -1009,8 +1009,8 @@ public static Invoice create(InvoiceCreateParams params) throws StripeException /** * This endpoint creates a draft invoice for a given customer. The invoice remains a draft until * you finalize the invoice, which - * allows you to pay or send the invoice to your customers. + * allows you to pay or send the invoice to your customers. */ public static Invoice create(InvoiceCreateParams params, RequestOptions options) throws StripeException { @@ -2105,21 +2105,21 @@ public static class CustomerTaxId extends StripeObject { * ro_tin}, {@code rs_pib}, {@code sv_nit}, {@code uy_ruc}, {@code ve_rif}, {@code vn_tin}, * {@code gb_vat}, {@code nz_gst}, {@code au_abn}, {@code au_arn}, {@code in_gst}, {@code * 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 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 al_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}, {@code ao_tin}, {@code bs_tin}, {@code bb_tin}, {@code cd_nif}, {@code - * mr_nif}, {@code me_pib}, {@code zw_tin}, {@code ba_tin}, {@code gn_nif}, {@code mk_vat}, - * {@code sr_fin}, {@code sn_ninea}, {@code am_tin}, {@code np_pan}, {@code tj_tin}, {@code - * ug_tin}, {@code zm_tin}, {@code kh_tin}, {@code aw_tin}, {@code az_tin}, {@code bd_bin}, - * {@code bj_ifu}, {@code et_tin}, {@code kg_tin}, {@code la_tin}, {@code cm_niu}, {@code - * cv_nif}, {@code bf_ifu}, or {@code unknown}. + * {@code ru_inn}, {@code ru_kpp}, {@code ca_bn}, {@code hk_br}, {@code es_cif}, {@code pl_nip}, + * {@code tw_vat}, {@code th_vat}, {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, {@code li_uid}, + * {@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 al_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}, {@code ao_tin}, {@code bs_tin}, {@code bb_tin}, {@code + * cd_nif}, {@code mr_nif}, {@code me_pib}, {@code zw_tin}, {@code ba_tin}, {@code gn_nif}, + * {@code mk_vat}, {@code sr_fin}, {@code sn_ninea}, {@code am_tin}, {@code np_pan}, {@code + * tj_tin}, {@code ug_tin}, {@code zm_tin}, {@code kh_tin}, {@code aw_tin}, {@code az_tin}, + * {@code bd_bin}, {@code bj_ifu}, {@code et_tin}, {@code kg_tin}, {@code la_tin}, {@code + * cm_niu}, {@code cv_nif}, {@code bf_ifu}, or {@code unknown}. */ @SerializedName("type") String type; diff --git a/src/main/java/com/stripe/model/PaymentAttemptRecord.java b/src/main/java/com/stripe/model/PaymentAttemptRecord.java index 41267ddb2c8..5e482e24bd6 100644 --- a/src/main/java/com/stripe/model/PaymentAttemptRecord.java +++ b/src/main/java/com/stripe/model/PaymentAttemptRecord.java @@ -1894,11 +1894,11 @@ public static class Grabpay extends StripeObject { @EqualsAndHashCode(callSuper = false) public static class Ideal extends StripeObject { /** - * The customer's bank. Can be one of {@code abn_amro}, {@code asn_bank}, {@code bunq}, {@code - * buut}, {@code finom}, {@code handelsbanken}, {@code ing}, {@code knab}, {@code mollie}, - * {@code moneyou}, {@code n26}, {@code nn}, {@code rabobank}, {@code regiobank}, {@code - * revolut}, {@code sns_bank}, {@code triodos_bank}, {@code van_lanschot}, or {@code - * yoursafe}. + * The customer's bank. Can be one of {@code abn_amro}, {@code adyen}, {@code asn_bank}, + * {@code bunq}, {@code buut}, {@code finom}, {@code handelsbanken}, {@code ing}, {@code + * knab}, {@code mollie}, {@code moneyou}, {@code n26}, {@code nn}, {@code rabobank}, {@code + * regiobank}, {@code revolut}, {@code sns_bank}, {@code triodos_bank}, {@code van_lanschot}, + * or {@code yoursafe}. */ @SerializedName("bank") String bank; @@ -1906,11 +1906,11 @@ public static class Ideal extends StripeObject { /** * The Bank Identifier Code of the customer's bank. * - *

One of {@code ABNANL2A}, {@code ASNBNL21}, {@code BITSNL2A}, {@code BUNQNL2A}, {@code - * BUUTNL2A}, {@code FNOMNL22}, {@code FVLBNL22}, {@code HANDNL2A}, {@code INGBNL2A}, {@code - * KNABNL2H}, {@code MLLENL2A}, {@code MOYONL21}, {@code NNBANL2G}, {@code NTSBDEB1}, {@code - * RABONL2U}, {@code RBRBNL21}, {@code REVOIE23}, {@code REVOLT21}, {@code SNSBNL2A}, or - * {@code TRIONL2U}. + *

One of {@code ABNANL2A}, {@code ADYBNL2A}, {@code ASNBNL21}, {@code BITSNL2A}, {@code + * BUNQNL2A}, {@code BUUTNL2A}, {@code FNOMNL22}, {@code FVLBNL22}, {@code HANDNL2A}, {@code + * INGBNL2A}, {@code KNABNL2H}, {@code MLLENL2A}, {@code MOYONL21}, {@code NNBANL2G}, {@code + * NTSBDEB1}, {@code RABONL2U}, {@code RBRBNL21}, {@code REVOIE23}, {@code REVOLT21}, {@code + * SNSBNL2A}, or {@code TRIONL2U}. */ @SerializedName("bic") String bic; diff --git a/src/main/java/com/stripe/model/PaymentIntent.java b/src/main/java/com/stripe/model/PaymentIntent.java index 8f41afcbe09..84c6559925f 100644 --- a/src/main/java/com/stripe/model/PaymentIntent.java +++ b/src/main/java/com/stripe/model/PaymentIntent.java @@ -1551,6 +1551,9 @@ public static class AmountDetails extends StripeObject { @SerializedName("discount_amount") Long discountAmount; + @SerializedName("error") + Errors error; + /** * A list of line items, each containing information about a product in the PaymentIntent. There * is a maximum of 200 line items. @@ -1567,6 +1570,28 @@ public static class AmountDetails extends StripeObject { @SerializedName("tip") Tip tip; + /** + * For more details about Errors, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Errors extends StripeObject { + /** + * The code of the error that occurred when validating the current amount details. + * + *

One of {@code amount_details_amount_mismatch}, or {@code + * amount_details_tax_shipping_discount_greater_than_amount}. + */ + @SerializedName("code") + String code; + + /** A message providing more details about the error. */ + @SerializedName("message") + String message; + } + /** * For more details about Shipping, please refer to the API Reference. @@ -5095,14 +5120,6 @@ public static class UsBankAccount extends StripeObject { @SerializedName("mandate_options") MandateOptions mandateOptions; - /** - * Preferred transaction settlement speed - * - *

One of {@code fastest}, or {@code standard}. - */ - @SerializedName("preferred_settlement_speed") - String preferredSettlementSpeed; - /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * diff --git a/src/main/java/com/stripe/model/PaymentLink.java b/src/main/java/com/stripe/model/PaymentLink.java index 55261a8c76f..e2f564dab47 100644 --- a/src/main/java/com/stripe/model/PaymentLink.java +++ b/src/main/java/com/stripe/model/PaymentLink.java @@ -96,7 +96,7 @@ public class PaymentLink extends ApiResource implements HasId, MetadataStore customFields; diff --git a/src/main/java/com/stripe/model/PaymentMethod.java b/src/main/java/com/stripe/model/PaymentMethod.java index 76646c88811..cf0854766b7 100644 --- a/src/main/java/com/stripe/model/PaymentMethod.java +++ b/src/main/java/com/stripe/model/PaymentMethod.java @@ -1924,11 +1924,11 @@ public static class Grabpay extends StripeObject {} @EqualsAndHashCode(callSuper = false) public static class Ideal extends StripeObject { /** - * The customer's bank, if provided. Can be one of {@code abn_amro}, {@code asn_bank}, {@code - * bunq}, {@code buut}, {@code finom}, {@code handelsbanken}, {@code ing}, {@code knab}, {@code - * mollie}, {@code moneyou}, {@code n26}, {@code nn}, {@code rabobank}, {@code regiobank}, - * {@code revolut}, {@code sns_bank}, {@code triodos_bank}, {@code van_lanschot}, or {@code - * yoursafe}. + * The customer's bank, if provided. Can be one of {@code abn_amro}, {@code adyen}, {@code + * asn_bank}, {@code bunq}, {@code buut}, {@code finom}, {@code handelsbanken}, {@code ing}, + * {@code knab}, {@code mollie}, {@code moneyou}, {@code n26}, {@code nn}, {@code rabobank}, + * {@code regiobank}, {@code revolut}, {@code sns_bank}, {@code triodos_bank}, {@code + * van_lanschot}, or {@code yoursafe}. */ @SerializedName("bank") String bank; @@ -1936,11 +1936,11 @@ public static class Ideal extends StripeObject { /** * The Bank Identifier Code of the customer's bank, if the bank was provided. * - *

One of {@code ABNANL2A}, {@code ASNBNL21}, {@code BITSNL2A}, {@code BUNQNL2A}, {@code - * BUUTNL2A}, {@code FNOMNL22}, {@code FVLBNL22}, {@code HANDNL2A}, {@code INGBNL2A}, {@code - * KNABNL2H}, {@code MLLENL2A}, {@code MOYONL21}, {@code NNBANL2G}, {@code NTSBDEB1}, {@code - * RABONL2U}, {@code RBRBNL21}, {@code REVOIE23}, {@code REVOLT21}, {@code SNSBNL2A}, or {@code - * TRIONL2U}. + *

One of {@code ABNANL2A}, {@code ADYBNL2A}, {@code ASNBNL21}, {@code BITSNL2A}, {@code + * BUNQNL2A}, {@code BUUTNL2A}, {@code FNOMNL22}, {@code FVLBNL22}, {@code HANDNL2A}, {@code + * INGBNL2A}, {@code KNABNL2H}, {@code MLLENL2A}, {@code MOYONL21}, {@code NNBANL2G}, {@code + * NTSBDEB1}, {@code RABONL2U}, {@code RBRBNL21}, {@code REVOIE23}, {@code REVOLT21}, {@code + * SNSBNL2A}, or {@code TRIONL2U}. */ @SerializedName("bic") String bic; diff --git a/src/main/java/com/stripe/model/PaymentRecord.java b/src/main/java/com/stripe/model/PaymentRecord.java index 15980fac033..1fedb45b0da 100644 --- a/src/main/java/com/stripe/model/PaymentRecord.java +++ b/src/main/java/com/stripe/model/PaymentRecord.java @@ -2196,11 +2196,11 @@ public static class Grabpay extends StripeObject { @EqualsAndHashCode(callSuper = false) public static class Ideal extends StripeObject { /** - * The customer's bank. Can be one of {@code abn_amro}, {@code asn_bank}, {@code bunq}, {@code - * buut}, {@code finom}, {@code handelsbanken}, {@code ing}, {@code knab}, {@code mollie}, - * {@code moneyou}, {@code n26}, {@code nn}, {@code rabobank}, {@code regiobank}, {@code - * revolut}, {@code sns_bank}, {@code triodos_bank}, {@code van_lanschot}, or {@code - * yoursafe}. + * The customer's bank. Can be one of {@code abn_amro}, {@code adyen}, {@code asn_bank}, + * {@code bunq}, {@code buut}, {@code finom}, {@code handelsbanken}, {@code ing}, {@code + * knab}, {@code mollie}, {@code moneyou}, {@code n26}, {@code nn}, {@code rabobank}, {@code + * regiobank}, {@code revolut}, {@code sns_bank}, {@code triodos_bank}, {@code van_lanschot}, + * or {@code yoursafe}. */ @SerializedName("bank") String bank; @@ -2208,11 +2208,11 @@ public static class Ideal extends StripeObject { /** * The Bank Identifier Code of the customer's bank. * - *

One of {@code ABNANL2A}, {@code ASNBNL21}, {@code BITSNL2A}, {@code BUNQNL2A}, {@code - * BUUTNL2A}, {@code FNOMNL22}, {@code FVLBNL22}, {@code HANDNL2A}, {@code INGBNL2A}, {@code - * KNABNL2H}, {@code MLLENL2A}, {@code MOYONL21}, {@code NNBANL2G}, {@code NTSBDEB1}, {@code - * RABONL2U}, {@code RBRBNL21}, {@code REVOIE23}, {@code REVOLT21}, {@code SNSBNL2A}, or - * {@code TRIONL2U}. + *

One of {@code ABNANL2A}, {@code ADYBNL2A}, {@code ASNBNL21}, {@code BITSNL2A}, {@code + * BUNQNL2A}, {@code BUUTNL2A}, {@code FNOMNL22}, {@code FVLBNL22}, {@code HANDNL2A}, {@code + * INGBNL2A}, {@code KNABNL2H}, {@code MLLENL2A}, {@code MOYONL21}, {@code NNBANL2G}, {@code + * NTSBDEB1}, {@code RABONL2U}, {@code RBRBNL21}, {@code REVOIE23}, {@code REVOLT21}, {@code + * SNSBNL2A}, or {@code TRIONL2U}. */ @SerializedName("bic") String bic; diff --git a/src/main/java/com/stripe/model/SetupAttempt.java b/src/main/java/com/stripe/model/SetupAttempt.java index 668b27f97c8..3d7a6f58788 100644 --- a/src/main/java/com/stripe/model/SetupAttempt.java +++ b/src/main/java/com/stripe/model/SetupAttempt.java @@ -673,7 +673,7 @@ public static class ThreeDSecure extends StripeObject { /** * The version of 3D Secure that was used. * - *

One of {@code 1.0.2}, {@code 2.1.0}, or {@code 2.2.0}. + *

One of {@code 1.0.2}, {@code 2.1.0}, {@code 2.2.0}, {@code 2.3.0}, or {@code 2.3.1}. */ @SerializedName("version") String version; @@ -798,11 +798,11 @@ public static class Cashapp extends StripeObject {} @EqualsAndHashCode(callSuper = false) public static class Ideal extends StripeObject { /** - * The customer's bank. Can be one of {@code abn_amro}, {@code asn_bank}, {@code bunq}, {@code - * buut}, {@code finom}, {@code handelsbanken}, {@code ing}, {@code knab}, {@code mollie}, - * {@code moneyou}, {@code n26}, {@code nn}, {@code rabobank}, {@code regiobank}, {@code - * revolut}, {@code sns_bank}, {@code triodos_bank}, {@code van_lanschot}, or {@code - * yoursafe}. + * The customer's bank. Can be one of {@code abn_amro}, {@code adyen}, {@code asn_bank}, + * {@code bunq}, {@code buut}, {@code finom}, {@code handelsbanken}, {@code ing}, {@code + * knab}, {@code mollie}, {@code moneyou}, {@code n26}, {@code nn}, {@code rabobank}, {@code + * regiobank}, {@code revolut}, {@code sns_bank}, {@code triodos_bank}, {@code van_lanschot}, + * or {@code yoursafe}. */ @SerializedName("bank") String bank; @@ -810,11 +810,11 @@ public static class Ideal extends StripeObject { /** * The Bank Identifier Code of the customer's bank. * - *

One of {@code ABNANL2A}, {@code ASNBNL21}, {@code BITSNL2A}, {@code BUNQNL2A}, {@code - * BUUTNL2A}, {@code FNOMNL22}, {@code FVLBNL22}, {@code HANDNL2A}, {@code INGBNL2A}, {@code - * KNABNL2H}, {@code MLLENL2A}, {@code MOYONL21}, {@code NNBANL2G}, {@code NTSBDEB1}, {@code - * RABONL2U}, {@code RBRBNL21}, {@code REVOIE23}, {@code REVOLT21}, {@code SNSBNL2A}, or - * {@code TRIONL2U}. + *

One of {@code ABNANL2A}, {@code ADYBNL2A}, {@code ASNBNL21}, {@code BITSNL2A}, {@code + * BUNQNL2A}, {@code BUUTNL2A}, {@code FNOMNL22}, {@code FVLBNL22}, {@code HANDNL2A}, {@code + * INGBNL2A}, {@code KNABNL2H}, {@code MLLENL2A}, {@code MOYONL21}, {@code NNBANL2G}, {@code + * NTSBDEB1}, {@code RABONL2U}, {@code RBRBNL21}, {@code REVOIE23}, {@code REVOLT21}, {@code + * SNSBNL2A}, or {@code TRIONL2U}. */ @SerializedName("bic") String bic; diff --git a/src/main/java/com/stripe/model/StripeError.java b/src/main/java/com/stripe/model/StripeError.java index fe99381b2d3..9b94fbe4faf 100644 --- a/src/main/java/com/stripe/model/StripeError.java +++ b/src/main/java/com/stripe/model/StripeError.java @@ -92,15 +92,16 @@ public class StripeError extends StripeObject { * payouts_limit_exceeded}, {@code payouts_not_allowed}, {@code platform_account_required}, {@code * platform_api_key_expired}, {@code postal_code_invalid}, {@code processing_error}, {@code * product_inactive}, {@code progressive_onboarding_limit_exceeded}, {@code rate_limit}, {@code - * refer_to_customer}, {@code refund_disputed_payment}, {@code resource_already_exists}, {@code - * resource_missing}, {@code return_intent_already_processed}, {@code routing_number_invalid}, - * {@code secret_key_required}, {@code sepa_unsupported_account}, {@code setup_attempt_failed}, - * {@code setup_intent_authentication_failure}, {@code setup_intent_invalid_parameter}, {@code - * setup_intent_mandate_invalid}, {@code setup_intent_mobile_wallet_unsupported}, {@code - * setup_intent_setup_attempt_expired}, {@code setup_intent_unexpected_state}, {@code - * shipping_address_invalid}, {@code shipping_calculation_failed}, {@code sku_inactive}, {@code - * state_unsupported}, {@code status_transition_invalid}, {@code stripe_tax_inactive}, {@code - * tax_id_invalid}, {@code tax_id_prohibited}, {@code taxes_calculation_failed}, {@code + * refer_to_customer}, {@code refund_disputed_payment}, {@code request_blocked}, {@code + * resource_already_exists}, {@code resource_missing}, {@code return_intent_already_processed}, + * {@code routing_number_invalid}, {@code secret_key_required}, {@code sepa_unsupported_account}, + * {@code setup_attempt_failed}, {@code setup_intent_authentication_failure}, {@code + * setup_intent_invalid_parameter}, {@code setup_intent_mandate_invalid}, {@code + * setup_intent_mobile_wallet_unsupported}, {@code setup_intent_setup_attempt_expired}, {@code + * setup_intent_unexpected_state}, {@code shipping_address_invalid}, {@code + * shipping_calculation_failed}, {@code sku_inactive}, {@code state_unsupported}, {@code + * status_transition_invalid}, {@code stripe_tax_inactive}, {@code tax_id_invalid}, {@code + * tax_id_prohibited}, {@code taxes_calculation_failed}, {@code * terminal_location_country_unsupported}, {@code terminal_reader_busy}, {@code * terminal_reader_hardware_fault}, {@code terminal_reader_invalid_location_for_activation}, * {@code terminal_reader_invalid_location_for_payment}, {@code terminal_reader_offline}, {@code diff --git a/src/main/java/com/stripe/model/Subscription.java b/src/main/java/com/stripe/model/Subscription.java index 0c11ec277b2..e5486348fe1 100644 --- a/src/main/java/com/stripe/model/Subscription.java +++ b/src/main/java/com/stripe/model/Subscription.java @@ -206,7 +206,10 @@ public class Subscription extends ApiResource implements HasId, MetadataStore customFields; @@ -836,8 +836,8 @@ public static Session retrieve( /** * Updates a Checkout Session object. * - *

Related guide: Dynamically - * update Checkout. + *

Related guide: Dynamically + * update a Checkout Session. */ @Override public Session update(Map params) throws StripeException { @@ -847,8 +847,8 @@ public Session update(Map params) throws StripeException { /** * Updates a Checkout Session object. * - *

Related guide: Dynamically - * update Checkout. + *

Related guide: Dynamically + * update a Checkout Session. */ @Override public Session update(Map params, RequestOptions options) throws StripeException { @@ -861,8 +861,8 @@ public Session update(Map params, RequestOptions options) throws /** * Updates a Checkout Session object. * - *

Related guide: Dynamically - * update Checkout. + *

Related guide: Dynamically + * update a Checkout Session. */ public Session update(SessionUpdateParams params) throws StripeException { return update(params, (RequestOptions) null); @@ -871,8 +871,8 @@ public Session update(SessionUpdateParams params) throws StripeException { /** * Updates a Checkout Session object. * - *

Related guide: Dynamically - * update Checkout. + *

Related guide: Dynamically + * update a Checkout Session. */ public Session update(SessionUpdateParams params, RequestOptions options) throws StripeException { String path = String.format("/v1/checkout/sessions/%s", ApiResource.urlEncodeId(this.getId())); @@ -1577,20 +1577,20 @@ public static class TaxId extends StripeObject { * {@code gb_vat}, {@code nz_gst}, {@code au_abn}, {@code au_arn}, {@code in_gst}, {@code * 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 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 al_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}, {@code ao_tin}, {@code bs_tin}, {@code bb_tin}, - * {@code cd_nif}, {@code mr_nif}, {@code me_pib}, {@code zw_tin}, {@code ba_tin}, {@code - * gn_nif}, {@code mk_vat}, {@code sr_fin}, {@code sn_ninea}, {@code am_tin}, {@code np_pan}, - * {@code tj_tin}, {@code ug_tin}, {@code zm_tin}, {@code kh_tin}, {@code aw_tin}, {@code - * az_tin}, {@code bd_bin}, {@code bj_ifu}, {@code et_tin}, {@code kg_tin}, {@code la_tin}, - * {@code cm_niu}, {@code cv_nif}, {@code bf_ifu}, or {@code unknown}. + * pl_nip}, {@code tw_vat}, {@code th_vat}, {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, + * {@code li_uid}, {@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 al_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}, {@code ao_tin}, {@code bs_tin}, + * {@code bb_tin}, {@code cd_nif}, {@code mr_nif}, {@code me_pib}, {@code zw_tin}, {@code + * ba_tin}, {@code gn_nif}, {@code mk_vat}, {@code sr_fin}, {@code sn_ninea}, {@code am_tin}, + * {@code np_pan}, {@code tj_tin}, {@code ug_tin}, {@code zm_tin}, {@code kh_tin}, {@code + * aw_tin}, {@code az_tin}, {@code bd_bin}, {@code bj_ifu}, {@code et_tin}, {@code kg_tin}, + * {@code la_tin}, {@code cm_niu}, {@code cv_nif}, {@code bf_ifu}, or {@code unknown}. */ @SerializedName("type") String type; diff --git a/src/main/java/com/stripe/model/radar/PaymentEvaluation.java b/src/main/java/com/stripe/model/radar/PaymentEvaluation.java new file mode 100644 index 00000000000..87e169804d9 --- /dev/null +++ b/src/main/java/com/stripe/model/radar/PaymentEvaluation.java @@ -0,0 +1,800 @@ +// File generated from our OpenAPI spec +package com.stripe.model.radar; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.ExpandableField; +import com.stripe.model.HasId; +import com.stripe.model.PaymentMethod; +import com.stripe.model.StripeObject; +import com.stripe.net.ApiRequest; +import com.stripe.net.ApiRequestParams; +import com.stripe.net.ApiResource; +import com.stripe.net.BaseAddress; +import com.stripe.net.RequestOptions; +import com.stripe.net.StripeResponseGetter; +import com.stripe.param.radar.PaymentEvaluationCreateParams; +import java.math.BigDecimal; +import java.util.List; +import java.util.Map; +import lombok.EqualsAndHashCode; +import lombok.Getter; +import lombok.Setter; + +/** + * Payment Evaluations represent the risk lifecycle of an externally processed payment. It includes + * the Radar risk score from Stripe, payment outcome taken by the merchant or processor, and any + * post transaction events, such as refunds or disputes. See the Radar API guide for integration steps. + */ +@Getter +@Setter +@EqualsAndHashCode(callSuper = false) +public class PaymentEvaluation extends ApiResource implements HasId { + /** Client device metadata attached to this payment evaluation. */ + @SerializedName("client_device_metadata_details") + ClientDeviceMetadataDetails clientDeviceMetadataDetails; + + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + @SerializedName("created_at") + Long createdAt; + + /** Customer details attached to this payment evaluation. */ + @SerializedName("customer_details") + CustomerDetails customerDetails; + + /** + * Event information associated with the payment evaluation, such as refunds, dispute, early fraud + * warnings, or user interventions. + */ + @SerializedName("events") + List events; + + /** Unique identifier for the object. */ + @Getter(onMethod_ = {@Override}) + @SerializedName("id") + String id; + + /** Collection of scores and insights for this payment evaluation. */ + @SerializedName("insights") + Insights insights; + + /** + * 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; + + /** + * 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. + * + *

Equal to {@code radar.payment_evaluation}. + */ + @SerializedName("object") + String object; + + /** Indicates the final outcome for the payment evaluation. */ + @SerializedName("outcome") + Outcome outcome; + + /** Payment details attached to this payment evaluation. */ + @SerializedName("payment_details") + PaymentDetails paymentDetails; + + /** + * Request a Radar API fraud risk score from Stripe for a payment before sending it for external + * processor authorization. + */ + public static PaymentEvaluation create(Map params) throws StripeException { + return create(params, (RequestOptions) null); + } + + /** + * Request a Radar API fraud risk score from Stripe for a payment before sending it for external + * processor authorization. + */ + public static PaymentEvaluation create(Map params, RequestOptions options) + throws StripeException { + String path = "/v1/radar/payment_evaluations"; + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, params, options); + return getGlobalResponseGetter().request(request, PaymentEvaluation.class); + } + + /** + * Request a Radar API fraud risk score from Stripe for a payment before sending it for external + * processor authorization. + */ + public static PaymentEvaluation create(PaymentEvaluationCreateParams params) + throws StripeException { + return create(params, (RequestOptions) null); + } + + /** + * Request a Radar API fraud risk score from Stripe for a payment before sending it for external + * processor authorization. + */ + public static PaymentEvaluation create( + PaymentEvaluationCreateParams params, RequestOptions options) throws StripeException { + String path = "/v1/radar/payment_evaluations"; + ApiResource.checkNullTypedParams(path, params); + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return getGlobalResponseGetter().request(request, PaymentEvaluation.class); + } + + /** Client device metadata attached to this payment evaluation. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class ClientDeviceMetadataDetails extends StripeObject { + /** + * ID for the Radar Session associated with the payment evaluation. A Radar Session is a snapshot of the + * browser metadata and device details that help Radar make more accurate predictions on your + * payments. + */ + @SerializedName("radar_session") + String radarSession; + } + + /** Customer details attached to this payment evaluation. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class CustomerDetails extends StripeObject { + /** The ID of the customer associated with the payment evaluation. */ + @SerializedName("customer") + String customer; + + /** The ID of the Account representing the customer associated with the payment evaluation. */ + @SerializedName("customer_account") + String customerAccount; + + /** The customer's email address. */ + @SerializedName("email") + String email; + + /** The customer's full name or business name. */ + @SerializedName("name") + String name; + + /** The customer's phone number. */ + @SerializedName("phone") + String phone; + } + + /** Event reported for this payment evaluation. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Event extends StripeObject { + /** Dispute opened event details attached to this payment evaluation. */ + @SerializedName("dispute_opened") + DisputeOpened disputeOpened; + + /** Early Fraud Warning Received event details attached to this payment evaluation. */ + @SerializedName("early_fraud_warning_received") + EarlyFraudWarningReceived earlyFraudWarningReceived; + + /** Timestamp when the event occurred. */ + @SerializedName("occurred_at") + Long occurredAt; + + /** Refunded Event details attached to this payment evaluation. */ + @SerializedName("refunded") + Refunded refunded; + + /** + * Indicates the type of event attached to the payment evaluation. + * + *

One of {@code dispute_opened}, {@code early_fraud_warning_received}, {@code refunded}, + * {@code user_intervention_raised}, or {@code user_intervention_resolved}. + */ + @SerializedName("type") + String type; + + /** User intervention raised event details attached to this payment evaluation. */ + @SerializedName("user_intervention_raised") + UserInterventionRaised userInterventionRaised; + + /** User Intervention Resolved Event details attached to this payment evaluation. */ + @SerializedName("user_intervention_resolved") + UserInterventionResolved userInterventionResolved; + + /** Dispute opened event details attached to this payment evaluation. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class DisputeOpened extends StripeObject { + /** + * Amount to dispute for this payment. A positive integer representing how much to charge in + * the smallest currency unit + * (for example, 100 cents to charge 1.00 USD or 100 to charge 100 Yen, a zero-decimal + * currency). + */ + @SerializedName("amount") + Long amount; + + /** + * Three-letter ISO currency + * code, in lowercase. Must be a supported + * currency. + */ + @SerializedName("currency") + String currency; + + /** + * Reason given by cardholder for dispute. + * + *

One of {@code account_not_available}, {@code credit_not_processed}, {@code + * customer_initiated}, {@code duplicate}, {@code fraudulent}, {@code general}, {@code + * noncompliant}, {@code product_not_received}, {@code product_unacceptable}, {@code + * subscription_canceled}, or {@code unrecognized}. + */ + @SerializedName("reason") + String reason; + } + + /** Early Fraud Warning Received event details attached to this payment evaluation. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class EarlyFraudWarningReceived extends StripeObject { + /** + * The type of fraud labeled by the issuer. + * + *

One of {@code made_with_lost_card}, {@code made_with_stolen_card}, {@code other}, or + * {@code unauthorized_use_of_card}. + */ + @SerializedName("fraud_type") + String fraudType; + } + + /** Refunded Event details attached to this payment evaluation. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Refunded extends StripeObject { + /** + * Amount refunded for this payment. A positive integer representing how much to charge in the smallest currency unit (for + * example, 100 cents to charge 1.00 USD or 100 to charge 100 Yen, a zero-decimal currency). + */ + @SerializedName("amount") + Long amount; + + /** + * Three-letter ISO currency + * code, in lowercase. Must be a supported + * currency. + */ + @SerializedName("currency") + String currency; + + /** + * Indicates the reason for the refund. + * + *

One of {@code duplicate}, {@code fraudulent}, {@code other}, or {@code + * requested_by_customer}. + */ + @SerializedName("reason") + String reason; + } + + /** User intervention raised event details attached to this payment evaluation. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class UserInterventionRaised extends StripeObject { + /** User intervention raised custom event details attached to this payment evaluation. */ + @SerializedName("custom") + Custom custom; + + /** Unique identifier for the user intervention event. */ + @SerializedName("key") + String key; + + /** + * Type of user intervention raised. + * + *

One of {@code 3ds}, {@code captcha}, or {@code custom}. + */ + @SerializedName("type") + String type; + + /** User intervention raised custom event details attached to this payment evaluation. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Custom extends StripeObject { + /** + * Custom type of user intervention raised. The string must use a snake case description for + * the type of intervention performed. + */ + @SerializedName("type") + String type; + } + } + + /** User Intervention Resolved Event details attached to this payment evaluation. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class UserInterventionResolved extends StripeObject { + /** Unique ID of this intervention. Use this to provide the result. */ + @SerializedName("key") + String key; + + /** + * Result of the intervention if it has been completed. + * + *

One of {@code abandoned}, {@code failed}, or {@code passed}. + */ + @SerializedName("outcome") + String outcome; + } + } + + /** Collection of scores and insights for this payment evaluation. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Insights extends StripeObject { + /** Stripe Radar's evaluation of the likelihood of a card issuer decline on this payment. */ + @SerializedName("card_issuer_decline") + CardIssuerDecline cardIssuerDecline; + + /** The timestamp when the evaluation was performed. */ + @SerializedName("evaluated_at") + Long evaluatedAt; + + /** Scores, insights and recommended action for one scorer for this PaymentEvaluation. */ + @SerializedName("fraudulent_dispute") + FraudulentDispute fraudulentDispute; + + /** + * Provides Stripe Radar's evaluation of the likelihood that a payment will be declined by the + * card issuer. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class CardIssuerDecline extends StripeObject { + /** + * Stripe Radar's evaluation of the likelihood that the payment will be declined by the card + * issuer. Scores range from 0 to 100, with higher values indicating a higher likelihood of + * decline. + */ + @SerializedName("model_score") + BigDecimal modelScore; + + /** + * Recommended action based on the model score. Possible values are {@code block} and {@code + * continue}. + * + *

One of {@code block}, or {@code continue}. + */ + @SerializedName("recommended_action") + String recommendedAction; + } + + /** Scores, insights and recommended action for one scorer for this PaymentEvaluation. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class FraudulentDispute extends StripeObject { + /** + * Recommended action based on the risk score. Possible values are {@code block} and {@code + * continue}. + * + *

One of {@code block}, or {@code continue}. + */ + @SerializedName("recommended_action") + String recommendedAction; + + /** + * Stripe Radar’s evaluation of the risk level of the payment. Possible values for evaluated + * payments are between 0 and 100, with higher scores indicating higher risk. + */ + @SerializedName("risk_score") + Long riskScore; + } + } + + /** Outcome details for this payment evaluation. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Outcome extends StripeObject { + /** Details of a merchant_blocked outcome attached to this payment evaluation. */ + @SerializedName("merchant_blocked") + MerchantBlocked merchantBlocked; + + /** The PaymentIntent ID associated with the payment evaluation. */ + @SerializedName("payment_intent_id") + String paymentIntentId; + + /** Details of an rejected outcome attached to this payment evaluation. */ + @SerializedName("rejected") + Rejected rejected; + + /** Details of a succeeded outcome attached to this payment evaluation. */ + @SerializedName("succeeded") + Succeeded succeeded; + + /** + * Indicates the outcome of the payment evaluation. + * + *

One of {@code failed}, {@code merchant_blocked}, {@code rejected}, or {@code succeeded}. + */ + @SerializedName("type") + String type; + + /** Details of a merchant_blocked outcome attached to this payment evaluation. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class MerchantBlocked extends StripeObject { + /** + * The reason the payment was blocked by the merchant. + * + *

One of {@code authentication_required}, {@code blocked_for_fraud}, {@code + * invalid_payment}, or {@code other}. + */ + @SerializedName("reason") + String reason; + } + + /** Details of an rejected outcome attached to this payment evaluation. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Rejected extends StripeObject { + /** Details of an rejected card outcome attached to this payment evaluation. */ + @SerializedName("card") + Card card; + + /** Details of an rejected card outcome attached to this payment evaluation. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Card extends StripeObject { + /** + * Result of the address line 1 check. + * + *

One of {@code fail}, {@code pass}, {@code unavailable}, or {@code unchecked}. + */ + @SerializedName("address_line1_check") + String addressLine1Check; + + /** + * Indicates whether the cardholder provided a postal code and if it matched the + * cardholder’s billing address. + * + *

One of {@code fail}, {@code pass}, {@code unavailable}, or {@code unchecked}. + */ + @SerializedName("address_postal_code_check") + String addressPostalCodeCheck; + + /** + * Result of the CVC check. + * + *

One of {@code fail}, {@code pass}, {@code unavailable}, or {@code unchecked}. + */ + @SerializedName("cvc_check") + String cvcCheck; + + /** + * Card issuer's reason for the network decline. + * + *

One of {@code authentication_failed}, {@code do_not_honor}, {@code expired}, {@code + * incorrect_cvc}, {@code incorrect_number}, {@code incorrect_postal_code}, {@code + * insufficient_funds}, {@code invalid_account}, {@code lost_card}, {@code other}, {@code + * processing_error}, {@code reported_stolen}, or {@code try_again_later}. + */ + @SerializedName("reason") + String reason; + } + } + + /** Details of a succeeded outcome attached to this payment evaluation. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Succeeded extends StripeObject { + /** Details of an succeeded card outcome attached to this payment evaluation. */ + @SerializedName("card") + Card card; + + /** Details of an succeeded card outcome attached to this payment evaluation. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Card extends StripeObject { + /** + * Result of the address line 1 check. + * + *

One of {@code fail}, {@code pass}, {@code unavailable}, or {@code unchecked}. + */ + @SerializedName("address_line1_check") + String addressLine1Check; + + /** + * Indicates whether the cardholder provided a postal code and if it matched the + * cardholder’s billing address. + * + *

One of {@code fail}, {@code pass}, {@code unavailable}, or {@code unchecked}. + */ + @SerializedName("address_postal_code_check") + String addressPostalCodeCheck; + + /** + * Result of the CVC check. + * + *

One of {@code fail}, {@code pass}, {@code unavailable}, or {@code unchecked}. + */ + @SerializedName("cvc_check") + String cvcCheck; + } + } + } + + /** Payment details attached to this payment evaluation. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class PaymentDetails extends StripeObject { + /** + * Amount intended to be collected by this payment. A positive integer representing how much to + * charge in the smallest currency + * unit (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). + * The minimum amount is $0.50 US or equivalent in + * charge currency. The amount value supports up to eight digits (e.g., a value of 99999999 + * for a USD charge of $999,999.99). + */ + @SerializedName("amount") + Long amount; + + /** + * Three-letter ISO currency + * code, in lowercase. Must be a supported + * currency. + */ + @SerializedName("currency") + String currency; + + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + @SerializedName("description") + String description; + + /** Details about the payment's customer presence and type. */ + @SerializedName("money_movement_details") + MoneyMovementDetails moneyMovementDetails; + + /** Details about the payment method used for the payment. */ + @SerializedName("payment_method_details") + PaymentMethodDetails paymentMethodDetails; + + /** Shipping details for the payment evaluation. */ + @SerializedName("shipping_details") + ShippingDetails shippingDetails; + + /** Payment statement descriptor. */ + @SerializedName("statement_descriptor") + String statementDescriptor; + + /** Money Movement details attached to this payment. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class MoneyMovementDetails extends StripeObject { + /** Describes card money movement details for the payment evaluation. */ + @SerializedName("card") + Card card; + + /** + * Describes the type of money movement. Currently only {@code card} is supported. + * + *

Equal to {@code card}. + */ + @SerializedName("money_movement_type") + String moneyMovementType; + + /** Money Movement card details attached to this payment. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Card extends StripeObject { + /** + * Describes the presence of the customer during the payment. + * + *

One of {@code off_session}, or {@code on_session}. + */ + @SerializedName("customer_presence") + String customerPresence; + + /** + * Describes the type of payment. + * + *

One of {@code one_off}, {@code recurring}, {@code setup_one_off}, or {@code + * setup_recurring}. + */ + @SerializedName("payment_type") + String paymentType; + } + } + + /** Payment method details attached to this payment evaluation. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class PaymentMethodDetails extends StripeObject { + /** Billing information associated with the payment evaluation. */ + @SerializedName("billing_details") + BillingDetails billingDetails; + + /** The payment method used in this payment evaluation. */ + @SerializedName("payment_method") + @Getter(lombok.AccessLevel.NONE) + @Setter(lombok.AccessLevel.NONE) + ExpandableField paymentMethod; + + /** Get ID of expandable {@code paymentMethod} object. */ + public String getPaymentMethod() { + return (this.paymentMethod != null) ? this.paymentMethod.getId() : null; + } + + public void setPaymentMethod(String id) { + this.paymentMethod = ApiResource.setExpandableFieldId(id, this.paymentMethod); + } + + /** Get expanded {@code paymentMethod}. */ + public PaymentMethod getPaymentMethodObject() { + return (this.paymentMethod != null) ? this.paymentMethod.getExpanded() : null; + } + + public void setPaymentMethodObject(PaymentMethod expandableObject) { + this.paymentMethod = + new ExpandableField(expandableObject.getId(), expandableObject); + } + + /** Billing details attached to this payment evaluation. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class BillingDetails extends StripeObject { + /** Address data. */ + @SerializedName("address") + Address address; + + /** Email address. */ + @SerializedName("email") + String email; + + /** Full name. */ + @SerializedName("name") + String name; + + /** Billing phone number (including extension). */ + @SerializedName("phone") + String phone; + + /** Address data. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Address extends StripeObject { + /** City, district, suburb, town, or village. */ + @SerializedName("city") + String city; + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + @SerializedName("country") + String country; + + /** Address line 1, such as the street, PO Box, or company name. */ + @SerializedName("line1") + String line1; + + /** Address line 2, such as the apartment, suite, unit, or building. */ + @SerializedName("line2") + String line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + String postalCode; + + /** + * State, county, province, or region (ISO 3166-2). + */ + @SerializedName("state") + String state; + } + } + } + + /** Shipping details attached to this payment. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class ShippingDetails extends StripeObject { + /** Address data. */ + @SerializedName("address") + Address address; + + /** Shipping name. */ + @SerializedName("name") + String name; + + /** Shipping phone number. */ + @SerializedName("phone") + String phone; + + /** Address data. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Address extends StripeObject { + /** City, district, suburb, town, or village. */ + @SerializedName("city") + String city; + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + @SerializedName("country") + String country; + + /** Address line 1, such as the street, PO Box, or company name. */ + @SerializedName("line1") + String line1; + + /** Address line 2, such as the apartment, suite, unit, or building. */ + @SerializedName("line2") + String line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + String postalCode; + + /** + * State, county, province, or region (ISO 3166-2). + */ + @SerializedName("state") + String state; + } + } + } + + @Override + public void setResponseGetter(StripeResponseGetter responseGetter) { + super.setResponseGetter(responseGetter); + trySetResponseGetter(clientDeviceMetadataDetails, responseGetter); + trySetResponseGetter(customerDetails, responseGetter); + trySetResponseGetter(insights, responseGetter); + trySetResponseGetter(outcome, responseGetter); + trySetResponseGetter(paymentDetails, responseGetter); + } +} diff --git a/src/main/java/com/stripe/model/tax/Calculation.java b/src/main/java/com/stripe/model/tax/Calculation.java index 4f2a4219eb2..8dc6f167c73 100644 --- a/src/main/java/com/stripe/model/tax/Calculation.java +++ b/src/main/java/com/stripe/model/tax/Calculation.java @@ -326,20 +326,20 @@ public static class TaxId extends StripeObject { * {@code gb_vat}, {@code nz_gst}, {@code au_abn}, {@code au_arn}, {@code in_gst}, {@code * 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 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 al_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}, {@code ao_tin}, {@code bs_tin}, {@code bb_tin}, - * {@code cd_nif}, {@code mr_nif}, {@code me_pib}, {@code zw_tin}, {@code ba_tin}, {@code - * gn_nif}, {@code mk_vat}, {@code sr_fin}, {@code sn_ninea}, {@code am_tin}, {@code np_pan}, - * {@code tj_tin}, {@code ug_tin}, {@code zm_tin}, {@code kh_tin}, {@code aw_tin}, {@code - * az_tin}, {@code bd_bin}, {@code bj_ifu}, {@code et_tin}, {@code kg_tin}, {@code la_tin}, - * {@code cm_niu}, {@code cv_nif}, {@code bf_ifu}, or {@code unknown}. + * pl_nip}, {@code tw_vat}, {@code th_vat}, {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, + * {@code li_uid}, {@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 al_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}, {@code ao_tin}, {@code bs_tin}, + * {@code bb_tin}, {@code cd_nif}, {@code mr_nif}, {@code me_pib}, {@code zw_tin}, {@code + * ba_tin}, {@code gn_nif}, {@code mk_vat}, {@code sr_fin}, {@code sn_ninea}, {@code am_tin}, + * {@code np_pan}, {@code tj_tin}, {@code ug_tin}, {@code zm_tin}, {@code kh_tin}, {@code + * aw_tin}, {@code az_tin}, {@code bd_bin}, {@code bj_ifu}, {@code et_tin}, {@code kg_tin}, + * {@code la_tin}, {@code cm_niu}, {@code cv_nif}, {@code bf_ifu}, 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 adb88509e17..ff821c03f95 100644 --- a/src/main/java/com/stripe/model/tax/Transaction.java +++ b/src/main/java/com/stripe/model/tax/Transaction.java @@ -371,20 +371,20 @@ public static class TaxId extends StripeObject { * {@code gb_vat}, {@code nz_gst}, {@code au_abn}, {@code au_arn}, {@code in_gst}, {@code * 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 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 al_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}, {@code ao_tin}, {@code bs_tin}, {@code bb_tin}, - * {@code cd_nif}, {@code mr_nif}, {@code me_pib}, {@code zw_tin}, {@code ba_tin}, {@code - * gn_nif}, {@code mk_vat}, {@code sr_fin}, {@code sn_ninea}, {@code am_tin}, {@code np_pan}, - * {@code tj_tin}, {@code ug_tin}, {@code zm_tin}, {@code kh_tin}, {@code aw_tin}, {@code - * az_tin}, {@code bd_bin}, {@code bj_ifu}, {@code et_tin}, {@code kg_tin}, {@code la_tin}, - * {@code cm_niu}, {@code cv_nif}, {@code bf_ifu}, or {@code unknown}. + * pl_nip}, {@code tw_vat}, {@code th_vat}, {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, + * {@code li_uid}, {@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 al_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}, {@code ao_tin}, {@code bs_tin}, + * {@code bb_tin}, {@code cd_nif}, {@code mr_nif}, {@code me_pib}, {@code zw_tin}, {@code + * ba_tin}, {@code gn_nif}, {@code mk_vat}, {@code sr_fin}, {@code sn_ninea}, {@code am_tin}, + * {@code np_pan}, {@code tj_tin}, {@code ug_tin}, {@code zm_tin}, {@code kh_tin}, {@code + * aw_tin}, {@code az_tin}, {@code bd_bin}, {@code bj_ifu}, {@code et_tin}, {@code kg_tin}, + * {@code la_tin}, {@code cm_niu}, {@code cv_nif}, {@code bf_ifu}, or {@code unknown}. */ @SerializedName("type") String type; diff --git a/src/main/java/com/stripe/model/terminal/Configuration.java b/src/main/java/com/stripe/model/terminal/Configuration.java index b6adb662df1..d6d5456c9ae 100644 --- a/src/main/java/com/stripe/model/terminal/Configuration.java +++ b/src/main/java/com/stripe/model/terminal/Configuration.java @@ -407,9 +407,6 @@ public static class Tipping extends StripeObject { @SerializedName("aud") Aud aud; - @SerializedName("bgn") - Bgn bgn; - @SerializedName("cad") Cad cad; @@ -515,30 +512,6 @@ public static class Aud extends StripeObject { Long smartTipThreshold; } - /** - * For more details about Bgn, please refer to the API - * Reference. - */ - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class Bgn extends StripeObject { - /** Fixed amounts displayed when collecting a tip. */ - @SerializedName("fixed_amounts") - List fixedAmounts; - - /** Percentages displayed when collecting a tip. */ - @SerializedName("percentages") - List percentages; - - /** - * Below this amount, fixed amounts will be displayed; above it, percentages will be - * displayed. - */ - @SerializedName("smart_tip_threshold") - Long smartTipThreshold; - } - /** * For more details about Cad, please refer to the API * Reference. diff --git a/src/main/java/com/stripe/model/treasury/ReceivedDebit.java b/src/main/java/com/stripe/model/treasury/ReceivedDebit.java index 3fc38259a95..6e7c5fb5b4f 100644 --- a/src/main/java/com/stripe/model/treasury/ReceivedDebit.java +++ b/src/main/java/com/stripe/model/treasury/ReceivedDebit.java @@ -368,6 +368,13 @@ public static class LinkedFlows extends StripeObject { */ @SerializedName("payout") String payout; + + /** + * Set if the ReceivedDebit was created due to a Topup object. + */ + @SerializedName("topup") + String topup; } /** diff --git a/src/main/java/com/stripe/param/AccountSessionCreateParams.java b/src/main/java/com/stripe/param/AccountSessionCreateParams.java index d64d4518df2..6c8ddb4ce12 100644 --- a/src/main/java/com/stripe/param/AccountSessionCreateParams.java +++ b/src/main/java/com/stripe/param/AccountSessionCreateParams.java @@ -1174,11 +1174,7 @@ public static class Features { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** - * Whether to allow creation of instant payouts. Defaults to {@code true} when {@code - * controller.losses.payments} is set to {@code stripe} for the account, otherwise {@code - * false}. - */ + /** Whether instant payouts are enabled for this component. */ @SerializedName("instant_payouts") Boolean instantPayouts; @@ -1296,11 +1292,7 @@ public Builder putAllExtraParam(Map map) { return this; } - /** - * Whether to allow creation of instant payouts. Defaults to {@code true} when {@code - * controller.losses.payments} is set to {@code stripe} for the account, otherwise {@code - * false}. - */ + /** Whether instant payouts are enabled for this component. */ public Builder setInstantPayouts(Boolean instantPayouts) { this.instantPayouts = instantPayouts; return this; @@ -2211,11 +2203,7 @@ public static class Features { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** - * Whether to allow creation of instant payouts. Defaults to {@code true} when {@code - * controller.losses.payments} is set to {@code stripe} for the account, otherwise {@code - * false}. - */ + /** Whether instant payouts are enabled for this component. */ @SerializedName("instant_payouts") Boolean instantPayouts; @@ -2307,11 +2295,7 @@ public Builder putAllExtraParam(Map map) { return this; } - /** - * Whether to allow creation of instant payouts. Defaults to {@code true} when {@code - * controller.losses.payments} is set to {@code stripe} for the account, otherwise {@code - * false}. - */ + /** Whether instant payouts are enabled for this component. */ public Builder setInstantPayouts(Boolean instantPayouts) { this.instantPayouts = instantPayouts; return this; @@ -3904,11 +3888,7 @@ public static class Features { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** - * Whether to allow creation of instant payouts. Defaults to {@code true} when {@code - * controller.losses.payments} is set to {@code stripe} for the account, otherwise {@code - * false}. - */ + /** Whether instant payouts are enabled for this component. */ @SerializedName("instant_payouts") Boolean instantPayouts; @@ -4026,11 +4006,7 @@ public Builder putAllExtraParam(Map map) { return this; } - /** - * Whether to allow creation of instant payouts. Defaults to {@code true} when {@code - * controller.losses.payments} is set to {@code stripe} for the account, otherwise {@code - * false}. - */ + /** Whether instant payouts are enabled for this component. */ public Builder setInstantPayouts(Boolean instantPayouts) { this.instantPayouts = instantPayouts; return this; diff --git a/src/main/java/com/stripe/param/BalanceTransactionListParams.java b/src/main/java/com/stripe/param/BalanceTransactionListParams.java index 744b212f76d..e3e649ec359 100644 --- a/src/main/java/com/stripe/param/BalanceTransactionListParams.java +++ b/src/main/java/com/stripe/param/BalanceTransactionListParams.java @@ -61,7 +61,7 @@ public class BalanceTransactionListParams extends ApiRequestParams { @SerializedName("payout") String payout; - /** Only returns the original transaction. */ + /** Only returns transactions associated with the given object. */ @SerializedName("source") String source; @@ -85,11 +85,11 @@ public class BalanceTransactionListParams extends ApiRequestParams { * payment_network_reserve_release}, {@code payment_refund}, {@code payment_reversal}, {@code * payment_unreconciled}, {@code payout}, {@code payout_cancel}, {@code payout_failure}, {@code * payout_minimum_balance_hold}, {@code payout_minimum_balance_release}, {@code refund}, {@code - * refund_failure}, {@code reserve_transaction}, {@code reserved_funds}, {@code stripe_fee}, - * {@code stripe_fx_fee}, {@code stripe_balance_payment_debit}, {@code - * stripe_balance_payment_debit_reversal}, {@code tax_fee}, {@code topup}, {@code topup_reversal}, - * {@code transfer}, {@code transfer_cancel}, {@code transfer_failure}, or {@code - * transfer_refund}. + * refund_failure}, {@code reserve_transaction}, {@code reserved_funds}, {@code reserve_hold}, + * {@code reserve_release}, {@code stripe_fee}, {@code stripe_fx_fee}, {@code + * stripe_balance_payment_debit}, {@code stripe_balance_payment_debit_reversal}, {@code tax_fee}, + * {@code topup}, {@code topup_reversal}, {@code transfer}, {@code transfer_cancel}, {@code + * transfer_failure}, or {@code transfer_refund}. */ @SerializedName("type") String type; @@ -260,7 +260,7 @@ public Builder setPayout(String payout) { return this; } - /** Only returns the original transaction. */ + /** Only returns transactions associated with the given object. */ public Builder setSource(String source) { this.source = source; return this; @@ -289,10 +289,11 @@ public Builder setStartingAfter(String startingAfter) { * payment_refund}, {@code payment_reversal}, {@code payment_unreconciled}, {@code payout}, * {@code payout_cancel}, {@code payout_failure}, {@code payout_minimum_balance_hold}, {@code * payout_minimum_balance_release}, {@code refund}, {@code refund_failure}, {@code - * reserve_transaction}, {@code reserved_funds}, {@code stripe_fee}, {@code stripe_fx_fee}, - * {@code stripe_balance_payment_debit}, {@code stripe_balance_payment_debit_reversal}, {@code - * tax_fee}, {@code topup}, {@code topup_reversal}, {@code transfer}, {@code transfer_cancel}, - * {@code transfer_failure}, or {@code transfer_refund}. + * reserve_transaction}, {@code reserved_funds}, {@code reserve_hold}, {@code reserve_release}, + * {@code stripe_fee}, {@code stripe_fx_fee}, {@code stripe_balance_payment_debit}, {@code + * stripe_balance_payment_debit_reversal}, {@code tax_fee}, {@code topup}, {@code + * topup_reversal}, {@code transfer}, {@code transfer_cancel}, {@code transfer_failure}, or + * {@code transfer_refund}. */ public Builder setType(String type) { this.type = type; diff --git a/src/main/java/com/stripe/param/ConfirmationTokenCreateParams.java b/src/main/java/com/stripe/param/ConfirmationTokenCreateParams.java index c120c974de8..ccdc86b5f71 100644 --- a/src/main/java/com/stripe/param/ConfirmationTokenCreateParams.java +++ b/src/main/java/com/stripe/param/ConfirmationTokenCreateParams.java @@ -3332,6 +3332,9 @@ public enum Bank implements ApiRequestParams.EnumParam { @SerializedName("abn_amro") ABN_AMRO("abn_amro"), + @SerializedName("adyen") + ADYEN("adyen"), + @SerializedName("asn_bank") ASN_BANK("asn_bank"), diff --git a/src/main/java/com/stripe/param/CouponCreateParams.java b/src/main/java/com/stripe/param/CouponCreateParams.java index 4a9f1e35e1e..49d3d9a285f 100644 --- a/src/main/java/com/stripe/param/CouponCreateParams.java +++ b/src/main/java/com/stripe/param/CouponCreateParams.java @@ -109,8 +109,9 @@ public class CouponCreateParams extends ApiRequestParams { BigDecimal percentOff; /** - * Unix timestamp specifying the last time at which the coupon can be redeemed. After the - * redeem_by date, the coupon can no longer be applied to new customers. + * Unix timestamp specifying the last time at which the coupon can be redeemed (cannot be set to + * more than 5 years in the future). After the redeem_by date, the coupon can no longer be applied + * to new customers. */ @SerializedName("redeem_by") Long redeemBy; @@ -407,8 +408,9 @@ public Builder setPercentOff(BigDecimal percentOff) { } /** - * Unix timestamp specifying the last time at which the coupon can be redeemed. After the - * redeem_by date, the coupon can no longer be applied to new customers. + * Unix timestamp specifying the last time at which the coupon can be redeemed (cannot be set to + * more than 5 years in the future). After the redeem_by date, the coupon can no longer be + * applied to new customers. */ public Builder setRedeemBy(Long redeemBy) { this.redeemBy = redeemBy; diff --git a/src/main/java/com/stripe/param/CustomerCreateParams.java b/src/main/java/com/stripe/param/CustomerCreateParams.java index e12cebfad7c..2a94319b861 100644 --- a/src/main/java/com/stripe/param/CustomerCreateParams.java +++ b/src/main/java/com/stripe/param/CustomerCreateParams.java @@ -1738,12 +1738,12 @@ public static class TaxIdData { * kz_bin}, {@code la_tin}, {@code li_uid}, {@code li_vat}, {@code ma_vat}, {@code md_vat}, * {@code me_pib}, {@code mk_vat}, {@code mr_nif}, {@code mx_rfc}, {@code my_frp}, {@code * my_itn}, {@code my_sst}, {@code ng_tin}, {@code no_vat}, {@code no_voec}, {@code np_pan}, - * {@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 sn_ninea}, {@code sr_fin}, {@code sv_nit}, {@code th_vat}, {@code - * tj_tin}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, {@code ua_vat}, {@code ug_tin}, - * {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code ve_rif}, {@code - * vn_tin}, {@code za_vat}, {@code zm_tin}, or {@code zw_tin} + * {@code nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, {@code pl_nip}, {@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 sn_ninea}, {@code sr_fin}, {@code sv_nit}, {@code + * th_vat}, {@code tj_tin}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, {@code ua_vat}, + * {@code ug_tin}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code + * ve_rif}, {@code vn_tin}, {@code za_vat}, {@code zm_tin}, or {@code zw_tin} */ @SerializedName("type") Type type; @@ -1817,11 +1817,12 @@ public Builder putAllExtraParam(Map map) { * ma_vat}, {@code md_vat}, {@code me_pib}, {@code mk_vat}, {@code mr_nif}, {@code mx_rfc}, * {@code my_frp}, {@code my_itn}, {@code my_sst}, {@code ng_tin}, {@code no_vat}, {@code * no_voec}, {@code np_pan}, {@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 sn_ninea}, {@code sr_fin}, {@code sv_nit}, - * {@code th_vat}, {@code tj_tin}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, {@code - * ua_vat}, {@code ug_tin}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, - * {@code ve_rif}, {@code vn_tin}, {@code za_vat}, {@code zm_tin}, or {@code zw_tin} + * {@code pl_nip}, {@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 sn_ninea}, {@code sr_fin}, + * {@code sv_nit}, {@code th_vat}, {@code tj_tin}, {@code tr_tin}, {@code tw_vat}, {@code + * tz_vat}, {@code ua_vat}, {@code ug_tin}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, + * {@code uz_vat}, {@code ve_rif}, {@code vn_tin}, {@code za_vat}, {@code zm_tin}, or {@code + * zw_tin} */ public Builder setType(CustomerCreateParams.TaxIdData.Type type) { this.type = type; @@ -2085,6 +2086,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("ph_tin") PH_TIN("ph_tin"), + @SerializedName("pl_nip") + PL_NIP("pl_nip"), + @SerializedName("ro_tin") RO_TIN("ro_tin"), diff --git a/src/main/java/com/stripe/param/CustomerTaxIdCreateParams.java b/src/main/java/com/stripe/param/CustomerTaxIdCreateParams.java index b135c6adc4c..a2a30ff9124 100644 --- a/src/main/java/com/stripe/param/CustomerTaxIdCreateParams.java +++ b/src/main/java/com/stripe/param/CustomerTaxIdCreateParams.java @@ -42,11 +42,11 @@ public class CustomerTaxIdCreateParams extends ApiRequestParams { * {@code ma_vat}, {@code md_vat}, {@code me_pib}, {@code mk_vat}, {@code mr_nif}, {@code mx_rfc}, * {@code my_frp}, {@code my_itn}, {@code my_sst}, {@code ng_tin}, {@code no_vat}, {@code * no_voec}, {@code np_pan}, {@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 sn_ninea}, {@code sr_fin}, {@code sv_nit}, {@code - * th_vat}, {@code tj_tin}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, {@code ua_vat}, {@code - * ug_tin}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code ve_rif}, {@code - * vn_tin}, {@code za_vat}, {@code zm_tin}, or {@code zw_tin} + * {@code pl_nip}, {@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 sn_ninea}, {@code sr_fin}, {@code + * sv_nit}, {@code th_vat}, {@code tj_tin}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, {@code + * ua_vat}, {@code ug_tin}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code + * ve_rif}, {@code vn_tin}, {@code za_vat}, {@code zm_tin}, or {@code zw_tin} */ @SerializedName("type") Type type; @@ -149,12 +149,12 @@ public Builder putAllExtraParam(Map map) { * kz_bin}, {@code la_tin}, {@code li_uid}, {@code li_vat}, {@code ma_vat}, {@code md_vat}, * {@code me_pib}, {@code mk_vat}, {@code mr_nif}, {@code mx_rfc}, {@code my_frp}, {@code * my_itn}, {@code my_sst}, {@code ng_tin}, {@code no_vat}, {@code no_voec}, {@code np_pan}, - * {@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 sn_ninea}, {@code sr_fin}, {@code sv_nit}, {@code th_vat}, {@code - * tj_tin}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, {@code ua_vat}, {@code ug_tin}, - * {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code ve_rif}, {@code - * vn_tin}, {@code za_vat}, {@code zm_tin}, or {@code zw_tin} + * {@code nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, {@code pl_nip}, {@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 sn_ninea}, {@code sr_fin}, {@code sv_nit}, {@code + * th_vat}, {@code tj_tin}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, {@code ua_vat}, + * {@code ug_tin}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code + * ve_rif}, {@code vn_tin}, {@code za_vat}, {@code zm_tin}, or {@code zw_tin} */ public Builder setType(CustomerTaxIdCreateParams.Type type) { this.type = type; @@ -418,6 +418,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("ph_tin") PH_TIN("ph_tin"), + @SerializedName("pl_nip") + PL_NIP("pl_nip"), + @SerializedName("ro_tin") RO_TIN("ro_tin"), diff --git a/src/main/java/com/stripe/param/InvoiceCreatePreviewParams.java b/src/main/java/com/stripe/param/InvoiceCreatePreviewParams.java index 3566d4da7b0..8797706e760 100644 --- a/src/main/java/com/stripe/param/InvoiceCreatePreviewParams.java +++ b/src/main/java/com/stripe/param/InvoiceCreatePreviewParams.java @@ -1409,11 +1409,12 @@ public static class TaxId { * ma_vat}, {@code md_vat}, {@code me_pib}, {@code mk_vat}, {@code mr_nif}, {@code mx_rfc}, * {@code my_frp}, {@code my_itn}, {@code my_sst}, {@code ng_tin}, {@code no_vat}, {@code * no_voec}, {@code np_pan}, {@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 sn_ninea}, {@code sr_fin}, {@code sv_nit}, - * {@code th_vat}, {@code tj_tin}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, {@code - * ua_vat}, {@code ug_tin}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, - * {@code ve_rif}, {@code vn_tin}, {@code za_vat}, {@code zm_tin}, or {@code zw_tin} + * {@code pl_nip}, {@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 sn_ninea}, {@code sr_fin}, + * {@code sv_nit}, {@code th_vat}, {@code tj_tin}, {@code tr_tin}, {@code tw_vat}, {@code + * tz_vat}, {@code ua_vat}, {@code ug_tin}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, + * {@code uz_vat}, {@code ve_rif}, {@code vn_tin}, {@code za_vat}, {@code zm_tin}, or {@code + * zw_tin} */ @SerializedName("type") Type type; @@ -1490,12 +1491,12 @@ public Builder putAllExtraParam(Map map) { * {@code ma_vat}, {@code md_vat}, {@code me_pib}, {@code mk_vat}, {@code mr_nif}, {@code * mx_rfc}, {@code my_frp}, {@code my_itn}, {@code my_sst}, {@code ng_tin}, {@code no_vat}, * {@code no_voec}, {@code np_pan}, {@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 sn_ninea}, {@code sr_fin}, {@code - * sv_nit}, {@code th_vat}, {@code tj_tin}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, - * {@code ua_vat}, {@code ug_tin}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code - * uz_vat}, {@code ve_rif}, {@code vn_tin}, {@code za_vat}, {@code zm_tin}, or {@code - * zw_tin} + * ph_tin}, {@code pl_nip}, {@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 sn_ninea}, {@code + * sr_fin}, {@code sv_nit}, {@code th_vat}, {@code tj_tin}, {@code tr_tin}, {@code tw_vat}, + * {@code tz_vat}, {@code ua_vat}, {@code ug_tin}, {@code us_ein}, {@code uy_ruc}, {@code + * uz_tin}, {@code uz_vat}, {@code ve_rif}, {@code vn_tin}, {@code za_vat}, {@code zm_tin}, + * or {@code zw_tin} */ public Builder setType(InvoiceCreatePreviewParams.CustomerDetails.TaxId.Type type) { this.type = type; @@ -1759,6 +1760,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("ph_tin") PH_TIN("ph_tin"), + @SerializedName("pl_nip") + PL_NIP("pl_nip"), + @SerializedName("ro_tin") RO_TIN("ro_tin"), diff --git a/src/main/java/com/stripe/param/PaymentIntentCaptureParams.java b/src/main/java/com/stripe/param/PaymentIntentCaptureParams.java index 1d6717c1256..7aec63f319b 100644 --- a/src/main/java/com/stripe/param/PaymentIntentCaptureParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentCaptureParams.java @@ -391,6 +391,21 @@ public static class AmountDetails { @SerializedName("discount_amount") Object discountAmount; + /** + * Set to {@code false} to return arithmetic validation errors in the response without failing + * the request. Use this when you want the operation to proceed regardless of arithmetic errors + * in the line item data. + * + *

Omit or set to {@code true} to immediately return a 400 error when arithmetic validation + * fails. Use this for strict validation that prevents processing with line item data that has + * arithmetic inconsistencies. + * + *

For card payments, Stripe doesn't send line item data if there's an arithmetic validation + * error to card networks. + */ + @SerializedName("enforce_arithmetic_validation") + Boolean enforceArithmeticValidation; + /** * 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 @@ -417,11 +432,13 @@ public static class AmountDetails { private AmountDetails( Object discountAmount, + Boolean enforceArithmeticValidation, Map extraParams, Object lineItems, Object shipping, Object tax) { this.discountAmount = discountAmount; + this.enforceArithmeticValidation = enforceArithmeticValidation; this.extraParams = extraParams; this.lineItems = lineItems; this.shipping = shipping; @@ -435,6 +452,8 @@ public static Builder builder() { public static class Builder { private Object discountAmount; + private Boolean enforceArithmeticValidation; + private Map extraParams; private Object lineItems; @@ -446,7 +465,12 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentCaptureParams.AmountDetails build() { return new PaymentIntentCaptureParams.AmountDetails( - this.discountAmount, this.extraParams, this.lineItems, this.shipping, this.tax); + this.discountAmount, + this.enforceArithmeticValidation, + this.extraParams, + this.lineItems, + this.shipping, + this.tax); } /** @@ -475,6 +499,23 @@ public Builder setDiscountAmount(EmptyParam discountAmount) { return this; } + /** + * Set to {@code false} to return arithmetic validation errors in the response without failing + * the request. Use this when you want the operation to proceed regardless of arithmetic + * errors in the line item data. + * + *

Omit or set to {@code true} to immediately return a 400 error when arithmetic validation + * fails. Use this for strict validation that prevents processing with line item data that has + * arithmetic inconsistencies. + * + *

For card payments, Stripe doesn't send line item data if there's an arithmetic + * validation error to card networks. + */ + public Builder setEnforceArithmeticValidation(Boolean enforceArithmeticValidation) { + this.enforceArithmeticValidation = enforceArithmeticValidation; + 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 diff --git a/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java b/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java index 13ea2b047cc..b978e5b2104 100644 --- a/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java @@ -689,6 +689,21 @@ public static class AmountDetails { @SerializedName("discount_amount") Object discountAmount; + /** + * Set to {@code false} to return arithmetic validation errors in the response without failing + * the request. Use this when you want the operation to proceed regardless of arithmetic errors + * in the line item data. + * + *

Omit or set to {@code true} to immediately return a 400 error when arithmetic validation + * fails. Use this for strict validation that prevents processing with line item data that has + * arithmetic inconsistencies. + * + *

For card payments, Stripe doesn't send line item data if there's an arithmetic validation + * error to card networks. + */ + @SerializedName("enforce_arithmetic_validation") + Boolean enforceArithmeticValidation; + /** * 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 @@ -715,11 +730,13 @@ public static class AmountDetails { private AmountDetails( Object discountAmount, + Boolean enforceArithmeticValidation, Map extraParams, Object lineItems, Object shipping, Object tax) { this.discountAmount = discountAmount; + this.enforceArithmeticValidation = enforceArithmeticValidation; this.extraParams = extraParams; this.lineItems = lineItems; this.shipping = shipping; @@ -733,6 +750,8 @@ public static Builder builder() { public static class Builder { private Object discountAmount; + private Boolean enforceArithmeticValidation; + private Map extraParams; private Object lineItems; @@ -744,7 +763,12 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentConfirmParams.AmountDetails build() { return new PaymentIntentConfirmParams.AmountDetails( - this.discountAmount, this.extraParams, this.lineItems, this.shipping, this.tax); + this.discountAmount, + this.enforceArithmeticValidation, + this.extraParams, + this.lineItems, + this.shipping, + this.tax); } /** @@ -773,6 +797,23 @@ public Builder setDiscountAmount(EmptyParam discountAmount) { return this; } + /** + * Set to {@code false} to return arithmetic validation errors in the response without failing + * the request. Use this when you want the operation to proceed regardless of arithmetic + * errors in the line item data. + * + *

Omit or set to {@code true} to immediately return a 400 error when arithmetic validation + * fails. Use this for strict validation that prevents processing with line item data that has + * arithmetic inconsistencies. + * + *

For card payments, Stripe doesn't send line item data if there's an arithmetic + * validation error to card networks. + */ + public Builder setEnforceArithmeticValidation(Boolean enforceArithmeticValidation) { + this.enforceArithmeticValidation = enforceArithmeticValidation; + 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 @@ -5854,6 +5895,9 @@ public enum Bank implements ApiRequestParams.EnumParam { @SerializedName("abn_amro") ABN_AMRO("abn_amro"), + @SerializedName("adyen") + ADYEN("adyen"), + @SerializedName("asn_bank") ASN_BANK("asn_bank"), @@ -14346,7 +14390,13 @@ public enum Version implements ApiRequestParams.EnumParam { N2__1__0("2.1.0"), @SerializedName("2.2.0") - N2__2__0("2.2.0"); + N2__2__0("2.2.0"), + + @SerializedName("2.3.0") + N2__3__0("2.3.0"), + + @SerializedName("2.3.1") + N2__3__1("2.3.1"); @Getter(onMethod_ = {@Override}) private final String value; @@ -22158,10 +22208,6 @@ public static class UsBankAccount { @SerializedName("networks") Networks networks; - /** Preferred transaction settlement speed. */ - @SerializedName("preferred_settlement_speed") - ApiRequestParams.EnumParam preferredSettlementSpeed; - /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * @@ -22205,7 +22251,6 @@ private UsBankAccount( FinancialConnections financialConnections, MandateOptions mandateOptions, Networks networks, - ApiRequestParams.EnumParam preferredSettlementSpeed, ApiRequestParams.EnumParam setupFutureUsage, String targetDate, VerificationMethod verificationMethod) { @@ -22213,7 +22258,6 @@ private UsBankAccount( this.financialConnections = financialConnections; this.mandateOptions = mandateOptions; this.networks = networks; - this.preferredSettlementSpeed = preferredSettlementSpeed; this.setupFutureUsage = setupFutureUsage; this.targetDate = targetDate; this.verificationMethod = verificationMethod; @@ -22232,8 +22276,6 @@ public static class Builder { private Networks networks; - private ApiRequestParams.EnumParam preferredSettlementSpeed; - private ApiRequestParams.EnumParam setupFutureUsage; private String targetDate; @@ -22247,7 +22289,6 @@ public PaymentIntentConfirmParams.PaymentMethodOptions.UsBankAccount build() { this.financialConnections, this.mandateOptions, this.networks, - this.preferredSettlementSpeed, this.setupFutureUsage, this.targetDate, this.verificationMethod); @@ -22306,20 +22347,6 @@ public Builder setNetworks( return this; } - /** Preferred transaction settlement speed. */ - public Builder setPreferredSettlementSpeed( - PaymentIntentConfirmParams.PaymentMethodOptions.UsBankAccount.PreferredSettlementSpeed - preferredSettlementSpeed) { - this.preferredSettlementSpeed = preferredSettlementSpeed; - return this; - } - - /** Preferred transaction settlement speed. */ - public Builder setPreferredSettlementSpeed(EmptyParam preferredSettlementSpeed) { - this.preferredSettlementSpeed = preferredSettlementSpeed; - return this; - } - /** * Indicates that you intend to make future payments with this PaymentIntent's payment * method. @@ -23012,21 +23039,6 @@ public enum Requested implements ApiRequestParams.EnumParam { } } - public enum PreferredSettlementSpeed implements ApiRequestParams.EnumParam { - @SerializedName("fastest") - FASTEST("fastest"), - - @SerializedName("standard") - STANDARD("standard"); - - @Getter(onMethod_ = {@Override}) - private final String value; - - PreferredSettlementSpeed(String value) { - this.value = value; - } - } - public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @SerializedName("none") NONE("none"), diff --git a/src/main/java/com/stripe/param/PaymentIntentCreateParams.java b/src/main/java/com/stripe/param/PaymentIntentCreateParams.java index 9b21b69adff..48820c96377 100644 --- a/src/main/java/com/stripe/param/PaymentIntentCreateParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentCreateParams.java @@ -1092,6 +1092,21 @@ public static class AmountDetails { @SerializedName("discount_amount") Object discountAmount; + /** + * Set to {@code false} to return arithmetic validation errors in the response without failing + * the request. Use this when you want the operation to proceed regardless of arithmetic errors + * in the line item data. + * + *

Omit or set to {@code true} to immediately return a 400 error when arithmetic validation + * fails. Use this for strict validation that prevents processing with line item data that has + * arithmetic inconsistencies. + * + *

For card payments, Stripe doesn't send line item data if there's an arithmetic validation + * error to card networks. + */ + @SerializedName("enforce_arithmetic_validation") + Boolean enforceArithmeticValidation; + /** * 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 @@ -1118,11 +1133,13 @@ public static class AmountDetails { private AmountDetails( Object discountAmount, + Boolean enforceArithmeticValidation, Map extraParams, Object lineItems, Object shipping, Object tax) { this.discountAmount = discountAmount; + this.enforceArithmeticValidation = enforceArithmeticValidation; this.extraParams = extraParams; this.lineItems = lineItems; this.shipping = shipping; @@ -1136,6 +1153,8 @@ public static Builder builder() { public static class Builder { private Object discountAmount; + private Boolean enforceArithmeticValidation; + private Map extraParams; private Object lineItems; @@ -1147,7 +1166,12 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentCreateParams.AmountDetails build() { return new PaymentIntentCreateParams.AmountDetails( - this.discountAmount, this.extraParams, this.lineItems, this.shipping, this.tax); + this.discountAmount, + this.enforceArithmeticValidation, + this.extraParams, + this.lineItems, + this.shipping, + this.tax); } /** @@ -1176,6 +1200,23 @@ public Builder setDiscountAmount(EmptyParam discountAmount) { return this; } + /** + * Set to {@code false} to return arithmetic validation errors in the response without failing + * the request. Use this when you want the operation to proceed regardless of arithmetic + * errors in the line item data. + * + *

Omit or set to {@code true} to immediately return a 400 error when arithmetic validation + * fails. Use this for strict validation that prevents processing with line item data that has + * arithmetic inconsistencies. + * + *

For card payments, Stripe doesn't send line item data if there's an arithmetic + * validation error to card networks. + */ + public Builder setEnforceArithmeticValidation(Boolean enforceArithmeticValidation) { + this.enforceArithmeticValidation = enforceArithmeticValidation; + 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 @@ -6375,6 +6416,9 @@ public enum Bank implements ApiRequestParams.EnumParam { @SerializedName("abn_amro") ABN_AMRO("abn_amro"), + @SerializedName("adyen") + ADYEN("adyen"), + @SerializedName("asn_bank") ASN_BANK("asn_bank"), @@ -14859,7 +14903,13 @@ public enum Version implements ApiRequestParams.EnumParam { N2__1__0("2.1.0"), @SerializedName("2.2.0") - N2__2__0("2.2.0"); + N2__2__0("2.2.0"), + + @SerializedName("2.3.0") + N2__3__0("2.3.0"), + + @SerializedName("2.3.1") + N2__3__1("2.3.1"); @Getter(onMethod_ = {@Override}) private final String value; @@ -22660,10 +22710,6 @@ public static class UsBankAccount { @SerializedName("networks") Networks networks; - /** Preferred transaction settlement speed. */ - @SerializedName("preferred_settlement_speed") - ApiRequestParams.EnumParam preferredSettlementSpeed; - /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * @@ -22707,7 +22753,6 @@ private UsBankAccount( FinancialConnections financialConnections, MandateOptions mandateOptions, Networks networks, - ApiRequestParams.EnumParam preferredSettlementSpeed, ApiRequestParams.EnumParam setupFutureUsage, String targetDate, VerificationMethod verificationMethod) { @@ -22715,7 +22760,6 @@ private UsBankAccount( this.financialConnections = financialConnections; this.mandateOptions = mandateOptions; this.networks = networks; - this.preferredSettlementSpeed = preferredSettlementSpeed; this.setupFutureUsage = setupFutureUsage; this.targetDate = targetDate; this.verificationMethod = verificationMethod; @@ -22734,8 +22778,6 @@ public static class Builder { private Networks networks; - private ApiRequestParams.EnumParam preferredSettlementSpeed; - private ApiRequestParams.EnumParam setupFutureUsage; private String targetDate; @@ -22749,7 +22791,6 @@ public PaymentIntentCreateParams.PaymentMethodOptions.UsBankAccount build() { this.financialConnections, this.mandateOptions, this.networks, - this.preferredSettlementSpeed, this.setupFutureUsage, this.targetDate, this.verificationMethod); @@ -22806,20 +22847,6 @@ public Builder setNetworks( return this; } - /** Preferred transaction settlement speed. */ - public Builder setPreferredSettlementSpeed( - PaymentIntentCreateParams.PaymentMethodOptions.UsBankAccount.PreferredSettlementSpeed - preferredSettlementSpeed) { - this.preferredSettlementSpeed = preferredSettlementSpeed; - return this; - } - - /** Preferred transaction settlement speed. */ - public Builder setPreferredSettlementSpeed(EmptyParam preferredSettlementSpeed) { - this.preferredSettlementSpeed = preferredSettlementSpeed; - return this; - } - /** * Indicates that you intend to make future payments with this PaymentIntent's payment * method. @@ -23512,21 +23539,6 @@ public enum Requested implements ApiRequestParams.EnumParam { } } - public enum PreferredSettlementSpeed implements ApiRequestParams.EnumParam { - @SerializedName("fastest") - FASTEST("fastest"), - - @SerializedName("standard") - STANDARD("standard"); - - @Getter(onMethod_ = {@Override}) - private final String value; - - PreferredSettlementSpeed(String value) { - this.value = value; - } - } - public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @SerializedName("none") NONE("none"), diff --git a/src/main/java/com/stripe/param/PaymentIntentIncrementAuthorizationParams.java b/src/main/java/com/stripe/param/PaymentIntentIncrementAuthorizationParams.java index 868dc107a0b..5c6ed24b654 100644 --- a/src/main/java/com/stripe/param/PaymentIntentIncrementAuthorizationParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentIncrementAuthorizationParams.java @@ -319,6 +319,21 @@ public static class AmountDetails { @SerializedName("discount_amount") Object discountAmount; + /** + * Set to {@code false} to return arithmetic validation errors in the response without failing + * the request. Use this when you want the operation to proceed regardless of arithmetic errors + * in the line item data. + * + *

Omit or set to {@code true} to immediately return a 400 error when arithmetic validation + * fails. Use this for strict validation that prevents processing with line item data that has + * arithmetic inconsistencies. + * + *

For card payments, Stripe doesn't send line item data if there's an arithmetic validation + * error to card networks. + */ + @SerializedName("enforce_arithmetic_validation") + Boolean enforceArithmeticValidation; + /** * 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 @@ -345,11 +360,13 @@ public static class AmountDetails { private AmountDetails( Object discountAmount, + Boolean enforceArithmeticValidation, Map extraParams, Object lineItems, Object shipping, Object tax) { this.discountAmount = discountAmount; + this.enforceArithmeticValidation = enforceArithmeticValidation; this.extraParams = extraParams; this.lineItems = lineItems; this.shipping = shipping; @@ -363,6 +380,8 @@ public static Builder builder() { public static class Builder { private Object discountAmount; + private Boolean enforceArithmeticValidation; + private Map extraParams; private Object lineItems; @@ -374,7 +393,12 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentIncrementAuthorizationParams.AmountDetails build() { return new PaymentIntentIncrementAuthorizationParams.AmountDetails( - this.discountAmount, this.extraParams, this.lineItems, this.shipping, this.tax); + this.discountAmount, + this.enforceArithmeticValidation, + this.extraParams, + this.lineItems, + this.shipping, + this.tax); } /** @@ -403,6 +427,23 @@ public Builder setDiscountAmount(EmptyParam discountAmount) { return this; } + /** + * Set to {@code false} to return arithmetic validation errors in the response without failing + * the request. Use this when you want the operation to proceed regardless of arithmetic + * errors in the line item data. + * + *

Omit or set to {@code true} to immediately return a 400 error when arithmetic validation + * fails. Use this for strict validation that prevents processing with line item data that has + * arithmetic inconsistencies. + * + *

For card payments, Stripe doesn't send line item data if there's an arithmetic + * validation error to card networks. + */ + public Builder setEnforceArithmeticValidation(Boolean enforceArithmeticValidation) { + this.enforceArithmeticValidation = enforceArithmeticValidation; + 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 diff --git a/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java b/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java index 1a94270da8c..2cca707947e 100644 --- a/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java @@ -991,6 +991,21 @@ public static class AmountDetails { @SerializedName("discount_amount") Object discountAmount; + /** + * Set to {@code false} to return arithmetic validation errors in the response without failing + * the request. Use this when you want the operation to proceed regardless of arithmetic errors + * in the line item data. + * + *

Omit or set to {@code true} to immediately return a 400 error when arithmetic validation + * fails. Use this for strict validation that prevents processing with line item data that has + * arithmetic inconsistencies. + * + *

For card payments, Stripe doesn't send line item data if there's an arithmetic validation + * error to card networks. + */ + @SerializedName("enforce_arithmetic_validation") + Boolean enforceArithmeticValidation; + /** * 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 @@ -1017,11 +1032,13 @@ public static class AmountDetails { private AmountDetails( Object discountAmount, + Boolean enforceArithmeticValidation, Map extraParams, Object lineItems, Object shipping, Object tax) { this.discountAmount = discountAmount; + this.enforceArithmeticValidation = enforceArithmeticValidation; this.extraParams = extraParams; this.lineItems = lineItems; this.shipping = shipping; @@ -1035,6 +1052,8 @@ public static Builder builder() { public static class Builder { private Object discountAmount; + private Boolean enforceArithmeticValidation; + private Map extraParams; private Object lineItems; @@ -1046,7 +1065,12 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentUpdateParams.AmountDetails build() { return new PaymentIntentUpdateParams.AmountDetails( - this.discountAmount, this.extraParams, this.lineItems, this.shipping, this.tax); + this.discountAmount, + this.enforceArithmeticValidation, + this.extraParams, + this.lineItems, + this.shipping, + this.tax); } /** @@ -1075,6 +1099,23 @@ public Builder setDiscountAmount(EmptyParam discountAmount) { return this; } + /** + * Set to {@code false} to return arithmetic validation errors in the response without failing + * the request. Use this when you want the operation to proceed regardless of arithmetic + * errors in the line item data. + * + *

Omit or set to {@code true} to immediately return a 400 error when arithmetic validation + * fails. Use this for strict validation that prevents processing with line item data that has + * arithmetic inconsistencies. + * + *

For card payments, Stripe doesn't send line item data if there's an arithmetic + * validation error to card networks. + */ + public Builder setEnforceArithmeticValidation(Boolean enforceArithmeticValidation) { + this.enforceArithmeticValidation = enforceArithmeticValidation; + 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 @@ -5954,6 +5995,9 @@ public enum Bank implements ApiRequestParams.EnumParam { @SerializedName("abn_amro") ABN_AMRO("abn_amro"), + @SerializedName("adyen") + ADYEN("adyen"), + @SerializedName("asn_bank") ASN_BANK("asn_bank"), @@ -14658,7 +14702,13 @@ public enum Version implements ApiRequestParams.EnumParam { N2__1__0("2.1.0"), @SerializedName("2.2.0") - N2__2__0("2.2.0"); + N2__2__0("2.2.0"), + + @SerializedName("2.3.0") + N2__3__0("2.3.0"), + + @SerializedName("2.3.1") + N2__3__1("2.3.1"); @Getter(onMethod_ = {@Override}) private final String value; @@ -22538,10 +22588,6 @@ public static class UsBankAccount { @SerializedName("networks") Networks networks; - /** Preferred transaction settlement speed. */ - @SerializedName("preferred_settlement_speed") - ApiRequestParams.EnumParam preferredSettlementSpeed; - /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * @@ -22585,7 +22631,6 @@ private UsBankAccount( FinancialConnections financialConnections, MandateOptions mandateOptions, Networks networks, - ApiRequestParams.EnumParam preferredSettlementSpeed, ApiRequestParams.EnumParam setupFutureUsage, Object targetDate, VerificationMethod verificationMethod) { @@ -22593,7 +22638,6 @@ private UsBankAccount( this.financialConnections = financialConnections; this.mandateOptions = mandateOptions; this.networks = networks; - this.preferredSettlementSpeed = preferredSettlementSpeed; this.setupFutureUsage = setupFutureUsage; this.targetDate = targetDate; this.verificationMethod = verificationMethod; @@ -22612,8 +22656,6 @@ public static class Builder { private Networks networks; - private ApiRequestParams.EnumParam preferredSettlementSpeed; - private ApiRequestParams.EnumParam setupFutureUsage; private Object targetDate; @@ -22627,7 +22669,6 @@ public PaymentIntentUpdateParams.PaymentMethodOptions.UsBankAccount build() { this.financialConnections, this.mandateOptions, this.networks, - this.preferredSettlementSpeed, this.setupFutureUsage, this.targetDate, this.verificationMethod); @@ -22684,20 +22725,6 @@ public Builder setNetworks( return this; } - /** Preferred transaction settlement speed. */ - public Builder setPreferredSettlementSpeed( - PaymentIntentUpdateParams.PaymentMethodOptions.UsBankAccount.PreferredSettlementSpeed - preferredSettlementSpeed) { - this.preferredSettlementSpeed = preferredSettlementSpeed; - return this; - } - - /** Preferred transaction settlement speed. */ - public Builder setPreferredSettlementSpeed(EmptyParam preferredSettlementSpeed) { - this.preferredSettlementSpeed = preferredSettlementSpeed; - return this; - } - /** * Indicates that you intend to make future payments with this PaymentIntent's payment * method. @@ -23409,21 +23436,6 @@ public enum Requested implements ApiRequestParams.EnumParam { } } - public enum PreferredSettlementSpeed implements ApiRequestParams.EnumParam { - @SerializedName("fastest") - FASTEST("fastest"), - - @SerializedName("standard") - STANDARD("standard"); - - @Getter(onMethod_ = {@Override}) - private final String value; - - PreferredSettlementSpeed(String value) { - this.value = value; - } - } - public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @SerializedName("none") NONE("none"), diff --git a/src/main/java/com/stripe/param/PaymentLinkCreateParams.java b/src/main/java/com/stripe/param/PaymentLinkCreateParams.java index 8a8146b7349..5b70c912672 100644 --- a/src/main/java/com/stripe/param/PaymentLinkCreateParams.java +++ b/src/main/java/com/stripe/param/PaymentLinkCreateParams.java @@ -62,12 +62,15 @@ public class PaymentLinkCreateParams extends ApiRequestParams { /** * Collect additional information from your customer using custom fields. Up to 3 fields are - * supported. + * supported. You can't set this parameter if {@code ui_mode} is {@code custom}. */ @SerializedName("custom_fields") List customFields; - /** Display additional text for your customers using custom text. */ + /** + * Display additional text for your customers using custom text. You can't set this parameter if + * {@code ui_mode} is {@code custom}. + */ @SerializedName("custom_text") CustomText customText; @@ -476,7 +479,10 @@ public Builder addAllCustomField(List eleme return this; } - /** Display additional text for your customers using custom text. */ + /** + * Display additional text for your customers using custom text. You can't set this parameter if + * {@code ui_mode} is {@code custom}. + */ public Builder setCustomText(PaymentLinkCreateParams.CustomText customText) { this.customText = customText; return this; @@ -6750,7 +6756,10 @@ public static class TaxIdCollection { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Describes whether a tax ID is required during checkout. Defaults to {@code never}. */ + /** + * Describes whether a tax ID is required during checkout. Defaults to {@code never}. You can't + * set this parameter if {@code ui_mode} is {@code custom}. + */ @SerializedName("required") Required required; @@ -6813,7 +6822,10 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Describes whether a tax ID is required during checkout. Defaults to {@code never}. */ + /** + * Describes whether a tax ID is required during checkout. Defaults to {@code never}. You + * can't set this parameter if {@code ui_mode} is {@code custom}. + */ public Builder setRequired(PaymentLinkCreateParams.TaxIdCollection.Required required) { this.required = required; return this; diff --git a/src/main/java/com/stripe/param/PaymentLinkUpdateParams.java b/src/main/java/com/stripe/param/PaymentLinkUpdateParams.java index 939c7cc1595..fbf7d674611 100644 --- a/src/main/java/com/stripe/param/PaymentLinkUpdateParams.java +++ b/src/main/java/com/stripe/param/PaymentLinkUpdateParams.java @@ -39,12 +39,15 @@ public class PaymentLinkUpdateParams extends ApiRequestParams { /** * Collect additional information from your customer using custom fields. Up to 3 fields are - * supported. + * supported. You can't set this parameter if {@code ui_mode} is {@code custom}. */ @SerializedName("custom_fields") Object customFields; - /** Display additional text for your customers using custom text. */ + /** + * Display additional text for your customers using custom text. You can't set this parameter if + * {@code ui_mode} is {@code custom}. + */ @SerializedName("custom_text") CustomText customText; @@ -362,7 +365,7 @@ public Builder addAllCustomField(List eleme /** * Collect additional information from your customer using custom fields. Up to 3 fields are - * supported. + * supported. You can't set this parameter if {@code ui_mode} is {@code custom}. */ public Builder setCustomFields(EmptyParam customFields) { this.customFields = customFields; @@ -371,14 +374,17 @@ public Builder setCustomFields(EmptyParam customFields) { /** * Collect additional information from your customer using custom fields. Up to 3 fields are - * supported. + * supported. You can't set this parameter if {@code ui_mode} is {@code custom}. */ public Builder setCustomFields(List customFields) { this.customFields = customFields; return this; } - /** Display additional text for your customers using custom text. */ + /** + * Display additional text for your customers using custom text. You can't set this parameter if + * {@code ui_mode} is {@code custom}. + */ public Builder setCustomText(PaymentLinkUpdateParams.CustomText customText) { this.customText = customText; return this; @@ -5588,7 +5594,10 @@ public static class TaxIdCollection { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Describes whether a tax ID is required during checkout. Defaults to {@code never}. */ + /** + * Describes whether a tax ID is required during checkout. Defaults to {@code never}. You can't + * set this parameter if {@code ui_mode} is {@code custom}. + */ @SerializedName("required") Required required; @@ -5651,7 +5660,10 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Describes whether a tax ID is required during checkout. Defaults to {@code never}. */ + /** + * Describes whether a tax ID is required during checkout. Defaults to {@code never}. You + * can't set this parameter if {@code ui_mode} is {@code custom}. + */ public Builder setRequired(PaymentLinkUpdateParams.TaxIdCollection.Required required) { this.required = required; return this; diff --git a/src/main/java/com/stripe/param/PaymentMethodConfigurationCreateParams.java b/src/main/java/com/stripe/param/PaymentMethodConfigurationCreateParams.java index 88173144d23..a4cae983f99 100644 --- a/src/main/java/com/stripe/param/PaymentMethodConfigurationCreateParams.java +++ b/src/main/java/com/stripe/param/PaymentMethodConfigurationCreateParams.java @@ -210,8 +210,8 @@ public class PaymentMethodConfigurationCreateParams extends ApiRequestParams { /** * Meal vouchers in France, or “titres-restaurant”, is a local benefits program commonly offered * by employers for their employees to purchase prepared food and beverages on working days. Check - * this page for more - * details. + * this page for + * more details. */ @SerializedName("fr_meal_voucher_conecs") FrMealVoucherConecs frMealVoucherConecs; @@ -1109,8 +1109,8 @@ public Builder setFpx(PaymentMethodConfigurationCreateParams.Fpx fpx) { /** * Meal vouchers in France, or “titres-restaurant”, is a local benefits program commonly offered * by employers for their employees to purchase prepared food and beverages on working days. - * Check this page for - * more details. + * Check this page + * for more details. */ public Builder setFrMealVoucherConecs( PaymentMethodConfigurationCreateParams.FrMealVoucherConecs frMealVoucherConecs) { diff --git a/src/main/java/com/stripe/param/PaymentMethodConfigurationUpdateParams.java b/src/main/java/com/stripe/param/PaymentMethodConfigurationUpdateParams.java index a1aeee447ef..1261aa9fceb 100644 --- a/src/main/java/com/stripe/param/PaymentMethodConfigurationUpdateParams.java +++ b/src/main/java/com/stripe/param/PaymentMethodConfigurationUpdateParams.java @@ -215,8 +215,8 @@ public class PaymentMethodConfigurationUpdateParams extends ApiRequestParams { /** * Meal vouchers in France, or “titres-restaurant”, is a local benefits program commonly offered * by employers for their employees to purchase prepared food and beverages on working days. Check - * this page for more - * details. + * this page for + * more details. */ @SerializedName("fr_meal_voucher_conecs") FrMealVoucherConecs frMealVoucherConecs; @@ -1116,8 +1116,8 @@ public Builder setFpx(PaymentMethodConfigurationUpdateParams.Fpx fpx) { /** * Meal vouchers in France, or “titres-restaurant”, is a local benefits program commonly offered * by employers for their employees to purchase prepared food and beverages on working days. - * Check this page for - * more details. + * Check this page + * for more details. */ public Builder setFrMealVoucherConecs( PaymentMethodConfigurationUpdateParams.FrMealVoucherConecs frMealVoucherConecs) { diff --git a/src/main/java/com/stripe/param/PaymentMethodCreateParams.java b/src/main/java/com/stripe/param/PaymentMethodCreateParams.java index ba1d8389e5e..6a80db12abd 100644 --- a/src/main/java/com/stripe/param/PaymentMethodCreateParams.java +++ b/src/main/java/com/stripe/param/PaymentMethodCreateParams.java @@ -3476,6 +3476,9 @@ public enum Bank implements ApiRequestParams.EnumParam { @SerializedName("abn_amro") ABN_AMRO("abn_amro"), + @SerializedName("adyen") + ADYEN("adyen"), + @SerializedName("asn_bank") ASN_BANK("asn_bank"), diff --git a/src/main/java/com/stripe/param/SetupIntentConfirmParams.java b/src/main/java/com/stripe/param/SetupIntentConfirmParams.java index 09ecee2dc4b..6758c5ef32b 100644 --- a/src/main/java/com/stripe/param/SetupIntentConfirmParams.java +++ b/src/main/java/com/stripe/param/SetupIntentConfirmParams.java @@ -3724,6 +3724,9 @@ public enum Bank implements ApiRequestParams.EnumParam { @SerializedName("abn_amro") ABN_AMRO("abn_amro"), + @SerializedName("adyen") + ADYEN("adyen"), + @SerializedName("asn_bank") ASN_BANK("asn_bank"), @@ -8291,7 +8294,13 @@ public enum Version implements ApiRequestParams.EnumParam { N2__1__0("2.1.0"), @SerializedName("2.2.0") - N2__2__0("2.2.0"); + N2__2__0("2.2.0"), + + @SerializedName("2.3.0") + N2__3__0("2.3.0"), + + @SerializedName("2.3.1") + N2__3__1("2.3.1"); @Getter(onMethod_ = {@Override}) private final String value; diff --git a/src/main/java/com/stripe/param/SetupIntentCreateParams.java b/src/main/java/com/stripe/param/SetupIntentCreateParams.java index 6222f201ccc..df0d34e227b 100644 --- a/src/main/java/com/stripe/param/SetupIntentCreateParams.java +++ b/src/main/java/com/stripe/param/SetupIntentCreateParams.java @@ -4260,6 +4260,9 @@ public enum Bank implements ApiRequestParams.EnumParam { @SerializedName("abn_amro") ABN_AMRO("abn_amro"), + @SerializedName("adyen") + ADYEN("adyen"), + @SerializedName("asn_bank") ASN_BANK("asn_bank"), @@ -8825,7 +8828,13 @@ public enum Version implements ApiRequestParams.EnumParam { N2__1__0("2.1.0"), @SerializedName("2.2.0") - N2__2__0("2.2.0"); + N2__2__0("2.2.0"), + + @SerializedName("2.3.0") + N2__3__0("2.3.0"), + + @SerializedName("2.3.1") + N2__3__1("2.3.1"); @Getter(onMethod_ = {@Override}) private final String value; diff --git a/src/main/java/com/stripe/param/SetupIntentUpdateParams.java b/src/main/java/com/stripe/param/SetupIntentUpdateParams.java index 7a5c6be9f37..60c1dd1bbb0 100644 --- a/src/main/java/com/stripe/param/SetupIntentUpdateParams.java +++ b/src/main/java/com/stripe/param/SetupIntentUpdateParams.java @@ -3731,6 +3731,9 @@ public enum Bank implements ApiRequestParams.EnumParam { @SerializedName("abn_amro") ABN_AMRO("abn_amro"), + @SerializedName("adyen") + ADYEN("adyen"), + @SerializedName("asn_bank") ASN_BANK("asn_bank"), @@ -8460,7 +8463,13 @@ public enum Version implements ApiRequestParams.EnumParam { N2__1__0("2.1.0"), @SerializedName("2.2.0") - N2__2__0("2.2.0"); + N2__2__0("2.2.0"), + + @SerializedName("2.3.0") + N2__3__0("2.3.0"), + + @SerializedName("2.3.1") + N2__3__1("2.3.1"); @Getter(onMethod_ = {@Override}) private final String value; diff --git a/src/main/java/com/stripe/param/TaxIdCollectionCreateParams.java b/src/main/java/com/stripe/param/TaxIdCollectionCreateParams.java index a9dac7a769c..509ab49c3b2 100644 --- a/src/main/java/com/stripe/param/TaxIdCollectionCreateParams.java +++ b/src/main/java/com/stripe/param/TaxIdCollectionCreateParams.java @@ -42,11 +42,11 @@ public class TaxIdCollectionCreateParams extends ApiRequestParams { * {@code ma_vat}, {@code md_vat}, {@code me_pib}, {@code mk_vat}, {@code mr_nif}, {@code mx_rfc}, * {@code my_frp}, {@code my_itn}, {@code my_sst}, {@code ng_tin}, {@code no_vat}, {@code * no_voec}, {@code np_pan}, {@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 sn_ninea}, {@code sr_fin}, {@code sv_nit}, {@code - * th_vat}, {@code tj_tin}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, {@code ua_vat}, {@code - * ug_tin}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code ve_rif}, {@code - * vn_tin}, {@code za_vat}, {@code zm_tin}, or {@code zw_tin} + * {@code pl_nip}, {@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 sn_ninea}, {@code sr_fin}, {@code + * sv_nit}, {@code th_vat}, {@code tj_tin}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, {@code + * ua_vat}, {@code ug_tin}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code + * ve_rif}, {@code vn_tin}, {@code za_vat}, {@code zm_tin}, or {@code zw_tin} */ @SerializedName("type") Type type; @@ -149,12 +149,12 @@ public Builder putAllExtraParam(Map map) { * kz_bin}, {@code la_tin}, {@code li_uid}, {@code li_vat}, {@code ma_vat}, {@code md_vat}, * {@code me_pib}, {@code mk_vat}, {@code mr_nif}, {@code mx_rfc}, {@code my_frp}, {@code * my_itn}, {@code my_sst}, {@code ng_tin}, {@code no_vat}, {@code no_voec}, {@code np_pan}, - * {@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 sn_ninea}, {@code sr_fin}, {@code sv_nit}, {@code th_vat}, {@code - * tj_tin}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, {@code ua_vat}, {@code ug_tin}, - * {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code ve_rif}, {@code - * vn_tin}, {@code za_vat}, {@code zm_tin}, or {@code zw_tin} + * {@code nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, {@code pl_nip}, {@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 sn_ninea}, {@code sr_fin}, {@code sv_nit}, {@code + * th_vat}, {@code tj_tin}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, {@code ua_vat}, + * {@code ug_tin}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code + * ve_rif}, {@code vn_tin}, {@code za_vat}, {@code zm_tin}, or {@code zw_tin} */ public Builder setType(TaxIdCollectionCreateParams.Type type) { this.type = type; @@ -418,6 +418,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("ph_tin") PH_TIN("ph_tin"), + @SerializedName("pl_nip") + PL_NIP("pl_nip"), + @SerializedName("ro_tin") RO_TIN("ro_tin"), diff --git a/src/main/java/com/stripe/param/TaxIdCreateParams.java b/src/main/java/com/stripe/param/TaxIdCreateParams.java index f0e76ac3d39..548215820cd 100644 --- a/src/main/java/com/stripe/param/TaxIdCreateParams.java +++ b/src/main/java/com/stripe/param/TaxIdCreateParams.java @@ -46,11 +46,11 @@ public class TaxIdCreateParams extends ApiRequestParams { * {@code ma_vat}, {@code md_vat}, {@code me_pib}, {@code mk_vat}, {@code mr_nif}, {@code mx_rfc}, * {@code my_frp}, {@code my_itn}, {@code my_sst}, {@code ng_tin}, {@code no_vat}, {@code * no_voec}, {@code np_pan}, {@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 sn_ninea}, {@code sr_fin}, {@code sv_nit}, {@code - * th_vat}, {@code tj_tin}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, {@code ua_vat}, {@code - * ug_tin}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code ve_rif}, {@code - * vn_tin}, {@code za_vat}, {@code zm_tin}, or {@code zw_tin} + * {@code pl_nip}, {@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 sn_ninea}, {@code sr_fin}, {@code + * sv_nit}, {@code th_vat}, {@code tj_tin}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, {@code + * ua_vat}, {@code ug_tin}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code + * ve_rif}, {@code vn_tin}, {@code za_vat}, {@code zm_tin}, or {@code zw_tin} */ @SerializedName("type") Type type; @@ -163,12 +163,12 @@ public Builder setOwner(TaxIdCreateParams.Owner owner) { * kz_bin}, {@code la_tin}, {@code li_uid}, {@code li_vat}, {@code ma_vat}, {@code md_vat}, * {@code me_pib}, {@code mk_vat}, {@code mr_nif}, {@code mx_rfc}, {@code my_frp}, {@code * my_itn}, {@code my_sst}, {@code ng_tin}, {@code no_vat}, {@code no_voec}, {@code np_pan}, - * {@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 sn_ninea}, {@code sr_fin}, {@code sv_nit}, {@code th_vat}, {@code - * tj_tin}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, {@code ua_vat}, {@code ug_tin}, - * {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code ve_rif}, {@code - * vn_tin}, {@code za_vat}, {@code zm_tin}, or {@code zw_tin} + * {@code nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, {@code pl_nip}, {@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 sn_ninea}, {@code sr_fin}, {@code sv_nit}, {@code + * th_vat}, {@code tj_tin}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, {@code ua_vat}, + * {@code ug_tin}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code + * ve_rif}, {@code vn_tin}, {@code za_vat}, {@code zm_tin}, or {@code zw_tin} */ public Builder setType(TaxIdCreateParams.Type type) { this.type = type; @@ -573,6 +573,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("ph_tin") PH_TIN("ph_tin"), + @SerializedName("pl_nip") + PL_NIP("pl_nip"), + @SerializedName("ro_tin") RO_TIN("ro_tin"), diff --git a/src/main/java/com/stripe/param/checkout/SessionCreateParams.java b/src/main/java/com/stripe/param/checkout/SessionCreateParams.java index 49d3c528142..fe2ad8eea9d 100644 --- a/src/main/java/com/stripe/param/checkout/SessionCreateParams.java +++ b/src/main/java/com/stripe/param/checkout/SessionCreateParams.java @@ -22,7 +22,10 @@ public class SessionCreateParams extends ApiRequestParams { @SerializedName("adaptive_pricing") AdaptivePricing adaptivePricing; - /** Configure actions after a Checkout Session has expired. */ + /** + * Configure actions after a Checkout Session has expired. You can't set this parameter if {@code + * ui_mode} is {@code custom}. + */ @SerializedName("after_expiration") AfterExpiration afterExpiration; @@ -80,12 +83,15 @@ public class SessionCreateParams extends ApiRequestParams { /** * Collect additional information from your customer using custom fields. Up to 3 fields are - * supported. + * supported. You can't set this parameter if {@code ui_mode} is {@code custom}. */ @SerializedName("custom_fields") List customFields; - /** Display additional text for your customers using custom text. */ + /** + * Display additional text for your customers using custom text. You can't set this parameter if + * {@code ui_mode} is {@code custom}. + */ @SerializedName("custom_text") CustomText customText; @@ -240,6 +246,8 @@ public class SessionCreateParams extends ApiRequestParams { * *

If a Customer is created or provided, * the names can be saved to the Customer object as well. + * + *

You can't set this parameter if {@code ui_mode} is {@code custom}. */ @SerializedName("name_collection") NameCollection nameCollection; @@ -257,12 +265,15 @@ public class SessionCreateParams extends ApiRequestParams { * *

For {@code subscription} mode, there is a maximum of 20 line items and optional items with * recurring Prices and 20 line items and optional items with one-time Prices. + * + *

You can't set this parameter if {@code ui_mode} is {@code custom}. */ @SerializedName("optional_items") List optionalItems; /** * Where the user is coming from. This informs the optimizations that are applied to the session. + * You can't set this parameter if {@code ui_mode} is {@code custom}. */ @SerializedName("origin_context") OriginContext originContext; @@ -388,7 +399,7 @@ public class SessionCreateParams extends ApiRequestParams { * Describes the type of transaction being performed by Checkout in order to customize relevant * text on the page, such as the submit button. {@code submit_type} can only be specified on * Checkout Sessions in {@code payment} or {@code subscription} mode. If blank or {@code auto}, - * {@code pay} is used. + * {@code pay} is used. You can't set this parameter if {@code ui_mode} is {@code custom}. */ @SerializedName("submit_type") SubmitType submitType; @@ -694,7 +705,10 @@ public Builder setAdaptivePricing(SessionCreateParams.AdaptivePricing adaptivePr return this; } - /** Configure actions after a Checkout Session has expired. */ + /** + * Configure actions after a Checkout Session has expired. You can't set this parameter if + * {@code ui_mode} is {@code custom}. + */ public Builder setAfterExpiration(SessionCreateParams.AfterExpiration afterExpiration) { this.afterExpiration = afterExpiration; return this; @@ -795,7 +809,10 @@ public Builder addAllCustomField(List elements) return this; } - /** Display additional text for your customers using custom text. */ + /** + * Display additional text for your customers using custom text. You can't set this parameter if + * {@code ui_mode} is {@code custom}. + */ public Builder setCustomText(SessionCreateParams.CustomText customText) { this.customText = customText; return this; @@ -1075,6 +1092,8 @@ public Builder setMode(SessionCreateParams.Mode mode) { * *

If a Customer is created or provided, * the names can be saved to the Customer object as well. + * + *

You can't set this parameter if {@code ui_mode} is {@code custom}. */ public Builder setNameCollection(SessionCreateParams.NameCollection nameCollection) { this.nameCollection = nameCollection; @@ -1109,7 +1128,7 @@ public Builder addAllOptionalItem(List element /** * Where the user is coming from. This informs the optimizations that are applied to the - * session. + * session. You can't set this parameter if {@code ui_mode} is {@code custom}. */ public Builder setOriginContext(SessionCreateParams.OriginContext originContext) { this.originContext = originContext; @@ -1297,7 +1316,7 @@ public Builder addAllShippingOption(List ele * Describes the type of transaction being performed by Checkout in order to customize relevant * text on the page, such as the submit button. {@code submit_type} can only be specified on * Checkout Sessions in {@code payment} or {@code subscription} mode. If blank or {@code auto}, - * {@code pay} is used. + * {@code pay} is used. You can't set this parameter if {@code ui_mode} is {@code custom}. */ public Builder setSubmitType(SessionCreateParams.SubmitType submitType) { this.submitType = submitType; @@ -4757,7 +4776,8 @@ public static class LineItem { /** * The tax rates that will be applied to * this line item depending on the customer's billing/shipping address. We currently support the - * following countries: US, GB, AU, and all countries in the EU. + * following countries: US, GB, AU, and all countries in the EU. You can't set this parameter if + * {@code ui_mode} is {@code custom}. */ @SerializedName("dynamic_tax_rates") List dynamicTaxRates; @@ -7143,7 +7163,10 @@ public enum AllowRedisplay implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) public static class PaymentMethodOptions { - /** contains details about the ACSS Debit payment method options. */ + /** + * contains details about the ACSS Debit payment method options. You can't set this parameter if + * {@code ui_mode} is {@code custom}. + */ @SerializedName("acss_debit") AcssDebit acssDebit; @@ -7575,7 +7598,10 @@ public SessionCreateParams.PaymentMethodOptions build() { this.wechatPay); } - /** contains details about the ACSS Debit payment method options. */ + /** + * contains details about the ACSS Debit payment method options. You can't set this parameter + * if {@code ui_mode} is {@code custom}. + */ public Builder setAcssDebit(SessionCreateParams.PaymentMethodOptions.AcssDebit acssDebit) { this.acssDebit = acssDebit; return this; @@ -9863,7 +9889,7 @@ public static class Card { /** * Restrictions to apply to the card payment method. For example, you can block specific card - * brands. + * brands. You can't set this parameter if {@code ui_mode} is {@code custom}. */ @SerializedName("restrictions") Restrictions restrictions; @@ -10087,7 +10113,7 @@ public Builder setRequestThreeDSecure( /** * Restrictions to apply to the card payment method. For example, you can block specific - * card brands. + * card brands. You can't set this parameter if {@code ui_mode} is {@code custom}. */ public Builder setRestrictions( SessionCreateParams.PaymentMethodOptions.Card.Restrictions restrictions) { @@ -18692,7 +18718,10 @@ public static class SubscriptionData { @SerializedName("application_fee_percent") BigDecimal applicationFeePercent; - /** A future timestamp to anchor the subscription's billing cycle for new subscriptions. */ + /** + * A future timestamp to anchor the subscription's billing cycle for new subscriptions. You + * can't set this parameter if {@code ui_mode} is {@code custom}. + */ @SerializedName("billing_cycle_anchor") Long billingCycleAnchor; @@ -18870,7 +18899,10 @@ public Builder setApplicationFeePercent(BigDecimal applicationFeePercent) { return this; } - /** A future timestamp to anchor the subscription's billing cycle for new subscriptions. */ + /** + * A future timestamp to anchor the subscription's billing cycle for new subscriptions. You + * can't set this parameter if {@code ui_mode} is {@code custom}. + */ public Builder setBillingCycleAnchor(Long billingCycleAnchor) { this.billingCycleAnchor = billingCycleAnchor; return this; @@ -19723,7 +19755,10 @@ public static class TaxIdCollection { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Describes whether a tax ID is required during checkout. Defaults to {@code never}. */ + /** + * Describes whether a tax ID is required during checkout. Defaults to {@code never}. You can't + * set this parameter if {@code ui_mode} is {@code custom}. + */ @SerializedName("required") Required required; @@ -19785,7 +19820,10 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Describes whether a tax ID is required during checkout. Defaults to {@code never}. */ + /** + * Describes whether a tax ID is required during checkout. Defaults to {@code never}. You + * can't set this parameter if {@code ui_mode} is {@code custom}. + */ public Builder setRequired(SessionCreateParams.TaxIdCollection.Required required) { this.required = required; return this; diff --git a/src/main/java/com/stripe/param/radar/PaymentEvaluationCreateParams.java b/src/main/java/com/stripe/param/radar/PaymentEvaluationCreateParams.java new file mode 100644 index 00000000000..d9072f65bdf --- /dev/null +++ b/src/main/java/com/stripe/param/radar/PaymentEvaluationCreateParams.java @@ -0,0 +1,1483 @@ +// File generated from our OpenAPI spec +package com.stripe.param.radar; + +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 PaymentEvaluationCreateParams extends ApiRequestParams { + /** Details about the Client Device Metadata to associate with the payment evaluation. */ + @SerializedName("client_device_metadata_details") + ClientDeviceMetadataDetails clientDeviceMetadataDetails; + + /** + * Required. Details about the customer associated with the payment evaluation. + */ + @SerializedName("customer_details") + CustomerDetails customerDetails; + + /** Specifies which fields in the response should be expanded. */ + @SerializedName("expand") + List expand; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * 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. Individual keys can be unset by posting an empty value to them. All keys can + * be unset by posting an empty value to {@code metadata}. + */ + @SerializedName("metadata") + Map metadata; + + /** Required. Details about the payment. */ + @SerializedName("payment_details") + PaymentDetails paymentDetails; + + private PaymentEvaluationCreateParams( + ClientDeviceMetadataDetails clientDeviceMetadataDetails, + CustomerDetails customerDetails, + List expand, + Map extraParams, + Map metadata, + PaymentDetails paymentDetails) { + this.clientDeviceMetadataDetails = clientDeviceMetadataDetails; + this.customerDetails = customerDetails; + this.expand = expand; + this.extraParams = extraParams; + this.metadata = metadata; + this.paymentDetails = paymentDetails; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private ClientDeviceMetadataDetails clientDeviceMetadataDetails; + + private CustomerDetails customerDetails; + + private List expand; + + private Map extraParams; + + private Map metadata; + + private PaymentDetails paymentDetails; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentEvaluationCreateParams build() { + return new PaymentEvaluationCreateParams( + this.clientDeviceMetadataDetails, + this.customerDetails, + this.expand, + this.extraParams, + this.metadata, + this.paymentDetails); + } + + /** Details about the Client Device Metadata to associate with the payment evaluation. */ + public Builder setClientDeviceMetadataDetails( + PaymentEvaluationCreateParams.ClientDeviceMetadataDetails clientDeviceMetadataDetails) { + this.clientDeviceMetadataDetails = clientDeviceMetadataDetails; + return this; + } + + /** + * Required. Details about the customer associated with the payment evaluation. + */ + public Builder setCustomerDetails( + PaymentEvaluationCreateParams.CustomerDetails customerDetails) { + this.customerDetails = customerDetails; + return this; + } + + /** + * Add an element to `expand` list. A list is initialized for the first `add/addAll` call, and + * subsequent calls adds additional elements to the original list. See {@link + * PaymentEvaluationCreateParams#expand} for the field documentation. + */ + public Builder addExpand(String element) { + if (this.expand == null) { + this.expand = new ArrayList<>(); + } + this.expand.add(element); + return this; + } + + /** + * Add all elements to `expand` list. A list is initialized for the first `add/addAll` call, and + * subsequent calls adds additional elements to the original list. See {@link + * PaymentEvaluationCreateParams#expand} for the field documentation. + */ + public Builder addAllExpand(List elements) { + if (this.expand == null) { + this.expand = new ArrayList<>(); + } + this.expand.addAll(elements); + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PaymentEvaluationCreateParams#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 PaymentEvaluationCreateParams#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 `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 + * PaymentEvaluationCreateParams#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 PaymentEvaluationCreateParams#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. Details about the payment. */ + public Builder setPaymentDetails(PaymentEvaluationCreateParams.PaymentDetails paymentDetails) { + this.paymentDetails = paymentDetails; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class ClientDeviceMetadataDetails { + /** + * 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. ID for the Radar Session to associate with the payment evaluation. + * A Radar Session is a snapshot of + * the browser metadata and device details that help Radar make more accurate predictions on + * your payments. + */ + @SerializedName("radar_session") + String radarSession; + + private ClientDeviceMetadataDetails(Map extraParams, String radarSession) { + this.extraParams = extraParams; + this.radarSession = radarSession; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String radarSession; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentEvaluationCreateParams.ClientDeviceMetadataDetails build() { + return new PaymentEvaluationCreateParams.ClientDeviceMetadataDetails( + this.extraParams, this.radarSession); + } + + /** + * 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 + * PaymentEvaluationCreateParams.ClientDeviceMetadataDetails#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 PaymentEvaluationCreateParams.ClientDeviceMetadataDetails#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. ID for the Radar Session to associate with the payment + * evaluation. A Radar Session is a + * snapshot of the browser metadata and device details that help Radar make more accurate + * predictions on your payments. + */ + public Builder setRadarSession(String radarSession) { + this.radarSession = radarSession; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class CustomerDetails { + /** The ID of the customer associated with the payment evaluation. */ + @SerializedName("customer") + String customer; + + /** The ID of the Account representing the customer associated with the payment evaluation. */ + @SerializedName("customer_account") + String customerAccount; + + /** The customer's email address. */ + @SerializedName("email") + String email; + + /** + * 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 customer's full name or business name. */ + @SerializedName("name") + String name; + + /** The customer's phone number. */ + @SerializedName("phone") + String phone; + + private CustomerDetails( + String customer, + String customerAccount, + String email, + Map extraParams, + String name, + String phone) { + this.customer = customer; + this.customerAccount = customerAccount; + this.email = email; + this.extraParams = extraParams; + this.name = name; + this.phone = phone; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String customer; + + private String customerAccount; + + private String email; + + private Map extraParams; + + private String name; + + private String phone; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentEvaluationCreateParams.CustomerDetails build() { + return new PaymentEvaluationCreateParams.CustomerDetails( + this.customer, + this.customerAccount, + this.email, + this.extraParams, + this.name, + this.phone); + } + + /** The ID of the customer associated with the payment evaluation. */ + public Builder setCustomer(String customer) { + this.customer = customer; + return this; + } + + /** The ID of the Account representing the customer associated with the payment evaluation. */ + public Builder setCustomerAccount(String customerAccount) { + this.customerAccount = customerAccount; + return this; + } + + /** The customer's email address. */ + public Builder setEmail(String email) { + this.email = email; + 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 + * PaymentEvaluationCreateParams.CustomerDetails#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 PaymentEvaluationCreateParams.CustomerDetails#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 customer's full name or business name. */ + public Builder setName(String name) { + this.name = name; + return this; + } + + /** The customer's phone number. */ + public Builder setPhone(String phone) { + this.phone = phone; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class PaymentDetails { + /** + * Required. The intended amount to collect with this payment. A positive + * integer representing how much to charge in the smallest currency unit (for + * example, 100 cents to charge 1.00 USD or 100 to charge 100 Yen, a zero-decimal currency). + */ + @SerializedName("amount") + Long amount; + + /** + * Required. Three-letter ISO currency code, in lowercase. + * Must be a supported currency. + */ + @SerializedName("currency") + String currency; + + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + @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; + + /** Details about the payment's customer presence and type. */ + @SerializedName("money_movement_details") + MoneyMovementDetails moneyMovementDetails; + + /** Required. Details about the payment method to use for the payment. */ + @SerializedName("payment_method_details") + PaymentMethodDetails paymentMethodDetails; + + /** Shipping details for the payment evaluation. */ + @SerializedName("shipping_details") + ShippingDetails shippingDetails; + + /** Payment statement descriptor. */ + @SerializedName("statement_descriptor") + String statementDescriptor; + + private PaymentDetails( + Long amount, + String currency, + String description, + Map extraParams, + MoneyMovementDetails moneyMovementDetails, + PaymentMethodDetails paymentMethodDetails, + ShippingDetails shippingDetails, + String statementDescriptor) { + this.amount = amount; + this.currency = currency; + this.description = description; + this.extraParams = extraParams; + this.moneyMovementDetails = moneyMovementDetails; + this.paymentMethodDetails = paymentMethodDetails; + this.shippingDetails = shippingDetails; + this.statementDescriptor = statementDescriptor; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long amount; + + private String currency; + + private String description; + + private Map extraParams; + + private MoneyMovementDetails moneyMovementDetails; + + private PaymentMethodDetails paymentMethodDetails; + + private ShippingDetails shippingDetails; + + private String statementDescriptor; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentEvaluationCreateParams.PaymentDetails build() { + return new PaymentEvaluationCreateParams.PaymentDetails( + this.amount, + this.currency, + this.description, + this.extraParams, + this.moneyMovementDetails, + this.paymentMethodDetails, + this.shippingDetails, + this.statementDescriptor); + } + + /** + * Required. The intended amount to collect with this payment. A positive + * integer representing how much to charge in the smallest currency unit (for + * example, 100 cents to charge 1.00 USD or 100 to charge 100 Yen, a zero-decimal currency). + */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } + + /** + * Required. Three-letter ISO currency code, in + * lowercase. Must be a supported currency. + */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } + + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + 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 + * PaymentEvaluationCreateParams.PaymentDetails#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 PaymentEvaluationCreateParams.PaymentDetails#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Details about the payment's customer presence and type. */ + public Builder setMoneyMovementDetails( + PaymentEvaluationCreateParams.PaymentDetails.MoneyMovementDetails moneyMovementDetails) { + this.moneyMovementDetails = moneyMovementDetails; + return this; + } + + /** Required. Details about the payment method to use for the payment. */ + public Builder setPaymentMethodDetails( + PaymentEvaluationCreateParams.PaymentDetails.PaymentMethodDetails paymentMethodDetails) { + this.paymentMethodDetails = paymentMethodDetails; + return this; + } + + /** Shipping details for the payment evaluation. */ + public Builder setShippingDetails( + PaymentEvaluationCreateParams.PaymentDetails.ShippingDetails shippingDetails) { + this.shippingDetails = shippingDetails; + return this; + } + + /** Payment statement descriptor. */ + public Builder setStatementDescriptor(String statementDescriptor) { + this.statementDescriptor = statementDescriptor; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class MoneyMovementDetails { + /** Describes card money movement details for the payment evaluation. */ + @SerializedName("card") + Card 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; + + /** + * Required. Describes the type of money movement. Currently only {@code + * card} is supported. + */ + @SerializedName("money_movement_type") + MoneyMovementType moneyMovementType; + + private MoneyMovementDetails( + Card card, Map extraParams, MoneyMovementType moneyMovementType) { + this.card = card; + this.extraParams = extraParams; + this.moneyMovementType = moneyMovementType; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Card card; + + private Map extraParams; + + private MoneyMovementType moneyMovementType; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentEvaluationCreateParams.PaymentDetails.MoneyMovementDetails build() { + return new PaymentEvaluationCreateParams.PaymentDetails.MoneyMovementDetails( + this.card, this.extraParams, this.moneyMovementType); + } + + /** Describes card money movement details for the payment evaluation. */ + public Builder setCard( + PaymentEvaluationCreateParams.PaymentDetails.MoneyMovementDetails.Card 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 + * PaymentEvaluationCreateParams.PaymentDetails.MoneyMovementDetails#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 + * PaymentEvaluationCreateParams.PaymentDetails.MoneyMovementDetails#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. Describes the type of money movement. Currently only {@code + * card} is supported. + */ + public Builder setMoneyMovementType( + PaymentEvaluationCreateParams.PaymentDetails.MoneyMovementDetails.MoneyMovementType + moneyMovementType) { + this.moneyMovementType = moneyMovementType; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Card { + /** Describes the presence of the customer during the payment. */ + @SerializedName("customer_presence") + CustomerPresence customerPresence; + + /** + * 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; + + /** Describes the type of payment. */ + @SerializedName("payment_type") + PaymentType paymentType; + + private Card( + CustomerPresence customerPresence, + Map extraParams, + PaymentType paymentType) { + this.customerPresence = customerPresence; + this.extraParams = extraParams; + this.paymentType = paymentType; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private CustomerPresence customerPresence; + + private Map extraParams; + + private PaymentType paymentType; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentEvaluationCreateParams.PaymentDetails.MoneyMovementDetails.Card build() { + return new PaymentEvaluationCreateParams.PaymentDetails.MoneyMovementDetails.Card( + this.customerPresence, this.extraParams, this.paymentType); + } + + /** Describes the presence of the customer during the payment. */ + public Builder setCustomerPresence( + PaymentEvaluationCreateParams.PaymentDetails.MoneyMovementDetails.Card + .CustomerPresence + customerPresence) { + this.customerPresence = customerPresence; + 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 + * PaymentEvaluationCreateParams.PaymentDetails.MoneyMovementDetails.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 + * PaymentEvaluationCreateParams.PaymentDetails.MoneyMovementDetails.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; + } + + /** Describes the type of payment. */ + public Builder setPaymentType( + PaymentEvaluationCreateParams.PaymentDetails.MoneyMovementDetails.Card.PaymentType + paymentType) { + this.paymentType = paymentType; + return this; + } + } + + public enum CustomerPresence implements ApiRequestParams.EnumParam { + @SerializedName("off_session") + OFF_SESSION("off_session"), + + @SerializedName("on_session") + ON_SESSION("on_session"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + CustomerPresence(String value) { + this.value = value; + } + } + + public enum PaymentType implements ApiRequestParams.EnumParam { + @SerializedName("one_off") + ONE_OFF("one_off"), + + @SerializedName("recurring") + RECURRING("recurring"), + + @SerializedName("setup_one_off") + SETUP_ONE_OFF("setup_one_off"), + + @SerializedName("setup_recurring") + SETUP_RECURRING("setup_recurring"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + PaymentType(String value) { + this.value = value; + } + } + } + + public enum MoneyMovementType implements ApiRequestParams.EnumParam { + @SerializedName("card") + CARD("card"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + MoneyMovementType(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class PaymentMethodDetails { + /** Billing information associated with the payment evaluation. */ + @SerializedName("billing_details") + BillingDetails billingDetails; + + /** + * 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. ID of the payment method used in this payment evaluation. */ + @SerializedName("payment_method") + String paymentMethod; + + private PaymentMethodDetails( + BillingDetails billingDetails, Map extraParams, String paymentMethod) { + this.billingDetails = billingDetails; + this.extraParams = extraParams; + this.paymentMethod = paymentMethod; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private BillingDetails billingDetails; + + private Map extraParams; + + private String paymentMethod; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentEvaluationCreateParams.PaymentDetails.PaymentMethodDetails build() { + return new PaymentEvaluationCreateParams.PaymentDetails.PaymentMethodDetails( + this.billingDetails, this.extraParams, this.paymentMethod); + } + + /** Billing information associated with the payment evaluation. */ + public Builder setBillingDetails( + PaymentEvaluationCreateParams.PaymentDetails.PaymentMethodDetails.BillingDetails + billingDetails) { + this.billingDetails = billingDetails; + 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 + * PaymentEvaluationCreateParams.PaymentDetails.PaymentMethodDetails#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 + * PaymentEvaluationCreateParams.PaymentDetails.PaymentMethodDetails#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. ID of the payment method used in this payment evaluation. */ + public Builder setPaymentMethod(String paymentMethod) { + this.paymentMethod = paymentMethod; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class BillingDetails { + /** Billing address. */ + @SerializedName("address") + Address address; + + /** Email address. */ + @SerializedName("email") + String email; + + /** + * 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; + + /** Full name. */ + @SerializedName("name") + String name; + + /** Billing phone number (including extension). */ + @SerializedName("phone") + String phone; + + private BillingDetails( + Address address, + String email, + Map extraParams, + String name, + String phone) { + this.address = address; + this.email = email; + this.extraParams = extraParams; + this.name = name; + this.phone = phone; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Address address; + + private String email; + + private Map extraParams; + + private String name; + + private String phone; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentEvaluationCreateParams.PaymentDetails.PaymentMethodDetails.BillingDetails + build() { + return new PaymentEvaluationCreateParams.PaymentDetails.PaymentMethodDetails + .BillingDetails(this.address, this.email, this.extraParams, this.name, this.phone); + } + + /** Billing address. */ + public Builder setAddress( + PaymentEvaluationCreateParams.PaymentDetails.PaymentMethodDetails.BillingDetails + .Address + address) { + this.address = address; + return this; + } + + /** Email address. */ + public Builder setEmail(String email) { + this.email = email; + 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 + * PaymentEvaluationCreateParams.PaymentDetails.PaymentMethodDetails.BillingDetails#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 + * PaymentEvaluationCreateParams.PaymentDetails.PaymentMethodDetails.BillingDetails#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Full name. */ + public Builder setName(String name) { + this.name = name; + return this; + } + + /** Billing phone number (including extension). */ + public Builder setPhone(String phone) { + this.phone = phone; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Address { + /** City, district, suburb, town, or village. */ + @SerializedName("city") + String city; + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + @SerializedName("country") + String 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; + + /** Address line 1, such as the street, PO Box, or company name. */ + @SerializedName("line1") + String line1; + + /** Address line 2, such as the apartment, suite, unit, or building. */ + @SerializedName("line2") + String line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + String postalCode; + + /** + * State, county, province, or region (ISO 3166-2). + */ + @SerializedName("state") + String state; + + private Address( + String city, + String country, + Map extraParams, + String line1, + String line2, + String postalCode, + String state) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.line1 = line1; + this.line2 = line2; + this.postalCode = postalCode; + this.state = state; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String city; + + private String country; + + private Map extraParams; + + private String line1; + + private String line2; + + private String postalCode; + + private String state; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentEvaluationCreateParams.PaymentDetails.PaymentMethodDetails.BillingDetails + .Address + build() { + return new PaymentEvaluationCreateParams.PaymentDetails.PaymentMethodDetails + .BillingDetails.Address( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.state); + } + + /** City, district, suburb, town, or village. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** + * Two-letter country code (ISO 3166-1 alpha-2). + */ + public Builder setCountry(String 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 + * PaymentEvaluationCreateParams.PaymentDetails.PaymentMethodDetails.BillingDetails.Address#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 + * PaymentEvaluationCreateParams.PaymentDetails.PaymentMethodDetails.BillingDetails.Address#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Address line 1, such as the street, PO Box, or company name. */ + public Builder setLine1(String line1) { + this.line1 = line1; + return this; + } + + /** Address line 2, such as the apartment, suite, unit, or building. */ + public Builder setLine2(String line2) { + this.line2 = line2; + return this; + } + + /** ZIP or postal code. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** + * State, county, province, or region (ISO 3166-2). + */ + public Builder setState(String state) { + this.state = state; + return this; + } + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class ShippingDetails { + /** Shipping address. */ + @SerializedName("address") + Address address; + + /** + * 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; + + /** Shipping name. */ + @SerializedName("name") + String name; + + /** Shipping phone number. */ + @SerializedName("phone") + String phone; + + private ShippingDetails( + Address address, Map extraParams, String name, String phone) { + this.address = address; + this.extraParams = extraParams; + this.name = name; + this.phone = phone; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Address address; + + private Map extraParams; + + private String name; + + private String phone; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentEvaluationCreateParams.PaymentDetails.ShippingDetails build() { + return new PaymentEvaluationCreateParams.PaymentDetails.ShippingDetails( + this.address, this.extraParams, this.name, this.phone); + } + + /** Shipping address. */ + public Builder setAddress( + PaymentEvaluationCreateParams.PaymentDetails.ShippingDetails.Address address) { + this.address = address; + 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 PaymentEvaluationCreateParams.PaymentDetails.ShippingDetails#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 PaymentEvaluationCreateParams.PaymentDetails.ShippingDetails#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Shipping name. */ + public Builder setName(String name) { + this.name = name; + return this; + } + + /** Shipping phone number. */ + public Builder setPhone(String phone) { + this.phone = phone; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Address { + /** City, district, suburb, town, or village. */ + @SerializedName("city") + String city; + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + @SerializedName("country") + String 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; + + /** Address line 1, such as the street, PO Box, or company name. */ + @SerializedName("line1") + String line1; + + /** Address line 2, such as the apartment, suite, unit, or building. */ + @SerializedName("line2") + String line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + String postalCode; + + /** + * State, county, province, or region (ISO 3166-2). + */ + @SerializedName("state") + String state; + + private Address( + String city, + String country, + Map extraParams, + String line1, + String line2, + String postalCode, + String state) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.line1 = line1; + this.line2 = line2; + this.postalCode = postalCode; + this.state = state; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String city; + + private String country; + + private Map extraParams; + + private String line1; + + private String line2; + + private String postalCode; + + private String state; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentEvaluationCreateParams.PaymentDetails.ShippingDetails.Address build() { + return new PaymentEvaluationCreateParams.PaymentDetails.ShippingDetails.Address( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.state); + } + + /** City, district, suburb, town, or village. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + public Builder setCountry(String 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 + * PaymentEvaluationCreateParams.PaymentDetails.ShippingDetails.Address#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 + * PaymentEvaluationCreateParams.PaymentDetails.ShippingDetails.Address#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Address line 1, such as the street, PO Box, or company name. */ + public Builder setLine1(String line1) { + this.line1 = line1; + return this; + } + + /** Address line 2, such as the apartment, suite, unit, or building. */ + public Builder setLine2(String line2) { + this.line2 = line2; + return this; + } + + /** ZIP or postal code. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** + * State, county, province, or region (ISO 3166-2). + */ + public Builder setState(String state) { + this.state = state; + return this; + } + } + } + } + } +} diff --git a/src/main/java/com/stripe/param/tax/CalculationCreateParams.java b/src/main/java/com/stripe/param/tax/CalculationCreateParams.java index 10433a7db45..e11770bc6ca 100644 --- a/src/main/java/com/stripe/param/tax/CalculationCreateParams.java +++ b/src/main/java/com/stripe/param/tax/CalculationCreateParams.java @@ -646,11 +646,12 @@ public static class TaxId { * ma_vat}, {@code md_vat}, {@code me_pib}, {@code mk_vat}, {@code mr_nif}, {@code mx_rfc}, * {@code my_frp}, {@code my_itn}, {@code my_sst}, {@code ng_tin}, {@code no_vat}, {@code * no_voec}, {@code np_pan}, {@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 sn_ninea}, {@code sr_fin}, {@code sv_nit}, - * {@code th_vat}, {@code tj_tin}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, {@code - * ua_vat}, {@code ug_tin}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, - * {@code ve_rif}, {@code vn_tin}, {@code za_vat}, {@code zm_tin}, or {@code zw_tin} + * {@code pl_nip}, {@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 sn_ninea}, {@code sr_fin}, + * {@code sv_nit}, {@code th_vat}, {@code tj_tin}, {@code tr_tin}, {@code tw_vat}, {@code + * tz_vat}, {@code ua_vat}, {@code ug_tin}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, + * {@code uz_vat}, {@code ve_rif}, {@code vn_tin}, {@code za_vat}, {@code zm_tin}, or {@code + * zw_tin} */ @SerializedName("type") Type type; @@ -727,12 +728,12 @@ public Builder putAllExtraParam(Map map) { * {@code ma_vat}, {@code md_vat}, {@code me_pib}, {@code mk_vat}, {@code mr_nif}, {@code * mx_rfc}, {@code my_frp}, {@code my_itn}, {@code my_sst}, {@code ng_tin}, {@code no_vat}, * {@code no_voec}, {@code np_pan}, {@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 sn_ninea}, {@code sr_fin}, {@code - * sv_nit}, {@code th_vat}, {@code tj_tin}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, - * {@code ua_vat}, {@code ug_tin}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code - * uz_vat}, {@code ve_rif}, {@code vn_tin}, {@code za_vat}, {@code zm_tin}, or {@code - * zw_tin} + * ph_tin}, {@code pl_nip}, {@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 sn_ninea}, {@code + * sr_fin}, {@code sv_nit}, {@code th_vat}, {@code tj_tin}, {@code tr_tin}, {@code tw_vat}, + * {@code tz_vat}, {@code ua_vat}, {@code ug_tin}, {@code us_ein}, {@code uy_ruc}, {@code + * uz_tin}, {@code uz_vat}, {@code ve_rif}, {@code vn_tin}, {@code za_vat}, {@code zm_tin}, + * or {@code zw_tin} */ public Builder setType(CalculationCreateParams.CustomerDetails.TaxId.Type type) { this.type = type; @@ -996,6 +997,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("ph_tin") PH_TIN("ph_tin"), + @SerializedName("pl_nip") + PL_NIP("pl_nip"), + @SerializedName("ro_tin") RO_TIN("ro_tin"), diff --git a/src/main/java/com/stripe/param/terminal/ConfigurationCreateParams.java b/src/main/java/com/stripe/param/terminal/ConfigurationCreateParams.java index e3a2a6341cc..d4013302e2b 100644 --- a/src/main/java/com/stripe/param/terminal/ConfigurationCreateParams.java +++ b/src/main/java/com/stripe/param/terminal/ConfigurationCreateParams.java @@ -51,7 +51,7 @@ public class ConfigurationCreateParams extends ApiRequestParams { @SerializedName("stripe_s700") StripeS700 stripeS700; - /** Tipping configurations for readers. supporting on-reader tips */ + /** Tipping configurations for readers that support on-reader tips. */ @SerializedName("tipping") Object tipping; @@ -225,13 +225,13 @@ public Builder setStripeS700(ConfigurationCreateParams.StripeS700 stripeS700) { return this; } - /** Tipping configurations for readers. supporting on-reader tips */ + /** Tipping configurations for readers that support on-reader tips. */ public Builder setTipping(ConfigurationCreateParams.Tipping tipping) { this.tipping = tipping; return this; } - /** Tipping configurations for readers. supporting on-reader tips */ + /** Tipping configurations for readers that support on-reader tips. */ public Builder setTipping(EmptyParam tipping) { this.tipping = tipping; return this; @@ -664,10 +664,6 @@ public static class Tipping { @SerializedName("aud") Aud aud; - /** Tipping configuration for BGN. */ - @SerializedName("bgn") - Bgn bgn; - /** Tipping configuration for CAD. */ @SerializedName("cad") Cad cad; @@ -756,7 +752,6 @@ public static class Tipping { private Tipping( Aed aed, Aud aud, - Bgn bgn, Cad cad, Chf chf, Czk czk, @@ -779,7 +774,6 @@ private Tipping( Usd usd) { this.aed = aed; this.aud = aud; - this.bgn = bgn; this.cad = cad; this.chf = chf; this.czk = czk; @@ -811,8 +805,6 @@ public static class Builder { private Aud aud; - private Bgn bgn; - private Cad cad; private Chf chf; @@ -858,7 +850,6 @@ public ConfigurationCreateParams.Tipping build() { return new ConfigurationCreateParams.Tipping( this.aed, this.aud, - this.bgn, this.cad, this.chf, this.czk, @@ -893,12 +884,6 @@ public Builder setAud(ConfigurationCreateParams.Tipping.Aud aud) { return this; } - /** Tipping configuration for BGN. */ - public Builder setBgn(ConfigurationCreateParams.Tipping.Bgn bgn) { - this.bgn = bgn; - return this; - } - /** Tipping configuration for CAD. */ public Builder setCad(ConfigurationCreateParams.Tipping.Cad cad) { this.cad = cad; @@ -1336,154 +1321,6 @@ public Builder setSmartTipThreshold(Long smartTipThreshold) { } } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Bgn { - /** - * 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; - - /** Fixed amounts displayed when collecting a tip. */ - @SerializedName("fixed_amounts") - List fixedAmounts; - - /** Percentages displayed when collecting a tip. */ - @SerializedName("percentages") - List percentages; - - /** - * Below this amount, fixed amounts will be displayed; above it, percentages will be - * displayed. - */ - @SerializedName("smart_tip_threshold") - Long smartTipThreshold; - - private Bgn( - Map extraParams, - List fixedAmounts, - List percentages, - Long smartTipThreshold) { - this.extraParams = extraParams; - this.fixedAmounts = fixedAmounts; - this.percentages = percentages; - this.smartTipThreshold = smartTipThreshold; - } - - public static Builder builder() { - return new Builder(); - } - - public static class Builder { - private Map extraParams; - - private List fixedAmounts; - - private List percentages; - - private Long smartTipThreshold; - - /** Finalize and obtain parameter instance from this builder. */ - public ConfigurationCreateParams.Tipping.Bgn build() { - return new ConfigurationCreateParams.Tipping.Bgn( - this.extraParams, this.fixedAmounts, this.percentages, this.smartTipThreshold); - } - - /** - * 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 ConfigurationCreateParams.Tipping.Bgn#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 ConfigurationCreateParams.Tipping.Bgn#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 `fixedAmounts` list. A list is initialized for the first `add/addAll` - * call, and subsequent calls adds additional elements to the original list. See {@link - * ConfigurationCreateParams.Tipping.Bgn#fixedAmounts} for the field documentation. - */ - public Builder addFixedAmount(Long element) { - if (this.fixedAmounts == null) { - this.fixedAmounts = new ArrayList<>(); - } - this.fixedAmounts.add(element); - return this; - } - - /** - * Add all elements to `fixedAmounts` list. A list is initialized for the first `add/addAll` - * call, and subsequent calls adds additional elements to the original list. See {@link - * ConfigurationCreateParams.Tipping.Bgn#fixedAmounts} for the field documentation. - */ - public Builder addAllFixedAmount(List elements) { - if (this.fixedAmounts == null) { - this.fixedAmounts = new ArrayList<>(); - } - this.fixedAmounts.addAll(elements); - return this; - } - - /** - * Add an element to `percentages` list. A list is initialized for the first `add/addAll` - * call, and subsequent calls adds additional elements to the original list. See {@link - * ConfigurationCreateParams.Tipping.Bgn#percentages} for the field documentation. - */ - public Builder addPercentage(Long element) { - if (this.percentages == null) { - this.percentages = new ArrayList<>(); - } - this.percentages.add(element); - return this; - } - - /** - * Add all elements to `percentages` list. A list is initialized for the first `add/addAll` - * call, and subsequent calls adds additional elements to the original list. See {@link - * ConfigurationCreateParams.Tipping.Bgn#percentages} for the field documentation. - */ - public Builder addAllPercentage(List elements) { - if (this.percentages == null) { - this.percentages = new ArrayList<>(); - } - this.percentages.addAll(elements); - return this; - } - - /** - * Below this amount, fixed amounts will be displayed; above it, percentages will be - * displayed. - */ - public Builder setSmartTipThreshold(Long smartTipThreshold) { - this.smartTipThreshold = smartTipThreshold; - return this; - } - } - } - @Getter @EqualsAndHashCode(callSuper = false) public static class Cad { diff --git a/src/main/java/com/stripe/param/terminal/ConfigurationUpdateParams.java b/src/main/java/com/stripe/param/terminal/ConfigurationUpdateParams.java index 382ad087f68..f51015f5fdd 100644 --- a/src/main/java/com/stripe/param/terminal/ConfigurationUpdateParams.java +++ b/src/main/java/com/stripe/param/terminal/ConfigurationUpdateParams.java @@ -700,10 +700,6 @@ public static class Tipping { @SerializedName("aud") Aud aud; - /** Tipping configuration for BGN. */ - @SerializedName("bgn") - Bgn bgn; - /** Tipping configuration for CAD. */ @SerializedName("cad") Cad cad; @@ -792,7 +788,6 @@ public static class Tipping { private Tipping( Aed aed, Aud aud, - Bgn bgn, Cad cad, Chf chf, Czk czk, @@ -815,7 +810,6 @@ private Tipping( Usd usd) { this.aed = aed; this.aud = aud; - this.bgn = bgn; this.cad = cad; this.chf = chf; this.czk = czk; @@ -847,8 +841,6 @@ public static class Builder { private Aud aud; - private Bgn bgn; - private Cad cad; private Chf chf; @@ -894,7 +886,6 @@ public ConfigurationUpdateParams.Tipping build() { return new ConfigurationUpdateParams.Tipping( this.aed, this.aud, - this.bgn, this.cad, this.chf, this.czk, @@ -929,12 +920,6 @@ public Builder setAud(ConfigurationUpdateParams.Tipping.Aud aud) { return this; } - /** Tipping configuration for BGN. */ - public Builder setBgn(ConfigurationUpdateParams.Tipping.Bgn bgn) { - this.bgn = bgn; - return this; - } - /** Tipping configuration for CAD. */ public Builder setCad(ConfigurationUpdateParams.Tipping.Cad cad) { this.cad = cad; @@ -1372,154 +1357,6 @@ public Builder setSmartTipThreshold(Long smartTipThreshold) { } } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Bgn { - /** - * 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; - - /** Fixed amounts displayed when collecting a tip. */ - @SerializedName("fixed_amounts") - List fixedAmounts; - - /** Percentages displayed when collecting a tip. */ - @SerializedName("percentages") - List percentages; - - /** - * Below this amount, fixed amounts will be displayed; above it, percentages will be - * displayed. - */ - @SerializedName("smart_tip_threshold") - Long smartTipThreshold; - - private Bgn( - Map extraParams, - List fixedAmounts, - List percentages, - Long smartTipThreshold) { - this.extraParams = extraParams; - this.fixedAmounts = fixedAmounts; - this.percentages = percentages; - this.smartTipThreshold = smartTipThreshold; - } - - public static Builder builder() { - return new Builder(); - } - - public static class Builder { - private Map extraParams; - - private List fixedAmounts; - - private List percentages; - - private Long smartTipThreshold; - - /** Finalize and obtain parameter instance from this builder. */ - public ConfigurationUpdateParams.Tipping.Bgn build() { - return new ConfigurationUpdateParams.Tipping.Bgn( - this.extraParams, this.fixedAmounts, this.percentages, this.smartTipThreshold); - } - - /** - * 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 ConfigurationUpdateParams.Tipping.Bgn#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 ConfigurationUpdateParams.Tipping.Bgn#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 `fixedAmounts` list. A list is initialized for the first `add/addAll` - * call, and subsequent calls adds additional elements to the original list. See {@link - * ConfigurationUpdateParams.Tipping.Bgn#fixedAmounts} for the field documentation. - */ - public Builder addFixedAmount(Long element) { - if (this.fixedAmounts == null) { - this.fixedAmounts = new ArrayList<>(); - } - this.fixedAmounts.add(element); - return this; - } - - /** - * Add all elements to `fixedAmounts` list. A list is initialized for the first `add/addAll` - * call, and subsequent calls adds additional elements to the original list. See {@link - * ConfigurationUpdateParams.Tipping.Bgn#fixedAmounts} for the field documentation. - */ - public Builder addAllFixedAmount(List elements) { - if (this.fixedAmounts == null) { - this.fixedAmounts = new ArrayList<>(); - } - this.fixedAmounts.addAll(elements); - return this; - } - - /** - * Add an element to `percentages` list. A list is initialized for the first `add/addAll` - * call, and subsequent calls adds additional elements to the original list. See {@link - * ConfigurationUpdateParams.Tipping.Bgn#percentages} for the field documentation. - */ - public Builder addPercentage(Long element) { - if (this.percentages == null) { - this.percentages = new ArrayList<>(); - } - this.percentages.add(element); - return this; - } - - /** - * Add all elements to `percentages` list. A list is initialized for the first `add/addAll` - * call, and subsequent calls adds additional elements to the original list. See {@link - * ConfigurationUpdateParams.Tipping.Bgn#percentages} for the field documentation. - */ - public Builder addAllPercentage(List elements) { - if (this.percentages == null) { - this.percentages = new ArrayList<>(); - } - this.percentages.addAll(elements); - return this; - } - - /** - * Below this amount, fixed amounts will be displayed; above it, percentages will be - * displayed. - */ - public Builder setSmartTipThreshold(Long smartTipThreshold) { - this.smartTipThreshold = smartTipThreshold; - return this; - } - } - } - @Getter @EqualsAndHashCode(callSuper = false) public static class Cad { diff --git a/src/main/java/com/stripe/service/InvoiceService.java b/src/main/java/com/stripe/service/InvoiceService.java index 30efc494903..979dc51661d 100644 --- a/src/main/java/com/stripe/service/InvoiceService.java +++ b/src/main/java/com/stripe/service/InvoiceService.java @@ -181,8 +181,8 @@ public StripeCollection list(InvoiceListParams params, RequestOptions o /** * This endpoint creates a draft invoice for a given customer. The invoice remains a draft until * you finalize the invoice, which - * allows you to pay or send the invoice to your customers. + * allows you to pay or send the invoice to your customers. */ public Invoice create(InvoiceCreateParams params) throws StripeException { return create(params, (RequestOptions) null); @@ -190,8 +190,8 @@ public Invoice create(InvoiceCreateParams params) throws StripeException { /** * This endpoint creates a draft invoice for a given customer. The invoice remains a draft until * you finalize the invoice, which - * allows you to pay or send the invoice to your customers. + * allows you to pay or send the invoice to your customers. */ public Invoice create(RequestOptions options) throws StripeException { return create((InvoiceCreateParams) null, options); @@ -199,8 +199,8 @@ public Invoice create(RequestOptions options) throws StripeException { /** * This endpoint creates a draft invoice for a given customer. The invoice remains a draft until * you finalize the invoice, which - * allows you to pay or send the invoice to your customers. + * allows you to pay or send the invoice to your customers. */ public Invoice create() throws StripeException { return create((InvoiceCreateParams) null, (RequestOptions) null); @@ -208,8 +208,8 @@ public Invoice create() throws StripeException { /** * This endpoint creates a draft invoice for a given customer. The invoice remains a draft until * you finalize the invoice, which - * allows you to pay or send the invoice to your customers. + * allows you to pay or send the invoice to your customers. */ public Invoice create(InvoiceCreateParams params, RequestOptions options) throws StripeException { String path = "/v1/invoices"; diff --git a/src/main/java/com/stripe/service/RadarService.java b/src/main/java/com/stripe/service/RadarService.java index ab27ef3a18d..c3281a95d64 100644 --- a/src/main/java/com/stripe/service/RadarService.java +++ b/src/main/java/com/stripe/service/RadarService.java @@ -13,6 +13,10 @@ public com.stripe.service.radar.EarlyFraudWarningService earlyFraudWarnings() { return new com.stripe.service.radar.EarlyFraudWarningService(this.getResponseGetter()); } + public com.stripe.service.radar.PaymentEvaluationService paymentEvaluations() { + return new com.stripe.service.radar.PaymentEvaluationService(this.getResponseGetter()); + } + public com.stripe.service.radar.ValueListItemService valueListItems() { return new com.stripe.service.radar.ValueListItemService(this.getResponseGetter()); } diff --git a/src/main/java/com/stripe/service/checkout/SessionService.java b/src/main/java/com/stripe/service/checkout/SessionService.java index 1fd61f54801..b5a1799a1f1 100644 --- a/src/main/java/com/stripe/service/checkout/SessionService.java +++ b/src/main/java/com/stripe/service/checkout/SessionService.java @@ -100,8 +100,8 @@ public Session retrieve(String session, SessionRetrieveParams params, RequestOpt /** * Updates a Checkout Session object. * - *

Related guide: Dynamically - * update Checkout. + *

Related guide: Dynamically + * update a Checkout Session. */ public Session update(String session, SessionUpdateParams params) throws StripeException { return update(session, params, (RequestOptions) null); @@ -109,8 +109,8 @@ public Session update(String session, SessionUpdateParams params) throws StripeE /** * Updates a Checkout Session object. * - *

Related guide: Dynamically - * update Checkout. + *

Related guide: Dynamically + * update a Checkout Session. */ public Session update(String session, RequestOptions options) throws StripeException { return update(session, (SessionUpdateParams) null, options); @@ -118,8 +118,8 @@ public Session update(String session, RequestOptions options) throws StripeExcep /** * Updates a Checkout Session object. * - *

Related guide: Dynamically - * update Checkout. + *

Related guide: Dynamically + * update a Checkout Session. */ public Session update(String session) throws StripeException { return update(session, (SessionUpdateParams) null, (RequestOptions) null); @@ -127,8 +127,8 @@ public Session update(String session) throws StripeException { /** * Updates a Checkout Session object. * - *

Related guide: Dynamically - * update Checkout. + *

Related guide: Dynamically + * update a Checkout Session. */ public Session update(String session, SessionUpdateParams params, RequestOptions options) throws StripeException { diff --git a/src/main/java/com/stripe/service/radar/PaymentEvaluationService.java b/src/main/java/com/stripe/service/radar/PaymentEvaluationService.java new file mode 100644 index 00000000000..44a70e5f163 --- /dev/null +++ b/src/main/java/com/stripe/service/radar/PaymentEvaluationService.java @@ -0,0 +1,43 @@ +// File generated from our OpenAPI spec +package com.stripe.service.radar; + +import com.stripe.exception.StripeException; +import com.stripe.model.radar.PaymentEvaluation; +import com.stripe.net.ApiRequest; +import com.stripe.net.ApiRequestParams; +import com.stripe.net.ApiResource; +import com.stripe.net.ApiService; +import com.stripe.net.BaseAddress; +import com.stripe.net.RequestOptions; +import com.stripe.net.StripeResponseGetter; +import com.stripe.param.radar.PaymentEvaluationCreateParams; + +public final class PaymentEvaluationService extends ApiService { + public PaymentEvaluationService(StripeResponseGetter responseGetter) { + super(responseGetter); + } + + /** + * Request a Radar API fraud risk score from Stripe for a payment before sending it for external + * processor authorization. + */ + public PaymentEvaluation create(PaymentEvaluationCreateParams params) throws StripeException { + return create(params, (RequestOptions) null); + } + /** + * Request a Radar API fraud risk score from Stripe for a payment before sending it for external + * processor authorization. + */ + public PaymentEvaluation create(PaymentEvaluationCreateParams params, RequestOptions options) + throws StripeException { + String path = "/v1/radar/payment_evaluations"; + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, PaymentEvaluation.class); + } +}