From 1cb9b9cd6ee811f7dce197db8720a3ed29362ed6 Mon Sep 17 00:00:00 2001 From: "stripe-openapi[bot]" <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 23 Apr 2026 19:46:15 +0000 Subject: [PATCH 1/3] Update generated code (#2203) * Update generated code for v2240 and * Update generated code for v2249 and * Update generated code for v2252 and --------- Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Co-authored-by: Michael Broshi <94012587+mbroshi-stripe@users.noreply.github.com> --- CODEGEN_VERSION | 2 +- OPENAPI_VERSION | 2 +- src/main/java/com/stripe/ApiVersion.java | 2 +- src/main/java/com/stripe/model/Account.java | 18 + .../java/com/stripe/model/AccountSession.java | 56 ++ .../com/stripe/model/BalanceTransaction.java | 14 +- src/main/java/com/stripe/model/Charge.java | 48 +- .../com/stripe/model/ConfirmationToken.java | 17 +- src/main/java/com/stripe/model/Invoice.java | 117 +++- src/main/java/com/stripe/model/Mandate.java | 62 +- .../stripe/model/PaymentAttemptRecord.java | 38 +- .../java/com/stripe/model/PaymentIntent.java | 115 +++- .../java/com/stripe/model/PaymentLink.java | 28 + .../java/com/stripe/model/PaymentMethod.java | 17 +- .../model/PaymentMethodConfiguration.java | 55 ++ .../java/com/stripe/model/PaymentRecord.java | 38 +- .../java/com/stripe/model/SetupAttempt.java | 16 + .../java/com/stripe/model/SetupIntent.java | 134 ++++ .../java/com/stripe/model/StripeError.java | 20 +- .../java/com/stripe/model/Subscription.java | 176 +++++- src/main/java/com/stripe/model/TaxId.java | 26 +- .../com/stripe/model/checkout/Session.java | 122 +++- .../stripe/model/issuing/Authorization.java | 8 + .../java/com/stripe/model/issuing/Card.java | 21 +- .../com/stripe/model/issuing/Cardholder.java | 16 + .../stripe/model/radar/PaymentEvaluation.java | 14 +- .../com/stripe/model/radar/ValueList.java | 4 +- .../com/stripe/model/tax/Calculation.java | 38 +- .../com/stripe/model/tax/Transaction.java | 38 +- .../com/stripe/param/AccountCreateParams.java | 203 +++++- .../param/AccountSessionCreateParams.java | 348 ++++++++++ .../com/stripe/param/AccountUpdateParams.java | 192 ++++++ .../param/BalanceTransactionListParams.java | 33 +- .../param/ConfirmationTokenCreateParams.java | 82 +++ .../stripe/param/CustomerCreateParams.java | 65 +- .../CustomerListPaymentMethodsParams.java | 3 + .../CustomerPaymentMethodListParams.java | 3 + .../param/CustomerTaxIdCreateParams.java | 64 +- .../com/stripe/param/InvoiceCreateParams.java | 410 ++++++++++++ .../param/InvoiceCreatePreviewParams.java | 65 +- .../com/stripe/param/InvoiceUpdateParams.java | 419 ++++++++++++ .../param/PaymentIntentConfirmParams.java | 410 +++++++++++- .../param/PaymentIntentCreateParams.java | 395 +++++++++++- .../param/PaymentIntentUpdateParams.java | 432 ++++++++++++- .../stripe/param/PaymentLinkCreateParams.java | 108 ++++ .../stripe/param/PaymentLinkUpdateParams.java | 3 + ...aymentMethodConfigurationCreateParams.java | 194 ++++++ ...aymentMethodConfigurationUpdateParams.java | 194 ++++++ .../param/PaymentMethodCreateParams.java | 79 +++ .../stripe/param/PaymentMethodListParams.java | 3 + .../param/SetupIntentConfirmParams.java | 451 +++++++++++++ .../stripe/param/SetupIntentCreateParams.java | 454 +++++++++++++ .../stripe/param/SetupIntentUpdateParams.java | 491 ++++++++++++++ .../param/SubscriptionCreateParams.java | 579 +++++++++++++++++ .../param/SubscriptionUpdateParams.java | 597 ++++++++++++++++++ .../param/TaxIdCollectionCreateParams.java | 64 +- .../com/stripe/param/TaxIdCreateParams.java | 64 +- .../param/WebhookEndpointCreateParams.java | 5 +- .../param/billing/MeterCreateParams.java | 12 +- .../param/billing/MeterEventCreateParams.java | 4 +- .../param/checkout/SessionCreateParams.java | 403 +++++++++++- .../VerificationSessionCreateParams.java | 8 +- .../param/issuing/CardCreateParams.java | 112 ++++ .../param/issuing/CardUpdateParams.java | 112 ++++ .../param/issuing/CardholderCreateParams.java | 118 ++++ .../param/issuing/CardholderUpdateParams.java | 118 ++++ .../param/radar/ValueListCreateParams.java | 14 +- .../param/tax/CalculationCreateParams.java | 65 +- .../param/tax/RegistrationCreateParams.java | 22 +- .../stripe/service/SubscriptionService.java | 24 +- .../stripe/functional/GeneratedExamples.java | 60 +- 71 files changed, 8327 insertions(+), 417 deletions(-) diff --git a/CODEGEN_VERSION b/CODEGEN_VERSION index ccc00900eac..da5c58a2311 100644 --- a/CODEGEN_VERSION +++ b/CODEGEN_VERSION @@ -1 +1 @@ -58595eed5a9dffbf0f297ecaf3ac45acf36c5de3 \ No newline at end of file +9aa5ee4ed2b929f65b7fbf7c341f938682888500 \ No newline at end of file diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 4ec501ea29c..048a4fc1a73 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v2205 \ No newline at end of file +v2252 \ 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 87fc548b515..101c139ffd0 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 = "2026-03-25.dahlia"; + public static final String CURRENT = "2026-04-22.dahlia"; public static final String CURRENT_MAJOR = "dahlia"; } diff --git a/src/main/java/com/stripe/model/Account.java b/src/main/java/com/stripe/model/Account.java index e3667b54ef6..26e13f0a7b5 100644 --- a/src/main/java/com/stripe/model/Account.java +++ b/src/main/java/com/stripe/model/Account.java @@ -906,6 +906,15 @@ public static class Capabilities extends StripeObject { @SerializedName("amazon_pay_payments") String amazonPayPayments; + /** + * The status of the {@code app_distribution} capability of the account, or whether the platform + * can distribute apps to other accounts. + * + *

One of {@code active}, {@code inactive}, or {@code pending}. + */ + @SerializedName("app_distribution") + String appDistribution; + /** * The status of the BECS Direct Debit (AU) payments capability of the account, or whether the * account can directly process BECS Direct Debit (AU) charges. @@ -1328,6 +1337,15 @@ public static class Capabilities extends StripeObject { @SerializedName("sofort_payments") String sofortPayments; + /** + * The status of the Sunbit capability of the account, or whether the account can directly + * process Sunbit payments. + * + *

One of {@code active}, {@code inactive}, or {@code pending}. + */ + @SerializedName("sunbit_payments") + String sunbitPayments; + /** * The status of the Swish capability of the account, or whether the account can directly * process Swish payments. diff --git a/src/main/java/com/stripe/model/AccountSession.java b/src/main/java/com/stripe/model/AccountSession.java index 68e087e8dc2..859eb4010c5 100644 --- a/src/main/java/com/stripe/model/AccountSession.java +++ b/src/main/java/com/stripe/model/AccountSession.java @@ -132,6 +132,9 @@ public static class Components extends StripeObject { @SerializedName("account_onboarding") AccountOnboarding accountOnboarding; + @SerializedName("balance_report") + BalanceReport balanceReport; + @SerializedName("balances") Balances balances; @@ -171,6 +174,9 @@ public static class Components extends StripeObject { @SerializedName("payout_details") PayoutDetails payoutDetails; + @SerializedName("payout_reconciliation_report") + PayoutReconciliationReport payoutReconciliationReport; + @SerializedName("payouts") Payouts payouts; @@ -271,6 +277,31 @@ public static class Features extends StripeObject { } } + /** + * For more details about BalanceReport, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class BalanceReport extends StripeObject { + /** Whether the embedded component is enabled. */ + @SerializedName("enabled") + Boolean enabled; + + @SerializedName("features") + Features features; + + /** + * For more details about Features, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Features extends StripeObject {} + } + /** * For more details about Balances, please refer to the API Reference. @@ -851,6 +882,31 @@ public static class PayoutDetails extends StripeObject { public static class Features extends StripeObject {} } + /** + * For more details about PayoutReconciliationReport, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class PayoutReconciliationReport extends StripeObject { + /** Whether the embedded component is enabled. */ + @SerializedName("enabled") + Boolean enabled; + + @SerializedName("features") + Features features; + + /** + * For more details about Features, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Features extends StripeObject {} + } + /** * For more details about Payouts, please refer to the API * Reference. diff --git a/src/main/java/com/stripe/model/BalanceTransaction.java b/src/main/java/com/stripe/model/BalanceTransaction.java index b8e639e7799..b3b13620e47 100644 --- a/src/main/java/com/stripe/model/BalanceTransaction.java +++ b/src/main/java/com/stripe/model/BalanceTransaction.java @@ -131,7 +131,8 @@ public class BalanceTransaction extends ApiResource implements HasId { * Transaction type: {@code adjustment}, {@code advance}, {@code advance_funding}, {@code * anticipation_repayment}, {@code application_fee}, {@code application_fee_refund}, {@code * charge}, {@code climate_order_purchase}, {@code climate_order_refund}, {@code - * connect_collection_transfer}, {@code contribution}, {@code issuing_authorization_hold}, {@code + * connect_collection_transfer}, {@code contribution}, {@code inbound_transfer}, {@code + * inbound_transfer_reversal}, {@code issuing_authorization_hold}, {@code * issuing_authorization_release}, {@code issuing_dispute}, {@code issuing_transaction}, {@code * obligation_outbound}, {@code obligation_reversal_inbound}, {@code payment}, {@code * payment_failure_refund}, {@code payment_network_reserve_hold}, {@code @@ -142,7 +143,7 @@ public class BalanceTransaction extends ApiResource implements HasId { * {@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}. Learn more about balance transaction types and * what they represent. To classify transactions for accounting purposes, consider {@code * reporting_category} instead. @@ -150,9 +151,10 @@ public class BalanceTransaction extends ApiResource implements HasId { *

One of {@code adjustment}, {@code advance}, {@code advance_funding}, {@code * anticipation_repayment}, {@code application_fee}, {@code application_fee_refund}, {@code * charge}, {@code climate_order_purchase}, {@code climate_order_refund}, {@code - * connect_collection_transfer}, {@code contribution}, {@code issuing_authorization_hold}, {@code - * issuing_authorization_release}, {@code issuing_dispute}, {@code issuing_transaction}, {@code - * obligation_outbound}, {@code obligation_reversal_inbound}, {@code payment}, {@code + * connect_collection_transfer}, {@code contribution}, {@code fee_credit_funding}, {@code + * inbound_transfer}, {@code inbound_transfer_reversal}, {@code issuing_authorization_hold}, + * {@code issuing_authorization_release}, {@code issuing_dispute}, {@code issuing_transaction}, + * {@code obligation_outbound}, {@code obligation_reversal_inbound}, {@code payment}, {@code * payment_failure_refund}, {@code payment_network_reserve_hold}, {@code * payment_network_reserve_release}, {@code payment_refund}, {@code payment_reversal}, {@code * payment_unreconciled}, {@code payout}, {@code payout_cancel}, {@code payout_failure}, {@code @@ -331,7 +333,7 @@ public static class FeeDetail extends StripeObject { /** * Type of the fee, one of: {@code application_fee}, {@code payment_method_passthrough_fee}, - * {@code stripe_fee} or {@code tax}. + * {@code stripe_fee}, {@code tax}, or {@code withheld_tax}. */ @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 7696e6f7d72..fb9f4813599 100644 --- a/src/main/java/com/stripe/model/Charge.java +++ b/src/main/java/com/stripe/model/Charge.java @@ -1303,6 +1303,9 @@ public static class PaymentMethodDetails extends StripeObject { @SerializedName("stripe_account") StripeAccount stripeAccount; + @SerializedName("sunbit") + Sunbit sunbit; + @SerializedName("swish") Swish swish; @@ -1450,17 +1453,11 @@ public static class AcssDebit extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class Affirm extends StripeObject { - /** - * ID of the location that this - * transaction's reader is assigned to. - */ + /** ID of the location that this reader is assigned to. */ @SerializedName("location") String location; - /** - * ID of the reader this - * transaction was made on. - */ + /** ID of the reader this transaction was made on. */ @SerializedName("reader") String reader; @@ -1481,7 +1478,7 @@ public static class AfterpayClearpay extends StripeObject { @SerializedName("order_id") String orderId; - /** Order identifier shown to the merchant in Afterpay’s online portal. */ + /** Order identifier shown to the merchant in Afterpay's online portal. */ @SerializedName("reference") String reference; } @@ -2737,7 +2734,7 @@ public static class Crypto extends StripeObject { /** * The token currency that the transaction was sent with. * - *

One of {@code usdc}, {@code usdg}, or {@code usdp}. + *

One of {@code phantom_cash}, {@code usdc}, {@code usdg}, {@code usdp}, or {@code usdt}. */ @SerializedName("token_currency") String tokenCurrency; @@ -3206,6 +3203,13 @@ public static class KakaoPay extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class Klarna extends StripeObject { + /** + * ID of the location that this + * transaction's reader is assigned to. + */ + @SerializedName("location") + String location; + /** The payer details for this transaction. */ @SerializedName("payer_details") PayerDetails payerDetails; @@ -3231,6 +3235,13 @@ public static class Klarna extends StripeObject { @SerializedName("preferred_locale") String preferredLocale; + /** + * ID of the reader this + * transaction was made on. + */ + @SerializedName("reader") + String reader; + /** * For more details about PayerDetails, please refer to the API Reference. @@ -3670,6 +3681,10 @@ public static class Pix extends StripeObject { /** Unique transaction id generated by BCB. */ @SerializedName("bank_transaction_id") String bankTransactionId; + + /** ID of the multi use Mandate generated by the PaymentIntent. */ + @SerializedName("mandate") + String mandate; } /** @@ -3970,6 +3985,19 @@ public void setGeneratedSepaDebitMandateObject(Mandate expandableObject) { @EqualsAndHashCode(callSuper = false) public static class StripeAccount extends StripeObject {} + /** + * For more details about Sunbit, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Sunbit extends StripeObject { + /** The Sunbit transaction ID associated with this payment. */ + @SerializedName("transaction_id") + String transactionId; + } + /** * For more details about Swish, please refer to the API * Reference. diff --git a/src/main/java/com/stripe/model/ConfirmationToken.java b/src/main/java/com/stripe/model/ConfirmationToken.java index 9c8650a9fe6..547e116a208 100644 --- a/src/main/java/com/stripe/model/ConfirmationToken.java +++ b/src/main/java/com/stripe/model/ConfirmationToken.java @@ -434,6 +434,9 @@ public static class PaymentMethodPreview extends StripeObject { @SerializedName("sofort") Sofort sofort; + @SerializedName("sunbit") + Sunbit sunbit; + @SerializedName("swish") Swish swish; @@ -454,8 +457,9 @@ public static class PaymentMethodPreview extends StripeObject { * link}, {@code mb_way}, {@code mobilepay}, {@code multibanco}, {@code naver_pay}, {@code * nz_bank_account}, {@code oxxo}, {@code p24}, {@code pay_by_bank}, {@code payco}, {@code * paynow}, {@code paypal}, {@code payto}, {@code pix}, {@code promptpay}, {@code revolut_pay}, - * {@code samsung_pay}, {@code satispay}, {@code sepa_debit}, {@code sofort}, {@code swish}, - * {@code twint}, {@code upi}, {@code us_bank_account}, {@code wechat_pay}, or {@code zip}. + * {@code samsung_pay}, {@code satispay}, {@code sepa_debit}, {@code sofort}, {@code sunbit}, + * {@code swish}, {@code twint}, {@code upi}, {@code us_bank_account}, {@code wechat_pay}, or + * {@code zip}. */ @SerializedName("type") String type; @@ -2274,6 +2278,15 @@ public static class Sofort extends StripeObject { String country; } + /** + * For more details about Sunbit, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Sunbit extends StripeObject {} + /** * For more details about Swish, please refer to the API * Reference. diff --git a/src/main/java/com/stripe/model/Invoice.java b/src/main/java/com/stripe/model/Invoice.java index c95f82f24da..812f83e1fb6 100644 --- a/src/main/java/com/stripe/model/Invoice.java +++ b/src/main/java/com/stripe/model/Invoice.java @@ -467,8 +467,7 @@ public class Invoice extends ApiResource implements HasId, MetadataStoreline item * period to get the service period for each price. */ @@ -476,8 +475,7 @@ public class Invoice extends ApiResource implements HasId, MetadataStoreline item * period to get the service period for each price. */ @@ -2109,20 +2107,21 @@ public static class CustomerTaxId 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 pl_nip}, - * {@code tw_vat}, {@code th_vat}, {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, {@code li_uid}, - * {@code li_vat}, {@code lk_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 it_cf}, {@code fo_vat}, {@code gi_tin}, {@code py_ruc}, {@code tw_vat}, {@code + * th_vat}, {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, {@code li_uid}, {@code li_vat}, {@code + * lk_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; @@ -2377,6 +2376,13 @@ public static class PaymentMethodOptions extends StripeObject { @SerializedName("payto") Payto payto; + /** + * If paying by {@code pix}, this sub-hash contains details about the Pix payment method + * options to pass to the invoice’s PaymentIntent. + */ + @SerializedName("pix") + Pix pix; + /** * If paying by {@code sepa_debit}, this sub-hash contains details about the SEPA Direct Debit * payment method options to pass to the invoice’s PaymentIntent. @@ -2384,6 +2390,13 @@ public static class PaymentMethodOptions extends StripeObject { @SerializedName("sepa_debit") SepaDebit sepaDebit; + /** + * If paying by {@code upi}, this sub-hash contains details about the UPI payment method + * options to pass to the invoice’s PaymentIntent. + */ + @SerializedName("upi") + Upi upi; + /** * If paying by {@code us_bank_account}, this sub-hash contains details about the ACH direct * debit payment method options to pass to the invoice’s PaymentIntent. @@ -2601,6 +2614,30 @@ public static class MandateOptions extends StripeObject { } } + /** + * For more details about Pix, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Pix extends StripeObject { + /** + * Determines if the amount includes the IOF tax. + * + *

One of {@code always}, or {@code never}. + */ + @SerializedName("amount_includes_iof") + String amountIncludesIof; + + /** + * The number of seconds (between 10 and 1209600) after which Pix payment will expire. + * Defaults to 86400 seconds. + */ + @SerializedName("expires_after_seconds") + Long expiresAfterSeconds; + } + /** * For more details about SepaDebit, please refer to the API Reference. @@ -2610,6 +2647,50 @@ public static class MandateOptions extends StripeObject { @EqualsAndHashCode(callSuper = false) public static class SepaDebit extends StripeObject {} + /** + * For more details about Upi, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Upi extends StripeObject { + @SerializedName("mandate_options") + MandateOptions mandateOptions; + + /** + * For more details about MandateOptions, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class MandateOptions extends StripeObject { + /** Amount to be charged for future payments. */ + @SerializedName("amount") + Long amount; + + /** + * One of {@code fixed} or {@code maximum}. If {@code fixed}, the {@code amount} param + * refers to the exact amount to be charged in future payments. If {@code maximum}, the + * amount charged can be up to the value passed for the {@code amount} param. + */ + @SerializedName("amount_type") + String amountType; + + /** + * A description of the mandate or subscription that is meant to be displayed to the + * customer. + */ + @SerializedName("description") + String description; + + /** End date of the mandate or subscription. */ + @SerializedName("end_date") + Long endDate; + } + } + /** * For more details about UsBankAccount, please refer to the API Reference. diff --git a/src/main/java/com/stripe/model/Mandate.java b/src/main/java/com/stripe/model/Mandate.java index 12e6c018aab..7a8ce146e1c 100644 --- a/src/main/java/com/stripe/model/Mandate.java +++ b/src/main/java/com/stripe/model/Mandate.java @@ -196,7 +196,15 @@ public static class Online extends StripeObject { @Getter @Setter @EqualsAndHashCode(callSuper = false) - public static class MultiUse extends StripeObject {} + public static class MultiUse extends StripeObject { + /** The amount of the payment on a multi use mandate. */ + @SerializedName("amount") + Long amount; + + /** The currency of the payment on a multi use mandate. */ + @SerializedName("currency") + String currency; + } /** * For more details about PaymentMethodDetails, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Pix extends StripeObject { + /** + * Determines if the amount includes the IOF tax. + * + *

One of {@code always}, or {@code never}. + */ + @SerializedName("amount_includes_iof") + String amountIncludesIof; + + /** + * Type of amount. + * + *

One of {@code fixed}, or {@code maximum}. + */ + @SerializedName("amount_type") + String amountType; + + /** + * Date when the mandate expires and no further payments will be charged, in {@code + * YYYY-MM-DD}. + */ + @SerializedName("end_date") + String endDate; + + /** + * Schedule at which the future payments will be charged. + * + *

One of {@code halfyearly}, {@code monthly}, {@code quarterly}, {@code weekly}, or {@code + * yearly}. + */ + @SerializedName("payment_schedule") + String paymentSchedule; + + /** Subscription name displayed to buyers in their bank app. */ + @SerializedName("reference") + String reference; + + /** Start date of the mandate, in {@code YYYY-MM-DD}. */ + @SerializedName("start_date") + String startDate; + } + /** * For more details about RevolutPay, please refer to the API Reference. diff --git a/src/main/java/com/stripe/model/PaymentAttemptRecord.java b/src/main/java/com/stripe/model/PaymentAttemptRecord.java index 362936cd851..0c71f2b284d 100644 --- a/src/main/java/com/stripe/model/PaymentAttemptRecord.java +++ b/src/main/java/com/stripe/model/PaymentAttemptRecord.java @@ -554,6 +554,9 @@ public static class PaymentMethodDetails extends StripeObject { @SerializedName("stripe_account") StripeAccount stripeAccount; + @SerializedName("sunbit") + Sunbit sunbit; + @SerializedName("swish") Swish swish; @@ -1824,7 +1827,7 @@ public static class Crypto extends StripeObject { /** * The token currency that the transaction was sent with. * - *

One of {@code usdc}, {@code usdg}, or {@code usdp}. + *

One of {@code phantom_cash}, {@code usdc}, {@code usdg}, {@code usdp}, or {@code usdt}. */ @SerializedName("token_currency") String tokenCurrency; @@ -1883,7 +1886,7 @@ public static class Eps extends StripeObject { * hypo_bank_burgenland_aktiengesellschaft}, {@code marchfelder_bank}, {@code oberbank_ag}, * {@code raiffeisen_bankengruppe_osterreich}, {@code schoellerbank_ag}, {@code * sparda_bank_wien}, {@code volksbank_gruppe}, {@code volkskreditbank_ag}, or {@code - * vr_bank_braunau}. + * vr_bank_braunau} */ @SerializedName("bank") String bank; @@ -2313,6 +2316,13 @@ public static class KakaoPay extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class Klarna extends StripeObject { + /** + * ID of the location that this + * transaction's reader is assigned to. + */ + @SerializedName("location") + String location; + /** The payer details for this transaction. */ @SerializedName("payer_details") PayerDetails payerDetails; @@ -2338,6 +2348,13 @@ public static class Klarna extends StripeObject { @SerializedName("preferred_locale") String preferredLocale; + /** + * ID of the reader this + * transaction was made on. + */ + @SerializedName("reader") + String reader; + /** * For more details about PayerDetails, please refer to the API Reference. @@ -2777,6 +2794,10 @@ public static class Pix extends StripeObject { /** Unique transaction id generated by BCB. */ @SerializedName("bank_transaction_id") String bankTransactionId; + + /** ID of the multi use Mandate generated by the PaymentIntent. */ + @SerializedName("mandate") + String mandate; } /** @@ -3077,6 +3098,19 @@ public void setGeneratedSepaDebitMandateObject(Mandate expandableObject) { @EqualsAndHashCode(callSuper = false) public static class StripeAccount extends StripeObject {} + /** + * For more details about Sunbit, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Sunbit extends StripeObject { + /** The Sunbit transaction ID associated with this payment. */ + @SerializedName("transaction_id") + String transactionId; + } + /** * For more details about Swish, please refer to the API * Reference. diff --git a/src/main/java/com/stripe/model/PaymentIntent.java b/src/main/java/com/stripe/model/PaymentIntent.java index 6a542c66eea..580ac961883 100644 --- a/src/main/java/com/stripe/model/PaymentIntent.java +++ b/src/main/java/com/stripe/model/PaymentIntent.java @@ -228,6 +228,10 @@ public class PaymentIntent extends ApiResource implements HasId, MetadataStore

key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a @@ -1721,6 +1725,23 @@ public static class Tax extends StripeObject { } } + /** + * For more details about ManagedPayments, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class ManagedPayments extends StripeObject { + /** + * Set to {@code true} to enable Managed Payments, Stripe's + * merchant of record solution, for this session. + */ + @SerializedName("enabled") + Boolean enabled; + } + /** * For more details about NextAction, please refer to the API Reference. @@ -1744,6 +1765,9 @@ public static class NextAction extends StripeObject { @SerializedName("display_bank_transfer_instructions") DisplayBankTransferInstructions displayBankTransferInstructions; + @SerializedName("klarna_display_qr_code") + KlarnaDisplayQrCode klarnaDisplayQrCode; + @SerializedName("konbini_display_details") KonbiniDisplayDetails konbiniDisplayDetails; @@ -2205,6 +2229,31 @@ public static class Zengin extends StripeObject { } } + /** + * For more details about KlarnaDisplayQrCode, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class KlarnaDisplayQrCode extends StripeObject { + /** The data being used to generate QR code. */ + @SerializedName("data") + String data; + + /** The timestamp at which the QR code expires. */ + @SerializedName("expires_at") + Long expiresAt; + + /** The image_url_png string used to render QR code. */ + @SerializedName("image_url_png") + String imageUrlPng; + + /** The image_url_svg string used to render QR code. */ + @SerializedName("image_url_svg") + String imageUrlSvg; + } + /** * For more details about KonbiniDisplayDetails, please refer to the API Reference. @@ -4841,6 +4890,9 @@ public static class Pix extends StripeObject { @SerializedName("expires_at") Long expiresAt; + @SerializedName("mandate_options") + MandateOptions mandateOptions; + /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * @@ -4860,10 +4912,70 @@ public static class Pix extends StripeObject { * with regional legislation and network rules, such as SCA. * - *

Equal to {@code none}. + *

One of {@code none}, or {@code off_session}. */ @SerializedName("setup_future_usage") String setupFutureUsage; + + /** + * For more details about MandateOptions, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class MandateOptions extends StripeObject { + /** Amount to be charged for future payments. */ + @SerializedName("amount") + Long amount; + + /** + * Determines if the amount includes the IOF tax. + * + *

One of {@code always}, or {@code never}. + */ + @SerializedName("amount_includes_iof") + String amountIncludesIof; + + /** + * Type of amount. + * + *

One of {@code fixed}, or {@code maximum}. + */ + @SerializedName("amount_type") + String amountType; + + /** + * Three-letter ISO currency + * code, in lowercase. + */ + @SerializedName("currency") + String currency; + + /** + * Date when the mandate expires and no further payments will be charged, in {@code + * YYYY-MM-DD}. + */ + @SerializedName("end_date") + String endDate; + + /** + * Schedule at which the future payments will be charged. + * + *

One of {@code halfyearly}, {@code monthly}, {@code quarterly}, {@code weekly}, or + * {@code yearly}. + */ + @SerializedName("payment_schedule") + String paymentSchedule; + + /** Subscription name displayed to buyers in their bank app. */ + @SerializedName("reference") + String reference; + + /** Start date of the mandate, in {@code YYYY-MM-DD}. */ + @SerializedName("start_date") + String startDate; + } } /** @@ -5513,6 +5625,7 @@ public void setResponseGetter(StripeResponseGetter responseGetter) { trySetResponseGetter(hooks, responseGetter); trySetResponseGetter(lastPaymentError, responseGetter); trySetResponseGetter(latestCharge, responseGetter); + trySetResponseGetter(managedPayments, responseGetter); trySetResponseGetter(nextAction, responseGetter); trySetResponseGetter(onBehalfOf, responseGetter); trySetResponseGetter(paymentDetails, responseGetter); diff --git a/src/main/java/com/stripe/model/PaymentLink.java b/src/main/java/com/stripe/model/PaymentLink.java index 9f7355b6fca..0128d02b34a 100644 --- a/src/main/java/com/stripe/model/PaymentLink.java +++ b/src/main/java/com/stripe/model/PaymentLink.java @@ -136,6 +136,16 @@ public class PaymentLink extends ApiResource implements HasId, MetadataStoreCheckoutSessions, PaymentIntents, Invoices, and Subscriptions. + */ + @SerializedName("managed_payments") + ManagedPayments managedPayments; + /** * 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 @@ -1043,6 +1053,23 @@ public static class RenderingOptions extends StripeObject { } } + /** + * For more details about ManagedPayments, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class ManagedPayments extends StripeObject { + /** + * Set to {@code true} to enable Managed Payments, Stripe's + * merchant of record solution, for this session. + */ + @SerializedName("enabled") + Boolean enabled; + } + /** * For more details about NameCollection, please refer to the API Reference. @@ -1491,6 +1518,7 @@ public void setResponseGetter(StripeResponseGetter responseGetter) { trySetResponseGetter(customText, responseGetter); trySetResponseGetter(invoiceCreation, responseGetter); trySetResponseGetter(lineItems, responseGetter); + trySetResponseGetter(managedPayments, responseGetter); trySetResponseGetter(nameCollection, responseGetter); trySetResponseGetter(onBehalfOf, responseGetter); trySetResponseGetter(paymentIntentData, responseGetter); diff --git a/src/main/java/com/stripe/model/PaymentMethod.java b/src/main/java/com/stripe/model/PaymentMethod.java index a82ce2abecb..b64e2357760 100644 --- a/src/main/java/com/stripe/model/PaymentMethod.java +++ b/src/main/java/com/stripe/model/PaymentMethod.java @@ -243,6 +243,9 @@ public class PaymentMethod extends ApiResource implements HasId, MetadataStore

API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Sunbit extends StripeObject {} + /** * For more details about Swish, please refer to the API * Reference. @@ -2760,6 +2772,7 @@ public void setResponseGetter(StripeResponseGetter responseGetter) { trySetResponseGetter(satispay, responseGetter); trySetResponseGetter(sepaDebit, responseGetter); trySetResponseGetter(sofort, responseGetter); + trySetResponseGetter(sunbit, responseGetter); trySetResponseGetter(swish, responseGetter); trySetResponseGetter(twint, responseGetter); trySetResponseGetter(upi, responseGetter); diff --git a/src/main/java/com/stripe/model/PaymentMethodConfiguration.java b/src/main/java/com/stripe/model/PaymentMethodConfiguration.java index 1b75dc97f7f..6e0555d1a29 100644 --- a/src/main/java/com/stripe/model/PaymentMethodConfiguration.java +++ b/src/main/java/com/stripe/model/PaymentMethodConfiguration.java @@ -239,6 +239,9 @@ public class PaymentMethodConfiguration extends ApiResource implements HasId { @SerializedName("sofort") Sofort sofort; + @SerializedName("sunbit") + Sunbit sunbit; + @SerializedName("swish") Swish swish; @@ -2910,6 +2913,57 @@ public static class DisplayPreference extends StripeObject { } } + /** + * For more details about Sunbit, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Sunbit extends StripeObject { + /** + * Whether this payment method may be offered at checkout. True if {@code display_preference} is + * {@code on} and the payment method's capability is active. + */ + @SerializedName("available") + Boolean available; + + @SerializedName("display_preference") + DisplayPreference displayPreference; + + /** + * For more details about DisplayPreference, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class DisplayPreference extends StripeObject { + /** + * For child configs, whether or not the account's preference will be observed. If {@code + * false}, the parent configuration's default is used. + */ + @SerializedName("overridable") + Boolean overridable; + + /** + * The account's display preference. + * + *

One of {@code none}, {@code off}, or {@code on}. + */ + @SerializedName("preference") + String preference; + + /** + * The effective display preference value. + * + *

One of {@code off}, or {@code on}. + */ + @SerializedName("value") + String value; + } + } + /** * For more details about Swish, please refer to the API * Reference. @@ -3268,6 +3322,7 @@ public void setResponseGetter(StripeResponseGetter responseGetter) { trySetResponseGetter(satispay, responseGetter); trySetResponseGetter(sepaDebit, responseGetter); trySetResponseGetter(sofort, responseGetter); + trySetResponseGetter(sunbit, responseGetter); trySetResponseGetter(swish, responseGetter); trySetResponseGetter(twint, responseGetter); trySetResponseGetter(upi, responseGetter); diff --git a/src/main/java/com/stripe/model/PaymentRecord.java b/src/main/java/com/stripe/model/PaymentRecord.java index c7d836c5b36..61109755916 100644 --- a/src/main/java/com/stripe/model/PaymentRecord.java +++ b/src/main/java/com/stripe/model/PaymentRecord.java @@ -856,6 +856,9 @@ public static class PaymentMethodDetails extends StripeObject { @SerializedName("stripe_account") StripeAccount stripeAccount; + @SerializedName("sunbit") + Sunbit sunbit; + @SerializedName("swish") Swish swish; @@ -2126,7 +2129,7 @@ public static class Crypto extends StripeObject { /** * The token currency that the transaction was sent with. * - *

One of {@code usdc}, {@code usdg}, or {@code usdp}. + *

One of {@code phantom_cash}, {@code usdc}, {@code usdg}, {@code usdp}, or {@code usdt}. */ @SerializedName("token_currency") String tokenCurrency; @@ -2185,7 +2188,7 @@ public static class Eps extends StripeObject { * hypo_bank_burgenland_aktiengesellschaft}, {@code marchfelder_bank}, {@code oberbank_ag}, * {@code raiffeisen_bankengruppe_osterreich}, {@code schoellerbank_ag}, {@code * sparda_bank_wien}, {@code volksbank_gruppe}, {@code volkskreditbank_ag}, or {@code - * vr_bank_braunau}. + * vr_bank_braunau} */ @SerializedName("bank") String bank; @@ -2615,6 +2618,13 @@ public static class KakaoPay extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class Klarna extends StripeObject { + /** + * ID of the location that this + * transaction's reader is assigned to. + */ + @SerializedName("location") + String location; + /** The payer details for this transaction. */ @SerializedName("payer_details") PayerDetails payerDetails; @@ -2640,6 +2650,13 @@ public static class Klarna extends StripeObject { @SerializedName("preferred_locale") String preferredLocale; + /** + * ID of the reader this + * transaction was made on. + */ + @SerializedName("reader") + String reader; + /** * For more details about PayerDetails, please refer to the API Reference. @@ -3079,6 +3096,10 @@ public static class Pix extends StripeObject { /** Unique transaction id generated by BCB. */ @SerializedName("bank_transaction_id") String bankTransactionId; + + /** ID of the multi use Mandate generated by the PaymentIntent. */ + @SerializedName("mandate") + String mandate; } /** @@ -3379,6 +3400,19 @@ public void setGeneratedSepaDebitMandateObject(Mandate expandableObject) { @EqualsAndHashCode(callSuper = false) public static class StripeAccount extends StripeObject {} + /** + * For more details about Sunbit, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Sunbit extends StripeObject { + /** The Sunbit transaction ID associated with this payment. */ + @SerializedName("transaction_id") + String transactionId; + } + /** * For more details about Swish, please refer to the API * Reference. diff --git a/src/main/java/com/stripe/model/SetupAttempt.java b/src/main/java/com/stripe/model/SetupAttempt.java index c3818f96c22..4d4d6dcd6cc 100644 --- a/src/main/java/com/stripe/model/SetupAttempt.java +++ b/src/main/java/com/stripe/model/SetupAttempt.java @@ -330,6 +330,9 @@ public static class PaymentMethodDetails extends StripeObject { @SerializedName("payto") Payto payto; + @SerializedName("pix") + Pix pix; + @SerializedName("revolut_pay") RevolutPay revolutPay; @@ -574,6 +577,10 @@ public static class Card extends StripeObject { @SerializedName("last4") String last4; + /** True if this payment was marked as MOTO and out of scope for SCA. */ + @SerializedName("moto") + Boolean moto; + /** * Identifies which network this charge was processed on. Can be {@code amex}, {@code * cartes_bancaires}, {@code diners}, {@code discover}, {@code eftpos_au}, {@code interac}, @@ -971,6 +978,15 @@ public static class Paypal extends StripeObject {} @EqualsAndHashCode(callSuper = false) public static class Payto extends StripeObject {} + /** + * For more details about Pix, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Pix extends StripeObject {} + /** * For more details about RevolutPay, please refer to the API Reference. diff --git a/src/main/java/com/stripe/model/SetupIntent.java b/src/main/java/com/stripe/model/SetupIntent.java index 4818fc82884..f0b15252fa1 100644 --- a/src/main/java/com/stripe/model/SetupIntent.java +++ b/src/main/java/com/stripe/model/SetupIntent.java @@ -157,6 +157,9 @@ public class SetupIntent extends ApiResource implements HasId, MetadataStoreAPI Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class ManagedPayments extends StripeObject { + /** + * Set to {@code true} to enable Managed Payments, Stripe's + * merchant of record solution, for this session. + */ + @SerializedName("enabled") + Boolean enabled; + } + /** * For more details about NextAction, please refer to the API Reference. @@ -875,6 +895,9 @@ public static class NextAction extends StripeObject { @SerializedName("cashapp_handle_redirect_or_display_qr_code") CashappHandleRedirectOrDisplayQrCode cashappHandleRedirectOrDisplayQrCode; + @SerializedName("pix_display_qr_code") + PixDisplayQrCode pixDisplayQrCode; + @SerializedName("redirect_to_url") RedirectToUrl redirectToUrl; @@ -945,6 +968,41 @@ public static class QrCode extends StripeObject { } } + /** + * For more details about PixDisplayQrCode, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class PixDisplayQrCode extends StripeObject { + /** + * The raw data string used to generate QR code, it should be used together with QR code + * library. + */ + @SerializedName("data") + String data; + + /** The date (unix timestamp) when the PIX expires. */ + @SerializedName("expires_at") + Long expiresAt; + + /** + * The URL to the hosted pix instructions page, which allows customers to view the pix QR + * code. + */ + @SerializedName("hosted_instructions_url") + String hostedInstructionsUrl; + + /** The image_url_png string used to render png QR code. */ + @SerializedName("image_url_png") + String imageUrlPng; + + /** The image_url_svg string used to render svg QR code. */ + @SerializedName("image_url_svg") + String imageUrlSvg; + } + /** * For more details about RedirectToUrl, please refer to the API Reference. @@ -1087,6 +1145,9 @@ public static class PaymentMethodOptions extends StripeObject { @SerializedName("payto") Payto payto; + @SerializedName("pix") + Pix pix; + @SerializedName("sepa_debit") SepaDebit sepaDebit; @@ -1447,6 +1508,78 @@ public static class MandateOptions extends StripeObject { } } + /** + * For more details about Pix, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Pix extends StripeObject { + @SerializedName("mandate_options") + MandateOptions mandateOptions; + + /** + * For more details about MandateOptions, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class MandateOptions extends StripeObject { + /** Amount to be charged for future payments. */ + @SerializedName("amount") + Long amount; + + /** + * Determines if the amount includes the IOF tax. + * + *

One of {@code always}, or {@code never}. + */ + @SerializedName("amount_includes_iof") + String amountIncludesIof; + + /** + * Type of amount. + * + *

One of {@code fixed}, or {@code maximum}. + */ + @SerializedName("amount_type") + String amountType; + + /** + * Three-letter ISO currency + * code, in lowercase. + */ + @SerializedName("currency") + String currency; + + /** + * Date when the mandate expires and no further payments will be charged, in {@code + * YYYY-MM-DD}. + */ + @SerializedName("end_date") + String endDate; + + /** + * Schedule at which the future payments will be charged. + * + *

One of {@code halfyearly}, {@code monthly}, {@code quarterly}, {@code weekly}, or + * {@code yearly}. + */ + @SerializedName("payment_schedule") + String paymentSchedule; + + /** Subscription name displayed to buyers in their bank app. */ + @SerializedName("reference") + String reference; + + /** Start date of the mandate, in {@code YYYY-MM-DD}. */ + @SerializedName("start_date") + String startDate; + } + } + /** * For more details about SepaDebit, please refer to the API Reference. @@ -1615,6 +1748,7 @@ public void setResponseGetter(StripeResponseGetter responseGetter) { trySetResponseGetter(customer, responseGetter); trySetResponseGetter(lastSetupError, responseGetter); trySetResponseGetter(latestAttempt, responseGetter); + trySetResponseGetter(managedPayments, responseGetter); trySetResponseGetter(mandate, responseGetter); trySetResponseGetter(nextAction, responseGetter); trySetResponseGetter(onBehalfOf, responseGetter); diff --git a/src/main/java/com/stripe/model/StripeError.java b/src/main/java/com/stripe/model/StripeError.java index 6892954c27e..8b266ce83c4 100644 --- a/src/main/java/com/stripe/model/StripeError.java +++ b/src/main/java/com/stripe/model/StripeError.java @@ -30,16 +30,16 @@ public class StripeError extends StripeObject { * account_error_country_change_requires_additional_steps}, {@code account_information_mismatch}, * {@code account_invalid}, {@code account_number_invalid}, {@code * account_token_required_for_v2_account}, {@code acss_debit_session_incomplete}, {@code - * alipay_upgrade_required}, {@code amount_too_large}, {@code amount_too_small}, {@code - * api_key_expired}, {@code application_fees_not_allowed}, {@code authentication_required}, {@code - * balance_insufficient}, {@code balance_invalid_parameter}, {@code - * bank_account_bad_routing_numbers}, {@code bank_account_declined}, {@code bank_account_exists}, - * {@code bank_account_restricted}, {@code bank_account_unusable}, {@code - * bank_account_unverified}, {@code bank_account_verification_failed}, {@code - * billing_invalid_mandate}, {@code bitcoin_upgrade_required}, {@code - * capture_charge_authorization_expired}, {@code capture_unauthorized_payment}, {@code - * card_decline_rate_limit_exceeded}, {@code card_declined}, {@code - * cardholder_phone_number_required}, {@code charge_already_captured}, {@code + * action_blocked}, {@code alipay_upgrade_required}, {@code amount_too_large}, {@code + * amount_too_small}, {@code api_key_expired}, {@code application_fees_not_allowed}, {@code + * approval_required}, {@code authentication_required}, {@code balance_insufficient}, {@code + * balance_invalid_parameter}, {@code bank_account_bad_routing_numbers}, {@code + * bank_account_declined}, {@code bank_account_exists}, {@code bank_account_restricted}, {@code + * bank_account_unusable}, {@code bank_account_unverified}, {@code + * bank_account_verification_failed}, {@code billing_invalid_mandate}, {@code + * bitcoin_upgrade_required}, {@code capture_charge_authorization_expired}, {@code + * capture_unauthorized_payment}, {@code card_decline_rate_limit_exceeded}, {@code card_declined}, + * {@code cardholder_phone_number_required}, {@code charge_already_captured}, {@code * charge_already_refunded}, {@code charge_disputed}, {@code charge_exceeds_source_limit}, {@code * charge_exceeds_transaction_limit}, {@code charge_expired_for_capture}, {@code * charge_invalid_parameter}, {@code charge_not_refundable}, {@code clearing_code_unsupported}, diff --git a/src/main/java/com/stripe/model/Subscription.java b/src/main/java/com/stripe/model/Subscription.java index c5414e35a2d..ca2e48c78a7 100644 --- a/src/main/java/com/stripe/model/Subscription.java +++ b/src/main/java/com/stripe/model/Subscription.java @@ -222,6 +222,14 @@ public class Subscription extends ApiResource implements HasId, MetadataStoreInvoices and PaymentIntents. + */ + @SerializedName("managed_payments") + ManagedPayments managedPayments; + /** * 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 @@ -903,8 +911,10 @@ public Subscription migrate(SubscriptionMigrateParams params, RequestOptions opt * Initiates resumption of a paused subscription, optionally resetting the billing cycle anchor * and creating prorations. If no resumption invoice is generated, the subscription becomes {@code * active} immediately. If a resumption invoice is generated, the subscription remains {@code - * paused} until the invoice is paid or marked uncollectible. If the invoice is not paid by the - * expiration date, it is voided and the subscription remains {@code paused}. + * paused} until the invoice is paid or marked uncollectible. If the invoice isn’t paid by the + * expiration date, it is voided and the subscription remains {@code paused}. You can only resume + * subscriptions with {@code collection_method} set to {@code charge_automatically}. {@code + * send_invoice} subscriptions are not supported. */ public Subscription resume() throws StripeException { return resume((Map) null, (RequestOptions) null); @@ -914,8 +924,10 @@ public Subscription resume() throws StripeException { * Initiates resumption of a paused subscription, optionally resetting the billing cycle anchor * and creating prorations. If no resumption invoice is generated, the subscription becomes {@code * active} immediately. If a resumption invoice is generated, the subscription remains {@code - * paused} until the invoice is paid or marked uncollectible. If the invoice is not paid by the - * expiration date, it is voided and the subscription remains {@code paused}. + * paused} until the invoice is paid or marked uncollectible. If the invoice isn’t paid by the + * expiration date, it is voided and the subscription remains {@code paused}. You can only resume + * subscriptions with {@code collection_method} set to {@code charge_automatically}. {@code + * send_invoice} subscriptions are not supported. */ public Subscription resume(RequestOptions options) throws StripeException { return resume((Map) null, options); @@ -925,8 +937,10 @@ public Subscription resume(RequestOptions options) throws StripeException { * Initiates resumption of a paused subscription, optionally resetting the billing cycle anchor * and creating prorations. If no resumption invoice is generated, the subscription becomes {@code * active} immediately. If a resumption invoice is generated, the subscription remains {@code - * paused} until the invoice is paid or marked uncollectible. If the invoice is not paid by the - * expiration date, it is voided and the subscription remains {@code paused}. + * paused} until the invoice is paid or marked uncollectible. If the invoice isn’t paid by the + * expiration date, it is voided and the subscription remains {@code paused}. You can only resume + * subscriptions with {@code collection_method} set to {@code charge_automatically}. {@code + * send_invoice} subscriptions are not supported. */ public Subscription resume(Map params) throws StripeException { return resume(params, (RequestOptions) null); @@ -936,8 +950,10 @@ public Subscription resume(Map params) throws StripeException { * Initiates resumption of a paused subscription, optionally resetting the billing cycle anchor * and creating prorations. If no resumption invoice is generated, the subscription becomes {@code * active} immediately. If a resumption invoice is generated, the subscription remains {@code - * paused} until the invoice is paid or marked uncollectible. If the invoice is not paid by the - * expiration date, it is voided and the subscription remains {@code paused}. + * paused} until the invoice is paid or marked uncollectible. If the invoice isn’t paid by the + * expiration date, it is voided and the subscription remains {@code paused}. You can only resume + * subscriptions with {@code collection_method} set to {@code charge_automatically}. {@code + * send_invoice} subscriptions are not supported. */ public Subscription resume(Map params, RequestOptions options) throws StripeException { @@ -952,8 +968,10 @@ public Subscription resume(Map params, RequestOptions options) * Initiates resumption of a paused subscription, optionally resetting the billing cycle anchor * and creating prorations. If no resumption invoice is generated, the subscription becomes {@code * active} immediately. If a resumption invoice is generated, the subscription remains {@code - * paused} until the invoice is paid or marked uncollectible. If the invoice is not paid by the - * expiration date, it is voided and the subscription remains {@code paused}. + * paused} until the invoice is paid or marked uncollectible. If the invoice isn’t paid by the + * expiration date, it is voided and the subscription remains {@code paused}. You can only resume + * subscriptions with {@code collection_method} set to {@code charge_automatically}. {@code + * send_invoice} subscriptions are not supported. */ public Subscription resume(SubscriptionResumeParams params) throws StripeException { return resume(params, (RequestOptions) null); @@ -963,8 +981,10 @@ public Subscription resume(SubscriptionResumeParams params) throws StripeExcepti * Initiates resumption of a paused subscription, optionally resetting the billing cycle anchor * and creating prorations. If no resumption invoice is generated, the subscription becomes {@code * active} immediately. If a resumption invoice is generated, the subscription remains {@code - * paused} until the invoice is paid or marked uncollectible. If the invoice is not paid by the - * expiration date, it is voided and the subscription remains {@code paused}. + * paused} until the invoice is paid or marked uncollectible. If the invoice isn’t paid by the + * expiration date, it is voided and the subscription remains {@code paused}. You can only resume + * subscriptions with {@code collection_method} set to {@code charge_automatically}. {@code + * send_invoice} subscriptions are not supported. */ public Subscription resume(SubscriptionResumeParams params, RequestOptions options) throws StripeException { @@ -1607,6 +1627,23 @@ public void setAccountObject(Account expandableObject) { } } + /** + * For more details about ManagedPayments, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class ManagedPayments extends StripeObject { + /** + * Set to {@code true} to enable Managed Payments, Stripe's + * merchant of record solution, for this session. + */ + @SerializedName("enabled") + Boolean enabled; + } + /** * The Pause Collection settings determine how we will pause collection for this subscription and * for how long the subscription should be paused. @@ -1709,6 +1746,13 @@ public static class PaymentMethodOptions extends StripeObject { @SerializedName("payto") Payto payto; + /** + * This sub-hash contains details about the Pix payment method options to pass to invoices + * created by the subscription. + */ + @SerializedName("pix") + Pix pix; + /** * This sub-hash contains details about the SEPA Direct Debit payment method options to pass * to invoices created by the subscription. @@ -1716,6 +1760,13 @@ public static class PaymentMethodOptions extends StripeObject { @SerializedName("sepa_debit") SepaDebit sepaDebit; + /** + * This sub-hash contains details about the UPI payment method options to pass to invoices + * created by the subscription. + */ + @SerializedName("upi") + Upi upi; + /** * This sub-hash contains details about the ACH direct debit payment method options to pass to * invoices created by the subscription. @@ -1955,6 +2006,62 @@ public static class MandateOptions extends StripeObject { } } + /** + * For more details about Pix, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Pix extends StripeObject { + /** + * The number of seconds (between 10 and 1209600) after which Pix payment will expire. + * Defaults to 86400 seconds. + */ + @SerializedName("expires_after_seconds") + Long expiresAfterSeconds; + + @SerializedName("mandate_options") + MandateOptions mandateOptions; + + /** + * For more details about MandateOptions, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class MandateOptions extends StripeObject { + /** Amount to be charged for future payments. */ + @SerializedName("amount") + Long amount; + + /** + * Determines if the amount includes the IOF tax. + * + *

One of {@code always}, or {@code never}. + */ + @SerializedName("amount_includes_iof") + String amountIncludesIof; + + /** + * Date when the mandate expires and no further payments will be charged, in {@code + * YYYY-MM-DD}. + */ + @SerializedName("end_date") + String endDate; + + /** + * Schedule at which the future payments will be charged. + * + *

One of {@code halfyearly}, {@code monthly}, {@code quarterly}, {@code weekly}, or + * {@code yearly}. + */ + @SerializedName("payment_schedule") + String paymentSchedule; + } + } + /** * For more details about SepaDebit, please refer to the API Reference. @@ -1964,6 +2071,50 @@ public static class MandateOptions extends StripeObject { @EqualsAndHashCode(callSuper = false) public static class SepaDebit extends StripeObject {} + /** + * For more details about Upi, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Upi extends StripeObject { + @SerializedName("mandate_options") + MandateOptions mandateOptions; + + /** + * For more details about MandateOptions, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class MandateOptions extends StripeObject { + /** Amount to be charged for future payments. */ + @SerializedName("amount") + Long amount; + + /** + * One of {@code fixed} or {@code maximum}. If {@code fixed}, the {@code amount} param + * refers to the exact amount to be charged in future payments. If {@code maximum}, the + * amount charged can be up to the value passed for the {@code amount} param. + */ + @SerializedName("amount_type") + String amountType; + + /** + * A description of the mandate or subscription that is meant to be displayed to the + * customer. + */ + @SerializedName("description") + String description; + + /** End date of the mandate or subscription. */ + @SerializedName("end_date") + Long endDate; + } + } + /** * For more details about UsBankAccount, please refer to the API Reference. @@ -2193,6 +2344,7 @@ public void setResponseGetter(StripeResponseGetter responseGetter) { trySetResponseGetter(invoiceSettings, responseGetter); trySetResponseGetter(items, responseGetter); trySetResponseGetter(latestInvoice, responseGetter); + trySetResponseGetter(managedPayments, responseGetter); trySetResponseGetter(onBehalfOf, responseGetter); trySetResponseGetter(pauseCollection, responseGetter); trySetResponseGetter(paymentSettings, responseGetter); diff --git a/src/main/java/com/stripe/model/TaxId.java b/src/main/java/com/stripe/model/TaxId.java index d21285fdced..bc8c5cec232 100644 --- a/src/main/java/com/stripe/model/TaxId.java +++ b/src/main/java/com/stripe/model/TaxId.java @@ -85,19 +85,19 @@ public class TaxId extends ApiResource implements HasId { * ca_pst_sk}, {@code ca_qst}, {@code cd_nif}, {@code ch_uid}, {@code ch_vat}, {@code cl_tin}, * {@code cm_niu}, {@code cn_tin}, {@code co_nit}, {@code cr_tin}, {@code cv_nif}, {@code de_stn}, * {@code do_rcn}, {@code ec_ruc}, {@code eg_tin}, {@code es_cif}, {@code et_tin}, {@code - * eu_oss_vat}, {@code eu_vat}, {@code gb_vat}, {@code ge_vat}, {@code gn_nif}, {@code hk_br}, - * {@code hr_oib}, {@code hu_tin}, {@code id_npwp}, {@code il_vat}, {@code in_gst}, {@code - * is_vat}, {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, {@code ke_pin}, {@code kg_tin}, {@code - * kh_tin}, {@code kr_brn}, {@code kz_bin}, {@code la_tin}, {@code li_uid}, {@code li_vat}, {@code - * lk_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 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}. Note that some - * legacy tax IDs have type {@code unknown} + * eu_oss_vat}, {@code eu_vat}, {@code fo_vat}, {@code gb_vat}, {@code ge_vat}, {@code gi_tin}, + * {@code gn_nif}, {@code hk_br}, {@code hr_oib}, {@code hu_tin}, {@code id_npwp}, {@code il_vat}, + * {@code in_gst}, {@code is_vat}, {@code it_cf}, {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, + * {@code ke_pin}, {@code kg_tin}, {@code kh_tin}, {@code kr_brn}, {@code kz_bin}, {@code la_tin}, + * {@code li_uid}, {@code li_vat}, {@code lk_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 pl_nip}, {@code py_ruc}, {@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}. Note that some legacy tax IDs have type {@code unknown} */ @SerializedName("type") String type; diff --git a/src/main/java/com/stripe/model/checkout/Session.java b/src/main/java/com/stripe/model/checkout/Session.java index 4ade0639f01..5c99a39219a 100644 --- a/src/main/java/com/stripe/model/checkout/Session.java +++ b/src/main/java/com/stripe/model/checkout/Session.java @@ -268,6 +268,15 @@ public class Session extends ApiResource implements HasId, MetadataStorePaymentIntents, Invoices, and Subscriptions. + */ + @SerializedName("managed_payments") + ManagedPayments managedPayments; + /** * 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 @@ -1584,21 +1593,21 @@ 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 - * pl_nip}, {@code tw_vat}, {@code th_vat}, {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, - * {@code li_uid}, {@code li_vat}, {@code lk_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 it_cf}, {@code fo_vat}, {@code gi_tin}, {@code py_ruc}, {@code tw_vat}, + * {@code th_vat}, {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, {@code li_uid}, {@code + * li_vat}, {@code lk_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; @@ -1848,6 +1857,23 @@ public static class RenderingOptions extends StripeObject { } } + /** + * For more details about ManagedPayments, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class ManagedPayments extends StripeObject { + /** + * Set to {@code true} to enable Managed Payments, Stripe's + * merchant of record solution, for this session. + */ + @SerializedName("enabled") + Boolean enabled; + } + /** * For more details about NameCollection, please refer to the API Reference. @@ -3646,6 +3672,9 @@ public static class Pix extends StripeObject { @SerializedName("expires_after_seconds") Long expiresAfterSeconds; + @SerializedName("mandate_options") + MandateOptions mandateOptions; + /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * @@ -3665,10 +3694,70 @@ public static class Pix extends StripeObject { * with regional legislation and network rules, such as SCA. * - *

Equal to {@code none}. + *

One of {@code none}, or {@code off_session}. */ @SerializedName("setup_future_usage") String setupFutureUsage; + + /** + * For more details about MandateOptions, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class MandateOptions extends StripeObject { + /** Amount to be charged for future payments. */ + @SerializedName("amount") + Long amount; + + /** + * Determines if the amount includes the IOF tax. + * + *

One of {@code always}, or {@code never}. + */ + @SerializedName("amount_includes_iof") + String amountIncludesIof; + + /** + * Type of amount. + * + *

One of {@code fixed}, or {@code maximum}. + */ + @SerializedName("amount_type") + String amountType; + + /** + * Three-letter ISO currency + * code, in lowercase. + */ + @SerializedName("currency") + String currency; + + /** + * Date when the mandate expires and no further payments will be charged, in {@code + * YYYY-MM-DD}. + */ + @SerializedName("end_date") + String endDate; + + /** + * Schedule at which the future payments will be charged. + * + *

One of {@code halfyearly}, {@code monthly}, {@code quarterly}, {@code weekly}, or + * {@code yearly}. + */ + @SerializedName("payment_schedule") + String paymentSchedule; + + /** Subscription name displayed to buyers in their bank app. */ + @SerializedName("reference") + String reference; + + /** Start date of the mandate, in {@code YYYY-MM-DD}. */ + @SerializedName("start_date") + String startDate; + } } /** @@ -4471,6 +4560,7 @@ public void setResponseGetter(StripeResponseGetter responseGetter) { trySetResponseGetter(invoice, responseGetter); trySetResponseGetter(invoiceCreation, responseGetter); trySetResponseGetter(lineItems, responseGetter); + trySetResponseGetter(managedPayments, responseGetter); trySetResponseGetter(nameCollection, responseGetter); trySetResponseGetter(paymentIntent, responseGetter); trySetResponseGetter(paymentLink, responseGetter); diff --git a/src/main/java/com/stripe/model/issuing/Authorization.java b/src/main/java/com/stripe/model/issuing/Authorization.java index de680af9e89..df2bb695fb2 100644 --- a/src/main/java/com/stripe/model/issuing/Authorization.java +++ b/src/main/java/com/stripe/model/issuing/Authorization.java @@ -87,6 +87,14 @@ public class Authorization extends ApiResource @SerializedName("card") Card card; + /** + * Whether the card was present at the point of sale for the authorization. + * + *

One of {@code not_present}, or {@code present}. + */ + @SerializedName("card_presence") + String cardPresence; + /** The cardholder to whom this authorization belongs. */ @SerializedName("cardholder") @Getter(lombok.AccessLevel.NONE) diff --git a/src/main/java/com/stripe/model/issuing/Card.java b/src/main/java/com/stripe/model/issuing/Card.java index e66d781f222..ee0bdee582c 100644 --- a/src/main/java/com/stripe/model/issuing/Card.java +++ b/src/main/java/com/stripe/model/issuing/Card.java @@ -44,7 +44,7 @@ public class Card extends ApiResource implements HasId, MetadataStore { /** * The reason why the card was canceled. * - *

One of {@code design_rejected}, {@code lost}, or {@code stolen}. + *

One of {@code design_rejected}, {@code fulfillment_error}, {@code lost}, or {@code stolen}. */ @SerializedName("cancellation_reason") String cancellationReason; @@ -175,7 +175,8 @@ public class Card extends ApiResource implements HasId, MetadataStore { /** * The reason why the previous card needed to be replaced. * - *

One of {@code damaged}, {@code expired}, {@code lost}, or {@code stolen}. + *

One of {@code damaged}, {@code expired}, {@code fulfillment_error}, {@code lost}, or {@code + * stolen}. */ @SerializedName("replacement_reason") String replacementReason; @@ -626,6 +627,14 @@ public static class Customs extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class SpendingControls extends StripeObject { + /** + * Array of card presence statuses from which authorizations will be allowed. Possible options + * are {@code present}, {@code not_present}. All other statuses will be blocked. Cannot be set + * with {@code blocked_card_presences}. Provide an empty value to unset this control. + */ + @SerializedName("allowed_card_presences") + List allowedCardPresences; + /** * Array of strings containing categories @@ -644,6 +653,14 @@ public static class SpendingControls extends StripeObject { @SerializedName("allowed_merchant_countries") List allowedMerchantCountries; + /** + * Array of card presence statuses from which authorizations will be declined. Possible options + * are {@code present}, {@code not_present}. Cannot be set with {@code allowed_card_presences}. + * Provide an empty value to unset this control. + */ + @SerializedName("blocked_card_presences") + List blockedCardPresences; + /** * Array of strings containing categories diff --git a/src/main/java/com/stripe/model/issuing/Cardholder.java b/src/main/java/com/stripe/model/issuing/Cardholder.java index d7890fa03ba..89f3263bfed 100644 --- a/src/main/java/com/stripe/model/issuing/Cardholder.java +++ b/src/main/java/com/stripe/model/issuing/Cardholder.java @@ -533,6 +533,14 @@ public static class Requirements extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class SpendingControls extends StripeObject { + /** + * Array of card presence statuses from which authorizations will be allowed. Possible options + * are {@code present}, {@code not_present}. All other statuses will be blocked. Cannot be set + * with {@code blocked_card_presences}. Provide an empty value to unset this control. + */ + @SerializedName("allowed_card_presences") + List allowedCardPresences; + /** * Array of strings containing categories @@ -551,6 +559,14 @@ public static class SpendingControls extends StripeObject { @SerializedName("allowed_merchant_countries") List allowedMerchantCountries; + /** + * Array of card presence statuses from which authorizations will be declined. Possible options + * are {@code present}, {@code not_present}. Cannot be set with {@code allowed_card_presences}. + * Provide an empty value to unset this control. + */ + @SerializedName("blocked_card_presences") + List blockedCardPresences; + /** * Array of strings containing categories diff --git a/src/main/java/com/stripe/model/radar/PaymentEvaluation.java b/src/main/java/com/stripe/model/radar/PaymentEvaluation.java index bc881239003..22d86cbe766 100644 --- a/src/main/java/com/stripe/model/radar/PaymentEvaluation.java +++ b/src/main/java/com/stripe/model/radar/PaymentEvaluation.java @@ -87,8 +87,8 @@ public class PaymentEvaluation extends ApiResource implements HasId { PaymentDetails paymentDetails; /** - * Recommended action based on the score of the fraudulent_payment signal. Possible values are - * {@code block} and {@code continue}. + * Recommended action based on the score of the {@code fraudulent_payment} signal. Possible values + * are {@code block} and {@code continue}. * *

One of {@code block}, or {@code continue}. */ @@ -752,15 +752,17 @@ public static class FraudulentPayment extends StripeObject { /** * Risk level of this signal, based on the score. * - *

One of {@code elevated}, {@code highest}, or {@code normal}. + *

One of {@code elevated}, {@code highest}, {@code low}, {@code normal}, {@code + * not_assessed}, or {@code unknown}. */ @SerializedName("risk_level") String riskLevel; /** - * Score for this insight. Possible values for evaluated payments are -1 and any value between - * 0 and 100. The value is returned with two decimal places. A score of -1 indicates a test - * integration and higher scores indicate a higher likelihood of the signal being true. + * Score for this signal. Possible values for evaluated payments are between 0 and 100. The + * value is returned with two decimal places and higher scores indicate a higher likelihood of + * the signal being true. A score of -1 is returned when a model evaluation was not performed, + * such as requests from incomplete integrations. */ @SerializedName("score") BigDecimal score; diff --git a/src/main/java/com/stripe/model/radar/ValueList.java b/src/main/java/com/stripe/model/radar/ValueList.java index 0e560494d20..44a2b5eebe9 100644 --- a/src/main/java/com/stripe/model/radar/ValueList.java +++ b/src/main/java/com/stripe/model/radar/ValueList.java @@ -54,8 +54,8 @@ public class ValueList extends ApiResource implements HasId, MetadataStore taxBreakdown; - /** Timestamp of date at which the tax rules and rates in effect applies for the calculation. */ + /** + * The calculation uses the tax rules and rates that are in effect at this timestamp. You can use + * a date up to 31 days in the past or up to 31 days in the future. If you use a future date, + * Stripe doesn't guarantee that the expected tax rules and rate being used match the actual rules + * and rate that will be in effect on that date. We deploy tax changes before their effective + * date, but not within a fixed window. + */ @SerializedName("tax_date") Long taxDate; @@ -326,21 +332,21 @@ 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 - * pl_nip}, {@code tw_vat}, {@code th_vat}, {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, - * {@code li_uid}, {@code li_vat}, {@code lk_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 it_cf}, {@code fo_vat}, {@code gi_tin}, {@code py_ruc}, {@code tw_vat}, + * {@code th_vat}, {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, {@code li_uid}, {@code + * li_vat}, {@code lk_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 3dc225c7943..9403ea8e01e 100644 --- a/src/main/java/com/stripe/model/tax/Transaction.java +++ b/src/main/java/com/stripe/model/tax/Transaction.java @@ -104,7 +104,13 @@ public class Transaction extends ApiResource implements HasId { @SerializedName("shipping_cost") ShippingCost shippingCost; - /** Timestamp of date at which the tax rules and rates in effect applies for the calculation. */ + /** + * The calculation uses the tax rules and rates that are in effect at this timestamp. You can use + * a date up to 31 days in the past or up to 31 days in the future. If you use a future date, + * Stripe doesn't guarantee that the expected tax rules and rate being used match the actual rules + * and rate that will be in effect on that date. We deploy tax changes before their effective + * date, but not within a fixed window. + */ @SerializedName("tax_date") Long taxDate; @@ -371,21 +377,21 @@ 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 - * pl_nip}, {@code tw_vat}, {@code th_vat}, {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, - * {@code li_uid}, {@code li_vat}, {@code lk_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 it_cf}, {@code fo_vat}, {@code gi_tin}, {@code py_ruc}, {@code tw_vat}, + * {@code th_vat}, {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, {@code li_uid}, {@code + * li_vat}, {@code lk_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/param/AccountCreateParams.java b/src/main/java/com/stripe/param/AccountCreateParams.java index 0bf0068ddde..53b279b141c 100644 --- a/src/main/java/com/stripe/param/AccountCreateParams.java +++ b/src/main/java/com/stripe/param/AccountCreateParams.java @@ -177,8 +177,9 @@ public class AccountCreateParams extends ApiRequestParams { TosAcceptance tosAcceptance; /** - * The type of Stripe account to create. May be one of {@code custom}, {@code express} or {@code - * standard}. + * The {@code type} parameter is deprecated. Use {@code controller} + * instead to configure dashboard access, fee payer, loss liability, and requirement collection. */ @SerializedName("type") Type type; @@ -564,8 +565,10 @@ public Builder setTosAcceptance(AccountCreateParams.TosAcceptance tosAcceptance) } /** - * The type of Stripe account to create. May be one of {@code custom}, {@code express} or {@code - * standard}. + * The {@code type} parameter is deprecated. Use {@code + * controller} instead to configure dashboard access, fee payer, loss liability, and + * requirement collection. */ public Builder setType(AccountCreateParams.Type type) { this.type = type; @@ -1301,6 +1304,10 @@ public static class Capabilities { @SerializedName("amazon_pay_payments") AmazonPayPayments amazonPayPayments; + /** The app_distribution capability. */ + @SerializedName("app_distribution") + AppDistribution appDistribution; + /** The au_becs_debit_payments capability. */ @SerializedName("au_becs_debit_payments") AuBecsDebitPayments auBecsDebitPayments; @@ -1498,6 +1505,10 @@ public static class Capabilities { @SerializedName("sofort_payments") SofortPayments sofortPayments; + /** The sunbit_payments capability. */ + @SerializedName("sunbit_payments") + SunbitPayments sunbitPayments; + /** The swish_payments capability. */ @SerializedName("swish_payments") SwishPayments swishPayments; @@ -1544,6 +1555,7 @@ private Capabilities( AfterpayClearpayPayments afterpayClearpayPayments, AlmaPayments almaPayments, AmazonPayPayments amazonPayPayments, + AppDistribution appDistribution, AuBecsDebitPayments auBecsDebitPayments, BacsDebitPayments bacsDebitPayments, BancontactPayments bancontactPayments, @@ -1592,6 +1604,7 @@ private Capabilities( SepaBankTransferPayments sepaBankTransferPayments, SepaDebitPayments sepaDebitPayments, SofortPayments sofortPayments, + SunbitPayments sunbitPayments, SwishPayments swishPayments, TaxReportingUs1099K taxReportingUs1099K, TaxReportingUs1099Misc taxReportingUs1099Misc, @@ -1607,6 +1620,7 @@ private Capabilities( this.afterpayClearpayPayments = afterpayClearpayPayments; this.almaPayments = almaPayments; this.amazonPayPayments = amazonPayPayments; + this.appDistribution = appDistribution; this.auBecsDebitPayments = auBecsDebitPayments; this.bacsDebitPayments = bacsDebitPayments; this.bancontactPayments = bancontactPayments; @@ -1655,6 +1669,7 @@ private Capabilities( this.sepaBankTransferPayments = sepaBankTransferPayments; this.sepaDebitPayments = sepaDebitPayments; this.sofortPayments = sofortPayments; + this.sunbitPayments = sunbitPayments; this.swishPayments = swishPayments; this.taxReportingUs1099K = taxReportingUs1099K; this.taxReportingUs1099Misc = taxReportingUs1099Misc; @@ -1682,6 +1697,8 @@ public static class Builder { private AmazonPayPayments amazonPayPayments; + private AppDistribution appDistribution; + private AuBecsDebitPayments auBecsDebitPayments; private BacsDebitPayments bacsDebitPayments; @@ -1778,6 +1795,8 @@ public static class Builder { private SofortPayments sofortPayments; + private SunbitPayments sunbitPayments; + private SwishPayments swishPayments; private TaxReportingUs1099K taxReportingUs1099K; @@ -1806,6 +1825,7 @@ public AccountCreateParams.Capabilities build() { this.afterpayClearpayPayments, this.almaPayments, this.amazonPayPayments, + this.appDistribution, this.auBecsDebitPayments, this.bacsDebitPayments, this.bancontactPayments, @@ -1854,6 +1874,7 @@ public AccountCreateParams.Capabilities build() { this.sepaBankTransferPayments, this.sepaDebitPayments, this.sofortPayments, + this.sunbitPayments, this.swishPayments, this.taxReportingUs1099K, this.taxReportingUs1099Misc, @@ -1900,6 +1921,13 @@ public Builder setAmazonPayPayments( return this; } + /** The app_distribution capability. */ + public Builder setAppDistribution( + AccountCreateParams.Capabilities.AppDistribution appDistribution) { + this.appDistribution = appDistribution; + return this; + } + /** The au_becs_debit_payments capability. */ public Builder setAuBecsDebitPayments( AccountCreateParams.Capabilities.AuBecsDebitPayments auBecsDebitPayments) { @@ -2246,6 +2274,13 @@ public Builder setSofortPayments( return this; } + /** The sunbit_payments capability. */ + public Builder setSunbitPayments( + AccountCreateParams.Capabilities.SunbitPayments sunbitPayments) { + this.sunbitPayments = sunbitPayments; + return this; + } + /** The swish_payments capability. */ public Builder setSwishPayments( AccountCreateParams.Capabilities.SwishPayments swishPayments) { @@ -2713,6 +2748,86 @@ public Builder setRequested(Boolean requested) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class AppDistribution { + /** + * 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; + + /** + * Passing true requests the capability for the account, if it is not already requested. A + * requested capability may not immediately become active. Any requirements to activate the + * capability are returned in the {@code requirements} arrays. + */ + @SerializedName("requested") + Boolean requested; + + private AppDistribution(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Capabilities.AppDistribution build() { + return new AccountCreateParams.Capabilities.AppDistribution( + this.extraParams, this.requested); + } + + /** + * 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 AccountCreateParams.Capabilities.AppDistribution#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 AccountCreateParams.Capabilities.AppDistribution#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Passing true requests the capability for the account, if it is not already requested. A + * requested capability may not immediately become active. Any requirements to activate the + * capability are returned in the {@code requirements} arrays. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class AuBecsDebitPayments { @@ -6469,6 +6584,86 @@ public Builder setRequested(Boolean requested) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class SunbitPayments { + /** + * 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; + + /** + * Passing true requests the capability for the account, if it is not already requested. A + * requested capability may not immediately become active. Any requirements to activate the + * capability are returned in the {@code requirements} arrays. + */ + @SerializedName("requested") + Boolean requested; + + private SunbitPayments(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Capabilities.SunbitPayments build() { + return new AccountCreateParams.Capabilities.SunbitPayments( + this.extraParams, this.requested); + } + + /** + * 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 AccountCreateParams.Capabilities.SunbitPayments#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 AccountCreateParams.Capabilities.SunbitPayments#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Passing true requests the capability for the account, if it is not already requested. A + * requested capability may not immediately become active. Any requirements to activate the + * capability are returned in the {@code requirements} arrays. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class SwishPayments { diff --git a/src/main/java/com/stripe/param/AccountSessionCreateParams.java b/src/main/java/com/stripe/param/AccountSessionCreateParams.java index 6c8ddb4ce12..1745d15ce42 100644 --- a/src/main/java/com/stripe/param/AccountSessionCreateParams.java +++ b/src/main/java/com/stripe/param/AccountSessionCreateParams.java @@ -153,6 +153,14 @@ public static class Components { @SerializedName("account_onboarding") AccountOnboarding accountOnboarding; + /** + * Configuration for the balance + * report embedded component. + */ + @SerializedName("balance_report") + BalanceReport balanceReport; + /** * Configuration for the balances @@ -266,6 +274,14 @@ public static class Components { @SerializedName("payout_details") PayoutDetails payoutDetails; + /** + * Configuration for the payout + * reconciliation report embedded component. + */ + @SerializedName("payout_reconciliation_report") + PayoutReconciliationReport payoutReconciliationReport; + /** * Configuration for the payouts embedded @@ -301,6 +317,7 @@ public static class Components { private Components( AccountManagement accountManagement, AccountOnboarding accountOnboarding, + BalanceReport balanceReport, Balances balances, DisputesList disputesList, Documents documents, @@ -315,12 +332,14 @@ private Components( PaymentDisputes paymentDisputes, Payments payments, PayoutDetails payoutDetails, + PayoutReconciliationReport payoutReconciliationReport, Payouts payouts, PayoutsList payoutsList, TaxRegistrations taxRegistrations, TaxSettings taxSettings) { this.accountManagement = accountManagement; this.accountOnboarding = accountOnboarding; + this.balanceReport = balanceReport; this.balances = balances; this.disputesList = disputesList; this.documents = documents; @@ -335,6 +354,7 @@ private Components( this.paymentDisputes = paymentDisputes; this.payments = payments; this.payoutDetails = payoutDetails; + this.payoutReconciliationReport = payoutReconciliationReport; this.payouts = payouts; this.payoutsList = payoutsList; this.taxRegistrations = taxRegistrations; @@ -350,6 +370,8 @@ public static class Builder { private AccountOnboarding accountOnboarding; + private BalanceReport balanceReport; + private Balances balances; private DisputesList disputesList; @@ -378,6 +400,8 @@ public static class Builder { private PayoutDetails payoutDetails; + private PayoutReconciliationReport payoutReconciliationReport; + private Payouts payouts; private PayoutsList payoutsList; @@ -391,6 +415,7 @@ public AccountSessionCreateParams.Components build() { return new AccountSessionCreateParams.Components( this.accountManagement, this.accountOnboarding, + this.balanceReport, this.balances, this.disputesList, this.documents, @@ -405,6 +430,7 @@ public AccountSessionCreateParams.Components build() { this.paymentDisputes, this.payments, this.payoutDetails, + this.payoutReconciliationReport, this.payouts, this.payoutsList, this.taxRegistrations, @@ -433,6 +459,17 @@ public Builder setAccountOnboarding( return this; } + /** + * Configuration for the balance + * report embedded component. + */ + public Builder setBalanceReport( + AccountSessionCreateParams.Components.BalanceReport balanceReport) { + this.balanceReport = balanceReport; + return this; + } + /** * Configuration for the balances @@ -599,6 +636,18 @@ public Builder setPayoutDetails( return this; } + /** + * Configuration for the payout + * reconciliation report embedded component. + */ + public Builder setPayoutReconciliationReport( + AccountSessionCreateParams.Components.PayoutReconciliationReport + payoutReconciliationReport) { + this.payoutReconciliationReport = payoutReconciliationReport; + return this; + } + /** * Configuration for the payouts @@ -1049,6 +1098,154 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class BalanceReport { + /** Required. Whether the embedded component is enabled. */ + @SerializedName("enabled") + Boolean enabled; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** An empty list, because this embedded component has no features. */ + @SerializedName("features") + Features features; + + private BalanceReport(Boolean enabled, Map extraParams, Features features) { + this.enabled = enabled; + this.extraParams = extraParams; + this.features = features; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Boolean enabled; + + private Map extraParams; + + private Features features; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountSessionCreateParams.Components.BalanceReport build() { + return new AccountSessionCreateParams.Components.BalanceReport( + this.enabled, this.extraParams, this.features); + } + + /** Required. Whether the embedded component is enabled. */ + public Builder setEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountSessionCreateParams.Components.BalanceReport#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountSessionCreateParams.Components.BalanceReport#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** An empty list, because this embedded component has no features. */ + public Builder setFeatures( + AccountSessionCreateParams.Components.BalanceReport.Features features) { + this.features = features; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Features { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Features(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountSessionCreateParams.Components.BalanceReport.Features build() { + return new AccountSessionCreateParams.Components.BalanceReport.Features( + this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountSessionCreateParams.Components.BalanceReport.Features#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountSessionCreateParams.Components.BalanceReport.Features#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Balances { @@ -3763,6 +3960,157 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class PayoutReconciliationReport { + /** Required. Whether the embedded component is enabled. */ + @SerializedName("enabled") + Boolean enabled; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** An empty list, because this embedded component has no features. */ + @SerializedName("features") + Features features; + + private PayoutReconciliationReport( + Boolean enabled, Map extraParams, Features features) { + this.enabled = enabled; + this.extraParams = extraParams; + this.features = features; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Boolean enabled; + + private Map extraParams; + + private Features features; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountSessionCreateParams.Components.PayoutReconciliationReport build() { + return new AccountSessionCreateParams.Components.PayoutReconciliationReport( + this.enabled, this.extraParams, this.features); + } + + /** Required. Whether the embedded component is enabled. */ + public Builder setEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountSessionCreateParams.Components.PayoutReconciliationReport#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountSessionCreateParams.Components.PayoutReconciliationReport#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** An empty list, because this embedded component has no features. */ + public Builder setFeatures( + AccountSessionCreateParams.Components.PayoutReconciliationReport.Features features) { + this.features = features; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Features { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Features(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountSessionCreateParams.Components.PayoutReconciliationReport.Features build() { + return new AccountSessionCreateParams.Components.PayoutReconciliationReport.Features( + this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountSessionCreateParams.Components.PayoutReconciliationReport.Features#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountSessionCreateParams.Components.PayoutReconciliationReport.Features#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Payouts { diff --git a/src/main/java/com/stripe/param/AccountUpdateParams.java b/src/main/java/com/stripe/param/AccountUpdateParams.java index 74f5ae9e5af..3c8f5b4170b 100644 --- a/src/main/java/com/stripe/param/AccountUpdateParams.java +++ b/src/main/java/com/stripe/param/AccountUpdateParams.java @@ -1402,6 +1402,10 @@ public static class Capabilities { @SerializedName("amazon_pay_payments") AmazonPayPayments amazonPayPayments; + /** The app_distribution capability. */ + @SerializedName("app_distribution") + AppDistribution appDistribution; + /** The au_becs_debit_payments capability. */ @SerializedName("au_becs_debit_payments") AuBecsDebitPayments auBecsDebitPayments; @@ -1599,6 +1603,10 @@ public static class Capabilities { @SerializedName("sofort_payments") SofortPayments sofortPayments; + /** The sunbit_payments capability. */ + @SerializedName("sunbit_payments") + SunbitPayments sunbitPayments; + /** The swish_payments capability. */ @SerializedName("swish_payments") SwishPayments swishPayments; @@ -1645,6 +1653,7 @@ private Capabilities( AfterpayClearpayPayments afterpayClearpayPayments, AlmaPayments almaPayments, AmazonPayPayments amazonPayPayments, + AppDistribution appDistribution, AuBecsDebitPayments auBecsDebitPayments, BacsDebitPayments bacsDebitPayments, BancontactPayments bancontactPayments, @@ -1693,6 +1702,7 @@ private Capabilities( SepaBankTransferPayments sepaBankTransferPayments, SepaDebitPayments sepaDebitPayments, SofortPayments sofortPayments, + SunbitPayments sunbitPayments, SwishPayments swishPayments, TaxReportingUs1099K taxReportingUs1099K, TaxReportingUs1099Misc taxReportingUs1099Misc, @@ -1708,6 +1718,7 @@ private Capabilities( this.afterpayClearpayPayments = afterpayClearpayPayments; this.almaPayments = almaPayments; this.amazonPayPayments = amazonPayPayments; + this.appDistribution = appDistribution; this.auBecsDebitPayments = auBecsDebitPayments; this.bacsDebitPayments = bacsDebitPayments; this.bancontactPayments = bancontactPayments; @@ -1756,6 +1767,7 @@ private Capabilities( this.sepaBankTransferPayments = sepaBankTransferPayments; this.sepaDebitPayments = sepaDebitPayments; this.sofortPayments = sofortPayments; + this.sunbitPayments = sunbitPayments; this.swishPayments = swishPayments; this.taxReportingUs1099K = taxReportingUs1099K; this.taxReportingUs1099Misc = taxReportingUs1099Misc; @@ -1783,6 +1795,8 @@ public static class Builder { private AmazonPayPayments amazonPayPayments; + private AppDistribution appDistribution; + private AuBecsDebitPayments auBecsDebitPayments; private BacsDebitPayments bacsDebitPayments; @@ -1879,6 +1893,8 @@ public static class Builder { private SofortPayments sofortPayments; + private SunbitPayments sunbitPayments; + private SwishPayments swishPayments; private TaxReportingUs1099K taxReportingUs1099K; @@ -1907,6 +1923,7 @@ public AccountUpdateParams.Capabilities build() { this.afterpayClearpayPayments, this.almaPayments, this.amazonPayPayments, + this.appDistribution, this.auBecsDebitPayments, this.bacsDebitPayments, this.bancontactPayments, @@ -1955,6 +1972,7 @@ public AccountUpdateParams.Capabilities build() { this.sepaBankTransferPayments, this.sepaDebitPayments, this.sofortPayments, + this.sunbitPayments, this.swishPayments, this.taxReportingUs1099K, this.taxReportingUs1099Misc, @@ -2001,6 +2019,13 @@ public Builder setAmazonPayPayments( return this; } + /** The app_distribution capability. */ + public Builder setAppDistribution( + AccountUpdateParams.Capabilities.AppDistribution appDistribution) { + this.appDistribution = appDistribution; + return this; + } + /** The au_becs_debit_payments capability. */ public Builder setAuBecsDebitPayments( AccountUpdateParams.Capabilities.AuBecsDebitPayments auBecsDebitPayments) { @@ -2347,6 +2372,13 @@ public Builder setSofortPayments( return this; } + /** The sunbit_payments capability. */ + public Builder setSunbitPayments( + AccountUpdateParams.Capabilities.SunbitPayments sunbitPayments) { + this.sunbitPayments = sunbitPayments; + return this; + } + /** The swish_payments capability. */ public Builder setSwishPayments( AccountUpdateParams.Capabilities.SwishPayments swishPayments) { @@ -2814,6 +2846,86 @@ public Builder setRequested(Boolean requested) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class AppDistribution { + /** + * 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; + + /** + * Passing true requests the capability for the account, if it is not already requested. A + * requested capability may not immediately become active. Any requirements to activate the + * capability are returned in the {@code requirements} arrays. + */ + @SerializedName("requested") + Boolean requested; + + private AppDistribution(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Capabilities.AppDistribution build() { + return new AccountUpdateParams.Capabilities.AppDistribution( + this.extraParams, this.requested); + } + + /** + * 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 AccountUpdateParams.Capabilities.AppDistribution#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 AccountUpdateParams.Capabilities.AppDistribution#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Passing true requests the capability for the account, if it is not already requested. A + * requested capability may not immediately become active. Any requirements to activate the + * capability are returned in the {@code requirements} arrays. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class AuBecsDebitPayments { @@ -6570,6 +6682,86 @@ public Builder setRequested(Boolean requested) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class SunbitPayments { + /** + * 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; + + /** + * Passing true requests the capability for the account, if it is not already requested. A + * requested capability may not immediately become active. Any requirements to activate the + * capability are returned in the {@code requirements} arrays. + */ + @SerializedName("requested") + Boolean requested; + + private SunbitPayments(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Capabilities.SunbitPayments build() { + return new AccountUpdateParams.Capabilities.SunbitPayments( + this.extraParams, this.requested); + } + + /** + * 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 AccountUpdateParams.Capabilities.SunbitPayments#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 AccountUpdateParams.Capabilities.SunbitPayments#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Passing true requests the capability for the account, if it is not already requested. A + * requested capability may not immediately become active. Any requirements to activate the + * capability are returned in the {@code requirements} arrays. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class SwishPayments { diff --git a/src/main/java/com/stripe/param/BalanceTransactionListParams.java b/src/main/java/com/stripe/param/BalanceTransactionListParams.java index e3e649ec359..f0f4d27f7f7 100644 --- a/src/main/java/com/stripe/param/BalanceTransactionListParams.java +++ b/src/main/java/com/stripe/param/BalanceTransactionListParams.java @@ -79,9 +79,10 @@ public class BalanceTransactionListParams extends ApiRequestParams { * {@code advance_funding}, {@code anticipation_repayment}, {@code application_fee}, {@code * application_fee_refund}, {@code charge}, {@code climate_order_purchase}, {@code * climate_order_refund}, {@code connect_collection_transfer}, {@code contribution}, {@code - * issuing_authorization_hold}, {@code issuing_authorization_release}, {@code issuing_dispute}, - * {@code issuing_transaction}, {@code obligation_outbound}, {@code obligation_reversal_inbound}, - * {@code payment}, {@code payment_failure_refund}, {@code payment_network_reserve_hold}, {@code + * inbound_transfer}, {@code inbound_transfer_reversal}, {@code issuing_authorization_hold}, + * {@code issuing_authorization_release}, {@code issuing_dispute}, {@code issuing_transaction}, + * {@code obligation_outbound}, {@code obligation_reversal_inbound}, {@code payment}, {@code + * payment_failure_refund}, {@code payment_network_reserve_hold}, {@code * 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 @@ -89,7 +90,7 @@ public class BalanceTransactionListParams extends ApiRequestParams { * {@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}. + * transfer_failure}, {@code transfer_refund}, or {@code fee_credit_funding}. */ @SerializedName("type") String type; @@ -282,18 +283,18 @@ public Builder setStartingAfter(String startingAfter) { * {@code advance_funding}, {@code anticipation_repayment}, {@code application_fee}, {@code * application_fee_refund}, {@code charge}, {@code climate_order_purchase}, {@code * climate_order_refund}, {@code connect_collection_transfer}, {@code contribution}, {@code - * issuing_authorization_hold}, {@code issuing_authorization_release}, {@code issuing_dispute}, - * {@code issuing_transaction}, {@code obligation_outbound}, {@code - * obligation_reversal_inbound}, {@code payment}, {@code payment_failure_refund}, {@code - * payment_network_reserve_hold}, {@code 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 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}. + * inbound_transfer}, {@code inbound_transfer_reversal}, {@code issuing_authorization_hold}, + * {@code issuing_authorization_release}, {@code issuing_dispute}, {@code issuing_transaction}, + * {@code obligation_outbound}, {@code obligation_reversal_inbound}, {@code payment}, {@code + * payment_failure_refund}, {@code payment_network_reserve_hold}, {@code + * 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 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}, {@code transfer_refund}, or {@code fee_credit_funding}. */ 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 40d7ffa7a3b..7149c6e3cae 100644 --- a/src/main/java/com/stripe/param/ConfirmationTokenCreateParams.java +++ b/src/main/java/com/stripe/param/ConfirmationTokenCreateParams.java @@ -569,6 +569,13 @@ public static class PaymentMethodData { @SerializedName("sofort") Sofort sofort; + /** + * If this is a Sunbit PaymentMethod, this hash contains details about the Sunbit payment + * method. + */ + @SerializedName("sunbit") + Sunbit sunbit; + /** * If this is a {@code swish} PaymentMethod, this hash contains details about the Swish payment * method. @@ -669,6 +676,7 @@ private PaymentMethodData( Satispay satispay, SepaDebit sepaDebit, Sofort sofort, + Sunbit sunbit, Swish swish, Twint twint, Type type, @@ -726,6 +734,7 @@ private PaymentMethodData( this.satispay = satispay; this.sepaDebit = sepaDebit; this.sofort = sofort; + this.sunbit = sunbit; this.swish = swish; this.twint = twint; this.type = type; @@ -840,6 +849,8 @@ public static class Builder { private Sofort sofort; + private Sunbit sunbit; + private Swish swish; private Twint twint; @@ -907,6 +918,7 @@ public ConfirmationTokenCreateParams.PaymentMethodData build() { this.satispay, this.sepaDebit, this.sofort, + this.sunbit, this.swish, this.twint, this.type, @@ -1425,6 +1437,15 @@ public Builder setSofort(ConfirmationTokenCreateParams.PaymentMethodData.Sofort return this; } + /** + * If this is a Sunbit PaymentMethod, this hash contains details about the Sunbit payment + * method. + */ + public Builder setSunbit(ConfirmationTokenCreateParams.PaymentMethodData.Sunbit sunbit) { + this.sunbit = sunbit; + return this; + } + /** * If this is a {@code swish} PaymentMethod, this hash contains details about the Swish * payment method. @@ -5403,6 +5424,64 @@ public enum Country implements ApiRequestParams.EnumParam { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Sunbit { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Sunbit(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public ConfirmationTokenCreateParams.PaymentMethodData.Sunbit build() { + return new ConfirmationTokenCreateParams.PaymentMethodData.Sunbit(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link ConfirmationTokenCreateParams.PaymentMethodData.Sunbit#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 ConfirmationTokenCreateParams.PaymentMethodData.Sunbit#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Swish { @@ -6179,6 +6258,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("sofort") SOFORT("sofort"), + @SerializedName("sunbit") + SUNBIT("sunbit"), + @SerializedName("swish") SWISH("swish"), diff --git a/src/main/java/com/stripe/param/CustomerCreateParams.java b/src/main/java/com/stripe/param/CustomerCreateParams.java index d30e6acf364..0a8e143438f 100644 --- a/src/main/java/com/stripe/param/CustomerCreateParams.java +++ b/src/main/java/com/stripe/param/CustomerCreateParams.java @@ -1731,19 +1731,20 @@ public static class TaxIdData { * ca_pst_bc}, {@code ca_pst_mb}, {@code ca_pst_sk}, {@code ca_qst}, {@code cd_nif}, {@code * ch_uid}, {@code ch_vat}, {@code cl_tin}, {@code cm_niu}, {@code cn_tin}, {@code co_nit}, * {@code cr_tin}, {@code cv_nif}, {@code de_stn}, {@code do_rcn}, {@code ec_ruc}, {@code - * eg_tin}, {@code es_cif}, {@code et_tin}, {@code eu_oss_vat}, {@code eu_vat}, {@code gb_vat}, - * {@code ge_vat}, {@code gn_nif}, {@code hk_br}, {@code hr_oib}, {@code hu_tin}, {@code - * id_npwp}, {@code il_vat}, {@code in_gst}, {@code is_vat}, {@code jp_cn}, {@code jp_rn}, - * {@code jp_trn}, {@code ke_pin}, {@code kg_tin}, {@code kh_tin}, {@code kr_brn}, {@code - * kz_bin}, {@code la_tin}, {@code li_uid}, {@code li_vat}, {@code lk_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 - * 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} + * eg_tin}, {@code es_cif}, {@code et_tin}, {@code eu_oss_vat}, {@code eu_vat}, {@code fo_vat}, + * {@code gb_vat}, {@code ge_vat}, {@code gi_tin}, {@code gn_nif}, {@code hk_br}, {@code + * hr_oib}, {@code hu_tin}, {@code id_npwp}, {@code il_vat}, {@code in_gst}, {@code is_vat}, + * {@code it_cf}, {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, {@code ke_pin}, {@code kg_tin}, + * {@code kh_tin}, {@code kr_brn}, {@code kz_bin}, {@code la_tin}, {@code li_uid}, {@code + * li_vat}, {@code lk_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 pl_nip}, {@code py_ruc}, {@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; @@ -1810,19 +1811,19 @@ public Builder putAllExtraParam(Map map) { * {@code cd_nif}, {@code ch_uid}, {@code ch_vat}, {@code cl_tin}, {@code cm_niu}, {@code * cn_tin}, {@code co_nit}, {@code cr_tin}, {@code cv_nif}, {@code de_stn}, {@code do_rcn}, * {@code ec_ruc}, {@code eg_tin}, {@code es_cif}, {@code et_tin}, {@code eu_oss_vat}, {@code - * eu_vat}, {@code gb_vat}, {@code ge_vat}, {@code gn_nif}, {@code hk_br}, {@code hr_oib}, - * {@code hu_tin}, {@code id_npwp}, {@code il_vat}, {@code in_gst}, {@code is_vat}, {@code - * jp_cn}, {@code jp_rn}, {@code jp_trn}, {@code ke_pin}, {@code kg_tin}, {@code kh_tin}, - * {@code kr_brn}, {@code kz_bin}, {@code la_tin}, {@code li_uid}, {@code li_vat}, {@code - * lk_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 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} + * eu_vat}, {@code fo_vat}, {@code gb_vat}, {@code ge_vat}, {@code gi_tin}, {@code gn_nif}, + * {@code hk_br}, {@code hr_oib}, {@code hu_tin}, {@code id_npwp}, {@code il_vat}, {@code + * in_gst}, {@code is_vat}, {@code it_cf}, {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, + * {@code ke_pin}, {@code kg_tin}, {@code kh_tin}, {@code kr_brn}, {@code kz_bin}, {@code + * la_tin}, {@code li_uid}, {@code li_vat}, {@code lk_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 pl_nip}, {@code + * py_ruc}, {@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; @@ -1972,12 +1973,18 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("eu_vat") EU_VAT("eu_vat"), + @SerializedName("fo_vat") + FO_VAT("fo_vat"), + @SerializedName("gb_vat") GB_VAT("gb_vat"), @SerializedName("ge_vat") GE_VAT("ge_vat"), + @SerializedName("gi_tin") + GI_TIN("gi_tin"), + @SerializedName("gn_nif") GN_NIF("gn_nif"), @@ -2002,6 +2009,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("is_vat") IS_VAT("is_vat"), + @SerializedName("it_cf") + IT_CF("it_cf"), + @SerializedName("jp_cn") JP_CN("jp_cn"), @@ -2092,6 +2102,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("pl_nip") PL_NIP("pl_nip"), + @SerializedName("py_ruc") + PY_RUC("py_ruc"), + @SerializedName("ro_tin") RO_TIN("ro_tin"), diff --git a/src/main/java/com/stripe/param/CustomerListPaymentMethodsParams.java b/src/main/java/com/stripe/param/CustomerListPaymentMethodsParams.java index 1e032df4801..1bf1ea47a25 100644 --- a/src/main/java/com/stripe/param/CustomerListPaymentMethodsParams.java +++ b/src/main/java/com/stripe/param/CustomerListPaymentMethodsParams.java @@ -378,6 +378,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("sofort") SOFORT("sofort"), + @SerializedName("sunbit") + SUNBIT("sunbit"), + @SerializedName("swish") SWISH("swish"), diff --git a/src/main/java/com/stripe/param/CustomerPaymentMethodListParams.java b/src/main/java/com/stripe/param/CustomerPaymentMethodListParams.java index 853df8e5ad5..d7ee6245d1e 100644 --- a/src/main/java/com/stripe/param/CustomerPaymentMethodListParams.java +++ b/src/main/java/com/stripe/param/CustomerPaymentMethodListParams.java @@ -378,6 +378,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("sofort") SOFORT("sofort"), + @SerializedName("sunbit") + SUNBIT("sunbit"), + @SerializedName("swish") SWISH("swish"), diff --git a/src/main/java/com/stripe/param/CustomerTaxIdCreateParams.java b/src/main/java/com/stripe/param/CustomerTaxIdCreateParams.java index aa8cf625167..c17435beb69 100644 --- a/src/main/java/com/stripe/param/CustomerTaxIdCreateParams.java +++ b/src/main/java/com/stripe/param/CustomerTaxIdCreateParams.java @@ -35,18 +35,19 @@ public class CustomerTaxIdCreateParams extends ApiRequestParams { * {@code ca_pst_mb}, {@code ca_pst_sk}, {@code ca_qst}, {@code cd_nif}, {@code ch_uid}, {@code * ch_vat}, {@code cl_tin}, {@code cm_niu}, {@code cn_tin}, {@code co_nit}, {@code cr_tin}, {@code * cv_nif}, {@code de_stn}, {@code do_rcn}, {@code ec_ruc}, {@code eg_tin}, {@code es_cif}, {@code - * et_tin}, {@code eu_oss_vat}, {@code eu_vat}, {@code gb_vat}, {@code ge_vat}, {@code gn_nif}, - * {@code hk_br}, {@code hr_oib}, {@code hu_tin}, {@code id_npwp}, {@code il_vat}, {@code in_gst}, - * {@code is_vat}, {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, {@code ke_pin}, {@code kg_tin}, - * {@code kh_tin}, {@code kr_brn}, {@code kz_bin}, {@code la_tin}, {@code li_uid}, {@code li_vat}, - * {@code lk_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 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} + * et_tin}, {@code eu_oss_vat}, {@code eu_vat}, {@code fo_vat}, {@code gb_vat}, {@code ge_vat}, + * {@code gi_tin}, {@code gn_nif}, {@code hk_br}, {@code hr_oib}, {@code hu_tin}, {@code id_npwp}, + * {@code il_vat}, {@code in_gst}, {@code is_vat}, {@code it_cf}, {@code jp_cn}, {@code jp_rn}, + * {@code jp_trn}, {@code ke_pin}, {@code kg_tin}, {@code kh_tin}, {@code kr_brn}, {@code kz_bin}, + * {@code la_tin}, {@code li_uid}, {@code li_vat}, {@code lk_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 pl_nip}, {@code py_ruc}, {@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; @@ -142,19 +143,20 @@ public Builder putAllExtraParam(Map map) { * ca_pst_bc}, {@code ca_pst_mb}, {@code ca_pst_sk}, {@code ca_qst}, {@code cd_nif}, {@code * ch_uid}, {@code ch_vat}, {@code cl_tin}, {@code cm_niu}, {@code cn_tin}, {@code co_nit}, * {@code cr_tin}, {@code cv_nif}, {@code de_stn}, {@code do_rcn}, {@code ec_ruc}, {@code - * eg_tin}, {@code es_cif}, {@code et_tin}, {@code eu_oss_vat}, {@code eu_vat}, {@code gb_vat}, - * {@code ge_vat}, {@code gn_nif}, {@code hk_br}, {@code hr_oib}, {@code hu_tin}, {@code - * id_npwp}, {@code il_vat}, {@code in_gst}, {@code is_vat}, {@code jp_cn}, {@code jp_rn}, - * {@code jp_trn}, {@code ke_pin}, {@code kg_tin}, {@code kh_tin}, {@code kr_brn}, {@code - * kz_bin}, {@code la_tin}, {@code li_uid}, {@code li_vat}, {@code lk_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 - * 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} + * eg_tin}, {@code es_cif}, {@code et_tin}, {@code eu_oss_vat}, {@code eu_vat}, {@code fo_vat}, + * {@code gb_vat}, {@code ge_vat}, {@code gi_tin}, {@code gn_nif}, {@code hk_br}, {@code + * hr_oib}, {@code hu_tin}, {@code id_npwp}, {@code il_vat}, {@code in_gst}, {@code is_vat}, + * {@code it_cf}, {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, {@code ke_pin}, {@code kg_tin}, + * {@code kh_tin}, {@code kr_brn}, {@code kz_bin}, {@code la_tin}, {@code li_uid}, {@code + * li_vat}, {@code lk_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 pl_nip}, {@code py_ruc}, {@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; @@ -304,12 +306,18 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("eu_vat") EU_VAT("eu_vat"), + @SerializedName("fo_vat") + FO_VAT("fo_vat"), + @SerializedName("gb_vat") GB_VAT("gb_vat"), @SerializedName("ge_vat") GE_VAT("ge_vat"), + @SerializedName("gi_tin") + GI_TIN("gi_tin"), + @SerializedName("gn_nif") GN_NIF("gn_nif"), @@ -334,6 +342,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("is_vat") IS_VAT("is_vat"), + @SerializedName("it_cf") + IT_CF("it_cf"), + @SerializedName("jp_cn") JP_CN("jp_cn"), @@ -424,6 +435,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("pl_nip") PL_NIP("pl_nip"), + @SerializedName("py_ruc") + PY_RUC("py_ruc"), + @SerializedName("ro_tin") RO_TIN("ro_tin"), diff --git a/src/main/java/com/stripe/param/InvoiceCreateParams.java b/src/main/java/com/stripe/param/InvoiceCreateParams.java index fac571ad3ca..8ccd8ed2a02 100644 --- a/src/main/java/com/stripe/param/InvoiceCreateParams.java +++ b/src/main/java/com/stripe/param/InvoiceCreateParams.java @@ -1755,6 +1755,13 @@ public static class PaymentMethodOptions { @SerializedName("payto") Object payto; + /** + * If paying by {@code pix}, this sub-hash contains details about the Pix payment method + * options to pass to the invoice’s PaymentIntent. + */ + @SerializedName("pix") + Object pix; + /** * If paying by {@code sepa_debit}, this sub-hash contains details about the SEPA Direct Debit * payment method options to pass to the invoice’s PaymentIntent. @@ -1762,6 +1769,13 @@ public static class PaymentMethodOptions { @SerializedName("sepa_debit") Object sepaDebit; + /** + * If paying by {@code upi}, this sub-hash contains details about the UPI payment method + * options to pass to the invoice’s PaymentIntent. + */ + @SerializedName("upi") + Object upi; + /** * If paying by {@code us_bank_account}, this sub-hash contains details about the ACH direct * debit payment method options to pass to the invoice’s PaymentIntent. @@ -1777,7 +1791,9 @@ private PaymentMethodOptions( Map extraParams, Object konbini, Object payto, + Object pix, Object sepaDebit, + Object upi, Object usBankAccount) { this.acssDebit = acssDebit; this.bancontact = bancontact; @@ -1786,7 +1802,9 @@ private PaymentMethodOptions( this.extraParams = extraParams; this.konbini = konbini; this.payto = payto; + this.pix = pix; this.sepaDebit = sepaDebit; + this.upi = upi; this.usBankAccount = usBankAccount; } @@ -1809,8 +1827,12 @@ public static class Builder { private Object payto; + private Object pix; + private Object sepaDebit; + private Object upi; + private Object usBankAccount; /** Finalize and obtain parameter instance from this builder. */ @@ -1823,7 +1845,9 @@ public InvoiceCreateParams.PaymentSettings.PaymentMethodOptions build() { this.extraParams, this.konbini, this.payto, + this.pix, this.sepaDebit, + this.upi, this.usBankAccount); } @@ -1969,6 +1993,24 @@ public Builder setPayto(EmptyParam payto) { return this; } + /** + * If paying by {@code pix}, this sub-hash contains details about the Pix payment method + * options to pass to the invoice’s PaymentIntent. + */ + public Builder setPix(InvoiceCreateParams.PaymentSettings.PaymentMethodOptions.Pix pix) { + this.pix = pix; + return this; + } + + /** + * If paying by {@code pix}, this sub-hash contains details about the Pix payment method + * options to pass to the invoice’s PaymentIntent. + */ + public Builder setPix(EmptyParam pix) { + this.pix = pix; + return this; + } + /** * If paying by {@code sepa_debit}, this sub-hash contains details about the SEPA Direct * Debit payment method options to pass to the invoice’s PaymentIntent. @@ -1988,6 +2030,24 @@ public Builder setSepaDebit(EmptyParam sepaDebit) { return this; } + /** + * If paying by {@code upi}, this sub-hash contains details about the UPI payment method + * options to pass to the invoice’s PaymentIntent. + */ + public Builder setUpi(InvoiceCreateParams.PaymentSettings.PaymentMethodOptions.Upi upi) { + this.upi = upi; + return this; + } + + /** + * If paying by {@code upi}, this sub-hash contains details about the UPI payment method + * options to pass to the invoice’s PaymentIntent. + */ + public Builder setUpi(EmptyParam upi) { + this.upi = upi; + return this; + } + /** * If paying by {@code us_bank_account}, this sub-hash contains details about the ACH direct * debit payment method options to pass to the invoice’s PaymentIntent. @@ -3297,6 +3357,120 @@ public enum Purpose implements ApiRequestParams.EnumParam { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Pix { + /** Determines if the amount includes the IOF tax. Defaults to {@code never}. */ + @SerializedName("amount_includes_iof") + AmountIncludesIof amountIncludesIof; + + /** + * The number of seconds (between 10 and 1209600) after which Pix payment will expire. + * Defaults to 86400 seconds. + */ + @SerializedName("expires_after_seconds") + Long expiresAfterSeconds; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Pix( + AmountIncludesIof amountIncludesIof, + Long expiresAfterSeconds, + Map extraParams) { + this.amountIncludesIof = amountIncludesIof; + this.expiresAfterSeconds = expiresAfterSeconds; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private AmountIncludesIof amountIncludesIof; + + private Long expiresAfterSeconds; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public InvoiceCreateParams.PaymentSettings.PaymentMethodOptions.Pix build() { + return new InvoiceCreateParams.PaymentSettings.PaymentMethodOptions.Pix( + this.amountIncludesIof, this.expiresAfterSeconds, this.extraParams); + } + + /** Determines if the amount includes the IOF tax. Defaults to {@code never}. */ + public Builder setAmountIncludesIof( + InvoiceCreateParams.PaymentSettings.PaymentMethodOptions.Pix.AmountIncludesIof + amountIncludesIof) { + this.amountIncludesIof = amountIncludesIof; + return this; + } + + /** + * The number of seconds (between 10 and 1209600) after which Pix payment will expire. + * Defaults to 86400 seconds. + */ + public Builder setExpiresAfterSeconds(Long expiresAfterSeconds) { + this.expiresAfterSeconds = expiresAfterSeconds; + 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 + * InvoiceCreateParams.PaymentSettings.PaymentMethodOptions.Pix#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 + * InvoiceCreateParams.PaymentSettings.PaymentMethodOptions.Pix#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + + public enum AmountIncludesIof implements ApiRequestParams.EnumParam { + @SerializedName("always") + ALWAYS("always"), + + @SerializedName("never") + NEVER("never"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + AmountIncludesIof(String value) { + this.value = value; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class SepaDebit { @@ -3359,6 +3533,236 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Upi { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Configuration options for setting up an eMandate. */ + @SerializedName("mandate_options") + MandateOptions mandateOptions; + + private Upi(Map extraParams, MandateOptions mandateOptions) { + this.extraParams = extraParams; + this.mandateOptions = mandateOptions; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private MandateOptions mandateOptions; + + /** Finalize and obtain parameter instance from this builder. */ + public InvoiceCreateParams.PaymentSettings.PaymentMethodOptions.Upi build() { + return new InvoiceCreateParams.PaymentSettings.PaymentMethodOptions.Upi( + this.extraParams, this.mandateOptions); + } + + /** + * 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 + * InvoiceCreateParams.PaymentSettings.PaymentMethodOptions.Upi#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 + * InvoiceCreateParams.PaymentSettings.PaymentMethodOptions.Upi#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Configuration options for setting up an eMandate. */ + public Builder setMandateOptions( + InvoiceCreateParams.PaymentSettings.PaymentMethodOptions.Upi.MandateOptions + mandateOptions) { + this.mandateOptions = mandateOptions; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class MandateOptions { + /** Amount to be charged for future payments. */ + @SerializedName("amount") + Long amount; + + /** + * One of {@code fixed} or {@code maximum}. If {@code fixed}, the {@code amount} param + * refers to the exact amount to be charged in future payments. If {@code maximum}, the + * amount charged can be up to the value passed for the {@code amount} param. + */ + @SerializedName("amount_type") + AmountType amountType; + + /** + * A description of the mandate or subscription that is meant to be displayed to the + * customer. + */ + @SerializedName("description") + String description; + + /** End date of the mandate or subscription. */ + @SerializedName("end_date") + Long endDate; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private MandateOptions( + Long amount, + AmountType amountType, + String description, + Long endDate, + Map extraParams) { + this.amount = amount; + this.amountType = amountType; + this.description = description; + this.endDate = endDate; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long amount; + + private AmountType amountType; + + private String description; + + private Long endDate; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public InvoiceCreateParams.PaymentSettings.PaymentMethodOptions.Upi.MandateOptions + build() { + return new InvoiceCreateParams.PaymentSettings.PaymentMethodOptions.Upi + .MandateOptions( + this.amount, this.amountType, this.description, this.endDate, this.extraParams); + } + + /** Amount to be charged for future payments. */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } + + /** + * One of {@code fixed} or {@code maximum}. If {@code fixed}, the {@code amount} param + * refers to the exact amount to be charged in future payments. If {@code maximum}, the + * amount charged can be up to the value passed for the {@code amount} param. + */ + public Builder setAmountType( + InvoiceCreateParams.PaymentSettings.PaymentMethodOptions.Upi.MandateOptions + .AmountType + amountType) { + this.amountType = amountType; + return this; + } + + /** + * A description of the mandate or subscription that is meant to be displayed to the + * customer. + */ + public Builder setDescription(String description) { + this.description = description; + return this; + } + + /** End date of the mandate or subscription. */ + public Builder setEndDate(Long endDate) { + this.endDate = endDate; + 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 + * InvoiceCreateParams.PaymentSettings.PaymentMethodOptions.Upi.MandateOptions#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * InvoiceCreateParams.PaymentSettings.PaymentMethodOptions.Upi.MandateOptions#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + + public enum AmountType implements ApiRequestParams.EnumParam { + @SerializedName("fixed") + FIXED("fixed"), + + @SerializedName("maximum") + MAXIMUM("maximum"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + AmountType(String value) { + this.value = value; + } + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class UsBankAccount { @@ -3953,6 +4357,9 @@ public enum PaymentMethodType implements ApiRequestParams.EnumParam { @SerializedName("payto") PAYTO("payto"), + @SerializedName("pix") + PIX("pix"), + @SerializedName("promptpay") PROMPTPAY("promptpay"), @@ -3971,6 +4378,9 @@ public enum PaymentMethodType implements ApiRequestParams.EnumParam { @SerializedName("swish") SWISH("swish"), + @SerializedName("upi") + UPI("upi"), + @SerializedName("us_bank_account") US_BANK_ACCOUNT("us_bank_account"), diff --git a/src/main/java/com/stripe/param/InvoiceCreatePreviewParams.java b/src/main/java/com/stripe/param/InvoiceCreatePreviewParams.java index eda26010906..35143714fd1 100644 --- a/src/main/java/com/stripe/param/InvoiceCreatePreviewParams.java +++ b/src/main/java/com/stripe/param/InvoiceCreatePreviewParams.java @@ -1402,19 +1402,19 @@ public static class TaxId { * {@code cd_nif}, {@code ch_uid}, {@code ch_vat}, {@code cl_tin}, {@code cm_niu}, {@code * cn_tin}, {@code co_nit}, {@code cr_tin}, {@code cv_nif}, {@code de_stn}, {@code do_rcn}, * {@code ec_ruc}, {@code eg_tin}, {@code es_cif}, {@code et_tin}, {@code eu_oss_vat}, {@code - * eu_vat}, {@code gb_vat}, {@code ge_vat}, {@code gn_nif}, {@code hk_br}, {@code hr_oib}, - * {@code hu_tin}, {@code id_npwp}, {@code il_vat}, {@code in_gst}, {@code is_vat}, {@code - * jp_cn}, {@code jp_rn}, {@code jp_trn}, {@code ke_pin}, {@code kg_tin}, {@code kh_tin}, - * {@code kr_brn}, {@code kz_bin}, {@code la_tin}, {@code li_uid}, {@code li_vat}, {@code - * lk_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 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} + * eu_vat}, {@code fo_vat}, {@code gb_vat}, {@code ge_vat}, {@code gi_tin}, {@code gn_nif}, + * {@code hk_br}, {@code hr_oib}, {@code hu_tin}, {@code id_npwp}, {@code il_vat}, {@code + * in_gst}, {@code is_vat}, {@code it_cf}, {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, + * {@code ke_pin}, {@code kg_tin}, {@code kh_tin}, {@code kr_brn}, {@code kz_bin}, {@code + * la_tin}, {@code li_uid}, {@code li_vat}, {@code lk_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 pl_nip}, {@code + * py_ruc}, {@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; @@ -1484,19 +1484,20 @@ public Builder putAllExtraParam(Map map) { * {@code cd_nif}, {@code ch_uid}, {@code ch_vat}, {@code cl_tin}, {@code cm_niu}, {@code * cn_tin}, {@code co_nit}, {@code cr_tin}, {@code cv_nif}, {@code de_stn}, {@code do_rcn}, * {@code ec_ruc}, {@code eg_tin}, {@code es_cif}, {@code et_tin}, {@code eu_oss_vat}, - * {@code eu_vat}, {@code gb_vat}, {@code ge_vat}, {@code gn_nif}, {@code hk_br}, {@code - * hr_oib}, {@code hu_tin}, {@code id_npwp}, {@code il_vat}, {@code in_gst}, {@code is_vat}, - * {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, {@code ke_pin}, {@code kg_tin}, {@code - * kh_tin}, {@code kr_brn}, {@code kz_bin}, {@code la_tin}, {@code li_uid}, {@code li_vat}, - * {@code lk_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 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} + * {@code eu_vat}, {@code fo_vat}, {@code gb_vat}, {@code ge_vat}, {@code gi_tin}, {@code + * gn_nif}, {@code hk_br}, {@code hr_oib}, {@code hu_tin}, {@code id_npwp}, {@code il_vat}, + * {@code in_gst}, {@code is_vat}, {@code it_cf}, {@code jp_cn}, {@code jp_rn}, {@code + * jp_trn}, {@code ke_pin}, {@code kg_tin}, {@code kh_tin}, {@code kr_brn}, {@code kz_bin}, + * {@code la_tin}, {@code li_uid}, {@code li_vat}, {@code lk_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 pl_nip}, + * {@code py_ruc}, {@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; @@ -1646,12 +1647,18 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("eu_vat") EU_VAT("eu_vat"), + @SerializedName("fo_vat") + FO_VAT("fo_vat"), + @SerializedName("gb_vat") GB_VAT("gb_vat"), @SerializedName("ge_vat") GE_VAT("ge_vat"), + @SerializedName("gi_tin") + GI_TIN("gi_tin"), + @SerializedName("gn_nif") GN_NIF("gn_nif"), @@ -1676,6 +1683,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("is_vat") IS_VAT("is_vat"), + @SerializedName("it_cf") + IT_CF("it_cf"), + @SerializedName("jp_cn") JP_CN("jp_cn"), @@ -1766,6 +1776,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("pl_nip") PL_NIP("pl_nip"), + @SerializedName("py_ruc") + PY_RUC("py_ruc"), + @SerializedName("ro_tin") RO_TIN("ro_tin"), diff --git a/src/main/java/com/stripe/param/InvoiceUpdateParams.java b/src/main/java/com/stripe/param/InvoiceUpdateParams.java index 61c19645981..616d7395600 100644 --- a/src/main/java/com/stripe/param/InvoiceUpdateParams.java +++ b/src/main/java/com/stripe/param/InvoiceUpdateParams.java @@ -1720,6 +1720,13 @@ public static class PaymentMethodOptions { @SerializedName("payto") Object payto; + /** + * If paying by {@code pix}, this sub-hash contains details about the Pix payment method + * options to pass to the invoice’s PaymentIntent. + */ + @SerializedName("pix") + Object pix; + /** * If paying by {@code sepa_debit}, this sub-hash contains details about the SEPA Direct Debit * payment method options to pass to the invoice’s PaymentIntent. @@ -1727,6 +1734,13 @@ public static class PaymentMethodOptions { @SerializedName("sepa_debit") Object sepaDebit; + /** + * If paying by {@code upi}, this sub-hash contains details about the UPI payment method + * options to pass to the invoice’s PaymentIntent. + */ + @SerializedName("upi") + Object upi; + /** * If paying by {@code us_bank_account}, this sub-hash contains details about the ACH direct * debit payment method options to pass to the invoice’s PaymentIntent. @@ -1742,7 +1756,9 @@ private PaymentMethodOptions( Map extraParams, Object konbini, Object payto, + Object pix, Object sepaDebit, + Object upi, Object usBankAccount) { this.acssDebit = acssDebit; this.bancontact = bancontact; @@ -1751,7 +1767,9 @@ private PaymentMethodOptions( this.extraParams = extraParams; this.konbini = konbini; this.payto = payto; + this.pix = pix; this.sepaDebit = sepaDebit; + this.upi = upi; this.usBankAccount = usBankAccount; } @@ -1774,8 +1792,12 @@ public static class Builder { private Object payto; + private Object pix; + private Object sepaDebit; + private Object upi; + private Object usBankAccount; /** Finalize and obtain parameter instance from this builder. */ @@ -1788,7 +1810,9 @@ public InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions build() { this.extraParams, this.konbini, this.payto, + this.pix, this.sepaDebit, + this.upi, this.usBankAccount); } @@ -1934,6 +1958,24 @@ public Builder setPayto(EmptyParam payto) { return this; } + /** + * If paying by {@code pix}, this sub-hash contains details about the Pix payment method + * options to pass to the invoice’s PaymentIntent. + */ + public Builder setPix(InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.Pix pix) { + this.pix = pix; + return this; + } + + /** + * If paying by {@code pix}, this sub-hash contains details about the Pix payment method + * options to pass to the invoice’s PaymentIntent. + */ + public Builder setPix(EmptyParam pix) { + this.pix = pix; + return this; + } + /** * If paying by {@code sepa_debit}, this sub-hash contains details about the SEPA Direct * Debit payment method options to pass to the invoice’s PaymentIntent. @@ -1953,6 +1995,24 @@ public Builder setSepaDebit(EmptyParam sepaDebit) { return this; } + /** + * If paying by {@code upi}, this sub-hash contains details about the UPI payment method + * options to pass to the invoice’s PaymentIntent. + */ + public Builder setUpi(InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.Upi upi) { + this.upi = upi; + return this; + } + + /** + * If paying by {@code upi}, this sub-hash contains details about the UPI payment method + * options to pass to the invoice’s PaymentIntent. + */ + public Builder setUpi(EmptyParam upi) { + this.upi = upi; + return this; + } + /** * If paying by {@code us_bank_account}, this sub-hash contains details about the ACH direct * debit payment method options to pass to the invoice’s PaymentIntent. @@ -3291,6 +3351,120 @@ public enum Purpose implements ApiRequestParams.EnumParam { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Pix { + /** Determines if the amount includes the IOF tax. Defaults to {@code never}. */ + @SerializedName("amount_includes_iof") + AmountIncludesIof amountIncludesIof; + + /** + * The number of seconds (between 10 and 1209600) after which Pix payment will expire. + * Defaults to 86400 seconds. + */ + @SerializedName("expires_after_seconds") + Long expiresAfterSeconds; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Pix( + AmountIncludesIof amountIncludesIof, + Long expiresAfterSeconds, + Map extraParams) { + this.amountIncludesIof = amountIncludesIof; + this.expiresAfterSeconds = expiresAfterSeconds; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private AmountIncludesIof amountIncludesIof; + + private Long expiresAfterSeconds; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.Pix build() { + return new InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.Pix( + this.amountIncludesIof, this.expiresAfterSeconds, this.extraParams); + } + + /** Determines if the amount includes the IOF tax. Defaults to {@code never}. */ + public Builder setAmountIncludesIof( + InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.Pix.AmountIncludesIof + amountIncludesIof) { + this.amountIncludesIof = amountIncludesIof; + return this; + } + + /** + * The number of seconds (between 10 and 1209600) after which Pix payment will expire. + * Defaults to 86400 seconds. + */ + public Builder setExpiresAfterSeconds(Long expiresAfterSeconds) { + this.expiresAfterSeconds = expiresAfterSeconds; + 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 + * InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.Pix#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 + * InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.Pix#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + + public enum AmountIncludesIof implements ApiRequestParams.EnumParam { + @SerializedName("always") + ALWAYS("always"), + + @SerializedName("never") + NEVER("never"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + AmountIncludesIof(String value) { + this.value = value; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class SepaDebit { @@ -3353,6 +3527,245 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Upi { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Configuration options for setting up an eMandate. */ + @SerializedName("mandate_options") + MandateOptions mandateOptions; + + private Upi(Map extraParams, MandateOptions mandateOptions) { + this.extraParams = extraParams; + this.mandateOptions = mandateOptions; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private MandateOptions mandateOptions; + + /** Finalize and obtain parameter instance from this builder. */ + public InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.Upi build() { + return new InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.Upi( + this.extraParams, this.mandateOptions); + } + + /** + * 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 + * InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.Upi#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 + * InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.Upi#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Configuration options for setting up an eMandate. */ + public Builder setMandateOptions( + InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.Upi.MandateOptions + mandateOptions) { + this.mandateOptions = mandateOptions; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class MandateOptions { + /** Amount to be charged for future payments. */ + @SerializedName("amount") + Long amount; + + /** + * One of {@code fixed} or {@code maximum}. If {@code fixed}, the {@code amount} param + * refers to the exact amount to be charged in future payments. If {@code maximum}, the + * amount charged can be up to the value passed for the {@code amount} param. + */ + @SerializedName("amount_type") + AmountType amountType; + + /** + * A description of the mandate or subscription that is meant to be displayed to the + * customer. + */ + @SerializedName("description") + Object description; + + /** End date of the mandate or subscription. */ + @SerializedName("end_date") + Long endDate; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private MandateOptions( + Long amount, + AmountType amountType, + Object description, + Long endDate, + Map extraParams) { + this.amount = amount; + this.amountType = amountType; + this.description = description; + this.endDate = endDate; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long amount; + + private AmountType amountType; + + private Object description; + + private Long endDate; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.Upi.MandateOptions + build() { + return new InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.Upi + .MandateOptions( + this.amount, this.amountType, this.description, this.endDate, this.extraParams); + } + + /** Amount to be charged for future payments. */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } + + /** + * One of {@code fixed} or {@code maximum}. If {@code fixed}, the {@code amount} param + * refers to the exact amount to be charged in future payments. If {@code maximum}, the + * amount charged can be up to the value passed for the {@code amount} param. + */ + public Builder setAmountType( + InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.Upi.MandateOptions + .AmountType + amountType) { + this.amountType = amountType; + return this; + } + + /** + * A description of the mandate or subscription that is meant to be displayed to the + * customer. + */ + public Builder setDescription(String description) { + this.description = description; + return this; + } + + /** + * A description of the mandate or subscription that is meant to be displayed to the + * customer. + */ + public Builder setDescription(EmptyParam description) { + this.description = description; + return this; + } + + /** End date of the mandate or subscription. */ + public Builder setEndDate(Long endDate) { + this.endDate = endDate; + 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 + * InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.Upi.MandateOptions#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.Upi.MandateOptions#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + + public enum AmountType implements ApiRequestParams.EnumParam { + @SerializedName("fixed") + FIXED("fixed"), + + @SerializedName("maximum") + MAXIMUM("maximum"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + AmountType(String value) { + this.value = value; + } + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class UsBankAccount { @@ -3947,6 +4360,9 @@ public enum PaymentMethodType implements ApiRequestParams.EnumParam { @SerializedName("payto") PAYTO("payto"), + @SerializedName("pix") + PIX("pix"), + @SerializedName("promptpay") PROMPTPAY("promptpay"), @@ -3965,6 +4381,9 @@ public enum PaymentMethodType implements ApiRequestParams.EnumParam { @SerializedName("swish") SWISH("swish"), + @SerializedName("upi") + UPI("upi"), + @SerializedName("us_bank_account") US_BANK_ACCOUNT("us_bank_account"), diff --git a/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java b/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java index 8fef9d787e0..1bce0007d41 100644 --- a/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java @@ -18,6 +18,10 @@ public class PaymentIntentConfirmParams extends ApiRequestParams { @SerializedName("amount_details") Object amountDetails; + /** Amount to confirm on the PaymentIntent. Defaults to {@code amount} if not provided. */ + @SerializedName("amount_to_confirm") + Long amountToConfirm; + /** Controls when the funds will be captured from the customer's account. */ @SerializedName("capture_method") CaptureMethod captureMethod; @@ -178,6 +182,7 @@ public class PaymentIntentConfirmParams extends ApiRequestParams { private PaymentIntentConfirmParams( Object amountDetails, + Long amountToConfirm, CaptureMethod captureMethod, String confirmationToken, Boolean errorOnRequiresAction, @@ -200,6 +205,7 @@ private PaymentIntentConfirmParams( Object shipping, Boolean useStripeSdk) { this.amountDetails = amountDetails; + this.amountToConfirm = amountToConfirm; this.captureMethod = captureMethod; this.confirmationToken = confirmationToken; this.errorOnRequiresAction = errorOnRequiresAction; @@ -230,6 +236,8 @@ public static Builder builder() { public static class Builder { private Object amountDetails; + private Long amountToConfirm; + private CaptureMethod captureMethod; private String confirmationToken; @@ -276,6 +284,7 @@ public static class Builder { public PaymentIntentConfirmParams build() { return new PaymentIntentConfirmParams( this.amountDetails, + this.amountToConfirm, this.captureMethod, this.confirmationToken, this.errorOnRequiresAction, @@ -311,6 +320,12 @@ public Builder setAmountDetails(EmptyParam amountDetails) { return this; } + /** Amount to confirm on the PaymentIntent. Defaults to {@code amount} if not provided. */ + public Builder setAmountToConfirm(Long amountToConfirm) { + this.amountToConfirm = amountToConfirm; + return this; + } + /** Controls when the funds will be captured from the customer's account. */ public Builder setCaptureMethod(PaymentIntentConfirmParams.CaptureMethod captureMethod) { this.captureMethod = captureMethod; @@ -3130,6 +3145,13 @@ public static class PaymentMethodData { @SerializedName("sofort") Sofort sofort; + /** + * If this is a Sunbit PaymentMethod, this hash contains details about the Sunbit payment + * method. + */ + @SerializedName("sunbit") + Sunbit sunbit; + /** * If this is a {@code swish} PaymentMethod, this hash contains details about the Swish payment * method. @@ -3230,6 +3252,7 @@ private PaymentMethodData( Satispay satispay, SepaDebit sepaDebit, Sofort sofort, + Sunbit sunbit, Swish swish, Twint twint, Type type, @@ -3287,6 +3310,7 @@ private PaymentMethodData( this.satispay = satispay; this.sepaDebit = sepaDebit; this.sofort = sofort; + this.sunbit = sunbit; this.swish = swish; this.twint = twint; this.type = type; @@ -3401,6 +3425,8 @@ public static class Builder { private Sofort sofort; + private Sunbit sunbit; + private Swish swish; private Twint twint; @@ -3468,6 +3494,7 @@ public PaymentIntentConfirmParams.PaymentMethodData build() { this.satispay, this.sepaDebit, this.sofort, + this.sunbit, this.swish, this.twint, this.type, @@ -3983,6 +4010,15 @@ public Builder setSofort(PaymentIntentConfirmParams.PaymentMethodData.Sofort sof return this; } + /** + * If this is a Sunbit PaymentMethod, this hash contains details about the Sunbit payment + * method. + */ + public Builder setSunbit(PaymentIntentConfirmParams.PaymentMethodData.Sunbit sunbit) { + this.sunbit = sunbit; + return this; + } + /** * If this is a {@code swish} PaymentMethod, this hash contains details about the Swish * payment method. @@ -7948,6 +7984,64 @@ public enum Country implements ApiRequestParams.EnumParam { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Sunbit { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Sunbit(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodData.Sunbit build() { + return new PaymentIntentConfirmParams.PaymentMethodData.Sunbit(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Sunbit#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 PaymentIntentConfirmParams.PaymentMethodData.Sunbit#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Swish { @@ -8722,6 +8816,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("sofort") SOFORT("sofort"), + @SerializedName("sunbit") + SUNBIT("sunbit"), + @SerializedName("swish") SWISH("swish"), @@ -20895,6 +20992,13 @@ public static class Pix { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** + * Additional fields for mandate creation. Only applicable when {@code + * setup_future_usage=off_session}. + */ + @SerializedName("mandate_options") + MandateOptions mandateOptions; + /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * @@ -20913,10 +21017,6 @@ public static class Pix { *

When processing card payments, Stripe uses {@code setup_future_usage} to help you comply * with regional legislation and network rules, such as SCA. - * - *

If you've already set {@code setup_future_usage} and you're performing a request using a - * publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. */ @SerializedName("setup_future_usage") SetupFutureUsage setupFutureUsage; @@ -20926,11 +21026,13 @@ private Pix( Long expiresAfterSeconds, Long expiresAt, Map extraParams, + MandateOptions mandateOptions, SetupFutureUsage setupFutureUsage) { this.amountIncludesIof = amountIncludesIof; this.expiresAfterSeconds = expiresAfterSeconds; this.expiresAt = expiresAt; this.extraParams = extraParams; + this.mandateOptions = mandateOptions; this.setupFutureUsage = setupFutureUsage; } @@ -20947,6 +21049,8 @@ public static class Builder { private Map extraParams; + private MandateOptions mandateOptions; + private SetupFutureUsage setupFutureUsage; /** Finalize and obtain parameter instance from this builder. */ @@ -20956,6 +21060,7 @@ public PaymentIntentConfirmParams.PaymentMethodOptions.Pix build() { this.expiresAfterSeconds, this.expiresAt, this.extraParams, + this.mandateOptions, this.setupFutureUsage); } @@ -21013,6 +21118,16 @@ public Builder putAllExtraParam(Map map) { return this; } + /** + * Additional fields for mandate creation. Only applicable when {@code + * setup_future_usage=off_session}. + */ + public Builder setMandateOptions( + PaymentIntentConfirmParams.PaymentMethodOptions.Pix.MandateOptions mandateOptions) { + this.mandateOptions = mandateOptions; + return this; + } + /** * Indicates that you intend to make future payments with this PaymentIntent's payment * method. @@ -21032,10 +21147,6 @@ public Builder putAllExtraParam(Map map) { *

When processing card payments, Stripe uses {@code setup_future_usage} to help you * comply with regional legislation and network rules, such as SCA. - * - *

If you've already set {@code setup_future_usage} and you're performing a request using - * a publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. */ public Builder setSetupFutureUsage( PaymentIntentConfirmParams.PaymentMethodOptions.Pix.SetupFutureUsage setupFutureUsage) { @@ -21044,6 +21155,281 @@ public Builder setSetupFutureUsage( } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class MandateOptions { + /** + * Amount to be charged for future payments. Required when {@code amount_type=fixed}. If not + * provided for {@code amount_type=maximum}, defaults to 40000. + */ + @SerializedName("amount") + Long amount; + + /** Determines if the amount includes the IOF tax. Defaults to {@code never}. */ + @SerializedName("amount_includes_iof") + AmountIncludesIof amountIncludesIof; + + /** Type of amount. Defaults to {@code maximum}. */ + @SerializedName("amount_type") + AmountType amountType; + + /** + * Three-letter ISO currency + * code, in lowercase. Only {@code brl} is supported currently. + */ + @SerializedName("currency") + String currency; + + /** + * Date when the mandate expires and no further payments will be charged, in {@code + * YYYY-MM-DD}. If not provided, the mandate will be active until canceled. If provided, end + * date should be after start date. + */ + @SerializedName("end_date") + String endDate; + + /** + * 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; + + /** Schedule at which the future payments will be charged. Defaults to {@code monthly}. */ + @SerializedName("payment_schedule") + PaymentSchedule paymentSchedule; + + /** + * Subscription name displayed to buyers in their bank app. Defaults to the displayable + * business name. + */ + @SerializedName("reference") + String reference; + + /** + * Start date of the mandate, in {@code YYYY-MM-DD}. Start date should be at least 3 days in + * the future. Defaults to 3 days after the current date. + */ + @SerializedName("start_date") + String startDate; + + private MandateOptions( + Long amount, + AmountIncludesIof amountIncludesIof, + AmountType amountType, + String currency, + String endDate, + Map extraParams, + PaymentSchedule paymentSchedule, + String reference, + String startDate) { + this.amount = amount; + this.amountIncludesIof = amountIncludesIof; + this.amountType = amountType; + this.currency = currency; + this.endDate = endDate; + this.extraParams = extraParams; + this.paymentSchedule = paymentSchedule; + this.reference = reference; + this.startDate = startDate; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long amount; + + private AmountIncludesIof amountIncludesIof; + + private AmountType amountType; + + private String currency; + + private String endDate; + + private Map extraParams; + + private PaymentSchedule paymentSchedule; + + private String reference; + + private String startDate; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodOptions.Pix.MandateOptions build() { + return new PaymentIntentConfirmParams.PaymentMethodOptions.Pix.MandateOptions( + this.amount, + this.amountIncludesIof, + this.amountType, + this.currency, + this.endDate, + this.extraParams, + this.paymentSchedule, + this.reference, + this.startDate); + } + + /** + * Amount to be charged for future payments. Required when {@code amount_type=fixed}. If + * not provided for {@code amount_type=maximum}, defaults to 40000. + */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } + + /** Determines if the amount includes the IOF tax. Defaults to {@code never}. */ + public Builder setAmountIncludesIof( + PaymentIntentConfirmParams.PaymentMethodOptions.Pix.MandateOptions.AmountIncludesIof + amountIncludesIof) { + this.amountIncludesIof = amountIncludesIof; + return this; + } + + /** Type of amount. Defaults to {@code maximum}. */ + public Builder setAmountType( + PaymentIntentConfirmParams.PaymentMethodOptions.Pix.MandateOptions.AmountType + amountType) { + this.amountType = amountType; + return this; + } + + /** + * Three-letter ISO currency + * code, in lowercase. Only {@code brl} is supported currently. + */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } + + /** + * Date when the mandate expires and no further payments will be charged, in {@code + * YYYY-MM-DD}. If not provided, the mandate will be active until canceled. If provided, + * end date should be after start date. + */ + public Builder setEndDate(String endDate) { + this.endDate = endDate; + 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 + * PaymentIntentConfirmParams.PaymentMethodOptions.Pix.MandateOptions#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Pix.MandateOptions#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Schedule at which the future payments will be charged. Defaults to {@code monthly}. */ + public Builder setPaymentSchedule( + PaymentIntentConfirmParams.PaymentMethodOptions.Pix.MandateOptions.PaymentSchedule + paymentSchedule) { + this.paymentSchedule = paymentSchedule; + return this; + } + + /** + * Subscription name displayed to buyers in their bank app. Defaults to the displayable + * business name. + */ + public Builder setReference(String reference) { + this.reference = reference; + return this; + } + + /** + * Start date of the mandate, in {@code YYYY-MM-DD}. Start date should be at least 3 days + * in the future. Defaults to 3 days after the current date. + */ + public Builder setStartDate(String startDate) { + this.startDate = startDate; + return this; + } + } + + public enum AmountIncludesIof implements ApiRequestParams.EnumParam { + @SerializedName("always") + ALWAYS("always"), + + @SerializedName("never") + NEVER("never"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + AmountIncludesIof(String value) { + this.value = value; + } + } + + public enum AmountType implements ApiRequestParams.EnumParam { + @SerializedName("fixed") + FIXED("fixed"), + + @SerializedName("maximum") + MAXIMUM("maximum"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + AmountType(String value) { + this.value = value; + } + } + + public enum PaymentSchedule implements ApiRequestParams.EnumParam { + @SerializedName("halfyearly") + HALFYEARLY("halfyearly"), + + @SerializedName("monthly") + MONTHLY("monthly"), + + @SerializedName("quarterly") + QUARTERLY("quarterly"), + + @SerializedName("weekly") + WEEKLY("weekly"), + + @SerializedName("yearly") + YEARLY("yearly"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + PaymentSchedule(String value) { + this.value = value; + } + } + } + public enum AmountIncludesIof implements ApiRequestParams.EnumParam { @SerializedName("always") ALWAYS("always"), @@ -21061,7 +21447,10 @@ public enum AmountIncludesIof implements ApiRequestParams.EnumParam { public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @SerializedName("none") - NONE("none"); + NONE("none"), + + @SerializedName("off_session") + OFF_SESSION("off_session"); @Getter(onMethod_ = {@Override}) private final String value; @@ -24491,6 +24880,9 @@ public enum ExcludedPaymentMethodType implements ApiRequestParams.EnumParam { @SerializedName("sofort") SOFORT("sofort"), + @SerializedName("sunbit") + SUNBIT("sunbit"), + @SerializedName("swish") SWISH("swish"), diff --git a/src/main/java/com/stripe/param/PaymentIntentCreateParams.java b/src/main/java/com/stripe/param/PaymentIntentCreateParams.java index 5b3f4189e6f..deb03b5809f 100644 --- a/src/main/java/com/stripe/param/PaymentIntentCreateParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentCreateParams.java @@ -3663,6 +3663,13 @@ public static class PaymentMethodData { @SerializedName("sofort") Sofort sofort; + /** + * If this is a Sunbit PaymentMethod, this hash contains details about the Sunbit payment + * method. + */ + @SerializedName("sunbit") + Sunbit sunbit; + /** * If this is a {@code swish} PaymentMethod, this hash contains details about the Swish payment * method. @@ -3763,6 +3770,7 @@ private PaymentMethodData( Satispay satispay, SepaDebit sepaDebit, Sofort sofort, + Sunbit sunbit, Swish swish, Twint twint, Type type, @@ -3820,6 +3828,7 @@ private PaymentMethodData( this.satispay = satispay; this.sepaDebit = sepaDebit; this.sofort = sofort; + this.sunbit = sunbit; this.swish = swish; this.twint = twint; this.type = type; @@ -3934,6 +3943,8 @@ public static class Builder { private Sofort sofort; + private Sunbit sunbit; + private Swish swish; private Twint twint; @@ -4001,6 +4012,7 @@ public PaymentIntentCreateParams.PaymentMethodData build() { this.satispay, this.sepaDebit, this.sofort, + this.sunbit, this.swish, this.twint, this.type, @@ -4509,6 +4521,15 @@ public Builder setSofort(PaymentIntentCreateParams.PaymentMethodData.Sofort sofo return this; } + /** + * If this is a Sunbit PaymentMethod, this hash contains details about the Sunbit payment + * method. + */ + public Builder setSunbit(PaymentIntentCreateParams.PaymentMethodData.Sunbit sunbit) { + this.sunbit = sunbit; + return this; + } + /** * If this is a {@code swish} PaymentMethod, this hash contains details about the Swish * payment method. @@ -8468,6 +8489,64 @@ public enum Country implements ApiRequestParams.EnumParam { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Sunbit { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Sunbit(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodData.Sunbit build() { + return new PaymentIntentCreateParams.PaymentMethodData.Sunbit(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Sunbit#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 PaymentIntentCreateParams.PaymentMethodData.Sunbit#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Swish { @@ -9242,6 +9321,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("sofort") SOFORT("sofort"), + @SerializedName("sunbit") + SUNBIT("sunbit"), + @SerializedName("swish") SWISH("swish"), @@ -21399,6 +21481,13 @@ public static class Pix { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** + * Additional fields for mandate creation. Only applicable when {@code + * setup_future_usage=off_session}. + */ + @SerializedName("mandate_options") + MandateOptions mandateOptions; + /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * @@ -21417,10 +21506,6 @@ public static class Pix { *

When processing card payments, Stripe uses {@code setup_future_usage} to help you comply * with regional legislation and network rules, such as SCA. - * - *

If you've already set {@code setup_future_usage} and you're performing a request using a - * publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. */ @SerializedName("setup_future_usage") SetupFutureUsage setupFutureUsage; @@ -21430,11 +21515,13 @@ private Pix( Long expiresAfterSeconds, Long expiresAt, Map extraParams, + MandateOptions mandateOptions, SetupFutureUsage setupFutureUsage) { this.amountIncludesIof = amountIncludesIof; this.expiresAfterSeconds = expiresAfterSeconds; this.expiresAt = expiresAt; this.extraParams = extraParams; + this.mandateOptions = mandateOptions; this.setupFutureUsage = setupFutureUsage; } @@ -21451,6 +21538,8 @@ public static class Builder { private Map extraParams; + private MandateOptions mandateOptions; + private SetupFutureUsage setupFutureUsage; /** Finalize and obtain parameter instance from this builder. */ @@ -21460,6 +21549,7 @@ public PaymentIntentCreateParams.PaymentMethodOptions.Pix build() { this.expiresAfterSeconds, this.expiresAt, this.extraParams, + this.mandateOptions, this.setupFutureUsage); } @@ -21517,6 +21607,16 @@ public Builder putAllExtraParam(Map map) { return this; } + /** + * Additional fields for mandate creation. Only applicable when {@code + * setup_future_usage=off_session}. + */ + public Builder setMandateOptions( + PaymentIntentCreateParams.PaymentMethodOptions.Pix.MandateOptions mandateOptions) { + this.mandateOptions = mandateOptions; + return this; + } + /** * Indicates that you intend to make future payments with this PaymentIntent's payment * method. @@ -21536,10 +21636,6 @@ public Builder putAllExtraParam(Map map) { *

When processing card payments, Stripe uses {@code setup_future_usage} to help you * comply with regional legislation and network rules, such as SCA. - * - *

If you've already set {@code setup_future_usage} and you're performing a request using - * a publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. */ public Builder setSetupFutureUsage( PaymentIntentCreateParams.PaymentMethodOptions.Pix.SetupFutureUsage setupFutureUsage) { @@ -21548,6 +21644,281 @@ public Builder setSetupFutureUsage( } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class MandateOptions { + /** + * Amount to be charged for future payments. Required when {@code amount_type=fixed}. If not + * provided for {@code amount_type=maximum}, defaults to 40000. + */ + @SerializedName("amount") + Long amount; + + /** Determines if the amount includes the IOF tax. Defaults to {@code never}. */ + @SerializedName("amount_includes_iof") + AmountIncludesIof amountIncludesIof; + + /** Type of amount. Defaults to {@code maximum}. */ + @SerializedName("amount_type") + AmountType amountType; + + /** + * Three-letter ISO currency + * code, in lowercase. Only {@code brl} is supported currently. + */ + @SerializedName("currency") + String currency; + + /** + * Date when the mandate expires and no further payments will be charged, in {@code + * YYYY-MM-DD}. If not provided, the mandate will be active until canceled. If provided, end + * date should be after start date. + */ + @SerializedName("end_date") + String endDate; + + /** + * 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; + + /** Schedule at which the future payments will be charged. Defaults to {@code monthly}. */ + @SerializedName("payment_schedule") + PaymentSchedule paymentSchedule; + + /** + * Subscription name displayed to buyers in their bank app. Defaults to the displayable + * business name. + */ + @SerializedName("reference") + String reference; + + /** + * Start date of the mandate, in {@code YYYY-MM-DD}. Start date should be at least 3 days in + * the future. Defaults to 3 days after the current date. + */ + @SerializedName("start_date") + String startDate; + + private MandateOptions( + Long amount, + AmountIncludesIof amountIncludesIof, + AmountType amountType, + String currency, + String endDate, + Map extraParams, + PaymentSchedule paymentSchedule, + String reference, + String startDate) { + this.amount = amount; + this.amountIncludesIof = amountIncludesIof; + this.amountType = amountType; + this.currency = currency; + this.endDate = endDate; + this.extraParams = extraParams; + this.paymentSchedule = paymentSchedule; + this.reference = reference; + this.startDate = startDate; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long amount; + + private AmountIncludesIof amountIncludesIof; + + private AmountType amountType; + + private String currency; + + private String endDate; + + private Map extraParams; + + private PaymentSchedule paymentSchedule; + + private String reference; + + private String startDate; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodOptions.Pix.MandateOptions build() { + return new PaymentIntentCreateParams.PaymentMethodOptions.Pix.MandateOptions( + this.amount, + this.amountIncludesIof, + this.amountType, + this.currency, + this.endDate, + this.extraParams, + this.paymentSchedule, + this.reference, + this.startDate); + } + + /** + * Amount to be charged for future payments. Required when {@code amount_type=fixed}. If + * not provided for {@code amount_type=maximum}, defaults to 40000. + */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } + + /** Determines if the amount includes the IOF tax. Defaults to {@code never}. */ + public Builder setAmountIncludesIof( + PaymentIntentCreateParams.PaymentMethodOptions.Pix.MandateOptions.AmountIncludesIof + amountIncludesIof) { + this.amountIncludesIof = amountIncludesIof; + return this; + } + + /** Type of amount. Defaults to {@code maximum}. */ + public Builder setAmountType( + PaymentIntentCreateParams.PaymentMethodOptions.Pix.MandateOptions.AmountType + amountType) { + this.amountType = amountType; + return this; + } + + /** + * Three-letter ISO currency + * code, in lowercase. Only {@code brl} is supported currently. + */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } + + /** + * Date when the mandate expires and no further payments will be charged, in {@code + * YYYY-MM-DD}. If not provided, the mandate will be active until canceled. If provided, + * end date should be after start date. + */ + public Builder setEndDate(String endDate) { + this.endDate = endDate; + 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 + * PaymentIntentCreateParams.PaymentMethodOptions.Pix.MandateOptions#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Pix.MandateOptions#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Schedule at which the future payments will be charged. Defaults to {@code monthly}. */ + public Builder setPaymentSchedule( + PaymentIntentCreateParams.PaymentMethodOptions.Pix.MandateOptions.PaymentSchedule + paymentSchedule) { + this.paymentSchedule = paymentSchedule; + return this; + } + + /** + * Subscription name displayed to buyers in their bank app. Defaults to the displayable + * business name. + */ + public Builder setReference(String reference) { + this.reference = reference; + return this; + } + + /** + * Start date of the mandate, in {@code YYYY-MM-DD}. Start date should be at least 3 days + * in the future. Defaults to 3 days after the current date. + */ + public Builder setStartDate(String startDate) { + this.startDate = startDate; + return this; + } + } + + public enum AmountIncludesIof implements ApiRequestParams.EnumParam { + @SerializedName("always") + ALWAYS("always"), + + @SerializedName("never") + NEVER("never"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + AmountIncludesIof(String value) { + this.value = value; + } + } + + public enum AmountType implements ApiRequestParams.EnumParam { + @SerializedName("fixed") + FIXED("fixed"), + + @SerializedName("maximum") + MAXIMUM("maximum"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + AmountType(String value) { + this.value = value; + } + } + + public enum PaymentSchedule implements ApiRequestParams.EnumParam { + @SerializedName("halfyearly") + HALFYEARLY("halfyearly"), + + @SerializedName("monthly") + MONTHLY("monthly"), + + @SerializedName("quarterly") + QUARTERLY("quarterly"), + + @SerializedName("weekly") + WEEKLY("weekly"), + + @SerializedName("yearly") + YEARLY("yearly"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + PaymentSchedule(String value) { + this.value = value; + } + } + } + public enum AmountIncludesIof implements ApiRequestParams.EnumParam { @SerializedName("always") ALWAYS("always"), @@ -21565,7 +21936,10 @@ public enum AmountIncludesIof implements ApiRequestParams.EnumParam { public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @SerializedName("none") - NONE("none"); + NONE("none"), + + @SerializedName("off_session") + OFF_SESSION("off_session"); @Getter(onMethod_ = {@Override}) private final String value; @@ -25114,6 +25488,9 @@ public enum ExcludedPaymentMethodType implements ApiRequestParams.EnumParam { @SerializedName("sofort") SOFORT("sofort"), + @SerializedName("sunbit") + SUNBIT("sunbit"), + @SerializedName("swish") SWISH("swish"), diff --git a/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java b/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java index 6e8137663fc..0ba950b3af0 100644 --- a/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java @@ -3140,6 +3140,13 @@ public static class PaymentMethodData { @SerializedName("sofort") Sofort sofort; + /** + * If this is a Sunbit PaymentMethod, this hash contains details about the Sunbit payment + * method. + */ + @SerializedName("sunbit") + Sunbit sunbit; + /** * If this is a {@code swish} PaymentMethod, this hash contains details about the Swish payment * method. @@ -3240,6 +3247,7 @@ private PaymentMethodData( Satispay satispay, SepaDebit sepaDebit, Sofort sofort, + Sunbit sunbit, Swish swish, Twint twint, Type type, @@ -3297,6 +3305,7 @@ private PaymentMethodData( this.satispay = satispay; this.sepaDebit = sepaDebit; this.sofort = sofort; + this.sunbit = sunbit; this.swish = swish; this.twint = twint; this.type = type; @@ -3411,6 +3420,8 @@ public static class Builder { private Sofort sofort; + private Sunbit sunbit; + private Swish swish; private Twint twint; @@ -3478,6 +3489,7 @@ public PaymentIntentUpdateParams.PaymentMethodData build() { this.satispay, this.sepaDebit, this.sofort, + this.sunbit, this.swish, this.twint, this.type, @@ -3986,6 +3998,15 @@ public Builder setSofort(PaymentIntentUpdateParams.PaymentMethodData.Sofort sofo return this; } + /** + * If this is a Sunbit PaymentMethod, this hash contains details about the Sunbit payment + * method. + */ + public Builder setSunbit(PaymentIntentUpdateParams.PaymentMethodData.Sunbit sunbit) { + this.sunbit = sunbit; + return this; + } + /** * If this is a {@code swish} PaymentMethod, this hash contains details about the Swish * payment method. @@ -8119,6 +8140,64 @@ public enum Country implements ApiRequestParams.EnumParam { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Sunbit { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Sunbit(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodData.Sunbit build() { + return new PaymentIntentUpdateParams.PaymentMethodData.Sunbit(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Sunbit#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 PaymentIntentUpdateParams.PaymentMethodData.Sunbit#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Swish { @@ -8920,6 +8999,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("sofort") SOFORT("sofort"), + @SerializedName("sunbit") + SUNBIT("sunbit"), + @SerializedName("swish") SWISH("swish"), @@ -21275,6 +21357,13 @@ public static class Pix { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** + * Additional fields for mandate creation. Only applicable when {@code + * setup_future_usage=off_session}. + */ + @SerializedName("mandate_options") + MandateOptions mandateOptions; + /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * @@ -21293,10 +21382,6 @@ public static class Pix { *

When processing card payments, Stripe uses {@code setup_future_usage} to help you comply * with regional legislation and network rules, such as SCA. - * - *

If you've already set {@code setup_future_usage} and you're performing a request using a - * publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. */ @SerializedName("setup_future_usage") SetupFutureUsage setupFutureUsage; @@ -21306,11 +21391,13 @@ private Pix( Long expiresAfterSeconds, Long expiresAt, Map extraParams, + MandateOptions mandateOptions, SetupFutureUsage setupFutureUsage) { this.amountIncludesIof = amountIncludesIof; this.expiresAfterSeconds = expiresAfterSeconds; this.expiresAt = expiresAt; this.extraParams = extraParams; + this.mandateOptions = mandateOptions; this.setupFutureUsage = setupFutureUsage; } @@ -21327,6 +21414,8 @@ public static class Builder { private Map extraParams; + private MandateOptions mandateOptions; + private SetupFutureUsage setupFutureUsage; /** Finalize and obtain parameter instance from this builder. */ @@ -21336,6 +21425,7 @@ public PaymentIntentUpdateParams.PaymentMethodOptions.Pix build() { this.expiresAfterSeconds, this.expiresAt, this.extraParams, + this.mandateOptions, this.setupFutureUsage); } @@ -21393,6 +21483,16 @@ public Builder putAllExtraParam(Map map) { return this; } + /** + * Additional fields for mandate creation. Only applicable when {@code + * setup_future_usage=off_session}. + */ + public Builder setMandateOptions( + PaymentIntentUpdateParams.PaymentMethodOptions.Pix.MandateOptions mandateOptions) { + this.mandateOptions = mandateOptions; + return this; + } + /** * Indicates that you intend to make future payments with this PaymentIntent's payment * method. @@ -21412,10 +21512,6 @@ public Builder putAllExtraParam(Map map) { *

When processing card payments, Stripe uses {@code setup_future_usage} to help you * comply with regional legislation and network rules, such as SCA. - * - *

If you've already set {@code setup_future_usage} and you're performing a request using - * a publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. */ public Builder setSetupFutureUsage( PaymentIntentUpdateParams.PaymentMethodOptions.Pix.SetupFutureUsage setupFutureUsage) { @@ -21424,6 +21520,318 @@ public Builder setSetupFutureUsage( } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class MandateOptions { + /** + * Amount to be charged for future payments. Required when {@code amount_type=fixed}. If not + * provided for {@code amount_type=maximum}, defaults to 40000. + */ + @SerializedName("amount") + Long amount; + + /** Determines if the amount includes the IOF tax. Defaults to {@code never}. */ + @SerializedName("amount_includes_iof") + AmountIncludesIof amountIncludesIof; + + /** Type of amount. Defaults to {@code maximum}. */ + @SerializedName("amount_type") + AmountType amountType; + + /** + * Three-letter ISO currency + * code, in lowercase. Only {@code brl} is supported currently. + */ + @SerializedName("currency") + Object currency; + + /** + * Date when the mandate expires and no further payments will be charged, in {@code + * YYYY-MM-DD}. If not provided, the mandate will be active until canceled. If provided, end + * date should be after start date. + */ + @SerializedName("end_date") + Object endDate; + + /** + * 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; + + /** Schedule at which the future payments will be charged. Defaults to {@code monthly}. */ + @SerializedName("payment_schedule") + PaymentSchedule paymentSchedule; + + /** + * Subscription name displayed to buyers in their bank app. Defaults to the displayable + * business name. + */ + @SerializedName("reference") + Object reference; + + /** + * Start date of the mandate, in {@code YYYY-MM-DD}. Start date should be at least 3 days in + * the future. Defaults to 3 days after the current date. + */ + @SerializedName("start_date") + Object startDate; + + private MandateOptions( + Long amount, + AmountIncludesIof amountIncludesIof, + AmountType amountType, + Object currency, + Object endDate, + Map extraParams, + PaymentSchedule paymentSchedule, + Object reference, + Object startDate) { + this.amount = amount; + this.amountIncludesIof = amountIncludesIof; + this.amountType = amountType; + this.currency = currency; + this.endDate = endDate; + this.extraParams = extraParams; + this.paymentSchedule = paymentSchedule; + this.reference = reference; + this.startDate = startDate; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long amount; + + private AmountIncludesIof amountIncludesIof; + + private AmountType amountType; + + private Object currency; + + private Object endDate; + + private Map extraParams; + + private PaymentSchedule paymentSchedule; + + private Object reference; + + private Object startDate; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodOptions.Pix.MandateOptions build() { + return new PaymentIntentUpdateParams.PaymentMethodOptions.Pix.MandateOptions( + this.amount, + this.amountIncludesIof, + this.amountType, + this.currency, + this.endDate, + this.extraParams, + this.paymentSchedule, + this.reference, + this.startDate); + } + + /** + * Amount to be charged for future payments. Required when {@code amount_type=fixed}. If + * not provided for {@code amount_type=maximum}, defaults to 40000. + */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } + + /** Determines if the amount includes the IOF tax. Defaults to {@code never}. */ + public Builder setAmountIncludesIof( + PaymentIntentUpdateParams.PaymentMethodOptions.Pix.MandateOptions.AmountIncludesIof + amountIncludesIof) { + this.amountIncludesIof = amountIncludesIof; + return this; + } + + /** Type of amount. Defaults to {@code maximum}. */ + public Builder setAmountType( + PaymentIntentUpdateParams.PaymentMethodOptions.Pix.MandateOptions.AmountType + amountType) { + this.amountType = amountType; + return this; + } + + /** + * Three-letter ISO currency + * code, in lowercase. Only {@code brl} is supported currently. + */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } + + /** + * Three-letter ISO currency + * code, in lowercase. Only {@code brl} is supported currently. + */ + public Builder setCurrency(EmptyParam currency) { + this.currency = currency; + return this; + } + + /** + * Date when the mandate expires and no further payments will be charged, in {@code + * YYYY-MM-DD}. If not provided, the mandate will be active until canceled. If provided, + * end date should be after start date. + */ + public Builder setEndDate(String endDate) { + this.endDate = endDate; + return this; + } + + /** + * Date when the mandate expires and no further payments will be charged, in {@code + * YYYY-MM-DD}. If not provided, the mandate will be active until canceled. If provided, + * end date should be after start date. + */ + public Builder setEndDate(EmptyParam endDate) { + this.endDate = endDate; + 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 + * PaymentIntentUpdateParams.PaymentMethodOptions.Pix.MandateOptions#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Pix.MandateOptions#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Schedule at which the future payments will be charged. Defaults to {@code monthly}. */ + public Builder setPaymentSchedule( + PaymentIntentUpdateParams.PaymentMethodOptions.Pix.MandateOptions.PaymentSchedule + paymentSchedule) { + this.paymentSchedule = paymentSchedule; + return this; + } + + /** + * Subscription name displayed to buyers in their bank app. Defaults to the displayable + * business name. + */ + public Builder setReference(String reference) { + this.reference = reference; + return this; + } + + /** + * Subscription name displayed to buyers in their bank app. Defaults to the displayable + * business name. + */ + public Builder setReference(EmptyParam reference) { + this.reference = reference; + return this; + } + + /** + * Start date of the mandate, in {@code YYYY-MM-DD}. Start date should be at least 3 days + * in the future. Defaults to 3 days after the current date. + */ + public Builder setStartDate(String startDate) { + this.startDate = startDate; + return this; + } + + /** + * Start date of the mandate, in {@code YYYY-MM-DD}. Start date should be at least 3 days + * in the future. Defaults to 3 days after the current date. + */ + public Builder setStartDate(EmptyParam startDate) { + this.startDate = startDate; + return this; + } + } + + public enum AmountIncludesIof implements ApiRequestParams.EnumParam { + @SerializedName("always") + ALWAYS("always"), + + @SerializedName("never") + NEVER("never"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + AmountIncludesIof(String value) { + this.value = value; + } + } + + public enum AmountType implements ApiRequestParams.EnumParam { + @SerializedName("fixed") + FIXED("fixed"), + + @SerializedName("maximum") + MAXIMUM("maximum"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + AmountType(String value) { + this.value = value; + } + } + + public enum PaymentSchedule implements ApiRequestParams.EnumParam { + @SerializedName("halfyearly") + HALFYEARLY("halfyearly"), + + @SerializedName("monthly") + MONTHLY("monthly"), + + @SerializedName("quarterly") + QUARTERLY("quarterly"), + + @SerializedName("weekly") + WEEKLY("weekly"), + + @SerializedName("yearly") + YEARLY("yearly"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + PaymentSchedule(String value) { + this.value = value; + } + } + } + public enum AmountIncludesIof implements ApiRequestParams.EnumParam { @SerializedName("always") ALWAYS("always"), @@ -21441,7 +21849,10 @@ public enum AmountIncludesIof implements ApiRequestParams.EnumParam { public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @SerializedName("none") - NONE("none"); + NONE("none"), + + @SerializedName("off_session") + OFF_SESSION("off_session"); @Getter(onMethod_ = {@Override}) private final String value; @@ -24971,6 +25382,9 @@ public enum ExcludedPaymentMethodType implements ApiRequestParams.EnumParam { @SerializedName("sofort") SOFORT("sofort"), + @SerializedName("sunbit") + SUNBIT("sunbit"), + @SerializedName("swish") SWISH("swish"), diff --git a/src/main/java/com/stripe/param/PaymentLinkCreateParams.java b/src/main/java/com/stripe/param/PaymentLinkCreateParams.java index 53da9a4cff8..68469190be6 100644 --- a/src/main/java/com/stripe/param/PaymentLinkCreateParams.java +++ b/src/main/java/com/stripe/param/PaymentLinkCreateParams.java @@ -110,6 +110,16 @@ public class PaymentLinkCreateParams extends ApiRequestParams { @SerializedName("line_items") List lineItems; + /** + * Settings for Managed Payments for this Payment Link and resulting CheckoutSessions, PaymentIntents, Invoices, and Subscriptions. + */ + @SerializedName("managed_payments") + ManagedPayments managedPayments; + /** * 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 @@ -239,6 +249,7 @@ private PaymentLinkCreateParams( String inactiveMessage, InvoiceCreation invoiceCreation, List lineItems, + ManagedPayments managedPayments, Map metadata, NameCollection nameCollection, String onBehalfOf, @@ -270,6 +281,7 @@ private PaymentLinkCreateParams( this.inactiveMessage = inactiveMessage; this.invoiceCreation = invoiceCreation; this.lineItems = lineItems; + this.managedPayments = managedPayments; this.metadata = metadata; this.nameCollection = nameCollection; this.onBehalfOf = onBehalfOf; @@ -324,6 +336,8 @@ public static class Builder { private List lineItems; + private ManagedPayments managedPayments; + private Map metadata; private NameCollection nameCollection; @@ -373,6 +387,7 @@ public PaymentLinkCreateParams build() { this.inactiveMessage, this.invoiceCreation, this.lineItems, + this.managedPayments, this.metadata, this.nameCollection, this.onBehalfOf, @@ -588,6 +603,18 @@ public Builder addAllLineItem(List elements) { return this; } + /** + * Settings for Managed Payments for this Payment Link and resulting CheckoutSessions, PaymentIntents, Invoices, and Subscriptions. + */ + public Builder setManagedPayments(PaymentLinkCreateParams.ManagedPayments managedPayments) { + this.managedPayments = managedPayments; + 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 @@ -4259,6 +4286,84 @@ public enum TaxBehavior implements ApiRequestParams.EnumParam { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class ManagedPayments { + /** + * Set to {@code true} to enable Managed Payments, Stripe's + * merchant of record solution, for this session. + */ + @SerializedName("enabled") + Boolean enabled; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private ManagedPayments(Boolean enabled, Map extraParams) { + this.enabled = enabled; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Boolean enabled; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentLinkCreateParams.ManagedPayments build() { + return new PaymentLinkCreateParams.ManagedPayments(this.enabled, this.extraParams); + } + + /** + * Set to {@code true} to enable Managed Payments, Stripe's + * merchant of record solution, for this session. + */ + public Builder setEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PaymentLinkCreateParams.ManagedPayments#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 PaymentLinkCreateParams.ManagedPayments#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class NameCollection { @@ -7089,6 +7194,9 @@ public enum PaymentMethodType implements ApiRequestParams.EnumParam { @SerializedName("sofort") SOFORT("sofort"), + @SerializedName("sunbit") + SUNBIT("sunbit"), + @SerializedName("swish") SWISH("swish"), diff --git a/src/main/java/com/stripe/param/PaymentLinkUpdateParams.java b/src/main/java/com/stripe/param/PaymentLinkUpdateParams.java index efe8f622b7d..f0448bb63c9 100644 --- a/src/main/java/com/stripe/param/PaymentLinkUpdateParams.java +++ b/src/main/java/com/stripe/param/PaymentLinkUpdateParams.java @@ -6151,6 +6151,9 @@ public enum PaymentMethodType implements ApiRequestParams.EnumParam { @SerializedName("sofort") SOFORT("sofort"), + @SerializedName("sunbit") + SUNBIT("sunbit"), + @SerializedName("swish") SWISH("swish"), diff --git a/src/main/java/com/stripe/param/PaymentMethodConfigurationCreateParams.java b/src/main/java/com/stripe/param/PaymentMethodConfigurationCreateParams.java index 06285487626..0855c0f0959 100644 --- a/src/main/java/com/stripe/param/PaymentMethodConfigurationCreateParams.java +++ b/src/main/java/com/stripe/param/PaymentMethodConfigurationCreateParams.java @@ -470,6 +470,17 @@ public class PaymentMethodConfigurationCreateParams extends ApiRequestParams { @SerializedName("sofort") Sofort sofort; + /** + * Sunbit is a single-use + * payment method where customers choose to pay in 3, 6, or 12 installments. Customers are + * redirected from your website or app, authorize the payment with Sunbit, then return to your + * website or app. You get immediate + * notification of whether the payment succeeded or failed. + */ + @SerializedName("sunbit") + Sunbit sunbit; + /** * Swish is a real-time payment method * popular in Sweden. It allows customers to single-use + * payment method where customers choose to pay in 3, 6, or 12 installments. Customers are + * redirected from your website or app, authorize the payment with Sunbit, then return to your + * website or app. You get immediate + * notification of whether the payment succeeded or failed. + */ + public Builder setSunbit(PaymentMethodConfigurationCreateParams.Sunbit sunbit) { + this.sunbit = sunbit; + return this; + } + /** * Swish is a real-time payment method * popular in Sweden. It allows customers to extraParams; + + private Sunbit(DisplayPreference displayPreference, Map extraParams) { + this.displayPreference = displayPreference; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private DisplayPreference displayPreference; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentMethodConfigurationCreateParams.Sunbit build() { + return new PaymentMethodConfigurationCreateParams.Sunbit( + this.displayPreference, this.extraParams); + } + + /** Whether or not the payment method should be displayed. */ + public Builder setDisplayPreference( + PaymentMethodConfigurationCreateParams.Sunbit.DisplayPreference displayPreference) { + this.displayPreference = displayPreference; + 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 + * PaymentMethodConfigurationCreateParams.Sunbit#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 PaymentMethodConfigurationCreateParams.Sunbit#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class DisplayPreference { + /** + * 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 account's preference for whether or not to display this payment method. */ + @SerializedName("preference") + Preference preference; + + private DisplayPreference(Map extraParams, Preference preference) { + this.extraParams = extraParams; + this.preference = preference; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Preference preference; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentMethodConfigurationCreateParams.Sunbit.DisplayPreference build() { + return new PaymentMethodConfigurationCreateParams.Sunbit.DisplayPreference( + this.extraParams, this.preference); + } + + /** + * 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 + * PaymentMethodConfigurationCreateParams.Sunbit.DisplayPreference#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 + * PaymentMethodConfigurationCreateParams.Sunbit.DisplayPreference#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 account's preference for whether or not to display this payment method. */ + public Builder setPreference( + PaymentMethodConfigurationCreateParams.Sunbit.DisplayPreference.Preference preference) { + this.preference = preference; + return this; + } + } + + public enum Preference implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"), + + @SerializedName("off") + OFF("off"), + + @SerializedName("on") + ON("on"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Preference(String value) { + this.value = value; + } + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Swish { diff --git a/src/main/java/com/stripe/param/PaymentMethodConfigurationUpdateParams.java b/src/main/java/com/stripe/param/PaymentMethodConfigurationUpdateParams.java index e6b3024243b..074c57ae9f3 100644 --- a/src/main/java/com/stripe/param/PaymentMethodConfigurationUpdateParams.java +++ b/src/main/java/com/stripe/param/PaymentMethodConfigurationUpdateParams.java @@ -471,6 +471,17 @@ public class PaymentMethodConfigurationUpdateParams extends ApiRequestParams { @SerializedName("sofort") Sofort sofort; + /** + * Sunbit is a single-use + * payment method where customers choose to pay in 3, 6, or 12 installments. Customers are + * redirected from your website or app, authorize the payment with Sunbit, then return to your + * website or app. You get immediate + * notification of whether the payment succeeded or failed. + */ + @SerializedName("sunbit") + Sunbit sunbit; + /** * Swish is a real-time payment method * popular in Sweden. It allows customers to single-use + * payment method where customers choose to pay in 3, 6, or 12 installments. Customers are + * redirected from your website or app, authorize the payment with Sunbit, then return to your + * website or app. You get immediate + * notification of whether the payment succeeded or failed. + */ + public Builder setSunbit(PaymentMethodConfigurationUpdateParams.Sunbit sunbit) { + this.sunbit = sunbit; + return this; + } + /** * Swish is a real-time payment method * popular in Sweden. It allows customers to extraParams; + + private Sunbit(DisplayPreference displayPreference, Map extraParams) { + this.displayPreference = displayPreference; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private DisplayPreference displayPreference; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentMethodConfigurationUpdateParams.Sunbit build() { + return new PaymentMethodConfigurationUpdateParams.Sunbit( + this.displayPreference, this.extraParams); + } + + /** Whether or not the payment method should be displayed. */ + public Builder setDisplayPreference( + PaymentMethodConfigurationUpdateParams.Sunbit.DisplayPreference displayPreference) { + this.displayPreference = displayPreference; + 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 + * PaymentMethodConfigurationUpdateParams.Sunbit#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 PaymentMethodConfigurationUpdateParams.Sunbit#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class DisplayPreference { + /** + * 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 account's preference for whether or not to display this payment method. */ + @SerializedName("preference") + Preference preference; + + private DisplayPreference(Map extraParams, Preference preference) { + this.extraParams = extraParams; + this.preference = preference; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Preference preference; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentMethodConfigurationUpdateParams.Sunbit.DisplayPreference build() { + return new PaymentMethodConfigurationUpdateParams.Sunbit.DisplayPreference( + this.extraParams, this.preference); + } + + /** + * 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 + * PaymentMethodConfigurationUpdateParams.Sunbit.DisplayPreference#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 + * PaymentMethodConfigurationUpdateParams.Sunbit.DisplayPreference#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 account's preference for whether or not to display this payment method. */ + public Builder setPreference( + PaymentMethodConfigurationUpdateParams.Sunbit.DisplayPreference.Preference preference) { + this.preference = preference; + return this; + } + } + + public enum Preference implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"), + + @SerializedName("off") + OFF("off"), + + @SerializedName("on") + ON("on"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Preference(String value) { + this.value = value; + } + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Swish { diff --git a/src/main/java/com/stripe/param/PaymentMethodCreateParams.java b/src/main/java/com/stripe/param/PaymentMethodCreateParams.java index 0503208963d..d586597cb6b 100644 --- a/src/main/java/com/stripe/param/PaymentMethodCreateParams.java +++ b/src/main/java/com/stripe/param/PaymentMethodCreateParams.java @@ -395,6 +395,12 @@ public class PaymentMethodCreateParams extends ApiRequestParams { @SerializedName("sofort") Sofort sofort; + /** + * If this is a Sunbit PaymentMethod, this hash contains details about the Sunbit payment method. + */ + @SerializedName("sunbit") + Sunbit sunbit; + /** * If this is a {@code swish} PaymentMethod, this hash contains details about the Swish payment * method. @@ -499,6 +505,7 @@ private PaymentMethodCreateParams( Satispay satispay, SepaDebit sepaDebit, Sofort sofort, + Sunbit sunbit, Swish swish, Twint twint, Type type, @@ -561,6 +568,7 @@ private PaymentMethodCreateParams( this.satispay = satispay; this.sepaDebit = sepaDebit; this.sofort = sofort; + this.sunbit = sunbit; this.swish = swish; this.twint = twint; this.type = type; @@ -685,6 +693,8 @@ public static class Builder { private Sofort sofort; + private Sunbit sunbit; + private Swish swish; private Twint twint; @@ -757,6 +767,7 @@ public PaymentMethodCreateParams build() { this.satispay, this.sepaDebit, this.sofort, + this.sunbit, this.swish, this.twint, this.type, @@ -1325,6 +1336,15 @@ public Builder setSofort(PaymentMethodCreateParams.Sofort sofort) { return this; } + /** + * If this is a Sunbit PaymentMethod, this hash contains details about the Sunbit payment + * method. + */ + public Builder setSunbit(PaymentMethodCreateParams.Sunbit sunbit) { + this.sunbit = sunbit; + return this; + } + /** * If this is a {@code swish} PaymentMethod, this hash contains details about the Swish payment * method. @@ -5483,6 +5503,62 @@ public enum Country implements ApiRequestParams.EnumParam { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Sunbit { + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Sunbit(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentMethodCreateParams.Sunbit build() { + return new PaymentMethodCreateParams.Sunbit(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PaymentMethodCreateParams.Sunbit#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 PaymentMethodCreateParams.Sunbit#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Swish { @@ -6322,6 +6398,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("sofort") SOFORT("sofort"), + @SerializedName("sunbit") + SUNBIT("sunbit"), + @SerializedName("swish") SWISH("swish"), diff --git a/src/main/java/com/stripe/param/PaymentMethodListParams.java b/src/main/java/com/stripe/param/PaymentMethodListParams.java index 82cf1b5d0ae..8494d18257f 100644 --- a/src/main/java/com/stripe/param/PaymentMethodListParams.java +++ b/src/main/java/com/stripe/param/PaymentMethodListParams.java @@ -406,6 +406,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("sofort") SOFORT("sofort"), + @SerializedName("sunbit") + SUNBIT("sunbit"), + @SerializedName("swish") SWISH("swish"), diff --git a/src/main/java/com/stripe/param/SetupIntentConfirmParams.java b/src/main/java/com/stripe/param/SetupIntentConfirmParams.java index 37457541478..286b88cbddf 100644 --- a/src/main/java/com/stripe/param/SetupIntentConfirmParams.java +++ b/src/main/java/com/stripe/param/SetupIntentConfirmParams.java @@ -983,6 +983,13 @@ public static class PaymentMethodData { @SerializedName("sofort") Sofort sofort; + /** + * If this is a Sunbit PaymentMethod, this hash contains details about the Sunbit payment + * method. + */ + @SerializedName("sunbit") + Sunbit sunbit; + /** * If this is a {@code swish} PaymentMethod, this hash contains details about the Swish payment * method. @@ -1083,6 +1090,7 @@ private PaymentMethodData( Satispay satispay, SepaDebit sepaDebit, Sofort sofort, + Sunbit sunbit, Swish swish, Twint twint, Type type, @@ -1140,6 +1148,7 @@ private PaymentMethodData( this.satispay = satispay; this.sepaDebit = sepaDebit; this.sofort = sofort; + this.sunbit = sunbit; this.swish = swish; this.twint = twint; this.type = type; @@ -1254,6 +1263,8 @@ public static class Builder { private Sofort sofort; + private Sunbit sunbit; + private Swish swish; private Twint twint; @@ -1321,6 +1332,7 @@ public SetupIntentConfirmParams.PaymentMethodData build() { this.satispay, this.sepaDebit, this.sofort, + this.sunbit, this.swish, this.twint, this.type, @@ -1829,6 +1841,15 @@ public Builder setSofort(SetupIntentConfirmParams.PaymentMethodData.Sofort sofor return this; } + /** + * If this is a Sunbit PaymentMethod, this hash contains details about the Sunbit payment + * method. + */ + public Builder setSunbit(SetupIntentConfirmParams.PaymentMethodData.Sunbit sunbit) { + this.sunbit = sunbit; + return this; + } + /** * If this is a {@code swish} PaymentMethod, this hash contains details about the Swish * payment method. @@ -5788,6 +5809,64 @@ public enum Country implements ApiRequestParams.EnumParam { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Sunbit { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Sunbit(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public SetupIntentConfirmParams.PaymentMethodData.Sunbit build() { + return new SetupIntentConfirmParams.PaymentMethodData.Sunbit(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SetupIntentConfirmParams.PaymentMethodData.Sunbit#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 SetupIntentConfirmParams.PaymentMethodData.Sunbit#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Swish { @@ -6561,6 +6640,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("sofort") SOFORT("sofort"), + @SerializedName("sunbit") + SUNBIT("sunbit"), + @SerializedName("swish") SWISH("swish"), @@ -6660,6 +6742,13 @@ public static class PaymentMethodOptions { @SerializedName("payto") Payto payto; + /** + * If this is a {@code pix} SetupIntent, this sub-hash contains details about the Pix payment + * method options. + */ + @SerializedName("pix") + Pix pix; + /** * If this is a {@code sepa_debit} SetupIntent, this sub-hash contains details about the SEPA * Debit payment method options. @@ -6692,6 +6781,7 @@ private PaymentMethodOptions( Link link, Paypal paypal, Payto payto, + Pix pix, SepaDebit sepaDebit, Upi upi, UsBankAccount usBankAccount) { @@ -6705,6 +6795,7 @@ private PaymentMethodOptions( this.link = link; this.paypal = paypal; this.payto = payto; + this.pix = pix; this.sepaDebit = sepaDebit; this.upi = upi; this.usBankAccount = usBankAccount; @@ -6735,6 +6826,8 @@ public static class Builder { private Payto payto; + private Pix pix; + private SepaDebit sepaDebit; private Upi upi; @@ -6754,6 +6847,7 @@ public SetupIntentConfirmParams.PaymentMethodOptions build() { this.link, this.paypal, this.payto, + this.pix, this.sepaDebit, this.upi, this.usBankAccount); @@ -6868,6 +6962,15 @@ public Builder setPayto(SetupIntentConfirmParams.PaymentMethodOptions.Payto payt return this; } + /** + * If this is a {@code pix} SetupIntent, this sub-hash contains details about the Pix payment + * method options. + */ + public Builder setPix(SetupIntentConfirmParams.PaymentMethodOptions.Pix pix) { + this.pix = pix; + return this; + } + /** * If this is a {@code sepa_debit} SetupIntent, this sub-hash contains details about the SEPA * Debit payment method options. @@ -10064,6 +10167,354 @@ public enum Purpose implements ApiRequestParams.EnumParam { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Pix { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Additional fields for mandate creation. */ + @SerializedName("mandate_options") + MandateOptions mandateOptions; + + private Pix(Map extraParams, MandateOptions mandateOptions) { + this.extraParams = extraParams; + this.mandateOptions = mandateOptions; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private MandateOptions mandateOptions; + + /** Finalize and obtain parameter instance from this builder. */ + public SetupIntentConfirmParams.PaymentMethodOptions.Pix build() { + return new SetupIntentConfirmParams.PaymentMethodOptions.Pix( + this.extraParams, this.mandateOptions); + } + + /** + * 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 SetupIntentConfirmParams.PaymentMethodOptions.Pix#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 SetupIntentConfirmParams.PaymentMethodOptions.Pix#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Additional fields for mandate creation. */ + public Builder setMandateOptions( + SetupIntentConfirmParams.PaymentMethodOptions.Pix.MandateOptions mandateOptions) { + this.mandateOptions = mandateOptions; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class MandateOptions { + /** + * Amount to be charged for future payments. Required when {@code amount_type=fixed}. If not + * provided for {@code amount_type=maximum}, defaults to 40000. + */ + @SerializedName("amount") + Long amount; + + /** Determines if the amount includes the IOF tax. Defaults to {@code never}. */ + @SerializedName("amount_includes_iof") + AmountIncludesIof amountIncludesIof; + + /** Type of amount. Defaults to {@code maximum}. */ + @SerializedName("amount_type") + AmountType amountType; + + /** + * Three-letter ISO currency + * code, in lowercase. Only {@code brl} is supported currently. + */ + @SerializedName("currency") + String currency; + + /** + * Date when the mandate expires and no further payments will be charged, in {@code + * YYYY-MM-DD}. If not provided, the mandate will be active until canceled. If provided, end + * date should be after start date. + */ + @SerializedName("end_date") + String endDate; + + /** + * 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; + + /** Schedule at which the future payments will be charged. Defaults to {@code monthly}. */ + @SerializedName("payment_schedule") + PaymentSchedule paymentSchedule; + + /** + * Subscription name displayed to buyers in their bank app. Defaults to the displayable + * business name. + */ + @SerializedName("reference") + String reference; + + /** + * Start date of the mandate, in {@code YYYY-MM-DD}. Start date should be at least 3 days in + * the future. Defaults to 3 days after the current date. + */ + @SerializedName("start_date") + String startDate; + + private MandateOptions( + Long amount, + AmountIncludesIof amountIncludesIof, + AmountType amountType, + String currency, + String endDate, + Map extraParams, + PaymentSchedule paymentSchedule, + String reference, + String startDate) { + this.amount = amount; + this.amountIncludesIof = amountIncludesIof; + this.amountType = amountType; + this.currency = currency; + this.endDate = endDate; + this.extraParams = extraParams; + this.paymentSchedule = paymentSchedule; + this.reference = reference; + this.startDate = startDate; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long amount; + + private AmountIncludesIof amountIncludesIof; + + private AmountType amountType; + + private String currency; + + private String endDate; + + private Map extraParams; + + private PaymentSchedule paymentSchedule; + + private String reference; + + private String startDate; + + /** Finalize and obtain parameter instance from this builder. */ + public SetupIntentConfirmParams.PaymentMethodOptions.Pix.MandateOptions build() { + return new SetupIntentConfirmParams.PaymentMethodOptions.Pix.MandateOptions( + this.amount, + this.amountIncludesIof, + this.amountType, + this.currency, + this.endDate, + this.extraParams, + this.paymentSchedule, + this.reference, + this.startDate); + } + + /** + * Amount to be charged for future payments. Required when {@code amount_type=fixed}. If + * not provided for {@code amount_type=maximum}, defaults to 40000. + */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } + + /** Determines if the amount includes the IOF tax. Defaults to {@code never}. */ + public Builder setAmountIncludesIof( + SetupIntentConfirmParams.PaymentMethodOptions.Pix.MandateOptions.AmountIncludesIof + amountIncludesIof) { + this.amountIncludesIof = amountIncludesIof; + return this; + } + + /** Type of amount. Defaults to {@code maximum}. */ + public Builder setAmountType( + SetupIntentConfirmParams.PaymentMethodOptions.Pix.MandateOptions.AmountType + amountType) { + this.amountType = amountType; + return this; + } + + /** + * Three-letter ISO currency + * code, in lowercase. Only {@code brl} is supported currently. + */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } + + /** + * Date when the mandate expires and no further payments will be charged, in {@code + * YYYY-MM-DD}. If not provided, the mandate will be active until canceled. If provided, + * end date should be after start date. + */ + public Builder setEndDate(String endDate) { + this.endDate = endDate; + 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 + * SetupIntentConfirmParams.PaymentMethodOptions.Pix.MandateOptions#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * SetupIntentConfirmParams.PaymentMethodOptions.Pix.MandateOptions#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Schedule at which the future payments will be charged. Defaults to {@code monthly}. */ + public Builder setPaymentSchedule( + SetupIntentConfirmParams.PaymentMethodOptions.Pix.MandateOptions.PaymentSchedule + paymentSchedule) { + this.paymentSchedule = paymentSchedule; + return this; + } + + /** + * Subscription name displayed to buyers in their bank app. Defaults to the displayable + * business name. + */ + public Builder setReference(String reference) { + this.reference = reference; + return this; + } + + /** + * Start date of the mandate, in {@code YYYY-MM-DD}. Start date should be at least 3 days + * in the future. Defaults to 3 days after the current date. + */ + public Builder setStartDate(String startDate) { + this.startDate = startDate; + return this; + } + } + + public enum AmountIncludesIof implements ApiRequestParams.EnumParam { + @SerializedName("always") + ALWAYS("always"), + + @SerializedName("never") + NEVER("never"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + AmountIncludesIof(String value) { + this.value = value; + } + } + + public enum AmountType implements ApiRequestParams.EnumParam { + @SerializedName("fixed") + FIXED("fixed"), + + @SerializedName("maximum") + MAXIMUM("maximum"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + AmountType(String value) { + this.value = value; + } + } + + public enum PaymentSchedule implements ApiRequestParams.EnumParam { + @SerializedName("halfyearly") + HALFYEARLY("halfyearly"), + + @SerializedName("monthly") + MONTHLY("monthly"), + + @SerializedName("quarterly") + QUARTERLY("quarterly"), + + @SerializedName("weekly") + WEEKLY("weekly"), + + @SerializedName("yearly") + YEARLY("yearly"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + PaymentSchedule(String value) { + this.value = value; + } + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class SepaDebit { diff --git a/src/main/java/com/stripe/param/SetupIntentCreateParams.java b/src/main/java/com/stripe/param/SetupIntentCreateParams.java index e500e560311..72d5b8a7bc4 100644 --- a/src/main/java/com/stripe/param/SetupIntentCreateParams.java +++ b/src/main/java/com/stripe/param/SetupIntentCreateParams.java @@ -1521,6 +1521,13 @@ public static class PaymentMethodData { @SerializedName("sofort") Sofort sofort; + /** + * If this is a Sunbit PaymentMethod, this hash contains details about the Sunbit payment + * method. + */ + @SerializedName("sunbit") + Sunbit sunbit; + /** * If this is a {@code swish} PaymentMethod, this hash contains details about the Swish payment * method. @@ -1621,6 +1628,7 @@ private PaymentMethodData( Satispay satispay, SepaDebit sepaDebit, Sofort sofort, + Sunbit sunbit, Swish swish, Twint twint, Type type, @@ -1678,6 +1686,7 @@ private PaymentMethodData( this.satispay = satispay; this.sepaDebit = sepaDebit; this.sofort = sofort; + this.sunbit = sunbit; this.swish = swish; this.twint = twint; this.type = type; @@ -1792,6 +1801,8 @@ public static class Builder { private Sofort sofort; + private Sunbit sunbit; + private Swish swish; private Twint twint; @@ -1859,6 +1870,7 @@ public SetupIntentCreateParams.PaymentMethodData build() { this.satispay, this.sepaDebit, this.sofort, + this.sunbit, this.swish, this.twint, this.type, @@ -2366,6 +2378,15 @@ public Builder setSofort(SetupIntentCreateParams.PaymentMethodData.Sofort sofort return this; } + /** + * If this is a Sunbit PaymentMethod, this hash contains details about the Sunbit payment + * method. + */ + public Builder setSunbit(SetupIntentCreateParams.PaymentMethodData.Sunbit sunbit) { + this.sunbit = sunbit; + return this; + } + /** * If this is a {@code swish} PaymentMethod, this hash contains details about the Swish * payment method. @@ -6324,6 +6345,64 @@ public enum Country implements ApiRequestParams.EnumParam { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Sunbit { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Sunbit(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public SetupIntentCreateParams.PaymentMethodData.Sunbit build() { + return new SetupIntentCreateParams.PaymentMethodData.Sunbit(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SetupIntentCreateParams.PaymentMethodData.Sunbit#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 SetupIntentCreateParams.PaymentMethodData.Sunbit#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Swish { @@ -7097,6 +7176,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("sofort") SOFORT("sofort"), + @SerializedName("sunbit") + SUNBIT("sunbit"), + @SerializedName("swish") SWISH("swish"), @@ -7196,6 +7278,13 @@ public static class PaymentMethodOptions { @SerializedName("payto") Payto payto; + /** + * If this is a {@code pix} SetupIntent, this sub-hash contains details about the Pix payment + * method options. + */ + @SerializedName("pix") + Pix pix; + /** * If this is a {@code sepa_debit} SetupIntent, this sub-hash contains details about the SEPA * Debit payment method options. @@ -7228,6 +7317,7 @@ private PaymentMethodOptions( Link link, Paypal paypal, Payto payto, + Pix pix, SepaDebit sepaDebit, Upi upi, UsBankAccount usBankAccount) { @@ -7241,6 +7331,7 @@ private PaymentMethodOptions( this.link = link; this.paypal = paypal; this.payto = payto; + this.pix = pix; this.sepaDebit = sepaDebit; this.upi = upi; this.usBankAccount = usBankAccount; @@ -7271,6 +7362,8 @@ public static class Builder { private Payto payto; + private Pix pix; + private SepaDebit sepaDebit; private Upi upi; @@ -7290,6 +7383,7 @@ public SetupIntentCreateParams.PaymentMethodOptions build() { this.link, this.paypal, this.payto, + this.pix, this.sepaDebit, this.upi, this.usBankAccount); @@ -7404,6 +7498,15 @@ public Builder setPayto(SetupIntentCreateParams.PaymentMethodOptions.Payto payto return this; } + /** + * If this is a {@code pix} SetupIntent, this sub-hash contains details about the Pix payment + * method options. + */ + public Builder setPix(SetupIntentCreateParams.PaymentMethodOptions.Pix pix) { + this.pix = pix; + return this; + } + /** * If this is a {@code sepa_debit} SetupIntent, this sub-hash contains details about the SEPA * Debit payment method options. @@ -10598,6 +10701,354 @@ public enum Purpose implements ApiRequestParams.EnumParam { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Pix { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Additional fields for mandate creation. */ + @SerializedName("mandate_options") + MandateOptions mandateOptions; + + private Pix(Map extraParams, MandateOptions mandateOptions) { + this.extraParams = extraParams; + this.mandateOptions = mandateOptions; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private MandateOptions mandateOptions; + + /** Finalize and obtain parameter instance from this builder. */ + public SetupIntentCreateParams.PaymentMethodOptions.Pix build() { + return new SetupIntentCreateParams.PaymentMethodOptions.Pix( + this.extraParams, this.mandateOptions); + } + + /** + * 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 SetupIntentCreateParams.PaymentMethodOptions.Pix#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 SetupIntentCreateParams.PaymentMethodOptions.Pix#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Additional fields for mandate creation. */ + public Builder setMandateOptions( + SetupIntentCreateParams.PaymentMethodOptions.Pix.MandateOptions mandateOptions) { + this.mandateOptions = mandateOptions; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class MandateOptions { + /** + * Amount to be charged for future payments. Required when {@code amount_type=fixed}. If not + * provided for {@code amount_type=maximum}, defaults to 40000. + */ + @SerializedName("amount") + Long amount; + + /** Determines if the amount includes the IOF tax. Defaults to {@code never}. */ + @SerializedName("amount_includes_iof") + AmountIncludesIof amountIncludesIof; + + /** Type of amount. Defaults to {@code maximum}. */ + @SerializedName("amount_type") + AmountType amountType; + + /** + * Three-letter ISO currency + * code, in lowercase. Only {@code brl} is supported currently. + */ + @SerializedName("currency") + String currency; + + /** + * Date when the mandate expires and no further payments will be charged, in {@code + * YYYY-MM-DD}. If not provided, the mandate will be active until canceled. If provided, end + * date should be after start date. + */ + @SerializedName("end_date") + String endDate; + + /** + * 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; + + /** Schedule at which the future payments will be charged. Defaults to {@code monthly}. */ + @SerializedName("payment_schedule") + PaymentSchedule paymentSchedule; + + /** + * Subscription name displayed to buyers in their bank app. Defaults to the displayable + * business name. + */ + @SerializedName("reference") + String reference; + + /** + * Start date of the mandate, in {@code YYYY-MM-DD}. Start date should be at least 3 days in + * the future. Defaults to 3 days after the current date. + */ + @SerializedName("start_date") + String startDate; + + private MandateOptions( + Long amount, + AmountIncludesIof amountIncludesIof, + AmountType amountType, + String currency, + String endDate, + Map extraParams, + PaymentSchedule paymentSchedule, + String reference, + String startDate) { + this.amount = amount; + this.amountIncludesIof = amountIncludesIof; + this.amountType = amountType; + this.currency = currency; + this.endDate = endDate; + this.extraParams = extraParams; + this.paymentSchedule = paymentSchedule; + this.reference = reference; + this.startDate = startDate; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long amount; + + private AmountIncludesIof amountIncludesIof; + + private AmountType amountType; + + private String currency; + + private String endDate; + + private Map extraParams; + + private PaymentSchedule paymentSchedule; + + private String reference; + + private String startDate; + + /** Finalize and obtain parameter instance from this builder. */ + public SetupIntentCreateParams.PaymentMethodOptions.Pix.MandateOptions build() { + return new SetupIntentCreateParams.PaymentMethodOptions.Pix.MandateOptions( + this.amount, + this.amountIncludesIof, + this.amountType, + this.currency, + this.endDate, + this.extraParams, + this.paymentSchedule, + this.reference, + this.startDate); + } + + /** + * Amount to be charged for future payments. Required when {@code amount_type=fixed}. If + * not provided for {@code amount_type=maximum}, defaults to 40000. + */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } + + /** Determines if the amount includes the IOF tax. Defaults to {@code never}. */ + public Builder setAmountIncludesIof( + SetupIntentCreateParams.PaymentMethodOptions.Pix.MandateOptions.AmountIncludesIof + amountIncludesIof) { + this.amountIncludesIof = amountIncludesIof; + return this; + } + + /** Type of amount. Defaults to {@code maximum}. */ + public Builder setAmountType( + SetupIntentCreateParams.PaymentMethodOptions.Pix.MandateOptions.AmountType + amountType) { + this.amountType = amountType; + return this; + } + + /** + * Three-letter ISO currency + * code, in lowercase. Only {@code brl} is supported currently. + */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } + + /** + * Date when the mandate expires and no further payments will be charged, in {@code + * YYYY-MM-DD}. If not provided, the mandate will be active until canceled. If provided, + * end date should be after start date. + */ + public Builder setEndDate(String endDate) { + this.endDate = endDate; + 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 + * SetupIntentCreateParams.PaymentMethodOptions.Pix.MandateOptions#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * SetupIntentCreateParams.PaymentMethodOptions.Pix.MandateOptions#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Schedule at which the future payments will be charged. Defaults to {@code monthly}. */ + public Builder setPaymentSchedule( + SetupIntentCreateParams.PaymentMethodOptions.Pix.MandateOptions.PaymentSchedule + paymentSchedule) { + this.paymentSchedule = paymentSchedule; + return this; + } + + /** + * Subscription name displayed to buyers in their bank app. Defaults to the displayable + * business name. + */ + public Builder setReference(String reference) { + this.reference = reference; + return this; + } + + /** + * Start date of the mandate, in {@code YYYY-MM-DD}. Start date should be at least 3 days + * in the future. Defaults to 3 days after the current date. + */ + public Builder setStartDate(String startDate) { + this.startDate = startDate; + return this; + } + } + + public enum AmountIncludesIof implements ApiRequestParams.EnumParam { + @SerializedName("always") + ALWAYS("always"), + + @SerializedName("never") + NEVER("never"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + AmountIncludesIof(String value) { + this.value = value; + } + } + + public enum AmountType implements ApiRequestParams.EnumParam { + @SerializedName("fixed") + FIXED("fixed"), + + @SerializedName("maximum") + MAXIMUM("maximum"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + AmountType(String value) { + this.value = value; + } + } + + public enum PaymentSchedule implements ApiRequestParams.EnumParam { + @SerializedName("halfyearly") + HALFYEARLY("halfyearly"), + + @SerializedName("monthly") + MONTHLY("monthly"), + + @SerializedName("quarterly") + QUARTERLY("quarterly"), + + @SerializedName("weekly") + WEEKLY("weekly"), + + @SerializedName("yearly") + YEARLY("yearly"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + PaymentSchedule(String value) { + this.value = value; + } + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class SepaDebit { @@ -12024,6 +12475,9 @@ public enum ExcludedPaymentMethodType implements ApiRequestParams.EnumParam { @SerializedName("sofort") SOFORT("sofort"), + @SerializedName("sunbit") + SUNBIT("sunbit"), + @SerializedName("swish") SWISH("swish"), diff --git a/src/main/java/com/stripe/param/SetupIntentUpdateParams.java b/src/main/java/com/stripe/param/SetupIntentUpdateParams.java index d6c0d53b3a2..6d222664b10 100644 --- a/src/main/java/com/stripe/param/SetupIntentUpdateParams.java +++ b/src/main/java/com/stripe/param/SetupIntentUpdateParams.java @@ -890,6 +890,13 @@ public static class PaymentMethodData { @SerializedName("sofort") Sofort sofort; + /** + * If this is a Sunbit PaymentMethod, this hash contains details about the Sunbit payment + * method. + */ + @SerializedName("sunbit") + Sunbit sunbit; + /** * If this is a {@code swish} PaymentMethod, this hash contains details about the Swish payment * method. @@ -990,6 +997,7 @@ private PaymentMethodData( Satispay satispay, SepaDebit sepaDebit, Sofort sofort, + Sunbit sunbit, Swish swish, Twint twint, Type type, @@ -1047,6 +1055,7 @@ private PaymentMethodData( this.satispay = satispay; this.sepaDebit = sepaDebit; this.sofort = sofort; + this.sunbit = sunbit; this.swish = swish; this.twint = twint; this.type = type; @@ -1161,6 +1170,8 @@ public static class Builder { private Sofort sofort; + private Sunbit sunbit; + private Swish swish; private Twint twint; @@ -1228,6 +1239,7 @@ public SetupIntentUpdateParams.PaymentMethodData build() { this.satispay, this.sepaDebit, this.sofort, + this.sunbit, this.swish, this.twint, this.type, @@ -1735,6 +1747,15 @@ public Builder setSofort(SetupIntentUpdateParams.PaymentMethodData.Sofort sofort return this; } + /** + * If this is a Sunbit PaymentMethod, this hash contains details about the Sunbit payment + * method. + */ + public Builder setSunbit(SetupIntentUpdateParams.PaymentMethodData.Sunbit sunbit) { + this.sunbit = sunbit; + return this; + } + /** * If this is a {@code swish} PaymentMethod, this hash contains details about the Swish * payment method. @@ -5867,6 +5888,64 @@ public enum Country implements ApiRequestParams.EnumParam { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Sunbit { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Sunbit(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public SetupIntentUpdateParams.PaymentMethodData.Sunbit build() { + return new SetupIntentUpdateParams.PaymentMethodData.Sunbit(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SetupIntentUpdateParams.PaymentMethodData.Sunbit#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 SetupIntentUpdateParams.PaymentMethodData.Sunbit#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Swish { @@ -6667,6 +6746,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("sofort") SOFORT("sofort"), + @SerializedName("sunbit") + SUNBIT("sunbit"), + @SerializedName("swish") SWISH("swish"), @@ -6766,6 +6848,13 @@ public static class PaymentMethodOptions { @SerializedName("payto") Payto payto; + /** + * If this is a {@code pix} SetupIntent, this sub-hash contains details about the Pix payment + * method options. + */ + @SerializedName("pix") + Pix pix; + /** * If this is a {@code sepa_debit} SetupIntent, this sub-hash contains details about the SEPA * Debit payment method options. @@ -6798,6 +6887,7 @@ private PaymentMethodOptions( Link link, Paypal paypal, Payto payto, + Pix pix, SepaDebit sepaDebit, Upi upi, UsBankAccount usBankAccount) { @@ -6811,6 +6901,7 @@ private PaymentMethodOptions( this.link = link; this.paypal = paypal; this.payto = payto; + this.pix = pix; this.sepaDebit = sepaDebit; this.upi = upi; this.usBankAccount = usBankAccount; @@ -6841,6 +6932,8 @@ public static class Builder { private Payto payto; + private Pix pix; + private SepaDebit sepaDebit; private Upi upi; @@ -6860,6 +6953,7 @@ public SetupIntentUpdateParams.PaymentMethodOptions build() { this.link, this.paypal, this.payto, + this.pix, this.sepaDebit, this.upi, this.usBankAccount); @@ -6974,6 +7068,15 @@ public Builder setPayto(SetupIntentUpdateParams.PaymentMethodOptions.Payto payto return this; } + /** + * If this is a {@code pix} SetupIntent, this sub-hash contains details about the Pix payment + * method options. + */ + public Builder setPix(SetupIntentUpdateParams.PaymentMethodOptions.Pix pix) { + this.pix = pix; + return this; + } + /** * If this is a {@code sepa_debit} SetupIntent, this sub-hash contains details about the SEPA * Debit payment method options. @@ -10288,6 +10391,391 @@ public enum Purpose implements ApiRequestParams.EnumParam { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Pix { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Additional fields for mandate creation. */ + @SerializedName("mandate_options") + MandateOptions mandateOptions; + + private Pix(Map extraParams, MandateOptions mandateOptions) { + this.extraParams = extraParams; + this.mandateOptions = mandateOptions; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private MandateOptions mandateOptions; + + /** Finalize and obtain parameter instance from this builder. */ + public SetupIntentUpdateParams.PaymentMethodOptions.Pix build() { + return new SetupIntentUpdateParams.PaymentMethodOptions.Pix( + this.extraParams, this.mandateOptions); + } + + /** + * 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 SetupIntentUpdateParams.PaymentMethodOptions.Pix#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 SetupIntentUpdateParams.PaymentMethodOptions.Pix#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Additional fields for mandate creation. */ + public Builder setMandateOptions( + SetupIntentUpdateParams.PaymentMethodOptions.Pix.MandateOptions mandateOptions) { + this.mandateOptions = mandateOptions; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class MandateOptions { + /** + * Amount to be charged for future payments. Required when {@code amount_type=fixed}. If not + * provided for {@code amount_type=maximum}, defaults to 40000. + */ + @SerializedName("amount") + Long amount; + + /** Determines if the amount includes the IOF tax. Defaults to {@code never}. */ + @SerializedName("amount_includes_iof") + AmountIncludesIof amountIncludesIof; + + /** Type of amount. Defaults to {@code maximum}. */ + @SerializedName("amount_type") + AmountType amountType; + + /** + * Three-letter ISO currency + * code, in lowercase. Only {@code brl} is supported currently. + */ + @SerializedName("currency") + Object currency; + + /** + * Date when the mandate expires and no further payments will be charged, in {@code + * YYYY-MM-DD}. If not provided, the mandate will be active until canceled. If provided, end + * date should be after start date. + */ + @SerializedName("end_date") + Object endDate; + + /** + * 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; + + /** Schedule at which the future payments will be charged. Defaults to {@code monthly}. */ + @SerializedName("payment_schedule") + PaymentSchedule paymentSchedule; + + /** + * Subscription name displayed to buyers in their bank app. Defaults to the displayable + * business name. + */ + @SerializedName("reference") + Object reference; + + /** + * Start date of the mandate, in {@code YYYY-MM-DD}. Start date should be at least 3 days in + * the future. Defaults to 3 days after the current date. + */ + @SerializedName("start_date") + Object startDate; + + private MandateOptions( + Long amount, + AmountIncludesIof amountIncludesIof, + AmountType amountType, + Object currency, + Object endDate, + Map extraParams, + PaymentSchedule paymentSchedule, + Object reference, + Object startDate) { + this.amount = amount; + this.amountIncludesIof = amountIncludesIof; + this.amountType = amountType; + this.currency = currency; + this.endDate = endDate; + this.extraParams = extraParams; + this.paymentSchedule = paymentSchedule; + this.reference = reference; + this.startDate = startDate; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long amount; + + private AmountIncludesIof amountIncludesIof; + + private AmountType amountType; + + private Object currency; + + private Object endDate; + + private Map extraParams; + + private PaymentSchedule paymentSchedule; + + private Object reference; + + private Object startDate; + + /** Finalize and obtain parameter instance from this builder. */ + public SetupIntentUpdateParams.PaymentMethodOptions.Pix.MandateOptions build() { + return new SetupIntentUpdateParams.PaymentMethodOptions.Pix.MandateOptions( + this.amount, + this.amountIncludesIof, + this.amountType, + this.currency, + this.endDate, + this.extraParams, + this.paymentSchedule, + this.reference, + this.startDate); + } + + /** + * Amount to be charged for future payments. Required when {@code amount_type=fixed}. If + * not provided for {@code amount_type=maximum}, defaults to 40000. + */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } + + /** Determines if the amount includes the IOF tax. Defaults to {@code never}. */ + public Builder setAmountIncludesIof( + SetupIntentUpdateParams.PaymentMethodOptions.Pix.MandateOptions.AmountIncludesIof + amountIncludesIof) { + this.amountIncludesIof = amountIncludesIof; + return this; + } + + /** Type of amount. Defaults to {@code maximum}. */ + public Builder setAmountType( + SetupIntentUpdateParams.PaymentMethodOptions.Pix.MandateOptions.AmountType + amountType) { + this.amountType = amountType; + return this; + } + + /** + * Three-letter ISO currency + * code, in lowercase. Only {@code brl} is supported currently. + */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } + + /** + * Three-letter ISO currency + * code, in lowercase. Only {@code brl} is supported currently. + */ + public Builder setCurrency(EmptyParam currency) { + this.currency = currency; + return this; + } + + /** + * Date when the mandate expires and no further payments will be charged, in {@code + * YYYY-MM-DD}. If not provided, the mandate will be active until canceled. If provided, + * end date should be after start date. + */ + public Builder setEndDate(String endDate) { + this.endDate = endDate; + return this; + } + + /** + * Date when the mandate expires and no further payments will be charged, in {@code + * YYYY-MM-DD}. If not provided, the mandate will be active until canceled. If provided, + * end date should be after start date. + */ + public Builder setEndDate(EmptyParam endDate) { + this.endDate = endDate; + 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 + * SetupIntentUpdateParams.PaymentMethodOptions.Pix.MandateOptions#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * SetupIntentUpdateParams.PaymentMethodOptions.Pix.MandateOptions#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Schedule at which the future payments will be charged. Defaults to {@code monthly}. */ + public Builder setPaymentSchedule( + SetupIntentUpdateParams.PaymentMethodOptions.Pix.MandateOptions.PaymentSchedule + paymentSchedule) { + this.paymentSchedule = paymentSchedule; + return this; + } + + /** + * Subscription name displayed to buyers in their bank app. Defaults to the displayable + * business name. + */ + public Builder setReference(String reference) { + this.reference = reference; + return this; + } + + /** + * Subscription name displayed to buyers in their bank app. Defaults to the displayable + * business name. + */ + public Builder setReference(EmptyParam reference) { + this.reference = reference; + return this; + } + + /** + * Start date of the mandate, in {@code YYYY-MM-DD}. Start date should be at least 3 days + * in the future. Defaults to 3 days after the current date. + */ + public Builder setStartDate(String startDate) { + this.startDate = startDate; + return this; + } + + /** + * Start date of the mandate, in {@code YYYY-MM-DD}. Start date should be at least 3 days + * in the future. Defaults to 3 days after the current date. + */ + public Builder setStartDate(EmptyParam startDate) { + this.startDate = startDate; + return this; + } + } + + public enum AmountIncludesIof implements ApiRequestParams.EnumParam { + @SerializedName("always") + ALWAYS("always"), + + @SerializedName("never") + NEVER("never"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + AmountIncludesIof(String value) { + this.value = value; + } + } + + public enum AmountType implements ApiRequestParams.EnumParam { + @SerializedName("fixed") + FIXED("fixed"), + + @SerializedName("maximum") + MAXIMUM("maximum"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + AmountType(String value) { + this.value = value; + } + } + + public enum PaymentSchedule implements ApiRequestParams.EnumParam { + @SerializedName("halfyearly") + HALFYEARLY("halfyearly"), + + @SerializedName("monthly") + MONTHLY("monthly"), + + @SerializedName("quarterly") + QUARTERLY("quarterly"), + + @SerializedName("weekly") + WEEKLY("weekly"), + + @SerializedName("yearly") + YEARLY("yearly"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + PaymentSchedule(String value) { + this.value = value; + } + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class SepaDebit { @@ -11624,6 +12112,9 @@ public enum ExcludedPaymentMethodType implements ApiRequestParams.EnumParam { @SerializedName("sofort") SOFORT("sofort"), + @SerializedName("sunbit") + SUNBIT("sunbit"), + @SerializedName("swish") SWISH("swish"), diff --git a/src/main/java/com/stripe/param/SubscriptionCreateParams.java b/src/main/java/com/stripe/param/SubscriptionCreateParams.java index 03ff21eb8fd..592ea7d1ef2 100644 --- a/src/main/java/com/stripe/param/SubscriptionCreateParams.java +++ b/src/main/java/com/stripe/param/SubscriptionCreateParams.java @@ -4007,6 +4007,13 @@ public static class PaymentMethodOptions { @SerializedName("payto") Object payto; + /** + * This sub-hash contains details about the Pix payment method options to pass to the + * invoice’s PaymentIntent. + */ + @SerializedName("pix") + Object pix; + /** * This sub-hash contains details about the SEPA Direct Debit payment method options to pass * to the invoice’s PaymentIntent. @@ -4014,6 +4021,13 @@ public static class PaymentMethodOptions { @SerializedName("sepa_debit") Object sepaDebit; + /** + * This sub-hash contains details about the UPI payment method options to pass to the + * invoice’s PaymentIntent. + */ + @SerializedName("upi") + Object upi; + /** * This sub-hash contains details about the ACH direct debit payment method options to pass to * the invoice’s PaymentIntent. @@ -4029,7 +4043,9 @@ private PaymentMethodOptions( Map extraParams, Object konbini, Object payto, + Object pix, Object sepaDebit, + Object upi, Object usBankAccount) { this.acssDebit = acssDebit; this.bancontact = bancontact; @@ -4038,7 +4054,9 @@ private PaymentMethodOptions( this.extraParams = extraParams; this.konbini = konbini; this.payto = payto; + this.pix = pix; this.sepaDebit = sepaDebit; + this.upi = upi; this.usBankAccount = usBankAccount; } @@ -4061,8 +4079,12 @@ public static class Builder { private Object payto; + private Object pix; + private Object sepaDebit; + private Object upi; + private Object usBankAccount; /** Finalize and obtain parameter instance from this builder. */ @@ -4075,7 +4097,9 @@ public SubscriptionCreateParams.PaymentSettings.PaymentMethodOptions build() { this.extraParams, this.konbini, this.payto, + this.pix, this.sepaDebit, + this.upi, this.usBankAccount); } @@ -4224,6 +4248,25 @@ public Builder setPayto(EmptyParam payto) { return this; } + /** + * This sub-hash contains details about the Pix payment method options to pass to the + * invoice’s PaymentIntent. + */ + public Builder setPix( + SubscriptionCreateParams.PaymentSettings.PaymentMethodOptions.Pix pix) { + this.pix = pix; + return this; + } + + /** + * This sub-hash contains details about the Pix payment method options to pass to the + * invoice’s PaymentIntent. + */ + public Builder setPix(EmptyParam pix) { + this.pix = pix; + return this; + } + /** * This sub-hash contains details about the SEPA Direct Debit payment method options to pass * to the invoice’s PaymentIntent. @@ -4243,6 +4286,25 @@ public Builder setSepaDebit(EmptyParam sepaDebit) { return this; } + /** + * This sub-hash contains details about the UPI payment method options to pass to the + * invoice’s PaymentIntent. + */ + public Builder setUpi( + SubscriptionCreateParams.PaymentSettings.PaymentMethodOptions.Upi upi) { + this.upi = upi; + return this; + } + + /** + * This sub-hash contains details about the UPI payment method options to pass to the + * invoice’s PaymentIntent. + */ + public Builder setUpi(EmptyParam upi) { + this.upi = upi; + return this; + } + /** * This sub-hash contains details about the ACH direct debit payment method options to pass * to the invoice’s PaymentIntent. @@ -5493,6 +5555,287 @@ public enum Purpose implements ApiRequestParams.EnumParam { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Pix { + /** + * The number of seconds (between 10 and 1209600) after which Pix payment will expire. + * Defaults to 86400 seconds. + */ + @SerializedName("expires_after_seconds") + Long expiresAfterSeconds; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Configuration options for setting up a mandate. */ + @SerializedName("mandate_options") + MandateOptions mandateOptions; + + private Pix( + Long expiresAfterSeconds, + Map extraParams, + MandateOptions mandateOptions) { + this.expiresAfterSeconds = expiresAfterSeconds; + this.extraParams = extraParams; + this.mandateOptions = mandateOptions; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long expiresAfterSeconds; + + private Map extraParams; + + private MandateOptions mandateOptions; + + /** Finalize and obtain parameter instance from this builder. */ + public SubscriptionCreateParams.PaymentSettings.PaymentMethodOptions.Pix build() { + return new SubscriptionCreateParams.PaymentSettings.PaymentMethodOptions.Pix( + this.expiresAfterSeconds, this.extraParams, this.mandateOptions); + } + + /** + * The number of seconds (between 10 and 1209600) after which Pix payment will expire. + * Defaults to 86400 seconds. + */ + public Builder setExpiresAfterSeconds(Long expiresAfterSeconds) { + this.expiresAfterSeconds = expiresAfterSeconds; + 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 + * SubscriptionCreateParams.PaymentSettings.PaymentMethodOptions.Pix#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 + * SubscriptionCreateParams.PaymentSettings.PaymentMethodOptions.Pix#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Configuration options for setting up a mandate. */ + public Builder setMandateOptions( + SubscriptionCreateParams.PaymentSettings.PaymentMethodOptions.Pix.MandateOptions + mandateOptions) { + this.mandateOptions = mandateOptions; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class MandateOptions { + /** Amount to be charged for future payments. If not provided, defaults to 40000. */ + @SerializedName("amount") + Long amount; + + /** Determines if the amount includes the IOF tax. Defaults to {@code never}. */ + @SerializedName("amount_includes_iof") + AmountIncludesIof amountIncludesIof; + + /** + * Date when the mandate expires and no further payments will be charged, in {@code + * YYYY-MM-DD}. If not provided, the mandate will be active until canceled. + */ + @SerializedName("end_date") + String endDate; + + /** + * 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; + + /** + * Schedule at which the future payments will be charged. Defaults to the subscription + * servicing interval. + */ + @SerializedName("payment_schedule") + PaymentSchedule paymentSchedule; + + private MandateOptions( + Long amount, + AmountIncludesIof amountIncludesIof, + String endDate, + Map extraParams, + PaymentSchedule paymentSchedule) { + this.amount = amount; + this.amountIncludesIof = amountIncludesIof; + this.endDate = endDate; + this.extraParams = extraParams; + this.paymentSchedule = paymentSchedule; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long amount; + + private AmountIncludesIof amountIncludesIof; + + private String endDate; + + private Map extraParams; + + private PaymentSchedule paymentSchedule; + + /** Finalize and obtain parameter instance from this builder. */ + public SubscriptionCreateParams.PaymentSettings.PaymentMethodOptions.Pix.MandateOptions + build() { + return new SubscriptionCreateParams.PaymentSettings.PaymentMethodOptions.Pix + .MandateOptions( + this.amount, + this.amountIncludesIof, + this.endDate, + this.extraParams, + this.paymentSchedule); + } + + /** Amount to be charged for future payments. If not provided, defaults to 40000. */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } + + /** Determines if the amount includes the IOF tax. Defaults to {@code never}. */ + public Builder setAmountIncludesIof( + SubscriptionCreateParams.PaymentSettings.PaymentMethodOptions.Pix.MandateOptions + .AmountIncludesIof + amountIncludesIof) { + this.amountIncludesIof = amountIncludesIof; + return this; + } + + /** + * Date when the mandate expires and no further payments will be charged, in {@code + * YYYY-MM-DD}. If not provided, the mandate will be active until canceled. + */ + public Builder setEndDate(String endDate) { + this.endDate = endDate; + 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 + * SubscriptionCreateParams.PaymentSettings.PaymentMethodOptions.Pix.MandateOptions#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * SubscriptionCreateParams.PaymentSettings.PaymentMethodOptions.Pix.MandateOptions#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Schedule at which the future payments will be charged. Defaults to the subscription + * servicing interval. + */ + public Builder setPaymentSchedule( + SubscriptionCreateParams.PaymentSettings.PaymentMethodOptions.Pix.MandateOptions + .PaymentSchedule + paymentSchedule) { + this.paymentSchedule = paymentSchedule; + return this; + } + } + + public enum AmountIncludesIof implements ApiRequestParams.EnumParam { + @SerializedName("always") + ALWAYS("always"), + + @SerializedName("never") + NEVER("never"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + AmountIncludesIof(String value) { + this.value = value; + } + } + + public enum PaymentSchedule implements ApiRequestParams.EnumParam { + @SerializedName("halfyearly") + HALFYEARLY("halfyearly"), + + @SerializedName("monthly") + MONTHLY("monthly"), + + @SerializedName("quarterly") + QUARTERLY("quarterly"), + + @SerializedName("weekly") + WEEKLY("weekly"), + + @SerializedName("yearly") + YEARLY("yearly"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + PaymentSchedule(String value) { + this.value = value; + } + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class SepaDebit { @@ -5555,6 +5898,236 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Upi { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Configuration options for setting up an eMandate. */ + @SerializedName("mandate_options") + MandateOptions mandateOptions; + + private Upi(Map extraParams, MandateOptions mandateOptions) { + this.extraParams = extraParams; + this.mandateOptions = mandateOptions; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private MandateOptions mandateOptions; + + /** Finalize and obtain parameter instance from this builder. */ + public SubscriptionCreateParams.PaymentSettings.PaymentMethodOptions.Upi build() { + return new SubscriptionCreateParams.PaymentSettings.PaymentMethodOptions.Upi( + this.extraParams, this.mandateOptions); + } + + /** + * 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 + * SubscriptionCreateParams.PaymentSettings.PaymentMethodOptions.Upi#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 + * SubscriptionCreateParams.PaymentSettings.PaymentMethodOptions.Upi#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Configuration options for setting up an eMandate. */ + public Builder setMandateOptions( + SubscriptionCreateParams.PaymentSettings.PaymentMethodOptions.Upi.MandateOptions + mandateOptions) { + this.mandateOptions = mandateOptions; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class MandateOptions { + /** Amount to be charged for future payments. */ + @SerializedName("amount") + Long amount; + + /** + * One of {@code fixed} or {@code maximum}. If {@code fixed}, the {@code amount} param + * refers to the exact amount to be charged in future payments. If {@code maximum}, the + * amount charged can be up to the value passed for the {@code amount} param. + */ + @SerializedName("amount_type") + AmountType amountType; + + /** + * A description of the mandate or subscription that is meant to be displayed to the + * customer. + */ + @SerializedName("description") + String description; + + /** End date of the mandate or subscription. */ + @SerializedName("end_date") + Long endDate; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private MandateOptions( + Long amount, + AmountType amountType, + String description, + Long endDate, + Map extraParams) { + this.amount = amount; + this.amountType = amountType; + this.description = description; + this.endDate = endDate; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long amount; + + private AmountType amountType; + + private String description; + + private Long endDate; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public SubscriptionCreateParams.PaymentSettings.PaymentMethodOptions.Upi.MandateOptions + build() { + return new SubscriptionCreateParams.PaymentSettings.PaymentMethodOptions.Upi + .MandateOptions( + this.amount, this.amountType, this.description, this.endDate, this.extraParams); + } + + /** Amount to be charged for future payments. */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } + + /** + * One of {@code fixed} or {@code maximum}. If {@code fixed}, the {@code amount} param + * refers to the exact amount to be charged in future payments. If {@code maximum}, the + * amount charged can be up to the value passed for the {@code amount} param. + */ + public Builder setAmountType( + SubscriptionCreateParams.PaymentSettings.PaymentMethodOptions.Upi.MandateOptions + .AmountType + amountType) { + this.amountType = amountType; + return this; + } + + /** + * A description of the mandate or subscription that is meant to be displayed to the + * customer. + */ + public Builder setDescription(String description) { + this.description = description; + return this; + } + + /** End date of the mandate or subscription. */ + public Builder setEndDate(Long endDate) { + this.endDate = endDate; + 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 + * SubscriptionCreateParams.PaymentSettings.PaymentMethodOptions.Upi.MandateOptions#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * SubscriptionCreateParams.PaymentSettings.PaymentMethodOptions.Upi.MandateOptions#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + + public enum AmountType implements ApiRequestParams.EnumParam { + @SerializedName("fixed") + FIXED("fixed"), + + @SerializedName("maximum") + MAXIMUM("maximum"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + AmountType(String value) { + this.value = value; + } + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class UsBankAccount { @@ -6151,6 +6724,9 @@ public enum PaymentMethodType implements ApiRequestParams.EnumParam { @SerializedName("payto") PAYTO("payto"), + @SerializedName("pix") + PIX("pix"), + @SerializedName("promptpay") PROMPTPAY("promptpay"), @@ -6169,6 +6745,9 @@ public enum PaymentMethodType implements ApiRequestParams.EnumParam { @SerializedName("swish") SWISH("swish"), + @SerializedName("upi") + UPI("upi"), + @SerializedName("us_bank_account") US_BANK_ACCOUNT("us_bank_account"), diff --git a/src/main/java/com/stripe/param/SubscriptionUpdateParams.java b/src/main/java/com/stripe/param/SubscriptionUpdateParams.java index 295cf6995f5..efe5217a41a 100644 --- a/src/main/java/com/stripe/param/SubscriptionUpdateParams.java +++ b/src/main/java/com/stripe/param/SubscriptionUpdateParams.java @@ -4172,6 +4172,13 @@ public static class PaymentMethodOptions { @SerializedName("payto") Object payto; + /** + * This sub-hash contains details about the Pix payment method options to pass to the + * invoice’s PaymentIntent. + */ + @SerializedName("pix") + Object pix; + /** * This sub-hash contains details about the SEPA Direct Debit payment method options to pass * to the invoice’s PaymentIntent. @@ -4179,6 +4186,13 @@ public static class PaymentMethodOptions { @SerializedName("sepa_debit") Object sepaDebit; + /** + * This sub-hash contains details about the UPI payment method options to pass to the + * invoice’s PaymentIntent. + */ + @SerializedName("upi") + Object upi; + /** * This sub-hash contains details about the ACH direct debit payment method options to pass to * the invoice’s PaymentIntent. @@ -4194,7 +4208,9 @@ private PaymentMethodOptions( Map extraParams, Object konbini, Object payto, + Object pix, Object sepaDebit, + Object upi, Object usBankAccount) { this.acssDebit = acssDebit; this.bancontact = bancontact; @@ -4203,7 +4219,9 @@ private PaymentMethodOptions( this.extraParams = extraParams; this.konbini = konbini; this.payto = payto; + this.pix = pix; this.sepaDebit = sepaDebit; + this.upi = upi; this.usBankAccount = usBankAccount; } @@ -4226,8 +4244,12 @@ public static class Builder { private Object payto; + private Object pix; + private Object sepaDebit; + private Object upi; + private Object usBankAccount; /** Finalize and obtain parameter instance from this builder. */ @@ -4240,7 +4262,9 @@ public SubscriptionUpdateParams.PaymentSettings.PaymentMethodOptions build() { this.extraParams, this.konbini, this.payto, + this.pix, this.sepaDebit, + this.upi, this.usBankAccount); } @@ -4389,6 +4413,25 @@ public Builder setPayto(EmptyParam payto) { return this; } + /** + * This sub-hash contains details about the Pix payment method options to pass to the + * invoice’s PaymentIntent. + */ + public Builder setPix( + SubscriptionUpdateParams.PaymentSettings.PaymentMethodOptions.Pix pix) { + this.pix = pix; + return this; + } + + /** + * This sub-hash contains details about the Pix payment method options to pass to the + * invoice’s PaymentIntent. + */ + public Builder setPix(EmptyParam pix) { + this.pix = pix; + return this; + } + /** * This sub-hash contains details about the SEPA Direct Debit payment method options to pass * to the invoice’s PaymentIntent. @@ -4408,6 +4451,25 @@ public Builder setSepaDebit(EmptyParam sepaDebit) { return this; } + /** + * This sub-hash contains details about the UPI payment method options to pass to the + * invoice’s PaymentIntent. + */ + public Builder setUpi( + SubscriptionUpdateParams.PaymentSettings.PaymentMethodOptions.Upi upi) { + this.upi = upi; + return this; + } + + /** + * This sub-hash contains details about the UPI payment method options to pass to the + * invoice’s PaymentIntent. + */ + public Builder setUpi(EmptyParam upi) { + this.upi = upi; + return this; + } + /** * This sub-hash contains details about the ACH direct debit payment method options to pass * to the invoice’s PaymentIntent. @@ -5696,6 +5758,296 @@ public enum Purpose implements ApiRequestParams.EnumParam { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Pix { + /** + * The number of seconds (between 10 and 1209600) after which Pix payment will expire. + * Defaults to 86400 seconds. + */ + @SerializedName("expires_after_seconds") + Long expiresAfterSeconds; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Configuration options for setting up a mandate. */ + @SerializedName("mandate_options") + MandateOptions mandateOptions; + + private Pix( + Long expiresAfterSeconds, + Map extraParams, + MandateOptions mandateOptions) { + this.expiresAfterSeconds = expiresAfterSeconds; + this.extraParams = extraParams; + this.mandateOptions = mandateOptions; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long expiresAfterSeconds; + + private Map extraParams; + + private MandateOptions mandateOptions; + + /** Finalize and obtain parameter instance from this builder. */ + public SubscriptionUpdateParams.PaymentSettings.PaymentMethodOptions.Pix build() { + return new SubscriptionUpdateParams.PaymentSettings.PaymentMethodOptions.Pix( + this.expiresAfterSeconds, this.extraParams, this.mandateOptions); + } + + /** + * The number of seconds (between 10 and 1209600) after which Pix payment will expire. + * Defaults to 86400 seconds. + */ + public Builder setExpiresAfterSeconds(Long expiresAfterSeconds) { + this.expiresAfterSeconds = expiresAfterSeconds; + 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 + * SubscriptionUpdateParams.PaymentSettings.PaymentMethodOptions.Pix#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 + * SubscriptionUpdateParams.PaymentSettings.PaymentMethodOptions.Pix#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Configuration options for setting up a mandate. */ + public Builder setMandateOptions( + SubscriptionUpdateParams.PaymentSettings.PaymentMethodOptions.Pix.MandateOptions + mandateOptions) { + this.mandateOptions = mandateOptions; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class MandateOptions { + /** Amount to be charged for future payments. If not provided, defaults to 40000. */ + @SerializedName("amount") + Long amount; + + /** Determines if the amount includes the IOF tax. Defaults to {@code never}. */ + @SerializedName("amount_includes_iof") + AmountIncludesIof amountIncludesIof; + + /** + * Date when the mandate expires and no further payments will be charged, in {@code + * YYYY-MM-DD}. If not provided, the mandate will be active until canceled. + */ + @SerializedName("end_date") + Object endDate; + + /** + * 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; + + /** + * Schedule at which the future payments will be charged. Defaults to the subscription + * servicing interval. + */ + @SerializedName("payment_schedule") + PaymentSchedule paymentSchedule; + + private MandateOptions( + Long amount, + AmountIncludesIof amountIncludesIof, + Object endDate, + Map extraParams, + PaymentSchedule paymentSchedule) { + this.amount = amount; + this.amountIncludesIof = amountIncludesIof; + this.endDate = endDate; + this.extraParams = extraParams; + this.paymentSchedule = paymentSchedule; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long amount; + + private AmountIncludesIof amountIncludesIof; + + private Object endDate; + + private Map extraParams; + + private PaymentSchedule paymentSchedule; + + /** Finalize and obtain parameter instance from this builder. */ + public SubscriptionUpdateParams.PaymentSettings.PaymentMethodOptions.Pix.MandateOptions + build() { + return new SubscriptionUpdateParams.PaymentSettings.PaymentMethodOptions.Pix + .MandateOptions( + this.amount, + this.amountIncludesIof, + this.endDate, + this.extraParams, + this.paymentSchedule); + } + + /** Amount to be charged for future payments. If not provided, defaults to 40000. */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } + + /** Determines if the amount includes the IOF tax. Defaults to {@code never}. */ + public Builder setAmountIncludesIof( + SubscriptionUpdateParams.PaymentSettings.PaymentMethodOptions.Pix.MandateOptions + .AmountIncludesIof + amountIncludesIof) { + this.amountIncludesIof = amountIncludesIof; + return this; + } + + /** + * Date when the mandate expires and no further payments will be charged, in {@code + * YYYY-MM-DD}. If not provided, the mandate will be active until canceled. + */ + public Builder setEndDate(String endDate) { + this.endDate = endDate; + return this; + } + + /** + * Date when the mandate expires and no further payments will be charged, in {@code + * YYYY-MM-DD}. If not provided, the mandate will be active until canceled. + */ + public Builder setEndDate(EmptyParam endDate) { + this.endDate = endDate; + 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 + * SubscriptionUpdateParams.PaymentSettings.PaymentMethodOptions.Pix.MandateOptions#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * SubscriptionUpdateParams.PaymentSettings.PaymentMethodOptions.Pix.MandateOptions#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Schedule at which the future payments will be charged. Defaults to the subscription + * servicing interval. + */ + public Builder setPaymentSchedule( + SubscriptionUpdateParams.PaymentSettings.PaymentMethodOptions.Pix.MandateOptions + .PaymentSchedule + paymentSchedule) { + this.paymentSchedule = paymentSchedule; + return this; + } + } + + public enum AmountIncludesIof implements ApiRequestParams.EnumParam { + @SerializedName("always") + ALWAYS("always"), + + @SerializedName("never") + NEVER("never"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + AmountIncludesIof(String value) { + this.value = value; + } + } + + public enum PaymentSchedule implements ApiRequestParams.EnumParam { + @SerializedName("halfyearly") + HALFYEARLY("halfyearly"), + + @SerializedName("monthly") + MONTHLY("monthly"), + + @SerializedName("quarterly") + QUARTERLY("quarterly"), + + @SerializedName("weekly") + WEEKLY("weekly"), + + @SerializedName("yearly") + YEARLY("yearly"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + PaymentSchedule(String value) { + this.value = value; + } + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class SepaDebit { @@ -5758,6 +6110,245 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Upi { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Configuration options for setting up an eMandate. */ + @SerializedName("mandate_options") + MandateOptions mandateOptions; + + private Upi(Map extraParams, MandateOptions mandateOptions) { + this.extraParams = extraParams; + this.mandateOptions = mandateOptions; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private MandateOptions mandateOptions; + + /** Finalize and obtain parameter instance from this builder. */ + public SubscriptionUpdateParams.PaymentSettings.PaymentMethodOptions.Upi build() { + return new SubscriptionUpdateParams.PaymentSettings.PaymentMethodOptions.Upi( + this.extraParams, this.mandateOptions); + } + + /** + * 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 + * SubscriptionUpdateParams.PaymentSettings.PaymentMethodOptions.Upi#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 + * SubscriptionUpdateParams.PaymentSettings.PaymentMethodOptions.Upi#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Configuration options for setting up an eMandate. */ + public Builder setMandateOptions( + SubscriptionUpdateParams.PaymentSettings.PaymentMethodOptions.Upi.MandateOptions + mandateOptions) { + this.mandateOptions = mandateOptions; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class MandateOptions { + /** Amount to be charged for future payments. */ + @SerializedName("amount") + Long amount; + + /** + * One of {@code fixed} or {@code maximum}. If {@code fixed}, the {@code amount} param + * refers to the exact amount to be charged in future payments. If {@code maximum}, the + * amount charged can be up to the value passed for the {@code amount} param. + */ + @SerializedName("amount_type") + AmountType amountType; + + /** + * A description of the mandate or subscription that is meant to be displayed to the + * customer. + */ + @SerializedName("description") + Object description; + + /** End date of the mandate or subscription. */ + @SerializedName("end_date") + Long endDate; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private MandateOptions( + Long amount, + AmountType amountType, + Object description, + Long endDate, + Map extraParams) { + this.amount = amount; + this.amountType = amountType; + this.description = description; + this.endDate = endDate; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long amount; + + private AmountType amountType; + + private Object description; + + private Long endDate; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public SubscriptionUpdateParams.PaymentSettings.PaymentMethodOptions.Upi.MandateOptions + build() { + return new SubscriptionUpdateParams.PaymentSettings.PaymentMethodOptions.Upi + .MandateOptions( + this.amount, this.amountType, this.description, this.endDate, this.extraParams); + } + + /** Amount to be charged for future payments. */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } + + /** + * One of {@code fixed} or {@code maximum}. If {@code fixed}, the {@code amount} param + * refers to the exact amount to be charged in future payments. If {@code maximum}, the + * amount charged can be up to the value passed for the {@code amount} param. + */ + public Builder setAmountType( + SubscriptionUpdateParams.PaymentSettings.PaymentMethodOptions.Upi.MandateOptions + .AmountType + amountType) { + this.amountType = amountType; + return this; + } + + /** + * A description of the mandate or subscription that is meant to be displayed to the + * customer. + */ + public Builder setDescription(String description) { + this.description = description; + return this; + } + + /** + * A description of the mandate or subscription that is meant to be displayed to the + * customer. + */ + public Builder setDescription(EmptyParam description) { + this.description = description; + return this; + } + + /** End date of the mandate or subscription. */ + public Builder setEndDate(Long endDate) { + this.endDate = endDate; + 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 + * SubscriptionUpdateParams.PaymentSettings.PaymentMethodOptions.Upi.MandateOptions#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * SubscriptionUpdateParams.PaymentSettings.PaymentMethodOptions.Upi.MandateOptions#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + + public enum AmountType implements ApiRequestParams.EnumParam { + @SerializedName("fixed") + FIXED("fixed"), + + @SerializedName("maximum") + MAXIMUM("maximum"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + AmountType(String value) { + this.value = value; + } + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class UsBankAccount { @@ -6354,6 +6945,9 @@ public enum PaymentMethodType implements ApiRequestParams.EnumParam { @SerializedName("payto") PAYTO("payto"), + @SerializedName("pix") + PIX("pix"), + @SerializedName("promptpay") PROMPTPAY("promptpay"), @@ -6372,6 +6966,9 @@ public enum PaymentMethodType implements ApiRequestParams.EnumParam { @SerializedName("swish") SWISH("swish"), + @SerializedName("upi") + UPI("upi"), + @SerializedName("us_bank_account") US_BANK_ACCOUNT("us_bank_account"), diff --git a/src/main/java/com/stripe/param/TaxIdCollectionCreateParams.java b/src/main/java/com/stripe/param/TaxIdCollectionCreateParams.java index d8f4abd78d8..fa900046df7 100644 --- a/src/main/java/com/stripe/param/TaxIdCollectionCreateParams.java +++ b/src/main/java/com/stripe/param/TaxIdCollectionCreateParams.java @@ -35,18 +35,19 @@ public class TaxIdCollectionCreateParams extends ApiRequestParams { * {@code ca_pst_mb}, {@code ca_pst_sk}, {@code ca_qst}, {@code cd_nif}, {@code ch_uid}, {@code * ch_vat}, {@code cl_tin}, {@code cm_niu}, {@code cn_tin}, {@code co_nit}, {@code cr_tin}, {@code * cv_nif}, {@code de_stn}, {@code do_rcn}, {@code ec_ruc}, {@code eg_tin}, {@code es_cif}, {@code - * et_tin}, {@code eu_oss_vat}, {@code eu_vat}, {@code gb_vat}, {@code ge_vat}, {@code gn_nif}, - * {@code hk_br}, {@code hr_oib}, {@code hu_tin}, {@code id_npwp}, {@code il_vat}, {@code in_gst}, - * {@code is_vat}, {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, {@code ke_pin}, {@code kg_tin}, - * {@code kh_tin}, {@code kr_brn}, {@code kz_bin}, {@code la_tin}, {@code li_uid}, {@code li_vat}, - * {@code lk_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 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} + * et_tin}, {@code eu_oss_vat}, {@code eu_vat}, {@code fo_vat}, {@code gb_vat}, {@code ge_vat}, + * {@code gi_tin}, {@code gn_nif}, {@code hk_br}, {@code hr_oib}, {@code hu_tin}, {@code id_npwp}, + * {@code il_vat}, {@code in_gst}, {@code is_vat}, {@code it_cf}, {@code jp_cn}, {@code jp_rn}, + * {@code jp_trn}, {@code ke_pin}, {@code kg_tin}, {@code kh_tin}, {@code kr_brn}, {@code kz_bin}, + * {@code la_tin}, {@code li_uid}, {@code li_vat}, {@code lk_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 pl_nip}, {@code py_ruc}, {@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; @@ -142,19 +143,20 @@ public Builder putAllExtraParam(Map map) { * ca_pst_bc}, {@code ca_pst_mb}, {@code ca_pst_sk}, {@code ca_qst}, {@code cd_nif}, {@code * ch_uid}, {@code ch_vat}, {@code cl_tin}, {@code cm_niu}, {@code cn_tin}, {@code co_nit}, * {@code cr_tin}, {@code cv_nif}, {@code de_stn}, {@code do_rcn}, {@code ec_ruc}, {@code - * eg_tin}, {@code es_cif}, {@code et_tin}, {@code eu_oss_vat}, {@code eu_vat}, {@code gb_vat}, - * {@code ge_vat}, {@code gn_nif}, {@code hk_br}, {@code hr_oib}, {@code hu_tin}, {@code - * id_npwp}, {@code il_vat}, {@code in_gst}, {@code is_vat}, {@code jp_cn}, {@code jp_rn}, - * {@code jp_trn}, {@code ke_pin}, {@code kg_tin}, {@code kh_tin}, {@code kr_brn}, {@code - * kz_bin}, {@code la_tin}, {@code li_uid}, {@code li_vat}, {@code lk_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 - * 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} + * eg_tin}, {@code es_cif}, {@code et_tin}, {@code eu_oss_vat}, {@code eu_vat}, {@code fo_vat}, + * {@code gb_vat}, {@code ge_vat}, {@code gi_tin}, {@code gn_nif}, {@code hk_br}, {@code + * hr_oib}, {@code hu_tin}, {@code id_npwp}, {@code il_vat}, {@code in_gst}, {@code is_vat}, + * {@code it_cf}, {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, {@code ke_pin}, {@code kg_tin}, + * {@code kh_tin}, {@code kr_brn}, {@code kz_bin}, {@code la_tin}, {@code li_uid}, {@code + * li_vat}, {@code lk_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 pl_nip}, {@code py_ruc}, {@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; @@ -304,12 +306,18 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("eu_vat") EU_VAT("eu_vat"), + @SerializedName("fo_vat") + FO_VAT("fo_vat"), + @SerializedName("gb_vat") GB_VAT("gb_vat"), @SerializedName("ge_vat") GE_VAT("ge_vat"), + @SerializedName("gi_tin") + GI_TIN("gi_tin"), + @SerializedName("gn_nif") GN_NIF("gn_nif"), @@ -334,6 +342,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("is_vat") IS_VAT("is_vat"), + @SerializedName("it_cf") + IT_CF("it_cf"), + @SerializedName("jp_cn") JP_CN("jp_cn"), @@ -424,6 +435,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("pl_nip") PL_NIP("pl_nip"), + @SerializedName("py_ruc") + PY_RUC("py_ruc"), + @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 2b1dad2afbd..e6d2b3bbf58 100644 --- a/src/main/java/com/stripe/param/TaxIdCreateParams.java +++ b/src/main/java/com/stripe/param/TaxIdCreateParams.java @@ -39,18 +39,19 @@ public class TaxIdCreateParams extends ApiRequestParams { * {@code ca_pst_mb}, {@code ca_pst_sk}, {@code ca_qst}, {@code cd_nif}, {@code ch_uid}, {@code * ch_vat}, {@code cl_tin}, {@code cm_niu}, {@code cn_tin}, {@code co_nit}, {@code cr_tin}, {@code * cv_nif}, {@code de_stn}, {@code do_rcn}, {@code ec_ruc}, {@code eg_tin}, {@code es_cif}, {@code - * et_tin}, {@code eu_oss_vat}, {@code eu_vat}, {@code gb_vat}, {@code ge_vat}, {@code gn_nif}, - * {@code hk_br}, {@code hr_oib}, {@code hu_tin}, {@code id_npwp}, {@code il_vat}, {@code in_gst}, - * {@code is_vat}, {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, {@code ke_pin}, {@code kg_tin}, - * {@code kh_tin}, {@code kr_brn}, {@code kz_bin}, {@code la_tin}, {@code li_uid}, {@code li_vat}, - * {@code lk_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 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} + * et_tin}, {@code eu_oss_vat}, {@code eu_vat}, {@code fo_vat}, {@code gb_vat}, {@code ge_vat}, + * {@code gi_tin}, {@code gn_nif}, {@code hk_br}, {@code hr_oib}, {@code hu_tin}, {@code id_npwp}, + * {@code il_vat}, {@code in_gst}, {@code is_vat}, {@code it_cf}, {@code jp_cn}, {@code jp_rn}, + * {@code jp_trn}, {@code ke_pin}, {@code kg_tin}, {@code kh_tin}, {@code kr_brn}, {@code kz_bin}, + * {@code la_tin}, {@code li_uid}, {@code li_vat}, {@code lk_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 pl_nip}, {@code py_ruc}, {@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; @@ -156,19 +157,20 @@ public Builder setOwner(TaxIdCreateParams.Owner owner) { * ca_pst_bc}, {@code ca_pst_mb}, {@code ca_pst_sk}, {@code ca_qst}, {@code cd_nif}, {@code * ch_uid}, {@code ch_vat}, {@code cl_tin}, {@code cm_niu}, {@code cn_tin}, {@code co_nit}, * {@code cr_tin}, {@code cv_nif}, {@code de_stn}, {@code do_rcn}, {@code ec_ruc}, {@code - * eg_tin}, {@code es_cif}, {@code et_tin}, {@code eu_oss_vat}, {@code eu_vat}, {@code gb_vat}, - * {@code ge_vat}, {@code gn_nif}, {@code hk_br}, {@code hr_oib}, {@code hu_tin}, {@code - * id_npwp}, {@code il_vat}, {@code in_gst}, {@code is_vat}, {@code jp_cn}, {@code jp_rn}, - * {@code jp_trn}, {@code ke_pin}, {@code kg_tin}, {@code kh_tin}, {@code kr_brn}, {@code - * kz_bin}, {@code la_tin}, {@code li_uid}, {@code li_vat}, {@code lk_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 - * 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} + * eg_tin}, {@code es_cif}, {@code et_tin}, {@code eu_oss_vat}, {@code eu_vat}, {@code fo_vat}, + * {@code gb_vat}, {@code ge_vat}, {@code gi_tin}, {@code gn_nif}, {@code hk_br}, {@code + * hr_oib}, {@code hu_tin}, {@code id_npwp}, {@code il_vat}, {@code in_gst}, {@code is_vat}, + * {@code it_cf}, {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, {@code ke_pin}, {@code kg_tin}, + * {@code kh_tin}, {@code kr_brn}, {@code kz_bin}, {@code la_tin}, {@code li_uid}, {@code + * li_vat}, {@code lk_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 pl_nip}, {@code py_ruc}, {@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; @@ -459,12 +461,18 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("eu_vat") EU_VAT("eu_vat"), + @SerializedName("fo_vat") + FO_VAT("fo_vat"), + @SerializedName("gb_vat") GB_VAT("gb_vat"), @SerializedName("ge_vat") GE_VAT("ge_vat"), + @SerializedName("gi_tin") + GI_TIN("gi_tin"), + @SerializedName("gn_nif") GN_NIF("gn_nif"), @@ -489,6 +497,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("is_vat") IS_VAT("is_vat"), + @SerializedName("it_cf") + IT_CF("it_cf"), + @SerializedName("jp_cn") JP_CN("jp_cn"), @@ -579,6 +590,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("pl_nip") PL_NIP("pl_nip"), + @SerializedName("py_ruc") + PY_RUC("py_ruc"), + @SerializedName("ro_tin") RO_TIN("ro_tin"), diff --git a/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java b/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java index bba110902f3..de6eb222e25 100644 --- a/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java +++ b/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java @@ -648,7 +648,10 @@ public enum ApiVersion implements ApiRequestParams.EnumParam { VERSION_2026_02_25_CLOVER("2026-02-25.clover"), @SerializedName("2026-03-25.dahlia") - VERSION_2026_03_25_DAHLIA("2026-03-25.dahlia"); + VERSION_2026_03_25_DAHLIA("2026-03-25.dahlia"), + + @SerializedName("2026-04-22.dahlia") + VERSION_2026_04_22_DAHLIA("2026-04-22.dahlia"); @Getter(onMethod_ = {@Override}) private final String value; diff --git a/src/main/java/com/stripe/param/billing/MeterCreateParams.java b/src/main/java/com/stripe/param/billing/MeterCreateParams.java index 2081cf3fe27..0d4d9aba31d 100644 --- a/src/main/java/com/stripe/param/billing/MeterCreateParams.java +++ b/src/main/java/com/stripe/param/billing/MeterCreateParams.java @@ -317,11 +317,7 @@ public static class DefaultAggregation { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** - * Required. Specifies how events are aggregated. Allowed values are {@code - * count} to count the number of events, {@code sum} to sum each event's value and {@code last} - * to take the last event's value in the window. - */ + /** Required. Specifies how events are aggregated. */ @SerializedName("formula") Formula formula; @@ -370,11 +366,7 @@ public Builder putAllExtraParam(Map map) { return this; } - /** - * Required. Specifies how events are aggregated. Allowed values are {@code - * count} to count the number of events, {@code sum} to sum each event's value and {@code - * last} to take the last event's value in the window. - */ + /** Required. Specifies how events are aggregated. */ public Builder setFormula(MeterCreateParams.DefaultAggregation.Formula formula) { this.formula = formula; return this; diff --git a/src/main/java/com/stripe/param/billing/MeterEventCreateParams.java b/src/main/java/com/stripe/param/billing/MeterEventCreateParams.java index 85b5afa8cd0..385c44b3215 100644 --- a/src/main/java/com/stripe/param/billing/MeterEventCreateParams.java +++ b/src/main/java/com/stripe/param/billing/MeterEventCreateParams.java @@ -35,7 +35,7 @@ public class MeterEventCreateParams extends ApiRequestParams { /** * A unique identifier for the event. If not provided, one is generated. We recommend using - * UUID-like identifiers. We will enforce uniqueness within a rolling period of at least 24 hours. + * UUID-like identifiers. Stripe enforces uniqueness within a rolling period of at least 24 hours. * The enforcement of uniqueness primarily addresses issues arising from accidental retries or * other problems occurring within extremely brief time intervals. This approach helps prevent * duplicate entries and ensures data integrity in high-frequency operations. @@ -165,7 +165,7 @@ public Builder putAllExtraParam(Map map) { /** * A unique identifier for the event. If not provided, one is generated. We recommend using - * UUID-like identifiers. We will enforce uniqueness within a rolling period of at least 24 + * UUID-like identifiers. Stripe enforces uniqueness within a rolling period of at least 24 * hours. The enforcement of uniqueness primarily addresses issues arising from accidental * retries or other problems occurring within extremely brief time intervals. This approach * helps prevent duplicate entries and ensures data integrity in high-frequency operations. diff --git a/src/main/java/com/stripe/param/checkout/SessionCreateParams.java b/src/main/java/com/stripe/param/checkout/SessionCreateParams.java index 476f481bba8..f53fb4b703f 100644 --- a/src/main/java/com/stripe/param/checkout/SessionCreateParams.java +++ b/src/main/java/com/stripe/param/checkout/SessionCreateParams.java @@ -229,6 +229,15 @@ public class SessionCreateParams extends ApiRequestParams { @SerializedName("locale") Locale locale; + /** + * Settings for Managed Payments for this Checkout Session and resulting PaymentIntents, Invoices, and Subscriptions. + */ + @SerializedName("managed_payments") + ManagedPayments managedPayments; + /** * 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 @@ -467,6 +476,7 @@ private SessionCreateParams( InvoiceCreation invoiceCreation, List lineItems, Locale locale, + ManagedPayments managedPayments, Map metadata, Mode mode, NameCollection nameCollection, @@ -518,6 +528,7 @@ private SessionCreateParams( this.invoiceCreation = invoiceCreation; this.lineItems = lineItems; this.locale = locale; + this.managedPayments = managedPayments; this.metadata = metadata; this.mode = mode; this.nameCollection = nameCollection; @@ -602,6 +613,8 @@ public static class Builder { private Locale locale; + private ManagedPayments managedPayments; + private Map metadata; private Mode mode; @@ -681,6 +694,7 @@ public SessionCreateParams build() { this.invoiceCreation, this.lineItems, this.locale, + this.managedPayments, this.metadata, this.mode, this.nameCollection, @@ -1070,6 +1084,17 @@ public Builder setLocale(SessionCreateParams.Locale locale) { return this; } + /** + * Settings for Managed Payments for this Checkout Session and resulting PaymentIntents, Invoices, and Subscriptions. + */ + public Builder setManagedPayments(SessionCreateParams.ManagedPayments managedPayments) { + this.managedPayments = managedPayments; + 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 @@ -5744,6 +5769,83 @@ public enum TaxBehavior implements ApiRequestParams.EnumParam { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class ManagedPayments { + /** + * Set to {@code true} to enable Managed Payments, Stripe's + * merchant of record solution, for this session. + */ + @SerializedName("enabled") + Boolean enabled; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private ManagedPayments(Boolean enabled, Map extraParams) { + this.enabled = enabled; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Boolean enabled; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public SessionCreateParams.ManagedPayments build() { + return new SessionCreateParams.ManagedPayments(this.enabled, this.extraParams); + } + + /** + * Set to {@code true} to enable Managed Payments, Stripe's + * merchant of record solution, for this session. + */ + public Builder setEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * SessionCreateParams.ManagedPayments#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link SessionCreateParams.ManagedPayments#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class NameCollection { @@ -14951,6 +15053,10 @@ public static class Pix { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** Additional fields for mandate creation. */ + @SerializedName("mandate_options") + MandateOptions mandateOptions; + /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * @@ -14977,10 +15083,12 @@ private Pix( AmountIncludesIof amountIncludesIof, Long expiresAfterSeconds, Map extraParams, + MandateOptions mandateOptions, SetupFutureUsage setupFutureUsage) { this.amountIncludesIof = amountIncludesIof; this.expiresAfterSeconds = expiresAfterSeconds; this.extraParams = extraParams; + this.mandateOptions = mandateOptions; this.setupFutureUsage = setupFutureUsage; } @@ -14995,6 +15103,8 @@ public static class Builder { private Map extraParams; + private MandateOptions mandateOptions; + private SetupFutureUsage setupFutureUsage; /** Finalize and obtain parameter instance from this builder. */ @@ -15003,6 +15113,7 @@ public SessionCreateParams.PaymentMethodOptions.Pix build() { this.amountIncludesIof, this.expiresAfterSeconds, this.extraParams, + this.mandateOptions, this.setupFutureUsage); } @@ -15050,6 +15161,13 @@ public Builder putAllExtraParam(Map map) { return this; } + /** Additional fields for mandate creation. */ + public Builder setMandateOptions( + SessionCreateParams.PaymentMethodOptions.Pix.MandateOptions mandateOptions) { + this.mandateOptions = mandateOptions; + return this; + } + /** * Indicates that you intend to make future payments with this PaymentIntent's payment * method. @@ -15077,6 +15195,280 @@ public Builder setSetupFutureUsage( } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class MandateOptions { + /** + * Amount to be charged for future payments. Required when {@code amount_type=fixed}. If not + * provided for {@code amount_type=maximum}, defaults to 40000. + */ + @SerializedName("amount") + Long amount; + + /** Determines if the amount includes the IOF tax. Defaults to {@code never}. */ + @SerializedName("amount_includes_iof") + AmountIncludesIof amountIncludesIof; + + /** Type of amount. Defaults to {@code maximum}. */ + @SerializedName("amount_type") + AmountType amountType; + + /** + * Three-letter ISO currency + * code, in lowercase. Only {@code brl} is supported currently. + */ + @SerializedName("currency") + String currency; + + /** + * Date when the mandate expires and no further payments will be charged, in {@code + * YYYY-MM-DD}. If not provided, the mandate will be active until canceled. If provided, end + * date should be after start date. + */ + @SerializedName("end_date") + String endDate; + + /** + * 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; + + /** Schedule at which the future payments will be charged. Defaults to {@code monthly}. */ + @SerializedName("payment_schedule") + PaymentSchedule paymentSchedule; + + /** + * Subscription name displayed to buyers in their bank app. Defaults to the displayable + * business name. + */ + @SerializedName("reference") + String reference; + + /** + * Start date of the mandate, in {@code YYYY-MM-DD}. Start date should be at least 3 days in + * the future. Defaults to 3 days after the current date. + */ + @SerializedName("start_date") + String startDate; + + private MandateOptions( + Long amount, + AmountIncludesIof amountIncludesIof, + AmountType amountType, + String currency, + String endDate, + Map extraParams, + PaymentSchedule paymentSchedule, + String reference, + String startDate) { + this.amount = amount; + this.amountIncludesIof = amountIncludesIof; + this.amountType = amountType; + this.currency = currency; + this.endDate = endDate; + this.extraParams = extraParams; + this.paymentSchedule = paymentSchedule; + this.reference = reference; + this.startDate = startDate; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long amount; + + private AmountIncludesIof amountIncludesIof; + + private AmountType amountType; + + private String currency; + + private String endDate; + + private Map extraParams; + + private PaymentSchedule paymentSchedule; + + private String reference; + + private String startDate; + + /** Finalize and obtain parameter instance from this builder. */ + public SessionCreateParams.PaymentMethodOptions.Pix.MandateOptions build() { + return new SessionCreateParams.PaymentMethodOptions.Pix.MandateOptions( + this.amount, + this.amountIncludesIof, + this.amountType, + this.currency, + this.endDate, + this.extraParams, + this.paymentSchedule, + this.reference, + this.startDate); + } + + /** + * Amount to be charged for future payments. Required when {@code amount_type=fixed}. If + * not provided for {@code amount_type=maximum}, defaults to 40000. + */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } + + /** Determines if the amount includes the IOF tax. Defaults to {@code never}. */ + public Builder setAmountIncludesIof( + SessionCreateParams.PaymentMethodOptions.Pix.MandateOptions.AmountIncludesIof + amountIncludesIof) { + this.amountIncludesIof = amountIncludesIof; + return this; + } + + /** Type of amount. Defaults to {@code maximum}. */ + public Builder setAmountType( + SessionCreateParams.PaymentMethodOptions.Pix.MandateOptions.AmountType amountType) { + this.amountType = amountType; + return this; + } + + /** + * Three-letter ISO currency + * code, in lowercase. Only {@code brl} is supported currently. + */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } + + /** + * Date when the mandate expires and no further payments will be charged, in {@code + * YYYY-MM-DD}. If not provided, the mandate will be active until canceled. If provided, + * end date should be after start date. + */ + public Builder setEndDate(String endDate) { + this.endDate = endDate; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * SessionCreateParams.PaymentMethodOptions.Pix.MandateOptions#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * SessionCreateParams.PaymentMethodOptions.Pix.MandateOptions#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Schedule at which the future payments will be charged. Defaults to {@code monthly}. */ + public Builder setPaymentSchedule( + SessionCreateParams.PaymentMethodOptions.Pix.MandateOptions.PaymentSchedule + paymentSchedule) { + this.paymentSchedule = paymentSchedule; + return this; + } + + /** + * Subscription name displayed to buyers in their bank app. Defaults to the displayable + * business name. + */ + public Builder setReference(String reference) { + this.reference = reference; + return this; + } + + /** + * Start date of the mandate, in {@code YYYY-MM-DD}. Start date should be at least 3 days + * in the future. Defaults to 3 days after the current date. + */ + public Builder setStartDate(String startDate) { + this.startDate = startDate; + return this; + } + } + + public enum AmountIncludesIof implements ApiRequestParams.EnumParam { + @SerializedName("always") + ALWAYS("always"), + + @SerializedName("never") + NEVER("never"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + AmountIncludesIof(String value) { + this.value = value; + } + } + + public enum AmountType implements ApiRequestParams.EnumParam { + @SerializedName("fixed") + FIXED("fixed"), + + @SerializedName("maximum") + MAXIMUM("maximum"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + AmountType(String value) { + this.value = value; + } + } + + public enum PaymentSchedule implements ApiRequestParams.EnumParam { + @SerializedName("halfyearly") + HALFYEARLY("halfyearly"), + + @SerializedName("monthly") + MONTHLY("monthly"), + + @SerializedName("quarterly") + QUARTERLY("quarterly"), + + @SerializedName("weekly") + WEEKLY("weekly"), + + @SerializedName("yearly") + YEARLY("yearly"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + PaymentSchedule(String value) { + this.value = value; + } + } + } + public enum AmountIncludesIof implements ApiRequestParams.EnumParam { @SerializedName("always") ALWAYS("always"), @@ -15094,7 +15486,10 @@ public enum AmountIncludesIof implements ApiRequestParams.EnumParam { public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @SerializedName("none") - NONE("none"); + NONE("none"), + + @SerializedName("off_session") + OFF_SESSION("off_session"); @Getter(onMethod_ = {@Override}) private final String value; @@ -20752,6 +21147,9 @@ public enum ExcludedPaymentMethodType implements ApiRequestParams.EnumParam { @SerializedName("sofort") SOFORT("sofort"), + @SerializedName("sunbit") + SUNBIT("sunbit"), + @SerializedName("swish") SWISH("swish"), @@ -21094,6 +21492,9 @@ public enum PaymentMethodType implements ApiRequestParams.EnumParam { @SerializedName("sofort") SOFORT("sofort"), + @SerializedName("sunbit") + SUNBIT("sunbit"), + @SerializedName("swish") SWISH("swish"), diff --git a/src/main/java/com/stripe/param/identity/VerificationSessionCreateParams.java b/src/main/java/com/stripe/param/identity/VerificationSessionCreateParams.java index 8840bb767d9..3ef23e2b690 100644 --- a/src/main/java/com/stripe/param/identity/VerificationSessionCreateParams.java +++ b/src/main/java/com/stripe/param/identity/VerificationSessionCreateParams.java @@ -47,7 +47,7 @@ public class VerificationSessionCreateParams extends ApiRequestParams { @SerializedName("options") Options options; - /** Details provided about the user being verified. These details may be shown to the user. */ + /** Details provided about the user being verified. These details might be shown to the user. */ @SerializedName("provided_details") ProvidedDetails providedDetails; @@ -59,7 +59,7 @@ public class VerificationSessionCreateParams extends ApiRequestParams { @SerializedName("related_customer_account") String relatedCustomerAccount; - /** Tokens referencing a Person resource and it's associated account. */ + /** Tokens referencing a Person resource and its associated account. */ @SerializedName("related_person") RelatedPerson relatedPerson; @@ -248,7 +248,7 @@ public Builder setOptions(VerificationSessionCreateParams.Options options) { return this; } - /** Details provided about the user being verified. These details may be shown to the user. */ + /** Details provided about the user being verified. These details might be shown to the user. */ public Builder setProvidedDetails( VerificationSessionCreateParams.ProvidedDetails providedDetails) { this.providedDetails = providedDetails; @@ -267,7 +267,7 @@ public Builder setRelatedCustomerAccount(String relatedCustomerAccount) { return this; } - /** Tokens referencing a Person resource and it's associated account. */ + /** Tokens referencing a Person resource and its associated account. */ public Builder setRelatedPerson(VerificationSessionCreateParams.RelatedPerson relatedPerson) { this.relatedPerson = relatedPerson; return this; diff --git a/src/main/java/com/stripe/param/issuing/CardCreateParams.java b/src/main/java/com/stripe/param/issuing/CardCreateParams.java index df1f69c0c8d..a6855a4dcba 100644 --- a/src/main/java/com/stripe/param/issuing/CardCreateParams.java +++ b/src/main/java/com/stripe/param/issuing/CardCreateParams.java @@ -1200,6 +1200,14 @@ public enum Type implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) public static class SpendingControls { + /** + * Array of card presence statuses from which authorizations will be allowed. Possible options + * are {@code present}, {@code not_present}. All other statuses will be blocked. Cannot be set + * with {@code blocked_card_presences}. Provide an empty value to unset this control. + */ + @SerializedName("allowed_card_presences") + List allowedCardPresences; + /** * Array of strings containing categories @@ -1218,6 +1226,14 @@ public static class SpendingControls { @SerializedName("allowed_merchant_countries") List allowedMerchantCountries; + /** + * Array of card presence statuses from which authorizations will be declined. Possible options + * are {@code present}, {@code not_present}. Cannot be set with {@code allowed_card_presences}. + * Provide an empty value to unset this control. + */ + @SerializedName("blocked_card_presences") + List blockedCardPresences; + /** * Array of strings containing categories @@ -1253,14 +1269,18 @@ public static class SpendingControls { List spendingLimits; private SpendingControls( + List allowedCardPresences, List allowedCategories, List allowedMerchantCountries, + List blockedCardPresences, List blockedCategories, List blockedMerchantCountries, Map extraParams, List spendingLimits) { + this.allowedCardPresences = allowedCardPresences; this.allowedCategories = allowedCategories; this.allowedMerchantCountries = allowedMerchantCountries; + this.blockedCardPresences = blockedCardPresences; this.blockedCategories = blockedCategories; this.blockedMerchantCountries = blockedMerchantCountries; this.extraParams = extraParams; @@ -1272,10 +1292,14 @@ public static Builder builder() { } public static class Builder { + private List allowedCardPresences; + private List allowedCategories; private List allowedMerchantCountries; + private List blockedCardPresences; + private List blockedCategories; private List blockedMerchantCountries; @@ -1287,14 +1311,44 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public CardCreateParams.SpendingControls build() { return new CardCreateParams.SpendingControls( + this.allowedCardPresences, this.allowedCategories, this.allowedMerchantCountries, + this.blockedCardPresences, this.blockedCategories, this.blockedMerchantCountries, this.extraParams, this.spendingLimits); } + /** + * Add an element to `allowedCardPresences` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. See + * {@link CardCreateParams.SpendingControls#allowedCardPresences} for the field documentation. + */ + public Builder addAllowedCardPresence( + CardCreateParams.SpendingControls.AllowedCardPresence element) { + if (this.allowedCardPresences == null) { + this.allowedCardPresences = new ArrayList<>(); + } + this.allowedCardPresences.add(element); + return this; + } + + /** + * Add all elements to `allowedCardPresences` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. See + * {@link CardCreateParams.SpendingControls#allowedCardPresences} for the field documentation. + */ + public Builder addAllAllowedCardPresence( + List elements) { + if (this.allowedCardPresences == null) { + this.allowedCardPresences = new ArrayList<>(); + } + this.allowedCardPresences.addAll(elements); + return this; + } + /** * Add an element to `allowedCategories` list. A list is initialized for the first * `add/addAll` call, and subsequent calls adds additional elements to the original list. See @@ -1350,6 +1404,34 @@ public Builder addAllAllowedMerchantCountry(List elements) { return this; } + /** + * Add an element to `blockedCardPresences` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. See + * {@link CardCreateParams.SpendingControls#blockedCardPresences} for the field documentation. + */ + public Builder addBlockedCardPresence( + CardCreateParams.SpendingControls.BlockedCardPresence element) { + if (this.blockedCardPresences == null) { + this.blockedCardPresences = new ArrayList<>(); + } + this.blockedCardPresences.add(element); + return this; + } + + /** + * Add all elements to `blockedCardPresences` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. See + * {@link CardCreateParams.SpendingControls#blockedCardPresences} for the field documentation. + */ + public Builder addAllBlockedCardPresence( + List elements) { + if (this.blockedCardPresences == null) { + this.blockedCardPresences = new ArrayList<>(); + } + this.blockedCardPresences.addAll(elements); + return this; + } + /** * Add an element to `blockedCategories` list. A list is initialized for the first * `add/addAll` call, and subsequent calls adds additional elements to the original list. See @@ -2531,6 +2613,21 @@ public enum Interval implements ApiRequestParams.EnumParam { } } + public enum AllowedCardPresence implements ApiRequestParams.EnumParam { + @SerializedName("not_present") + NOT_PRESENT("not_present"), + + @SerializedName("present") + PRESENT("present"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + AllowedCardPresence(String value) { + this.value = value; + } + } + public enum AllowedCategory implements ApiRequestParams.EnumParam { @SerializedName("ac_refrigeration_repair") AC_REFRIGERATION_REPAIR("ac_refrigeration_repair"), @@ -3447,6 +3544,21 @@ public enum AllowedCategory implements ApiRequestParams.EnumParam { } } + public enum BlockedCardPresence implements ApiRequestParams.EnumParam { + @SerializedName("not_present") + NOT_PRESENT("not_present"), + + @SerializedName("present") + PRESENT("present"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + BlockedCardPresence(String value) { + this.value = value; + } + } + public enum BlockedCategory implements ApiRequestParams.EnumParam { @SerializedName("ac_refrigeration_repair") AC_REFRIGERATION_REPAIR("ac_refrigeration_repair"), diff --git a/src/main/java/com/stripe/param/issuing/CardUpdateParams.java b/src/main/java/com/stripe/param/issuing/CardUpdateParams.java index 6c584cec1bf..5ea56176d2a 100644 --- a/src/main/java/com/stripe/param/issuing/CardUpdateParams.java +++ b/src/main/java/com/stripe/param/issuing/CardUpdateParams.java @@ -967,6 +967,14 @@ public enum Type implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) public static class SpendingControls { + /** + * Array of card presence statuses from which authorizations will be allowed. Possible options + * are {@code present}, {@code not_present}. All other statuses will be blocked. Cannot be set + * with {@code blocked_card_presences}. Provide an empty value to unset this control. + */ + @SerializedName("allowed_card_presences") + List allowedCardPresences; + /** * Array of strings containing categories @@ -985,6 +993,14 @@ public static class SpendingControls { @SerializedName("allowed_merchant_countries") List allowedMerchantCountries; + /** + * Array of card presence statuses from which authorizations will be declined. Possible options + * are {@code present}, {@code not_present}. Cannot be set with {@code allowed_card_presences}. + * Provide an empty value to unset this control. + */ + @SerializedName("blocked_card_presences") + List blockedCardPresences; + /** * Array of strings containing categories @@ -1020,14 +1036,18 @@ public static class SpendingControls { List spendingLimits; private SpendingControls( + List allowedCardPresences, List allowedCategories, List allowedMerchantCountries, + List blockedCardPresences, List blockedCategories, List blockedMerchantCountries, Map extraParams, List spendingLimits) { + this.allowedCardPresences = allowedCardPresences; this.allowedCategories = allowedCategories; this.allowedMerchantCountries = allowedMerchantCountries; + this.blockedCardPresences = blockedCardPresences; this.blockedCategories = blockedCategories; this.blockedMerchantCountries = blockedMerchantCountries; this.extraParams = extraParams; @@ -1039,10 +1059,14 @@ public static Builder builder() { } public static class Builder { + private List allowedCardPresences; + private List allowedCategories; private List allowedMerchantCountries; + private List blockedCardPresences; + private List blockedCategories; private List blockedMerchantCountries; @@ -1054,14 +1078,44 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public CardUpdateParams.SpendingControls build() { return new CardUpdateParams.SpendingControls( + this.allowedCardPresences, this.allowedCategories, this.allowedMerchantCountries, + this.blockedCardPresences, this.blockedCategories, this.blockedMerchantCountries, this.extraParams, this.spendingLimits); } + /** + * Add an element to `allowedCardPresences` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. See + * {@link CardUpdateParams.SpendingControls#allowedCardPresences} for the field documentation. + */ + public Builder addAllowedCardPresence( + CardUpdateParams.SpendingControls.AllowedCardPresence element) { + if (this.allowedCardPresences == null) { + this.allowedCardPresences = new ArrayList<>(); + } + this.allowedCardPresences.add(element); + return this; + } + + /** + * Add all elements to `allowedCardPresences` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. See + * {@link CardUpdateParams.SpendingControls#allowedCardPresences} for the field documentation. + */ + public Builder addAllAllowedCardPresence( + List elements) { + if (this.allowedCardPresences == null) { + this.allowedCardPresences = new ArrayList<>(); + } + this.allowedCardPresences.addAll(elements); + return this; + } + /** * Add an element to `allowedCategories` list. A list is initialized for the first * `add/addAll` call, and subsequent calls adds additional elements to the original list. See @@ -1117,6 +1171,34 @@ public Builder addAllAllowedMerchantCountry(List elements) { return this; } + /** + * Add an element to `blockedCardPresences` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. See + * {@link CardUpdateParams.SpendingControls#blockedCardPresences} for the field documentation. + */ + public Builder addBlockedCardPresence( + CardUpdateParams.SpendingControls.BlockedCardPresence element) { + if (this.blockedCardPresences == null) { + this.blockedCardPresences = new ArrayList<>(); + } + this.blockedCardPresences.add(element); + return this; + } + + /** + * Add all elements to `blockedCardPresences` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. See + * {@link CardUpdateParams.SpendingControls#blockedCardPresences} for the field documentation. + */ + public Builder addAllBlockedCardPresence( + List elements) { + if (this.blockedCardPresences == null) { + this.blockedCardPresences = new ArrayList<>(); + } + this.blockedCardPresences.addAll(elements); + return this; + } + /** * Add an element to `blockedCategories` list. A list is initialized for the first * `add/addAll` call, and subsequent calls adds additional elements to the original list. See @@ -2298,6 +2380,21 @@ public enum Interval implements ApiRequestParams.EnumParam { } } + public enum AllowedCardPresence implements ApiRequestParams.EnumParam { + @SerializedName("not_present") + NOT_PRESENT("not_present"), + + @SerializedName("present") + PRESENT("present"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + AllowedCardPresence(String value) { + this.value = value; + } + } + public enum AllowedCategory implements ApiRequestParams.EnumParam { @SerializedName("ac_refrigeration_repair") AC_REFRIGERATION_REPAIR("ac_refrigeration_repair"), @@ -3214,6 +3311,21 @@ public enum AllowedCategory implements ApiRequestParams.EnumParam { } } + public enum BlockedCardPresence implements ApiRequestParams.EnumParam { + @SerializedName("not_present") + NOT_PRESENT("not_present"), + + @SerializedName("present") + PRESENT("present"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + BlockedCardPresence(String value) { + this.value = value; + } + } + public enum BlockedCategory implements ApiRequestParams.EnumParam { @SerializedName("ac_refrigeration_repair") AC_REFRIGERATION_REPAIR("ac_refrigeration_repair"), diff --git a/src/main/java/com/stripe/param/issuing/CardholderCreateParams.java b/src/main/java/com/stripe/param/issuing/CardholderCreateParams.java index 01ce2d89682..64b6f6b119e 100644 --- a/src/main/java/com/stripe/param/issuing/CardholderCreateParams.java +++ b/src/main/java/com/stripe/param/issuing/CardholderCreateParams.java @@ -1282,6 +1282,14 @@ public Builder setFront(String front) { @Getter @EqualsAndHashCode(callSuper = false) public static class SpendingControls { + /** + * Array of card presence statuses from which authorizations will be allowed. Possible options + * are {@code present}, {@code not_present}. All other statuses will be blocked. Cannot be set + * with {@code blocked_card_presences}. Provide an empty value to unset this control. + */ + @SerializedName("allowed_card_presences") + List allowedCardPresences; + /** * Array of strings containing categories @@ -1300,6 +1308,14 @@ public static class SpendingControls { @SerializedName("allowed_merchant_countries") List allowedMerchantCountries; + /** + * Array of card presence statuses from which authorizations will be declined. Possible options + * are {@code present}, {@code not_present}. Cannot be set with {@code allowed_card_presences}. + * Provide an empty value to unset this control. + */ + @SerializedName("blocked_card_presences") + List blockedCardPresences; + /** * Array of strings containing categories @@ -1338,15 +1354,19 @@ public static class SpendingControls { String spendingLimitsCurrency; private SpendingControls( + List allowedCardPresences, List allowedCategories, List allowedMerchantCountries, + List blockedCardPresences, List blockedCategories, List blockedMerchantCountries, Map extraParams, List spendingLimits, String spendingLimitsCurrency) { + this.allowedCardPresences = allowedCardPresences; this.allowedCategories = allowedCategories; this.allowedMerchantCountries = allowedMerchantCountries; + this.blockedCardPresences = blockedCardPresences; this.blockedCategories = blockedCategories; this.blockedMerchantCountries = blockedMerchantCountries; this.extraParams = extraParams; @@ -1359,10 +1379,16 @@ public static Builder builder() { } public static class Builder { + private List + allowedCardPresences; + private List allowedCategories; private List allowedMerchantCountries; + private List + blockedCardPresences; + private List blockedCategories; private List blockedMerchantCountries; @@ -1376,8 +1402,10 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public CardholderCreateParams.SpendingControls build() { return new CardholderCreateParams.SpendingControls( + this.allowedCardPresences, this.allowedCategories, this.allowedMerchantCountries, + this.blockedCardPresences, this.blockedCategories, this.blockedMerchantCountries, this.extraParams, @@ -1385,6 +1413,36 @@ public CardholderCreateParams.SpendingControls build() { this.spendingLimitsCurrency); } + /** + * Add an element to `allowedCardPresences` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. See + * {@link CardholderCreateParams.SpendingControls#allowedCardPresences} for the field + * documentation. + */ + public Builder addAllowedCardPresence( + CardholderCreateParams.SpendingControls.AllowedCardPresence element) { + if (this.allowedCardPresences == null) { + this.allowedCardPresences = new ArrayList<>(); + } + this.allowedCardPresences.add(element); + return this; + } + + /** + * Add all elements to `allowedCardPresences` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. See + * {@link CardholderCreateParams.SpendingControls#allowedCardPresences} for the field + * documentation. + */ + public Builder addAllAllowedCardPresence( + List elements) { + if (this.allowedCardPresences == null) { + this.allowedCardPresences = new ArrayList<>(); + } + this.allowedCardPresences.addAll(elements); + return this; + } + /** * Add an element to `allowedCategories` list. A list is initialized for the first * `add/addAll` call, and subsequent calls adds additional elements to the original list. See @@ -1443,6 +1501,36 @@ public Builder addAllAllowedMerchantCountry(List elements) { return this; } + /** + * Add an element to `blockedCardPresences` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. See + * {@link CardholderCreateParams.SpendingControls#blockedCardPresences} for the field + * documentation. + */ + public Builder addBlockedCardPresence( + CardholderCreateParams.SpendingControls.BlockedCardPresence element) { + if (this.blockedCardPresences == null) { + this.blockedCardPresences = new ArrayList<>(); + } + this.blockedCardPresences.add(element); + return this; + } + + /** + * Add all elements to `blockedCardPresences` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. See + * {@link CardholderCreateParams.SpendingControls#blockedCardPresences} for the field + * documentation. + */ + public Builder addAllBlockedCardPresence( + List elements) { + if (this.blockedCardPresences == null) { + this.blockedCardPresences = new ArrayList<>(); + } + this.blockedCardPresences.addAll(elements); + return this; + } + /** * Add an element to `blockedCategories` list. A list is initialized for the first * `add/addAll` call, and subsequent calls adds additional elements to the original list. See @@ -2640,6 +2728,21 @@ public enum Interval implements ApiRequestParams.EnumParam { } } + public enum AllowedCardPresence implements ApiRequestParams.EnumParam { + @SerializedName("not_present") + NOT_PRESENT("not_present"), + + @SerializedName("present") + PRESENT("present"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + AllowedCardPresence(String value) { + this.value = value; + } + } + public enum AllowedCategory implements ApiRequestParams.EnumParam { @SerializedName("ac_refrigeration_repair") AC_REFRIGERATION_REPAIR("ac_refrigeration_repair"), @@ -3556,6 +3659,21 @@ public enum AllowedCategory implements ApiRequestParams.EnumParam { } } + public enum BlockedCardPresence implements ApiRequestParams.EnumParam { + @SerializedName("not_present") + NOT_PRESENT("not_present"), + + @SerializedName("present") + PRESENT("present"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + BlockedCardPresence(String value) { + this.value = value; + } + } + public enum BlockedCategory implements ApiRequestParams.EnumParam { @SerializedName("ac_refrigeration_repair") AC_REFRIGERATION_REPAIR("ac_refrigeration_repair"), diff --git a/src/main/java/com/stripe/param/issuing/CardholderUpdateParams.java b/src/main/java/com/stripe/param/issuing/CardholderUpdateParams.java index d48c5d9d3dd..080bcd1b437 100644 --- a/src/main/java/com/stripe/param/issuing/CardholderUpdateParams.java +++ b/src/main/java/com/stripe/param/issuing/CardholderUpdateParams.java @@ -1336,6 +1336,14 @@ public Builder setFront(EmptyParam front) { @Getter @EqualsAndHashCode(callSuper = false) public static class SpendingControls { + /** + * Array of card presence statuses from which authorizations will be allowed. Possible options + * are {@code present}, {@code not_present}. All other statuses will be blocked. Cannot be set + * with {@code blocked_card_presences}. Provide an empty value to unset this control. + */ + @SerializedName("allowed_card_presences") + List allowedCardPresences; + /** * Array of strings containing categories @@ -1354,6 +1362,14 @@ public static class SpendingControls { @SerializedName("allowed_merchant_countries") List allowedMerchantCountries; + /** + * Array of card presence statuses from which authorizations will be declined. Possible options + * are {@code present}, {@code not_present}. Cannot be set with {@code allowed_card_presences}. + * Provide an empty value to unset this control. + */ + @SerializedName("blocked_card_presences") + List blockedCardPresences; + /** * Array of strings containing categories @@ -1392,15 +1408,19 @@ public static class SpendingControls { Object spendingLimitsCurrency; private SpendingControls( + List allowedCardPresences, List allowedCategories, List allowedMerchantCountries, + List blockedCardPresences, List blockedCategories, List blockedMerchantCountries, Map extraParams, List spendingLimits, Object spendingLimitsCurrency) { + this.allowedCardPresences = allowedCardPresences; this.allowedCategories = allowedCategories; this.allowedMerchantCountries = allowedMerchantCountries; + this.blockedCardPresences = blockedCardPresences; this.blockedCategories = blockedCategories; this.blockedMerchantCountries = blockedMerchantCountries; this.extraParams = extraParams; @@ -1413,10 +1433,16 @@ public static Builder builder() { } public static class Builder { + private List + allowedCardPresences; + private List allowedCategories; private List allowedMerchantCountries; + private List + blockedCardPresences; + private List blockedCategories; private List blockedMerchantCountries; @@ -1430,8 +1456,10 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public CardholderUpdateParams.SpendingControls build() { return new CardholderUpdateParams.SpendingControls( + this.allowedCardPresences, this.allowedCategories, this.allowedMerchantCountries, + this.blockedCardPresences, this.blockedCategories, this.blockedMerchantCountries, this.extraParams, @@ -1439,6 +1467,36 @@ public CardholderUpdateParams.SpendingControls build() { this.spendingLimitsCurrency); } + /** + * Add an element to `allowedCardPresences` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. See + * {@link CardholderUpdateParams.SpendingControls#allowedCardPresences} for the field + * documentation. + */ + public Builder addAllowedCardPresence( + CardholderUpdateParams.SpendingControls.AllowedCardPresence element) { + if (this.allowedCardPresences == null) { + this.allowedCardPresences = new ArrayList<>(); + } + this.allowedCardPresences.add(element); + return this; + } + + /** + * Add all elements to `allowedCardPresences` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. See + * {@link CardholderUpdateParams.SpendingControls#allowedCardPresences} for the field + * documentation. + */ + public Builder addAllAllowedCardPresence( + List elements) { + if (this.allowedCardPresences == null) { + this.allowedCardPresences = new ArrayList<>(); + } + this.allowedCardPresences.addAll(elements); + return this; + } + /** * Add an element to `allowedCategories` list. A list is initialized for the first * `add/addAll` call, and subsequent calls adds additional elements to the original list. See @@ -1497,6 +1555,36 @@ public Builder addAllAllowedMerchantCountry(List elements) { return this; } + /** + * Add an element to `blockedCardPresences` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. See + * {@link CardholderUpdateParams.SpendingControls#blockedCardPresences} for the field + * documentation. + */ + public Builder addBlockedCardPresence( + CardholderUpdateParams.SpendingControls.BlockedCardPresence element) { + if (this.blockedCardPresences == null) { + this.blockedCardPresences = new ArrayList<>(); + } + this.blockedCardPresences.add(element); + return this; + } + + /** + * Add all elements to `blockedCardPresences` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. See + * {@link CardholderUpdateParams.SpendingControls#blockedCardPresences} for the field + * documentation. + */ + public Builder addAllBlockedCardPresence( + List elements) { + if (this.blockedCardPresences == null) { + this.blockedCardPresences = new ArrayList<>(); + } + this.blockedCardPresences.addAll(elements); + return this; + } + /** * Add an element to `blockedCategories` list. A list is initialized for the first * `add/addAll` call, and subsequent calls adds additional elements to the original list. See @@ -2703,6 +2791,21 @@ public enum Interval implements ApiRequestParams.EnumParam { } } + public enum AllowedCardPresence implements ApiRequestParams.EnumParam { + @SerializedName("not_present") + NOT_PRESENT("not_present"), + + @SerializedName("present") + PRESENT("present"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + AllowedCardPresence(String value) { + this.value = value; + } + } + public enum AllowedCategory implements ApiRequestParams.EnumParam { @SerializedName("ac_refrigeration_repair") AC_REFRIGERATION_REPAIR("ac_refrigeration_repair"), @@ -3619,6 +3722,21 @@ public enum AllowedCategory implements ApiRequestParams.EnumParam { } } + public enum BlockedCardPresence implements ApiRequestParams.EnumParam { + @SerializedName("not_present") + NOT_PRESENT("not_present"), + + @SerializedName("present") + PRESENT("present"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + BlockedCardPresence(String value) { + this.value = value; + } + } + public enum BlockedCategory implements ApiRequestParams.EnumParam { @SerializedName("ac_refrigeration_repair") AC_REFRIGERATION_REPAIR("ac_refrigeration_repair"), diff --git a/src/main/java/com/stripe/param/radar/ValueListCreateParams.java b/src/main/java/com/stripe/param/radar/ValueListCreateParams.java index 209cd61b055..76413b3c995 100644 --- a/src/main/java/com/stripe/param/radar/ValueListCreateParams.java +++ b/src/main/java/com/stripe/param/radar/ValueListCreateParams.java @@ -33,8 +33,9 @@ public class ValueListCreateParams extends ApiRequestParams { /** * Type of the items in the value list. One of {@code card_fingerprint}, {@code card_bin}, {@code * crypto_fingerprint}, {@code email}, {@code ip_address}, {@code country}, {@code string}, {@code - * case_sensitive_string}, {@code customer_id}, {@code sepa_debit_fingerprint}, or {@code - * us_bank_account_fingerprint}. Use {@code string} if the item type is unknown or mixed. + * case_sensitive_string}, {@code customer_id}, {@code account}, {@code sepa_debit_fingerprint}, + * or {@code us_bank_account_fingerprint}. Use {@code string} if the item type is unknown or + * mixed. */ @SerializedName("item_type") ItemType itemType; @@ -151,9 +152,9 @@ public Builder putAllExtraParam(Map map) { /** * Type of the items in the value list. One of {@code card_fingerprint}, {@code card_bin}, * {@code crypto_fingerprint}, {@code email}, {@code ip_address}, {@code country}, {@code - * string}, {@code case_sensitive_string}, {@code customer_id}, {@code sepa_debit_fingerprint}, - * or {@code us_bank_account_fingerprint}. Use {@code string} if the item type is unknown or - * mixed. + * string}, {@code case_sensitive_string}, {@code customer_id}, {@code account}, {@code + * sepa_debit_fingerprint}, or {@code us_bank_account_fingerprint}. Use {@code string} if the + * item type is unknown or mixed. */ public Builder setItemType(ValueListCreateParams.ItemType itemType) { this.itemType = itemType; @@ -194,6 +195,9 @@ public Builder setName(String name) { } public enum ItemType implements ApiRequestParams.EnumParam { + @SerializedName("account") + ACCOUNT("account"), + @SerializedName("card_bin") CARD_BIN("card_bin"), diff --git a/src/main/java/com/stripe/param/tax/CalculationCreateParams.java b/src/main/java/com/stripe/param/tax/CalculationCreateParams.java index e5cf6b0ece3..a6613ad0bbf 100644 --- a/src/main/java/com/stripe/param/tax/CalculationCreateParams.java +++ b/src/main/java/com/stripe/param/tax/CalculationCreateParams.java @@ -639,19 +639,19 @@ public static class TaxId { * {@code cd_nif}, {@code ch_uid}, {@code ch_vat}, {@code cl_tin}, {@code cm_niu}, {@code * cn_tin}, {@code co_nit}, {@code cr_tin}, {@code cv_nif}, {@code de_stn}, {@code do_rcn}, * {@code ec_ruc}, {@code eg_tin}, {@code es_cif}, {@code et_tin}, {@code eu_oss_vat}, {@code - * eu_vat}, {@code gb_vat}, {@code ge_vat}, {@code gn_nif}, {@code hk_br}, {@code hr_oib}, - * {@code hu_tin}, {@code id_npwp}, {@code il_vat}, {@code in_gst}, {@code is_vat}, {@code - * jp_cn}, {@code jp_rn}, {@code jp_trn}, {@code ke_pin}, {@code kg_tin}, {@code kh_tin}, - * {@code kr_brn}, {@code kz_bin}, {@code la_tin}, {@code li_uid}, {@code li_vat}, {@code - * lk_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 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} + * eu_vat}, {@code fo_vat}, {@code gb_vat}, {@code ge_vat}, {@code gi_tin}, {@code gn_nif}, + * {@code hk_br}, {@code hr_oib}, {@code hu_tin}, {@code id_npwp}, {@code il_vat}, {@code + * in_gst}, {@code is_vat}, {@code it_cf}, {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, + * {@code ke_pin}, {@code kg_tin}, {@code kh_tin}, {@code kr_brn}, {@code kz_bin}, {@code + * la_tin}, {@code li_uid}, {@code li_vat}, {@code lk_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 pl_nip}, {@code + * py_ruc}, {@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; @@ -721,19 +721,20 @@ public Builder putAllExtraParam(Map map) { * {@code cd_nif}, {@code ch_uid}, {@code ch_vat}, {@code cl_tin}, {@code cm_niu}, {@code * cn_tin}, {@code co_nit}, {@code cr_tin}, {@code cv_nif}, {@code de_stn}, {@code do_rcn}, * {@code ec_ruc}, {@code eg_tin}, {@code es_cif}, {@code et_tin}, {@code eu_oss_vat}, - * {@code eu_vat}, {@code gb_vat}, {@code ge_vat}, {@code gn_nif}, {@code hk_br}, {@code - * hr_oib}, {@code hu_tin}, {@code id_npwp}, {@code il_vat}, {@code in_gst}, {@code is_vat}, - * {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, {@code ke_pin}, {@code kg_tin}, {@code - * kh_tin}, {@code kr_brn}, {@code kz_bin}, {@code la_tin}, {@code li_uid}, {@code li_vat}, - * {@code lk_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 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} + * {@code eu_vat}, {@code fo_vat}, {@code gb_vat}, {@code ge_vat}, {@code gi_tin}, {@code + * gn_nif}, {@code hk_br}, {@code hr_oib}, {@code hu_tin}, {@code id_npwp}, {@code il_vat}, + * {@code in_gst}, {@code is_vat}, {@code it_cf}, {@code jp_cn}, {@code jp_rn}, {@code + * jp_trn}, {@code ke_pin}, {@code kg_tin}, {@code kh_tin}, {@code kr_brn}, {@code kz_bin}, + * {@code la_tin}, {@code li_uid}, {@code li_vat}, {@code lk_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 pl_nip}, + * {@code py_ruc}, {@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; @@ -883,12 +884,18 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("eu_vat") EU_VAT("eu_vat"), + @SerializedName("fo_vat") + FO_VAT("fo_vat"), + @SerializedName("gb_vat") GB_VAT("gb_vat"), @SerializedName("ge_vat") GE_VAT("ge_vat"), + @SerializedName("gi_tin") + GI_TIN("gi_tin"), + @SerializedName("gn_nif") GN_NIF("gn_nif"), @@ -913,6 +920,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("is_vat") IS_VAT("is_vat"), + @SerializedName("it_cf") + IT_CF("it_cf"), + @SerializedName("jp_cn") JP_CN("jp_cn"), @@ -1003,6 +1013,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("pl_nip") PL_NIP("pl_nip"), + @SerializedName("py_ruc") + PY_RUC("py_ruc"), + @SerializedName("ro_tin") RO_TIN("ro_tin"), diff --git a/src/main/java/com/stripe/param/tax/RegistrationCreateParams.java b/src/main/java/com/stripe/param/tax/RegistrationCreateParams.java index 3aeb2002231..0f5de5c976c 100644 --- a/src/main/java/com/stripe/param/tax/RegistrationCreateParams.java +++ b/src/main/java/com/stripe/param/tax/RegistrationCreateParams.java @@ -15880,14 +15880,9 @@ public static class LocalAmusementTax { Map extraParams; /** - * Required. A FIPS code - * representing the local jurisdiction. Supported FIPS codes are: {@code 02154} (Arlington - * Heights), {@code 05248} (Bensenville), {@code 06613} (Bloomington), {@code 10906} - * (Campton Hills), {@code 14000} (Chicago), {@code 21696} (East Dundee), {@code 24582} - * (Evanston), {@code 45421} (Lynwood), {@code 48892} (Midlothian), {@code 64343} (River - * Grove), {@code 64421} (Riverside), {@code 65806} (Roselle), and {@code 68081} (Schiller - * Park). + * Required. A jurisdiction code representing the local + * jurisdiction. */ @SerializedName("jurisdiction") String jurisdiction; @@ -15943,14 +15938,9 @@ public Builder putAllExtraParam(Map map) { } /** - * Required. A FIPS code - * representing the local jurisdiction. Supported FIPS codes are: {@code 02154} (Arlington - * Heights), {@code 05248} (Bensenville), {@code 06613} (Bloomington), {@code 10906} - * (Campton Hills), {@code 14000} (Chicago), {@code 21696} (East Dundee), {@code 24582} - * (Evanston), {@code 45421} (Lynwood), {@code 48892} (Midlothian), {@code 64343} (River - * Grove), {@code 64421} (Riverside), {@code 65806} (Roselle), and {@code 68081} (Schiller - * Park). + * Required. A jurisdiction code representing the local + * jurisdiction. */ public Builder setJurisdiction(String jurisdiction) { this.jurisdiction = jurisdiction; diff --git a/src/main/java/com/stripe/service/SubscriptionService.java b/src/main/java/com/stripe/service/SubscriptionService.java index 9f58e62f243..6cbdc7bb3cf 100644 --- a/src/main/java/com/stripe/service/SubscriptionService.java +++ b/src/main/java/com/stripe/service/SubscriptionService.java @@ -556,8 +556,10 @@ public Subscription migrate( * Initiates resumption of a paused subscription, optionally resetting the billing cycle anchor * and creating prorations. If no resumption invoice is generated, the subscription becomes {@code * active} immediately. If a resumption invoice is generated, the subscription remains {@code - * paused} until the invoice is paid or marked uncollectible. If the invoice is not paid by the - * expiration date, it is voided and the subscription remains {@code paused}. + * paused} until the invoice is paid or marked uncollectible. If the invoice isn’t paid by the + * expiration date, it is voided and the subscription remains {@code paused}. You can only resume + * subscriptions with {@code collection_method} set to {@code charge_automatically}. {@code + * send_invoice} subscriptions are not supported. */ public Subscription resume(String subscription, SubscriptionResumeParams params) throws StripeException { @@ -567,8 +569,10 @@ public Subscription resume(String subscription, SubscriptionResumeParams params) * Initiates resumption of a paused subscription, optionally resetting the billing cycle anchor * and creating prorations. If no resumption invoice is generated, the subscription becomes {@code * active} immediately. If a resumption invoice is generated, the subscription remains {@code - * paused} until the invoice is paid or marked uncollectible. If the invoice is not paid by the - * expiration date, it is voided and the subscription remains {@code paused}. + * paused} until the invoice is paid or marked uncollectible. If the invoice isn’t paid by the + * expiration date, it is voided and the subscription remains {@code paused}. You can only resume + * subscriptions with {@code collection_method} set to {@code charge_automatically}. {@code + * send_invoice} subscriptions are not supported. */ public Subscription resume(String subscription, RequestOptions options) throws StripeException { return resume(subscription, (SubscriptionResumeParams) null, options); @@ -577,8 +581,10 @@ public Subscription resume(String subscription, RequestOptions options) throws S * Initiates resumption of a paused subscription, optionally resetting the billing cycle anchor * and creating prorations. If no resumption invoice is generated, the subscription becomes {@code * active} immediately. If a resumption invoice is generated, the subscription remains {@code - * paused} until the invoice is paid or marked uncollectible. If the invoice is not paid by the - * expiration date, it is voided and the subscription remains {@code paused}. + * paused} until the invoice is paid or marked uncollectible. If the invoice isn’t paid by the + * expiration date, it is voided and the subscription remains {@code paused}. You can only resume + * subscriptions with {@code collection_method} set to {@code charge_automatically}. {@code + * send_invoice} subscriptions are not supported. */ public Subscription resume(String subscription) throws StripeException { return resume(subscription, (SubscriptionResumeParams) null, (RequestOptions) null); @@ -587,8 +593,10 @@ public Subscription resume(String subscription) throws StripeException { * Initiates resumption of a paused subscription, optionally resetting the billing cycle anchor * and creating prorations. If no resumption invoice is generated, the subscription becomes {@code * active} immediately. If a resumption invoice is generated, the subscription remains {@code - * paused} until the invoice is paid or marked uncollectible. If the invoice is not paid by the - * expiration date, it is voided and the subscription remains {@code paused}. + * paused} until the invoice is paid or marked uncollectible. If the invoice isn’t paid by the + * expiration date, it is voided and the subscription remains {@code paused}. You can only resume + * subscriptions with {@code collection_method} set to {@code charge_automatically}. {@code + * send_invoice} subscriptions are not supported. */ public Subscription resume( String subscription, SubscriptionResumeParams params, RequestOptions options) diff --git a/src/test/java/com/stripe/functional/GeneratedExamples.java b/src/test/java/com/stripe/functional/GeneratedExamples.java index 3e7868791a6..77d30868fc1 100644 --- a/src/test/java/com/stripe/functional/GeneratedExamples.java +++ b/src/test/java/com/stripe/functional/GeneratedExamples.java @@ -3208,7 +3208,7 @@ public void testCoreEventsGetServices() throws StripeException { null, null, com.stripe.model.v2.core.Event.class, - "{\"changes\":{\"int_key\":123,\"string_key\":\"value\",\"boolean_key\":true,\"object_key\":{\"object_int_key\":123,\"object_string_key\":\"value\",\"object_boolean_key\":true},\"array_key\":[1,2,3]},\"context\":\"context\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"object\":\"v2.core.event\",\"reason\":{\"type\":\"request\",\"request\":{\"id\":\"obj_123\",\"idempotency_key\":\"idempotency_key\"}},\"type\":\"type\"}"); + "{\"object\":\"v2.core.event\",\"changes\":{\"int_key\":123,\"string_key\":\"value\",\"boolean_key\":true,\"object_key\":{\"object_int_key\":123,\"object_string_key\":\"value\",\"object_boolean_key\":true},\"array_key\":[1,2,3]},\"context\":\"context\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"reason\":{\"request\":{\"id\":\"obj_123\",\"idempotency_key\":\"idempotency_key\"},\"type\":\"request\"},\"type\":\"type\"}"); StripeClient client = new StripeClient(networkSpy); com.stripe.model.v2.core.Event event = client.v2().core().events().retrieve("ll_123"); @@ -24381,7 +24381,7 @@ public void testV2BillingMeterEventPostServices() throws StripeException { null, null, com.stripe.model.v2.billing.MeterEvent.class, - "{\"created\":\"1970-01-12T21:42:34.472Z\",\"event_name\":\"event_name\",\"identifier\":\"identifier\",\"object\":\"v2.billing.meter_event\",\"payload\":{\"key\":\"payload\"},\"timestamp\":\"1970-01-01T15:18:46.294Z\",\"livemode\":true}"); + "{\"object\":\"v2.billing.meter_event\",\"created\":\"1970-01-12T21:42:34.472Z\",\"event_name\":\"event_name\",\"identifier\":\"identifier\",\"livemode\":true,\"payload\":{\"key\":\"payload\"},\"timestamp\":\"1970-01-01T15:18:46.294Z\"}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.billing.MeterEventCreateParams params = @@ -24410,7 +24410,7 @@ public void testV2BillingMeterEventAdjustmentPostServices() throws StripeExcepti null, null, com.stripe.model.v2.billing.MeterEventAdjustment.class, - "{\"cancel\":{\"identifier\":\"identifier\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"event_name\":\"event_name\",\"id\":\"obj_123\",\"object\":\"v2.billing.meter_event_adjustment\",\"status\":\"complete\",\"type\":\"cancel\",\"livemode\":true}"); + "{\"object\":\"v2.billing.meter_event_adjustment\",\"cancel\":{\"identifier\":\"identifier\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"event_name\":\"event_name\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"complete\",\"type\":\"cancel\"}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.billing.MeterEventAdjustmentCreateParams params = @@ -24443,7 +24443,7 @@ public void testV2BillingMeterEventSessionPostServices() throws StripeException null, null, com.stripe.model.v2.billing.MeterEventSession.class, - "{\"authentication_token\":\"authentication_token\",\"created\":\"1970-01-12T21:42:34.472Z\",\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"id\":\"obj_123\",\"object\":\"v2.billing.meter_event_session\",\"livemode\":true}"); + "{\"object\":\"v2.billing.meter_event_session\",\"authentication_token\":\"authentication_token\",\"created\":\"1970-01-12T21:42:34.472Z\",\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"id\":\"obj_123\",\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.model.v2.billing.MeterEventSession meterEventSession = @@ -24499,7 +24499,7 @@ public void testV2CoreAccountGetServices() throws StripeException { null, new TypeToken< com.stripe.model.v2.StripeCollection>() {}.getType(), - "{\"data\":[{\"applied_configurations\":[\"recipient\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.core.account\",\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"object\":\"v2.core.account\",\"applied_configurations\":[\"recipient\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.core.AccountListParams params = @@ -24521,7 +24521,7 @@ public void testV2CoreAccountPostServices() throws StripeException { null, null, com.stripe.model.v2.core.Account.class, - "{\"applied_configurations\":[\"recipient\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.core.account\",\"livemode\":true}"); + "{\"object\":\"v2.core.account\",\"applied_configurations\":[\"recipient\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.core.AccountCreateParams params = @@ -24542,7 +24542,7 @@ public void testV2CoreAccountGet2Services() throws StripeException { null, null, com.stripe.model.v2.core.Account.class, - "{\"applied_configurations\":[\"recipient\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.core.account\",\"livemode\":true}"); + "{\"object\":\"v2.core.account\",\"applied_configurations\":[\"recipient\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.core.AccountRetrieveParams params = @@ -24568,7 +24568,7 @@ public void testV2CoreAccountPost2Services() throws StripeException { null, null, com.stripe.model.v2.core.Account.class, - "{\"applied_configurations\":[\"recipient\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.core.account\",\"livemode\":true}"); + "{\"object\":\"v2.core.account\",\"applied_configurations\":[\"recipient\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.core.AccountUpdateParams params = @@ -24594,7 +24594,7 @@ public void testV2CoreAccountPost3Services() throws StripeException { null, null, com.stripe.model.v2.core.Account.class, - "{\"applied_configurations\":[\"recipient\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.core.account\",\"livemode\":true}"); + "{\"object\":\"v2.core.account\",\"applied_configurations\":[\"recipient\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.core.AccountCloseParams params = @@ -24622,7 +24622,7 @@ public void testV2CoreAccountsPersonGetServices() throws StripeException { new TypeToken< com.stripe.model.v2.StripeCollection< com.stripe.model.v2.core.AccountPerson>>() {}.getType(), - "{\"data\":[{\"account\":\"account\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.core.account_person\",\"updated\":\"1970-01-03T17:07:10.277Z\",\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"object\":\"v2.core.account_person\",\"account\":\"account\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"updated\":\"1970-01-03T17:07:10.277Z\"}],\"next_page_url\":null,\"previous_page_url\":null}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.core.accounts.PersonListParams params = @@ -24648,7 +24648,7 @@ public void testV2CoreAccountsPersonPostServices() throws StripeException { null, null, com.stripe.model.v2.core.AccountPerson.class, - "{\"account\":\"account\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.core.account_person\",\"updated\":\"1970-01-03T17:07:10.277Z\",\"livemode\":true}"); + "{\"object\":\"v2.core.account_person\",\"account\":\"account\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"updated\":\"1970-01-03T17:07:10.277Z\"}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.core.accounts.PersonCreateParams params = @@ -24697,7 +24697,7 @@ public void testV2CoreAccountsPersonGet2Services() throws StripeException { null, null, com.stripe.model.v2.core.AccountPerson.class, - "{\"account\":\"account\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.core.account_person\",\"updated\":\"1970-01-03T17:07:10.277Z\",\"livemode\":true}"); + "{\"object\":\"v2.core.account_person\",\"account\":\"account\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"updated\":\"1970-01-03T17:07:10.277Z\"}"); StripeClient client = new StripeClient(networkSpy); com.stripe.model.v2.core.AccountPerson accountPerson = @@ -24720,7 +24720,7 @@ public void testV2CoreAccountsPersonPost2Services() throws StripeException { null, null, com.stripe.model.v2.core.AccountPerson.class, - "{\"account\":\"account\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.core.account_person\",\"updated\":\"1970-01-03T17:07:10.277Z\",\"livemode\":true}"); + "{\"object\":\"v2.core.account_person\",\"account\":\"account\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"updated\":\"1970-01-03T17:07:10.277Z\"}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.core.accounts.PersonUpdateParams params = @@ -24746,7 +24746,7 @@ public void testV2CoreAccountsPersonTokenPostServices() throws StripeException { null, null, com.stripe.model.v2.core.AccountPersonToken.class, - "{\"created\":\"1970-01-12T21:42:34.472Z\",\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"id\":\"obj_123\",\"livemode\":true,\"object\":\"v2.core.account_person_token\",\"used\":true}"); + "{\"object\":\"v2.core.account_person_token\",\"created\":\"1970-01-12T21:42:34.472Z\",\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"id\":\"obj_123\",\"livemode\":true,\"used\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.core.accounts.PersonTokenCreateParams params = @@ -24772,7 +24772,7 @@ public void testV2CoreAccountsPersonTokenGetServices() throws StripeException { null, null, com.stripe.model.v2.core.AccountPersonToken.class, - "{\"created\":\"1970-01-12T21:42:34.472Z\",\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"id\":\"obj_123\",\"livemode\":true,\"object\":\"v2.core.account_person_token\",\"used\":true}"); + "{\"object\":\"v2.core.account_person_token\",\"created\":\"1970-01-12T21:42:34.472Z\",\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"id\":\"obj_123\",\"livemode\":true,\"used\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.model.v2.core.AccountPersonToken accountPersonToken = @@ -24795,7 +24795,7 @@ public void testV2CoreAccountLinkPostServices() throws StripeException { null, null, com.stripe.model.v2.core.AccountLink.class, - "{\"account\":\"account\",\"created\":\"1970-01-12T21:42:34.472Z\",\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"object\":\"v2.core.account_link\",\"url\":\"url\",\"use_case\":{\"type\":\"account_onboarding\"},\"livemode\":true}"); + "{\"object\":\"v2.core.account_link\",\"account\":\"account\",\"created\":\"1970-01-12T21:42:34.472Z\",\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"livemode\":true,\"url\":\"url\",\"use_case\":{\"type\":\"account_onboarding\"}}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.core.AccountLinkCreateParams params = @@ -24803,9 +24803,6 @@ public void testV2CoreAccountLinkPostServices() throws StripeException { .setAccount("account") .setUseCase( com.stripe.param.v2.core.AccountLinkCreateParams.UseCase.builder() - .setType( - com.stripe.param.v2.core.AccountLinkCreateParams.UseCase.Type - .ACCOUNT_ONBOARDING) .setAccountOnboarding( com.stripe.param.v2.core.AccountLinkCreateParams.UseCase.AccountOnboarding .builder() @@ -24847,6 +24844,9 @@ public void testV2CoreAccountLinkPostServices() throws StripeException { .setRefreshUrl("refresh_url") .setReturnUrl("return_url") .build()) + .setType( + com.stripe.param.v2.core.AccountLinkCreateParams.UseCase.Type + .ACCOUNT_ONBOARDING) .build()) .build(); @@ -24870,7 +24870,7 @@ public void testV2CoreAccountTokenPostServices() throws StripeException { null, null, com.stripe.model.v2.core.AccountToken.class, - "{\"created\":\"1970-01-12T21:42:34.472Z\",\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"id\":\"obj_123\",\"livemode\":true,\"object\":\"v2.core.account_token\",\"used\":true}"); + "{\"object\":\"v2.core.account_token\",\"created\":\"1970-01-12T21:42:34.472Z\",\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"id\":\"obj_123\",\"livemode\":true,\"used\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.core.AccountTokenCreateParams params = @@ -24896,7 +24896,7 @@ public void testV2CoreAccountTokenGetServices() throws StripeException { null, null, com.stripe.model.v2.core.AccountToken.class, - "{\"created\":\"1970-01-12T21:42:34.472Z\",\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"id\":\"obj_123\",\"livemode\":true,\"object\":\"v2.core.account_token\",\"used\":true}"); + "{\"object\":\"v2.core.account_token\",\"created\":\"1970-01-12T21:42:34.472Z\",\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"id\":\"obj_123\",\"livemode\":true,\"used\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.model.v2.core.AccountToken accountToken = @@ -24920,7 +24920,7 @@ public void testV2CoreEventGetServices() throws StripeException { null, new TypeToken< com.stripe.model.v2.StripeCollection>() {}.getType(), - "{\"data\":[{\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"object\":\"v2.core.event\",\"type\":\"type\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"object\":\"v2.core.event\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"type\":\"type\"}],\"next_page_url\":null,\"previous_page_url\":null}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.core.EventListParams params = @@ -24942,7 +24942,7 @@ public void testV2CoreEventGet2Services() throws StripeException { null, null, com.stripe.model.v2.core.Event.class, - "{\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"object\":\"v2.core.event\",\"type\":\"type\"}"); + "{\"object\":\"v2.core.event\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"type\":\"type\"}"); StripeClient client = new StripeClient(networkSpy); com.stripe.model.v2.core.Event event = client.v2().core().events().retrieve("id_123"); @@ -24962,7 +24962,7 @@ public void testV2CoreEventDestinationGetServices() throws StripeException { new TypeToken< com.stripe.model.v2.StripeCollection< com.stripe.model.v2.core.EventDestination>>() {}.getType(), - "{\"data\":[{\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"enabled_events\":[\"enabled_events\"],\"event_payload\":\"thin\",\"id\":\"obj_123\",\"name\":\"name\",\"object\":\"v2.core.event_destination\",\"status\":\"disabled\",\"type\":\"amazon_eventbridge\",\"updated\":\"1970-01-03T17:07:10.277Z\",\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"object\":\"v2.core.event_destination\",\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"enabled_events\":[\"enabled_events\"],\"event_payload\":\"thin\",\"id\":\"obj_123\",\"livemode\":true,\"name\":\"name\",\"status\":\"disabled\",\"type\":\"amazon_eventbridge\",\"updated\":\"1970-01-03T17:07:10.277Z\"}],\"next_page_url\":null,\"previous_page_url\":null}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.core.EventDestinationListParams params = @@ -24988,7 +24988,7 @@ public void testV2CoreEventDestinationPostServices() throws StripeException { null, null, com.stripe.model.v2.core.EventDestination.class, - "{\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"enabled_events\":[\"enabled_events\"],\"event_payload\":\"thin\",\"id\":\"obj_123\",\"name\":\"name\",\"object\":\"v2.core.event_destination\",\"status\":\"disabled\",\"type\":\"amazon_eventbridge\",\"updated\":\"1970-01-03T17:07:10.277Z\",\"livemode\":true}"); + "{\"object\":\"v2.core.event_destination\",\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"enabled_events\":[\"enabled_events\"],\"event_payload\":\"thin\",\"id\":\"obj_123\",\"livemode\":true,\"name\":\"name\",\"status\":\"disabled\",\"type\":\"amazon_eventbridge\",\"updated\":\"1970-01-03T17:07:10.277Z\"}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.core.EventDestinationCreateParams params = @@ -25043,7 +25043,7 @@ public void testV2CoreEventDestinationGet2Services() throws StripeException { null, null, com.stripe.model.v2.core.EventDestination.class, - "{\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"enabled_events\":[\"enabled_events\"],\"event_payload\":\"thin\",\"id\":\"obj_123\",\"name\":\"name\",\"object\":\"v2.core.event_destination\",\"status\":\"disabled\",\"type\":\"amazon_eventbridge\",\"updated\":\"1970-01-03T17:07:10.277Z\",\"livemode\":true}"); + "{\"object\":\"v2.core.event_destination\",\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"enabled_events\":[\"enabled_events\"],\"event_payload\":\"thin\",\"id\":\"obj_123\",\"livemode\":true,\"name\":\"name\",\"status\":\"disabled\",\"type\":\"amazon_eventbridge\",\"updated\":\"1970-01-03T17:07:10.277Z\"}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.core.EventDestinationRetrieveParams params = @@ -25069,7 +25069,7 @@ public void testV2CoreEventDestinationPost2Services() throws StripeException { null, null, com.stripe.model.v2.core.EventDestination.class, - "{\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"enabled_events\":[\"enabled_events\"],\"event_payload\":\"thin\",\"id\":\"obj_123\",\"name\":\"name\",\"object\":\"v2.core.event_destination\",\"status\":\"disabled\",\"type\":\"amazon_eventbridge\",\"updated\":\"1970-01-03T17:07:10.277Z\",\"livemode\":true}"); + "{\"object\":\"v2.core.event_destination\",\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"enabled_events\":[\"enabled_events\"],\"event_payload\":\"thin\",\"id\":\"obj_123\",\"livemode\":true,\"name\":\"name\",\"status\":\"disabled\",\"type\":\"amazon_eventbridge\",\"updated\":\"1970-01-03T17:07:10.277Z\"}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.core.EventDestinationUpdateParams params = @@ -25095,7 +25095,7 @@ public void testV2CoreEventDestinationPost3Services() throws StripeException { null, null, com.stripe.model.v2.core.EventDestination.class, - "{\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"enabled_events\":[\"enabled_events\"],\"event_payload\":\"thin\",\"id\":\"obj_123\",\"name\":\"name\",\"object\":\"v2.core.event_destination\",\"status\":\"disabled\",\"type\":\"amazon_eventbridge\",\"updated\":\"1970-01-03T17:07:10.277Z\",\"livemode\":true}"); + "{\"object\":\"v2.core.event_destination\",\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"enabled_events\":[\"enabled_events\"],\"event_payload\":\"thin\",\"id\":\"obj_123\",\"livemode\":true,\"name\":\"name\",\"status\":\"disabled\",\"type\":\"amazon_eventbridge\",\"updated\":\"1970-01-03T17:07:10.277Z\"}"); StripeClient client = new StripeClient(networkSpy); com.stripe.model.v2.core.EventDestination eventDestination = @@ -25118,7 +25118,7 @@ public void testV2CoreEventDestinationPost4Services() throws StripeException { null, null, com.stripe.model.v2.core.EventDestination.class, - "{\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"enabled_events\":[\"enabled_events\"],\"event_payload\":\"thin\",\"id\":\"obj_123\",\"name\":\"name\",\"object\":\"v2.core.event_destination\",\"status\":\"disabled\",\"type\":\"amazon_eventbridge\",\"updated\":\"1970-01-03T17:07:10.277Z\",\"livemode\":true}"); + "{\"object\":\"v2.core.event_destination\",\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"enabled_events\":[\"enabled_events\"],\"event_payload\":\"thin\",\"id\":\"obj_123\",\"livemode\":true,\"name\":\"name\",\"status\":\"disabled\",\"type\":\"amazon_eventbridge\",\"updated\":\"1970-01-03T17:07:10.277Z\"}"); StripeClient client = new StripeClient(networkSpy); com.stripe.model.v2.core.EventDestination eventDestination = @@ -25141,7 +25141,7 @@ public void testV2CoreEventDestinationPost5Services() throws StripeException { null, null, com.stripe.model.v2.core.Event.class, - "{\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"object\":\"v2.core.event\",\"type\":\"type\"}"); + "{\"object\":\"v2.core.event\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"type\":\"type\"}"); StripeClient client = new StripeClient(networkSpy); com.stripe.model.v2.core.Event event = client.v2().core().eventDestinations().ping("id_123"); From 373cf5b2a23054cf73904c4f9b59de792776d099 Mon Sep 17 00:00:00 2001 From: Michael Broshi Date: Thu, 23 Apr 2026 20:10:52 -0400 Subject: [PATCH 2/3] Bump version to 32.1.0 --- CHANGELOG.md | 34 ++++++++++++++++++++++++++++ README.md | 10 ++++---- VERSION | 2 +- gradle.properties | 2 +- src/main/java/com/stripe/Stripe.java | 2 +- 5 files changed, 42 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8a5865fee46..e7175272dc0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,39 @@ # Changelog +## 32.1.0 - 2026-04-23 +This release changes the pinned API version to 2026-04-22.dahlia. + +* [#2203](https://github.com/stripe/stripe-java/pull/2203) Update generated code + * Add support for `balanceReport` and `payoutReconciliationReport` on `AccountSession.components` and `AccountSessionCreateParams.components` + * Add support for `appDistribution` and `sunbitPayments` on `Account.capabilities`, `AccountCreateParams.capabilities`, and `AccountUpdateParams.capabilities` + * Add support for `sunbit` on `Charge.payment_method_details`, `ConfirmationToken.payment_method_preview`, `ConfirmationTokenCreateParams.payment_method_data`, `PaymentAttemptRecord.payment_method_details`, `PaymentIntentConfirmParams.payment_method_data`, `PaymentIntentCreateParams.payment_method_data`, `PaymentIntentUpdateParams.payment_method_data`, `PaymentMethodConfigurationCreateParams`, `PaymentMethodConfigurationUpdateParams`, `PaymentMethodConfiguration`, `PaymentMethodCreateParams`, `PaymentMethod`, `PaymentRecord.payment_method_details`, `SetupIntentConfirmParams.payment_method_data`, `SetupIntentCreateParams.payment_method_data`, and `SetupIntentUpdateParams.payment_method_data` + * Add support for `location` and `reader` on `Charge.payment_method_details.klarna`, `PaymentAttemptRecord.payment_method_details.klarna`, and `PaymentRecord.payment_method_details.klarna` + * Add support for `mandate` on `Charge.payment_method_details.pix`, `PaymentAttemptRecord.payment_method_details.pix`, and `PaymentRecord.payment_method_details.pix` + * Add support for `managedPayments` on `PaymentIntent`, `PaymentLinkCreateParams`, `PaymentLink`, `SetupIntent`, `Subscription`, `checkout.SessionCreateParams`, and `checkout.Session` + * Add support for new value `sunbit` on enums `PaymentIntentConfirmParams.excludedPaymentMethodTypes`, `PaymentIntentCreateParams.excludedPaymentMethodTypes`, `PaymentIntentUpdateParams.excludedPaymentMethodTypes`, `SetupIntentCreateParams.excludedPaymentMethodTypes`, `SetupIntentUpdateParams.excludedPaymentMethodTypes`, and `checkout.SessionCreateParams.excludedPaymentMethodTypes` + * Add support for `mandateOptions` on `PaymentIntent.payment_method_options.pix`, `PaymentIntentConfirmParams.payment_method_options.pix`, `PaymentIntentCreateParams.payment_method_options.pix`, `PaymentIntentUpdateParams.payment_method_options.pix`, `checkout.Session.payment_method_options.pix`, and `checkout.SessionCreateParams.payment_method_options.pix` + * Change type of `PaymentIntentConfirmParams.payment_method_options.pix.setupFutureUsage`, `PaymentIntentCreateParams.payment_method_options.pix.setupFutureUsage`, `PaymentIntentUpdateParams.payment_method_options.pix.setupFutureUsage`, and `checkout.SessionCreateParams.payment_method_options.pix.setupFutureUsage` from `literal('none')` to `enum('none'|'off_session')` + * Add support for new value `sunbit` on enum `checkout.SessionCreateParams.paymentMethodTypes` + * ⚠️ Change type of `PaymentIntent.payment_method_options.pix.setupFutureUsage` and `checkout.Session.payment_method_options.pix.setupFutureUsage` from `literal('none')` to `enum('none'|'off_session')` + * Add support for new value `sunbit` on enums `ConfirmationTokenCreateParams.payment_method_data.type`, `PaymentIntentConfirmParams.payment_method_data.type`, `PaymentIntentCreateParams.payment_method_data.type`, `PaymentIntentUpdateParams.payment_method_data.type`, `SetupIntentConfirmParams.payment_method_data.type`, `SetupIntentCreateParams.payment_method_data.type`, and `SetupIntentUpdateParams.payment_method_data.type` + * Add support for new values `fo_vat`, `gi_tin`, `it_cf`, and `py_ruc` on enums `CustomerCreateParams.tax_id_data[].type`, `InvoiceCreatePreviewParams.customer_details.tax_ids[].type`, `TaxIdCreateParams.type`, and `tax.CalculationCreateParams.customer_details.tax_ids[].type` + * Add support for new value `sunbit` on enums `CustomerListPaymentMethodsParams.type`, `PaymentMethodCreateParams.type`, and `PaymentMethodListParams.type` + * Add support for `pix` on `Invoice.payment_settings.payment_method_options`, `InvoiceCreateParams.payment_settings.payment_method_options`, `InvoiceUpdateParams.payment_settings.payment_method_options`, `Mandate.payment_method_details`, `SetupAttempt.payment_method_details`, `SetupIntent.payment_method_options`, `SetupIntentConfirmParams.payment_method_options`, `SetupIntentCreateParams.payment_method_options`, `SetupIntentUpdateParams.payment_method_options`, `Subscription.payment_settings.payment_method_options`, `SubscriptionCreateParams.payment_settings.payment_method_options`, and `SubscriptionUpdateParams.payment_settings.payment_method_options` + * Add support for `upi` on `Invoice.payment_settings.payment_method_options`, `InvoiceCreateParams.payment_settings.payment_method_options`, `InvoiceUpdateParams.payment_settings.payment_method_options`, `Subscription.payment_settings.payment_method_options`, `SubscriptionCreateParams.payment_settings.payment_method_options`, and `SubscriptionUpdateParams.payment_settings.payment_method_options` + * Add support for new values `pix` and `upi` on enums `InvoiceCreateParams.payment_settings.paymentMethodTypes`, `InvoiceUpdateParams.payment_settings.paymentMethodTypes`, `SubscriptionCreateParams.payment_settings.paymentMethodTypes`, and `SubscriptionUpdateParams.payment_settings.paymentMethodTypes` + * Add support for `cardPresence` on `issuing.Authorization` + * Add support for `allowedCardPresences` and `blockedCardPresences` on `issuing.Card.spending_controls`, `issuing.CardCreateParams.spending_controls`, `issuing.CardUpdateParams.spending_controls`, `issuing.Cardholder.spending_controls`, `issuing.CardholderCreateParams.spending_controls`, and `issuing.CardholderUpdateParams.spending_controls` + * Add support for `amount` and `currency` on `Mandate.multi_use` + * Add support for `amountToConfirm` on `PaymentIntentConfirmParams` + * Add support for `klarnaDisplayQrCode` on `PaymentIntent.next_action` + * Add support for new value `sunbit` on enums `PaymentLinkCreateParams.paymentMethodTypes` and `PaymentLinkUpdateParams.paymentMethodTypes` + * Add support for new value `account` on enum `radar.ValueListCreateParams.itemType` + * Add support for `moto` on `SetupAttempt.payment_method_details.card` + * Add support for `pixDisplayQrCode` on `SetupIntent.next_action` + * Add support for new value `2026-04-22.dahlia` on enum `WebhookEndpointCreateParams.apiVersion` +* [#2208](https://github.com/stripe/stripe-java/pull/2208) Fix missing stripeContext in RequestOptions.toBuilderFullCopy() + - Fixes a bug where an existing `stripeContext` was being reset to `null` when calling `RequestOptions#toBuilderFullCopy()` + ## 32.0.0 - 2026-03-25 This release changes the pinned API version to `2026-03-25.dahlia` and contains breaking changes (prefixed with ⚠️ below). There's also a [detailed migration guide](https://github.com/stripe/stripe-java/wiki/Migration-guide-for-v32) to simplify your upgrade process. diff --git a/README.md b/README.md index 2642db8fe38..4eb6070520d 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Stripe Java client library -[![Maven Central](https://img.shields.io/badge/maven--central-v32.0.0-blue)](https://mvnrepository.com/artifact/com.stripe/stripe-java) +[![Maven Central](https://img.shields.io/badge/maven--central-v32.1.0-blue)](https://mvnrepository.com/artifact/com.stripe/stripe-java) [![JavaDoc](http://img.shields.io/badge/javadoc-reference-blue.svg)](https://stripe.dev/stripe-java) [![Build Status](https://github.com/stripe/stripe-java/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/stripe/stripe-java/actions?query=branch%3Amaster) @@ -26,7 +26,7 @@ We support LTS versions of the JDK. Currently, that's Java versions: Add this dependency to your project's build file: ```groovy -implementation "com.stripe:stripe-java:32.0.0" +implementation "com.stripe:stripe-java:32.1.0" ``` ### Maven users @@ -37,7 +37,7 @@ Add this dependency to your project's POM: com.stripe stripe-java - 32.0.0 + 32.1.0 ``` @@ -46,8 +46,8 @@ Add this dependency to your project's POM: If you are not using Gradle or Maven, you will need to manually install the following JARs: 1. The Stripe JAR: - - Download the latest release version from [Maven Central](https://repo1.maven.org/maven2/com/stripe/stripe-java/32.0.0/stripe-java-32.0.0.jar) - - Current release version: 32.0.0 + - Download the latest release version from [Maven Central](https://repo1.maven.org/maven2/com/stripe/stripe-java/32.1.0/stripe-java-32.1.0.jar) + - Current release version: 32.1.0 2. Google Gson: - The Stripe JAR builds and tests with Gson version 2.10.1 diff --git a/VERSION b/VERSION index 308b186242c..fe9ca52d156 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -32.0.0 +32.1.0 diff --git a/gradle.properties b/gradle.properties index d7fc85c1409..d0913a937f8 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,5 @@ GROUP=com.stripe -VERSION_NAME=32.0.0 +VERSION_NAME=32.1.0 POM_URL=https://github.com/stripe/stripe-java POM_SCM_URL=git@github.com:stripe/stripe-java.git diff --git a/src/main/java/com/stripe/Stripe.java b/src/main/java/com/stripe/Stripe.java index d4c6c0e531e..8077e07895c 100644 --- a/src/main/java/com/stripe/Stripe.java +++ b/src/main/java/com/stripe/Stripe.java @@ -14,7 +14,7 @@ public abstract class Stripe { public static final String LIVE_API_BASE = "https://api.stripe.com"; public static final String UPLOAD_API_BASE = "https://files.stripe.com"; public static final String METER_EVENTS_API_BASE = "https://meter-events.stripe.com"; - public static final String VERSION = "32.0.0"; + public static final String VERSION = "32.1.0"; public static volatile String apiKey; public static volatile String clientId; From c5b0bbe5fba84e439e35a96c3f1a9ad7a326e84c Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 24 Apr 2026 15:23:25 +0000 Subject: [PATCH 3/3] Update generated code for v2253 and --- CODEGEN_VERSION | 2 +- .../StripeEventNotificationHandler.java | 105 ++++ ...BillingMeterErrorReportTriggeredEvent.java | 5 +- .../V1BillingMeterNoMeterFoundEvent.java | 5 +- ...merceProductCatalogImportsFailedEvent.java | 22 + ...CatalogImportsFailedEventNotification.java | 28 + ...eProductCatalogImportsProcessingEvent.java | 22 + ...logImportsProcessingEventNotification.java | 28 + ...ceProductCatalogImportsSucceededEvent.java | 22 + ...alogImportsSucceededEventNotification.java | 28 + ...atalogImportsSucceededWithErrorsEvent.java | 22 + ...sSucceededWithErrorsEventNotification.java | 29 + .../V2DataReportingQueryRunCreatedEvent.java | 22 + ...rtingQueryRunCreatedEventNotification.java | 27 + .../V2DataReportingQueryRunFailedEvent.java | 22 + ...ortingQueryRunFailedEventNotification.java | 27 + ...V2DataReportingQueryRunSucceededEvent.java | 22 + ...ingQueryRunSucceededEventNotification.java | 27 + .../V2DataReportingQueryRunUpdatedEvent.java | 22 + ...rtingQueryRunUpdatedEventNotification.java | 27 + .../V2ExtendWorkflowRunFailedEvent.java | 44 ++ ...endWorkflowRunFailedEventNotification.java | 27 + .../V2ExtendWorkflowRunStartedEvent.java | 22 + ...ndWorkflowRunStartedEventNotification.java | 27 + .../V2ExtendWorkflowRunSucceededEvent.java | 22 + ...WorkflowRunSucceededEventNotification.java | 27 + ...oneyManagementTransactionCreatedEvent.java | 3 + ...tratedCommerceAgreementConfirmedEvent.java | 63 ++ ...ceAgreementConfirmedEventNotification.java | 28 + ...estratedCommerceAgreementCreatedEvent.java | 67 +++ ...erceAgreementCreatedEventNotification.java | 28 + ...merceAgreementPartiallyConfirmedEvent.java | 63 ++ ...ntPartiallyConfirmedEventNotification.java | 29 + ...ratedCommerceAgreementTerminatedEvent.java | 67 +++ ...eAgreementTerminatedEventNotification.java | 28 + .../exception/CannotProceedException.java | 45 ++ .../com/stripe/exception/StripeException.java | 3 + .../stripe/model/v2/EventDataClassLookup.java | 62 ++ .../v2/EventNotificationClassLookup.java | 46 ++ .../stripe/model/v2/billing/BillSetting.java | 14 +- .../model/v2/billing/BillSettingVersion.java | 10 +- .../com/stripe/model/v2/billing/Cadence.java | 46 +- .../model/v2/billing/CollectionSetting.java | 27 +- .../v2/billing/CollectionSettingVersion.java | 23 +- .../v2/billing/MeterEventAdjustment.java | 9 +- .../model/v2/billing/MeterEventSession.java | 4 +- .../v2/commerce/ProductCatalogImport.java | 260 +++++++++ .../com/stripe/model/v2/core/Account.java | 58 +- .../com/stripe/model/v2/core/BatchJob.java | 84 +-- .../model/v2/core/vault/GbBankAccount.java | 2 +- .../model/v2/data/reporting/QueryRun.java | 170 ++++++ .../com/stripe/model/v2/extend/Workflow.java | 113 ++++ .../stripe/model/v2/extend/WorkflowRun.java | 181 ++++++ .../com/stripe/model/v2/iam/ActivityLog.java | 238 ++++++++ .../v2/moneymanagement/InboundTransfer.java | 25 +- .../v2/moneymanagement/OutboundTransfer.java | 7 +- .../v2/moneymanagement/PayoutMethod.java | 2 +- .../model/v2/moneymanagement/Transaction.java | 6 +- .../v2/moneymanagement/TransactionEntry.java | 6 +- .../model/v2/network/BusinessProfile.java | 101 ++++ .../v2/orchestratedcommerce/Agreement.java | 125 ++++ .../v2/billing/BillSettingCreateParams.java | 16 +- .../v2/billing/BillSettingUpdateParams.java | 22 +- .../param/v2/billing/CadenceCreateParams.java | 80 +-- .../param/v2/billing/CadenceUpdateParams.java | 54 +- .../CollectionSettingCreateParams.java | 198 +++++-- .../CollectionSettingUpdateParams.java | 215 ++++--- .../MeterEventAdjustmentCreateParams.java | 16 +- .../param/v2/billing/ProfileListParams.java | 4 +- .../productcatalog/ImportCreateParams.java | 158 +++++ .../productcatalog/ImportListParams.java | 260 +++++++++ .../param/v2/core/BatchJobCreateParams.java | 5 +- .../core/vault/GbBankAccountCreateParams.java | 8 +- .../data/reporting/QueryRunCreateParams.java | 167 ++++++ .../param/v2/extend/WorkflowInvokeParams.java | 99 ++++ .../param/v2/extend/WorkflowListParams.java | 138 +++++ .../v2/extend/WorkflowRunListParams.java | 174 ++++++ .../param/v2/iam/ActivityLogListParams.java | 205 +++++++ .../OutboundSetupIntentCreateParams.java | 8 +- .../OutboundSetupIntentUpdateParams.java | 8 +- .../AgreementCreateParams.java | 80 +++ .../AgreementListParams.java | 92 +++ .../java/com/stripe/service/V2Services.java | 24 + .../stripe/service/v2/CommerceService.java | 15 + .../com/stripe/service/v2/DatumService.java | 15 + .../com/stripe/service/v2/ExtendService.java | 19 + .../com/stripe/service/v2/IamService.java | 15 + .../com/stripe/service/v2/NetworkService.java | 15 + .../v2/OrchestratedCommerceService.java | 16 + .../v2/billing/MeterEventSessionService.java | 8 +- .../v2/commerce/ProductCatalogService.java | 16 + .../productcatalog/ImportService.java | 80 +++ .../v2/core/accounts/PersonTokenService.java | 32 +- .../service/v2/data/ReportingService.java | 15 + .../v2/data/reporting/QueryRunService.java | 60 ++ .../service/v2/extend/WorkflowRunService.java | 58 ++ .../service/v2/extend/WorkflowService.java | 79 +++ .../service/v2/iam/ActivityLogService.java | 47 ++ .../moneymanagement/PayoutMethodService.java | 9 +- .../v2/network/BusinessProfileService.java | 40 ++ .../AgreementService.java | 103 ++++ .../stripe/functional/GeneratedExamples.java | 542 +++++++++++++++++- 102 files changed, 5548 insertions(+), 393 deletions(-) create mode 100644 src/main/java/com/stripe/events/V2CommerceProductCatalogImportsFailedEvent.java create mode 100644 src/main/java/com/stripe/events/V2CommerceProductCatalogImportsFailedEventNotification.java create mode 100644 src/main/java/com/stripe/events/V2CommerceProductCatalogImportsProcessingEvent.java create mode 100644 src/main/java/com/stripe/events/V2CommerceProductCatalogImportsProcessingEventNotification.java create mode 100644 src/main/java/com/stripe/events/V2CommerceProductCatalogImportsSucceededEvent.java create mode 100644 src/main/java/com/stripe/events/V2CommerceProductCatalogImportsSucceededEventNotification.java create mode 100644 src/main/java/com/stripe/events/V2CommerceProductCatalogImportsSucceededWithErrorsEvent.java create mode 100644 src/main/java/com/stripe/events/V2CommerceProductCatalogImportsSucceededWithErrorsEventNotification.java create mode 100644 src/main/java/com/stripe/events/V2DataReportingQueryRunCreatedEvent.java create mode 100644 src/main/java/com/stripe/events/V2DataReportingQueryRunCreatedEventNotification.java create mode 100644 src/main/java/com/stripe/events/V2DataReportingQueryRunFailedEvent.java create mode 100644 src/main/java/com/stripe/events/V2DataReportingQueryRunFailedEventNotification.java create mode 100644 src/main/java/com/stripe/events/V2DataReportingQueryRunSucceededEvent.java create mode 100644 src/main/java/com/stripe/events/V2DataReportingQueryRunSucceededEventNotification.java create mode 100644 src/main/java/com/stripe/events/V2DataReportingQueryRunUpdatedEvent.java create mode 100644 src/main/java/com/stripe/events/V2DataReportingQueryRunUpdatedEventNotification.java create mode 100644 src/main/java/com/stripe/events/V2ExtendWorkflowRunFailedEvent.java create mode 100644 src/main/java/com/stripe/events/V2ExtendWorkflowRunFailedEventNotification.java create mode 100644 src/main/java/com/stripe/events/V2ExtendWorkflowRunStartedEvent.java create mode 100644 src/main/java/com/stripe/events/V2ExtendWorkflowRunStartedEventNotification.java create mode 100644 src/main/java/com/stripe/events/V2ExtendWorkflowRunSucceededEvent.java create mode 100644 src/main/java/com/stripe/events/V2ExtendWorkflowRunSucceededEventNotification.java create mode 100644 src/main/java/com/stripe/events/V2OrchestratedCommerceAgreementConfirmedEvent.java create mode 100644 src/main/java/com/stripe/events/V2OrchestratedCommerceAgreementConfirmedEventNotification.java create mode 100644 src/main/java/com/stripe/events/V2OrchestratedCommerceAgreementCreatedEvent.java create mode 100644 src/main/java/com/stripe/events/V2OrchestratedCommerceAgreementCreatedEventNotification.java create mode 100644 src/main/java/com/stripe/events/V2OrchestratedCommerceAgreementPartiallyConfirmedEvent.java create mode 100644 src/main/java/com/stripe/events/V2OrchestratedCommerceAgreementPartiallyConfirmedEventNotification.java create mode 100644 src/main/java/com/stripe/events/V2OrchestratedCommerceAgreementTerminatedEvent.java create mode 100644 src/main/java/com/stripe/events/V2OrchestratedCommerceAgreementTerminatedEventNotification.java create mode 100644 src/main/java/com/stripe/exception/CannotProceedException.java create mode 100644 src/main/java/com/stripe/model/v2/commerce/ProductCatalogImport.java create mode 100644 src/main/java/com/stripe/model/v2/data/reporting/QueryRun.java create mode 100644 src/main/java/com/stripe/model/v2/extend/Workflow.java create mode 100644 src/main/java/com/stripe/model/v2/extend/WorkflowRun.java create mode 100644 src/main/java/com/stripe/model/v2/iam/ActivityLog.java create mode 100644 src/main/java/com/stripe/model/v2/network/BusinessProfile.java create mode 100644 src/main/java/com/stripe/model/v2/orchestratedcommerce/Agreement.java create mode 100644 src/main/java/com/stripe/param/v2/commerce/productcatalog/ImportCreateParams.java create mode 100644 src/main/java/com/stripe/param/v2/commerce/productcatalog/ImportListParams.java create mode 100644 src/main/java/com/stripe/param/v2/data/reporting/QueryRunCreateParams.java create mode 100644 src/main/java/com/stripe/param/v2/extend/WorkflowInvokeParams.java create mode 100644 src/main/java/com/stripe/param/v2/extend/WorkflowListParams.java create mode 100644 src/main/java/com/stripe/param/v2/extend/WorkflowRunListParams.java create mode 100644 src/main/java/com/stripe/param/v2/iam/ActivityLogListParams.java create mode 100644 src/main/java/com/stripe/param/v2/orchestratedcommerce/AgreementCreateParams.java create mode 100644 src/main/java/com/stripe/param/v2/orchestratedcommerce/AgreementListParams.java create mode 100644 src/main/java/com/stripe/service/v2/CommerceService.java create mode 100644 src/main/java/com/stripe/service/v2/DatumService.java create mode 100644 src/main/java/com/stripe/service/v2/ExtendService.java create mode 100644 src/main/java/com/stripe/service/v2/IamService.java create mode 100644 src/main/java/com/stripe/service/v2/NetworkService.java create mode 100644 src/main/java/com/stripe/service/v2/OrchestratedCommerceService.java create mode 100644 src/main/java/com/stripe/service/v2/commerce/ProductCatalogService.java create mode 100644 src/main/java/com/stripe/service/v2/commerce/productcatalog/ImportService.java create mode 100644 src/main/java/com/stripe/service/v2/data/ReportingService.java create mode 100644 src/main/java/com/stripe/service/v2/data/reporting/QueryRunService.java create mode 100644 src/main/java/com/stripe/service/v2/extend/WorkflowRunService.java create mode 100644 src/main/java/com/stripe/service/v2/extend/WorkflowService.java create mode 100644 src/main/java/com/stripe/service/v2/iam/ActivityLogService.java create mode 100644 src/main/java/com/stripe/service/v2/network/BusinessProfileService.java create mode 100644 src/main/java/com/stripe/service/v2/orchestratedcommerce/AgreementService.java diff --git a/CODEGEN_VERSION b/CODEGEN_VERSION index 57b376a31d1..4540bccf09f 100644 --- a/CODEGEN_VERSION +++ b/CODEGEN_VERSION @@ -1 +1 @@ -505d252427d8aaae5b38486880ba3550b08958ec \ No newline at end of file +826bf48af8bcd391512daeaf283b8486347b14c8 \ No newline at end of file diff --git a/src/main/java/com/stripe/StripeEventNotificationHandler.java b/src/main/java/com/stripe/StripeEventNotificationHandler.java index de51efb15da..09e29ca4ea0 100644 --- a/src/main/java/com/stripe/StripeEventNotificationHandler.java +++ b/src/main/java/com/stripe/StripeEventNotificationHandler.java @@ -6,6 +6,10 @@ // - as do these comments, explaining the whole thing import com.stripe.events.V1BillingMeterErrorReportTriggeredEventNotification; import com.stripe.events.V1BillingMeterNoMeterFoundEventNotification; +import com.stripe.events.V2CommerceProductCatalogImportsFailedEventNotification; +import com.stripe.events.V2CommerceProductCatalogImportsProcessingEventNotification; +import com.stripe.events.V2CommerceProductCatalogImportsSucceededEventNotification; +import com.stripe.events.V2CommerceProductCatalogImportsSucceededWithErrorsEventNotification; import com.stripe.events.V2CoreAccountClosedEventNotification; import com.stripe.events.V2CoreAccountCreatedEventNotification; import com.stripe.events.V2CoreAccountIncludingConfigurationCustomerCapabilityStatusUpdatedEventNotification; @@ -37,6 +41,13 @@ import com.stripe.events.V2CoreBatchJobValidationFailedEventNotification; import com.stripe.events.V2CoreEventDestinationPingEventNotification; import com.stripe.events.V2CoreHealthEventGenerationFailureResolvedEventNotification; +import com.stripe.events.V2DataReportingQueryRunCreatedEventNotification; +import com.stripe.events.V2DataReportingQueryRunFailedEventNotification; +import com.stripe.events.V2DataReportingQueryRunSucceededEventNotification; +import com.stripe.events.V2DataReportingQueryRunUpdatedEventNotification; +import com.stripe.events.V2ExtendWorkflowRunFailedEventNotification; +import com.stripe.events.V2ExtendWorkflowRunStartedEventNotification; +import com.stripe.events.V2ExtendWorkflowRunSucceededEventNotification; import com.stripe.events.V2MoneyManagementAdjustmentCreatedEventNotification; import com.stripe.events.V2MoneyManagementFinancialAccountCreatedEventNotification; import com.stripe.events.V2MoneyManagementFinancialAccountUpdatedEventNotification; @@ -73,6 +84,10 @@ import com.stripe.events.V2MoneyManagementReceivedDebitUpdatedEventNotification; import com.stripe.events.V2MoneyManagementTransactionCreatedEventNotification; import com.stripe.events.V2MoneyManagementTransactionUpdatedEventNotification; +import com.stripe.events.V2OrchestratedCommerceAgreementConfirmedEventNotification; +import com.stripe.events.V2OrchestratedCommerceAgreementCreatedEventNotification; +import com.stripe.events.V2OrchestratedCommerceAgreementPartiallyConfirmedEventNotification; +import com.stripe.events.V2OrchestratedCommerceAgreementTerminatedEventNotification; import com.stripe.exception.SignatureVerificationException; import com.stripe.model.v2.core.EventNotification; import java.util.ArrayList; @@ -203,6 +218,30 @@ public StripeEventNotificationHandler onV1BillingMeterNoMeterFound( return this; } + public StripeEventNotificationHandler onV2CommerceProductCatalogImportsFailed( + Callback callback) { + this.register("v2.commerce.product_catalog.imports.failed", callback); + return this; + } + + public StripeEventNotificationHandler onV2CommerceProductCatalogImportsProcessing( + Callback callback) { + this.register("v2.commerce.product_catalog.imports.processing", callback); + return this; + } + + public StripeEventNotificationHandler onV2CommerceProductCatalogImportsSucceeded( + Callback callback) { + this.register("v2.commerce.product_catalog.imports.succeeded", callback); + return this; + } + + public StripeEventNotificationHandler onV2CommerceProductCatalogImportsSucceededWithErrors( + Callback callback) { + this.register("v2.commerce.product_catalog.imports.succeeded_with_errors", callback); + return this; + } + public StripeEventNotificationHandler onV2CoreAccountClosed( Callback callback) { this.register("v2.core.account.closed", callback); @@ -401,6 +440,48 @@ public StripeEventNotificationHandler onV2CoreHealthEventGenerationFailureResolv return this; } + public StripeEventNotificationHandler onV2DataReportingQueryRunCreated( + Callback callback) { + this.register("v2.data.reporting.query_run.created", callback); + return this; + } + + public StripeEventNotificationHandler onV2DataReportingQueryRunFailed( + Callback callback) { + this.register("v2.data.reporting.query_run.failed", callback); + return this; + } + + public StripeEventNotificationHandler onV2DataReportingQueryRunSucceeded( + Callback callback) { + this.register("v2.data.reporting.query_run.succeeded", callback); + return this; + } + + public StripeEventNotificationHandler onV2DataReportingQueryRunUpdated( + Callback callback) { + this.register("v2.data.reporting.query_run.updated", callback); + return this; + } + + public StripeEventNotificationHandler onV2ExtendWorkflowRunFailed( + Callback callback) { + this.register("v2.extend.workflow_run.failed", callback); + return this; + } + + public StripeEventNotificationHandler onV2ExtendWorkflowRunStarted( + Callback callback) { + this.register("v2.extend.workflow_run.started", callback); + return this; + } + + public StripeEventNotificationHandler onV2ExtendWorkflowRunSucceeded( + Callback callback) { + this.register("v2.extend.workflow_run.succeeded", callback); + return this; + } + public StripeEventNotificationHandler onV2MoneyManagementAdjustmentCreated( Callback callback) { this.register("v2.money_management.adjustment.created", callback); @@ -616,6 +697,30 @@ public StripeEventNotificationHandler onV2MoneyManagementTransactionUpdated( this.register("v2.money_management.transaction.updated", callback); return this; } + + public StripeEventNotificationHandler onV2OrchestratedCommerceAgreementConfirmed( + Callback callback) { + this.register("v2.orchestrated_commerce.agreement.confirmed", callback); + return this; + } + + public StripeEventNotificationHandler onV2OrchestratedCommerceAgreementCreated( + Callback callback) { + this.register("v2.orchestrated_commerce.agreement.created", callback); + return this; + } + + public StripeEventNotificationHandler onV2OrchestratedCommerceAgreementPartiallyConfirmed( + Callback callback) { + this.register("v2.orchestrated_commerce.agreement.partially_confirmed", callback); + return this; + } + + public StripeEventNotificationHandler onV2OrchestratedCommerceAgreementTerminated( + Callback callback) { + this.register("v2.orchestrated_commerce.agreement.terminated", callback); + return this; + } // notification-handler-methods: The end of the section generated from our OpenAPI spec /** diff --git a/src/main/java/com/stripe/events/V1BillingMeterErrorReportTriggeredEvent.java b/src/main/java/com/stripe/events/V1BillingMeterErrorReportTriggeredEvent.java index 4be0b7018e3..ce740f0c162 100644 --- a/src/main/java/com/stripe/events/V1BillingMeterErrorReportTriggeredEvent.java +++ b/src/main/java/com/stripe/events/V1BillingMeterErrorReportTriggeredEvent.java @@ -47,8 +47,9 @@ public static final class ErrorType { * *

One of {@code archived_meter}, {@code meter_event_customer_not_found}, {@code * meter_event_dimension_count_too_high}, {@code meter_event_invalid_value}, {@code - * meter_event_no_customer_defined}, {@code missing_dimension_payload_keys}, {@code - * no_meter}, {@code timestamp_in_future}, or {@code timestamp_too_far_in_past}. + * meter_event_no_customer_defined}, {@code meter_event_value_too_many_digits}, {@code + * missing_dimension_payload_keys}, {@code no_meter}, {@code timestamp_in_future}, or {@code + * timestamp_too_far_in_past}. */ @SerializedName("code") String code; diff --git a/src/main/java/com/stripe/events/V1BillingMeterNoMeterFoundEvent.java b/src/main/java/com/stripe/events/V1BillingMeterNoMeterFoundEvent.java index a1fc6e3bbf0..f59b7a735af 100644 --- a/src/main/java/com/stripe/events/V1BillingMeterNoMeterFoundEvent.java +++ b/src/main/java/com/stripe/events/V1BillingMeterNoMeterFoundEvent.java @@ -44,8 +44,9 @@ public static final class ErrorType { * *

One of {@code archived_meter}, {@code meter_event_customer_not_found}, {@code * meter_event_dimension_count_too_high}, {@code meter_event_invalid_value}, {@code - * meter_event_no_customer_defined}, {@code missing_dimension_payload_keys}, {@code - * no_meter}, {@code timestamp_in_future}, or {@code timestamp_too_far_in_past}. + * meter_event_no_customer_defined}, {@code meter_event_value_too_many_digits}, {@code + * missing_dimension_payload_keys}, {@code no_meter}, {@code timestamp_in_future}, or {@code + * timestamp_too_far_in_past}. */ @SerializedName("code") String code; diff --git a/src/main/java/com/stripe/events/V2CommerceProductCatalogImportsFailedEvent.java b/src/main/java/com/stripe/events/V2CommerceProductCatalogImportsFailedEvent.java new file mode 100644 index 00000000000..7cea84025a9 --- /dev/null +++ b/src/main/java/com/stripe/events/V2CommerceProductCatalogImportsFailedEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.commerce.ProductCatalogImport; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import lombok.Getter; + +@Getter +public final class V2CommerceProductCatalogImportsFailedEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public ProductCatalogImport fetchRelatedObject() throws StripeException { + return (ProductCatalogImport) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V2CommerceProductCatalogImportsFailedEventNotification.java b/src/main/java/com/stripe/events/V2CommerceProductCatalogImportsFailedEventNotification.java new file mode 100644 index 00000000000..05777d17845 --- /dev/null +++ b/src/main/java/com/stripe/events/V2CommerceProductCatalogImportsFailedEventNotification.java @@ -0,0 +1,28 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.commerce.ProductCatalogImport; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import lombok.Getter; + +@Getter +public final class V2CommerceProductCatalogImportsFailedEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public ProductCatalogImport fetchRelatedObject() throws StripeException { + return (ProductCatalogImport) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2CommerceProductCatalogImportsFailedEvent fetchEvent() throws StripeException { + return (V2CommerceProductCatalogImportsFailedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2CommerceProductCatalogImportsProcessingEvent.java b/src/main/java/com/stripe/events/V2CommerceProductCatalogImportsProcessingEvent.java new file mode 100644 index 00000000000..c5274364e37 --- /dev/null +++ b/src/main/java/com/stripe/events/V2CommerceProductCatalogImportsProcessingEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.commerce.ProductCatalogImport; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import lombok.Getter; + +@Getter +public final class V2CommerceProductCatalogImportsProcessingEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public ProductCatalogImport fetchRelatedObject() throws StripeException { + return (ProductCatalogImport) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V2CommerceProductCatalogImportsProcessingEventNotification.java b/src/main/java/com/stripe/events/V2CommerceProductCatalogImportsProcessingEventNotification.java new file mode 100644 index 00000000000..5cb5701b1bd --- /dev/null +++ b/src/main/java/com/stripe/events/V2CommerceProductCatalogImportsProcessingEventNotification.java @@ -0,0 +1,28 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.commerce.ProductCatalogImport; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import lombok.Getter; + +@Getter +public final class V2CommerceProductCatalogImportsProcessingEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public ProductCatalogImport fetchRelatedObject() throws StripeException { + return (ProductCatalogImport) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2CommerceProductCatalogImportsProcessingEvent fetchEvent() throws StripeException { + return (V2CommerceProductCatalogImportsProcessingEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2CommerceProductCatalogImportsSucceededEvent.java b/src/main/java/com/stripe/events/V2CommerceProductCatalogImportsSucceededEvent.java new file mode 100644 index 00000000000..82958418a48 --- /dev/null +++ b/src/main/java/com/stripe/events/V2CommerceProductCatalogImportsSucceededEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.commerce.ProductCatalogImport; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import lombok.Getter; + +@Getter +public final class V2CommerceProductCatalogImportsSucceededEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public ProductCatalogImport fetchRelatedObject() throws StripeException { + return (ProductCatalogImport) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V2CommerceProductCatalogImportsSucceededEventNotification.java b/src/main/java/com/stripe/events/V2CommerceProductCatalogImportsSucceededEventNotification.java new file mode 100644 index 00000000000..d871e127c5a --- /dev/null +++ b/src/main/java/com/stripe/events/V2CommerceProductCatalogImportsSucceededEventNotification.java @@ -0,0 +1,28 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.commerce.ProductCatalogImport; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import lombok.Getter; + +@Getter +public final class V2CommerceProductCatalogImportsSucceededEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public ProductCatalogImport fetchRelatedObject() throws StripeException { + return (ProductCatalogImport) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2CommerceProductCatalogImportsSucceededEvent fetchEvent() throws StripeException { + return (V2CommerceProductCatalogImportsSucceededEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2CommerceProductCatalogImportsSucceededWithErrorsEvent.java b/src/main/java/com/stripe/events/V2CommerceProductCatalogImportsSucceededWithErrorsEvent.java new file mode 100644 index 00000000000..24fff4734fd --- /dev/null +++ b/src/main/java/com/stripe/events/V2CommerceProductCatalogImportsSucceededWithErrorsEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.commerce.ProductCatalogImport; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import lombok.Getter; + +@Getter +public final class V2CommerceProductCatalogImportsSucceededWithErrorsEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public ProductCatalogImport fetchRelatedObject() throws StripeException { + return (ProductCatalogImport) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V2CommerceProductCatalogImportsSucceededWithErrorsEventNotification.java b/src/main/java/com/stripe/events/V2CommerceProductCatalogImportsSucceededWithErrorsEventNotification.java new file mode 100644 index 00000000000..604ea3f96c6 --- /dev/null +++ b/src/main/java/com/stripe/events/V2CommerceProductCatalogImportsSucceededWithErrorsEventNotification.java @@ -0,0 +1,29 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.commerce.ProductCatalogImport; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import lombok.Getter; + +@Getter +public final class V2CommerceProductCatalogImportsSucceededWithErrorsEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public ProductCatalogImport fetchRelatedObject() throws StripeException { + return (ProductCatalogImport) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2CommerceProductCatalogImportsSucceededWithErrorsEvent fetchEvent() + throws StripeException { + return (V2CommerceProductCatalogImportsSucceededWithErrorsEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2DataReportingQueryRunCreatedEvent.java b/src/main/java/com/stripe/events/V2DataReportingQueryRunCreatedEvent.java new file mode 100644 index 00000000000..fc47f1897da --- /dev/null +++ b/src/main/java/com/stripe/events/V2DataReportingQueryRunCreatedEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.data.reporting.QueryRun; +import lombok.Getter; + +@Getter +public final class V2DataReportingQueryRunCreatedEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public QueryRun fetchRelatedObject() throws StripeException { + return (QueryRun) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V2DataReportingQueryRunCreatedEventNotification.java b/src/main/java/com/stripe/events/V2DataReportingQueryRunCreatedEventNotification.java new file mode 100644 index 00000000000..7b5085e303c --- /dev/null +++ b/src/main/java/com/stripe/events/V2DataReportingQueryRunCreatedEventNotification.java @@ -0,0 +1,27 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import com.stripe.model.v2.data.reporting.QueryRun; +import lombok.Getter; + +@Getter +public final class V2DataReportingQueryRunCreatedEventNotification extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public QueryRun fetchRelatedObject() throws StripeException { + return (QueryRun) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2DataReportingQueryRunCreatedEvent fetchEvent() throws StripeException { + return (V2DataReportingQueryRunCreatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2DataReportingQueryRunFailedEvent.java b/src/main/java/com/stripe/events/V2DataReportingQueryRunFailedEvent.java new file mode 100644 index 00000000000..734c0e28e71 --- /dev/null +++ b/src/main/java/com/stripe/events/V2DataReportingQueryRunFailedEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.data.reporting.QueryRun; +import lombok.Getter; + +@Getter +public final class V2DataReportingQueryRunFailedEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public QueryRun fetchRelatedObject() throws StripeException { + return (QueryRun) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V2DataReportingQueryRunFailedEventNotification.java b/src/main/java/com/stripe/events/V2DataReportingQueryRunFailedEventNotification.java new file mode 100644 index 00000000000..9ddb13d3e18 --- /dev/null +++ b/src/main/java/com/stripe/events/V2DataReportingQueryRunFailedEventNotification.java @@ -0,0 +1,27 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import com.stripe.model.v2.data.reporting.QueryRun; +import lombok.Getter; + +@Getter +public final class V2DataReportingQueryRunFailedEventNotification extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public QueryRun fetchRelatedObject() throws StripeException { + return (QueryRun) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2DataReportingQueryRunFailedEvent fetchEvent() throws StripeException { + return (V2DataReportingQueryRunFailedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2DataReportingQueryRunSucceededEvent.java b/src/main/java/com/stripe/events/V2DataReportingQueryRunSucceededEvent.java new file mode 100644 index 00000000000..c475f3b010d --- /dev/null +++ b/src/main/java/com/stripe/events/V2DataReportingQueryRunSucceededEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.data.reporting.QueryRun; +import lombok.Getter; + +@Getter +public final class V2DataReportingQueryRunSucceededEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public QueryRun fetchRelatedObject() throws StripeException { + return (QueryRun) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V2DataReportingQueryRunSucceededEventNotification.java b/src/main/java/com/stripe/events/V2DataReportingQueryRunSucceededEventNotification.java new file mode 100644 index 00000000000..881348c6df3 --- /dev/null +++ b/src/main/java/com/stripe/events/V2DataReportingQueryRunSucceededEventNotification.java @@ -0,0 +1,27 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import com.stripe.model.v2.data.reporting.QueryRun; +import lombok.Getter; + +@Getter +public final class V2DataReportingQueryRunSucceededEventNotification extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public QueryRun fetchRelatedObject() throws StripeException { + return (QueryRun) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2DataReportingQueryRunSucceededEvent fetchEvent() throws StripeException { + return (V2DataReportingQueryRunSucceededEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2DataReportingQueryRunUpdatedEvent.java b/src/main/java/com/stripe/events/V2DataReportingQueryRunUpdatedEvent.java new file mode 100644 index 00000000000..2ba22efb6ef --- /dev/null +++ b/src/main/java/com/stripe/events/V2DataReportingQueryRunUpdatedEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.data.reporting.QueryRun; +import lombok.Getter; + +@Getter +public final class V2DataReportingQueryRunUpdatedEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public QueryRun fetchRelatedObject() throws StripeException { + return (QueryRun) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V2DataReportingQueryRunUpdatedEventNotification.java b/src/main/java/com/stripe/events/V2DataReportingQueryRunUpdatedEventNotification.java new file mode 100644 index 00000000000..fba2b6cb655 --- /dev/null +++ b/src/main/java/com/stripe/events/V2DataReportingQueryRunUpdatedEventNotification.java @@ -0,0 +1,27 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import com.stripe.model.v2.data.reporting.QueryRun; +import lombok.Getter; + +@Getter +public final class V2DataReportingQueryRunUpdatedEventNotification extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public QueryRun fetchRelatedObject() throws StripeException { + return (QueryRun) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2DataReportingQueryRunUpdatedEvent fetchEvent() throws StripeException { + return (V2DataReportingQueryRunUpdatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2ExtendWorkflowRunFailedEvent.java b/src/main/java/com/stripe/events/V2ExtendWorkflowRunFailedEvent.java new file mode 100644 index 00000000000..9ffe5427a2f --- /dev/null +++ b/src/main/java/com/stripe/events/V2ExtendWorkflowRunFailedEvent.java @@ -0,0 +1,44 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.extend.WorkflowRun; +import lombok.Getter; +import lombok.Setter; + +@Getter +public final class V2ExtendWorkflowRunFailedEvent extends Event { + /** Data for the v2.extend.workflow_run.failed event. */ + @SerializedName("data") + V2ExtendWorkflowRunFailedEvent.EventData data; + + @Getter + @Setter + public static final class EventData { + /** A Stripe dashboard URL with more information about the Workflow Run failure. */ + @SerializedName("dashboard_url") + String dashboardUrl; + /** Details about the Workflow Run's transition into the FAILED state. */ + @SerializedName("failure_details") + FailureDetails failureDetails; + + public static final class FailureDetails { + /** Optional details about the failure result. */ + @SerializedName("error_message") + String errorMessage; + } + } + + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public WorkflowRun fetchRelatedObject() throws StripeException { + return (WorkflowRun) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V2ExtendWorkflowRunFailedEventNotification.java b/src/main/java/com/stripe/events/V2ExtendWorkflowRunFailedEventNotification.java new file mode 100644 index 00000000000..6c35f4b41f1 --- /dev/null +++ b/src/main/java/com/stripe/events/V2ExtendWorkflowRunFailedEventNotification.java @@ -0,0 +1,27 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import com.stripe.model.v2.extend.WorkflowRun; +import lombok.Getter; + +@Getter +public final class V2ExtendWorkflowRunFailedEventNotification extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public WorkflowRun fetchRelatedObject() throws StripeException { + return (WorkflowRun) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2ExtendWorkflowRunFailedEvent fetchEvent() throws StripeException { + return (V2ExtendWorkflowRunFailedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2ExtendWorkflowRunStartedEvent.java b/src/main/java/com/stripe/events/V2ExtendWorkflowRunStartedEvent.java new file mode 100644 index 00000000000..75ab1044c2d --- /dev/null +++ b/src/main/java/com/stripe/events/V2ExtendWorkflowRunStartedEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.extend.WorkflowRun; +import lombok.Getter; + +@Getter +public final class V2ExtendWorkflowRunStartedEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public WorkflowRun fetchRelatedObject() throws StripeException { + return (WorkflowRun) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V2ExtendWorkflowRunStartedEventNotification.java b/src/main/java/com/stripe/events/V2ExtendWorkflowRunStartedEventNotification.java new file mode 100644 index 00000000000..a3010c6ef5f --- /dev/null +++ b/src/main/java/com/stripe/events/V2ExtendWorkflowRunStartedEventNotification.java @@ -0,0 +1,27 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import com.stripe.model.v2.extend.WorkflowRun; +import lombok.Getter; + +@Getter +public final class V2ExtendWorkflowRunStartedEventNotification extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public WorkflowRun fetchRelatedObject() throws StripeException { + return (WorkflowRun) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2ExtendWorkflowRunStartedEvent fetchEvent() throws StripeException { + return (V2ExtendWorkflowRunStartedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2ExtendWorkflowRunSucceededEvent.java b/src/main/java/com/stripe/events/V2ExtendWorkflowRunSucceededEvent.java new file mode 100644 index 00000000000..5f14d41ca35 --- /dev/null +++ b/src/main/java/com/stripe/events/V2ExtendWorkflowRunSucceededEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.extend.WorkflowRun; +import lombok.Getter; + +@Getter +public final class V2ExtendWorkflowRunSucceededEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public WorkflowRun fetchRelatedObject() throws StripeException { + return (WorkflowRun) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V2ExtendWorkflowRunSucceededEventNotification.java b/src/main/java/com/stripe/events/V2ExtendWorkflowRunSucceededEventNotification.java new file mode 100644 index 00000000000..2cd07140281 --- /dev/null +++ b/src/main/java/com/stripe/events/V2ExtendWorkflowRunSucceededEventNotification.java @@ -0,0 +1,27 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import com.stripe.model.v2.extend.WorkflowRun; +import lombok.Getter; + +@Getter +public final class V2ExtendWorkflowRunSucceededEventNotification extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public WorkflowRun fetchRelatedObject() throws StripeException { + return (WorkflowRun) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2ExtendWorkflowRunSucceededEvent fetchEvent() throws StripeException { + return (V2ExtendWorkflowRunSucceededEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementTransactionCreatedEvent.java b/src/main/java/com/stripe/events/V2MoneyManagementTransactionCreatedEvent.java index 834b719f513..8d41a792822 100644 --- a/src/main/java/com/stripe/events/V2MoneyManagementTransactionCreatedEvent.java +++ b/src/main/java/com/stripe/events/V2MoneyManagementTransactionCreatedEvent.java @@ -18,6 +18,9 @@ public final class V2MoneyManagementTransactionCreatedEvent extends Event { @Getter @Setter public static final class EventData { + /** Id of the v1 Treasury Transaction corresponding to this Transaction. */ + @SerializedName("treasury_transaction") + String treasuryTransaction; /** Id of the v1 Transaction corresponding to this Transaction. */ @SerializedName("v1_id") String v1Id; diff --git a/src/main/java/com/stripe/events/V2OrchestratedCommerceAgreementConfirmedEvent.java b/src/main/java/com/stripe/events/V2OrchestratedCommerceAgreementConfirmedEvent.java new file mode 100644 index 00000000000..e7e9dc91a82 --- /dev/null +++ b/src/main/java/com/stripe/events/V2OrchestratedCommerceAgreementConfirmedEvent.java @@ -0,0 +1,63 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.orchestratedcommerce.Agreement; +import java.time.Instant; +import lombok.Getter; +import lombok.Setter; + +@Getter +public final class V2OrchestratedCommerceAgreementConfirmedEvent extends Event { + /** Data for the v2.orchestrated_commerce.agreement.confirmed event. */ + @SerializedName("data") + V2OrchestratedCommerceAgreementConfirmedEvent.EventData data; + + @Getter + @Setter + public static final class EventData { + /** The time at which the orchestrator confirmed the agreement. */ + @SerializedName("orchestrator_confirmed_at") + Instant orchestratorConfirmedAt; + /** Details about the orchestrator. */ + @SerializedName("orchestrator_details") + OrchestratorDetails orchestratorDetails; + /** The time at which the seller confirmed the agreement. */ + @SerializedName("seller_confirmed_at") + Instant sellerConfirmedAt; + /** Details about the seller. */ + @SerializedName("seller_details") + SellerDetails sellerDetails; + + public static final class OrchestratorDetails { + /** + * The name of the orchestrator. This can be the name of the agent or the name of the + * business. + */ + @SerializedName("name") + String name; + /** The Network ID of the orchestrator. */ + @SerializedName("network_business_profile") + String networkBusinessProfile; + } + + public static final class SellerDetails { + /** The Network ID of the seller. */ + @SerializedName("network_business_profile") + String networkBusinessProfile; + } + } + + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Agreement fetchRelatedObject() throws StripeException { + return (Agreement) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V2OrchestratedCommerceAgreementConfirmedEventNotification.java b/src/main/java/com/stripe/events/V2OrchestratedCommerceAgreementConfirmedEventNotification.java new file mode 100644 index 00000000000..9dcecf8b64b --- /dev/null +++ b/src/main/java/com/stripe/events/V2OrchestratedCommerceAgreementConfirmedEventNotification.java @@ -0,0 +1,28 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import com.stripe.model.v2.orchestratedcommerce.Agreement; +import lombok.Getter; + +@Getter +public final class V2OrchestratedCommerceAgreementConfirmedEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Agreement fetchRelatedObject() throws StripeException { + return (Agreement) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2OrchestratedCommerceAgreementConfirmedEvent fetchEvent() throws StripeException { + return (V2OrchestratedCommerceAgreementConfirmedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2OrchestratedCommerceAgreementCreatedEvent.java b/src/main/java/com/stripe/events/V2OrchestratedCommerceAgreementCreatedEvent.java new file mode 100644 index 00000000000..331ee10cd8e --- /dev/null +++ b/src/main/java/com/stripe/events/V2OrchestratedCommerceAgreementCreatedEvent.java @@ -0,0 +1,67 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.orchestratedcommerce.Agreement; +import java.time.Instant; +import lombok.Getter; +import lombok.Setter; + +@Getter +public final class V2OrchestratedCommerceAgreementCreatedEvent extends Event { + /** Data for the v2.orchestrated_commerce.agreement.created event. */ + @SerializedName("data") + V2OrchestratedCommerceAgreementCreatedEvent.EventData data; + + @Getter + @Setter + public static final class EventData { + /** The time at which the agreement was created. */ + @SerializedName("created") + Instant created; + /** + * The party that initiated the agreement. + * + *

One of {@code orchestrator}, or {@code seller}. + */ + @SerializedName("initiated_by") + String initiatedBy; + /** Details about the orchestrator. */ + @SerializedName("orchestrator_details") + OrchestratorDetails orchestratorDetails; + /** Details about the seller. */ + @SerializedName("seller_details") + SellerDetails sellerDetails; + + public static final class OrchestratorDetails { + /** + * The name of the orchestrator. This can be the name of the agent or the name of the + * business. + */ + @SerializedName("name") + String name; + /** The Network ID of the orchestrator. */ + @SerializedName("network_business_profile") + String networkBusinessProfile; + } + + public static final class SellerDetails { + /** The Network ID of the seller. */ + @SerializedName("network_business_profile") + String networkBusinessProfile; + } + } + + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Agreement fetchRelatedObject() throws StripeException { + return (Agreement) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V2OrchestratedCommerceAgreementCreatedEventNotification.java b/src/main/java/com/stripe/events/V2OrchestratedCommerceAgreementCreatedEventNotification.java new file mode 100644 index 00000000000..2320cedab1a --- /dev/null +++ b/src/main/java/com/stripe/events/V2OrchestratedCommerceAgreementCreatedEventNotification.java @@ -0,0 +1,28 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import com.stripe.model.v2.orchestratedcommerce.Agreement; +import lombok.Getter; + +@Getter +public final class V2OrchestratedCommerceAgreementCreatedEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Agreement fetchRelatedObject() throws StripeException { + return (Agreement) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2OrchestratedCommerceAgreementCreatedEvent fetchEvent() throws StripeException { + return (V2OrchestratedCommerceAgreementCreatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2OrchestratedCommerceAgreementPartiallyConfirmedEvent.java b/src/main/java/com/stripe/events/V2OrchestratedCommerceAgreementPartiallyConfirmedEvent.java new file mode 100644 index 00000000000..1b78a6390ae --- /dev/null +++ b/src/main/java/com/stripe/events/V2OrchestratedCommerceAgreementPartiallyConfirmedEvent.java @@ -0,0 +1,63 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.orchestratedcommerce.Agreement; +import java.time.Instant; +import lombok.Getter; +import lombok.Setter; + +@Getter +public final class V2OrchestratedCommerceAgreementPartiallyConfirmedEvent extends Event { + /** Data for the v2.orchestrated_commerce.agreement.partially_confirmed event. */ + @SerializedName("data") + V2OrchestratedCommerceAgreementPartiallyConfirmedEvent.EventData data; + + @Getter + @Setter + public static final class EventData { + /** The time at which the orchestrator confirmed the agreement. */ + @SerializedName("orchestrator_confirmed_at") + Instant orchestratorConfirmedAt; + /** Details about the orchestrator. */ + @SerializedName("orchestrator_details") + OrchestratorDetails orchestratorDetails; + /** The time at which the seller confirmed the agreement. */ + @SerializedName("seller_confirmed_at") + Instant sellerConfirmedAt; + /** Details about the seller. */ + @SerializedName("seller_details") + SellerDetails sellerDetails; + + public static final class OrchestratorDetails { + /** + * The name of the orchestrator. This can be the name of the agent or the name of the + * business. + */ + @SerializedName("name") + String name; + /** The Network ID of the orchestrator. */ + @SerializedName("network_business_profile") + String networkBusinessProfile; + } + + public static final class SellerDetails { + /** The Network ID of the seller. */ + @SerializedName("network_business_profile") + String networkBusinessProfile; + } + } + + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Agreement fetchRelatedObject() throws StripeException { + return (Agreement) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V2OrchestratedCommerceAgreementPartiallyConfirmedEventNotification.java b/src/main/java/com/stripe/events/V2OrchestratedCommerceAgreementPartiallyConfirmedEventNotification.java new file mode 100644 index 00000000000..2e9de38ed5f --- /dev/null +++ b/src/main/java/com/stripe/events/V2OrchestratedCommerceAgreementPartiallyConfirmedEventNotification.java @@ -0,0 +1,29 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import com.stripe.model.v2.orchestratedcommerce.Agreement; +import lombok.Getter; + +@Getter +public final class V2OrchestratedCommerceAgreementPartiallyConfirmedEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Agreement fetchRelatedObject() throws StripeException { + return (Agreement) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2OrchestratedCommerceAgreementPartiallyConfirmedEvent fetchEvent() + throws StripeException { + return (V2OrchestratedCommerceAgreementPartiallyConfirmedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2OrchestratedCommerceAgreementTerminatedEvent.java b/src/main/java/com/stripe/events/V2OrchestratedCommerceAgreementTerminatedEvent.java new file mode 100644 index 00000000000..bcb3333806c --- /dev/null +++ b/src/main/java/com/stripe/events/V2OrchestratedCommerceAgreementTerminatedEvent.java @@ -0,0 +1,67 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.orchestratedcommerce.Agreement; +import java.time.Instant; +import lombok.Getter; +import lombok.Setter; + +@Getter +public final class V2OrchestratedCommerceAgreementTerminatedEvent extends Event { + /** Data for the v2.orchestrated_commerce.agreement.terminated event. */ + @SerializedName("data") + V2OrchestratedCommerceAgreementTerminatedEvent.EventData data; + + @Getter + @Setter + public static final class EventData { + /** Details about the orchestrator. */ + @SerializedName("orchestrator_details") + OrchestratorDetails orchestratorDetails; + /** Details about the seller. */ + @SerializedName("seller_details") + SellerDetails sellerDetails; + /** The time at which the agreement was terminated. */ + @SerializedName("terminated_at") + Instant terminatedAt; + /** + * The party that terminated the agreement. + * + *

One of {@code orchestrator}, or {@code seller}. + */ + @SerializedName("terminated_by") + String terminatedBy; + + public static final class OrchestratorDetails { + /** + * The name of the orchestrator. This can be the name of the agent or the name of the + * business. + */ + @SerializedName("name") + String name; + /** The Network ID of the orchestrator. */ + @SerializedName("network_business_profile") + String networkBusinessProfile; + } + + public static final class SellerDetails { + /** The Network ID of the seller. */ + @SerializedName("network_business_profile") + String networkBusinessProfile; + } + } + + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Agreement fetchRelatedObject() throws StripeException { + return (Agreement) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V2OrchestratedCommerceAgreementTerminatedEventNotification.java b/src/main/java/com/stripe/events/V2OrchestratedCommerceAgreementTerminatedEventNotification.java new file mode 100644 index 00000000000..1e9c53a8e7d --- /dev/null +++ b/src/main/java/com/stripe/events/V2OrchestratedCommerceAgreementTerminatedEventNotification.java @@ -0,0 +1,28 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import com.stripe.model.v2.orchestratedcommerce.Agreement; +import lombok.Getter; + +@Getter +public final class V2OrchestratedCommerceAgreementTerminatedEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Agreement fetchRelatedObject() throws StripeException { + return (Agreement) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2OrchestratedCommerceAgreementTerminatedEvent fetchEvent() throws StripeException { + return (V2OrchestratedCommerceAgreementTerminatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/exception/CannotProceedException.java b/src/main/java/com/stripe/exception/CannotProceedException.java new file mode 100644 index 00000000000..089992b1865 --- /dev/null +++ b/src/main/java/com/stripe/exception/CannotProceedException.java @@ -0,0 +1,45 @@ +// File generated from our OpenAPI spec +package com.stripe.exception; + +import com.google.gson.JsonObject; +import com.google.gson.annotations.SerializedName; +import com.stripe.model.StripeError; +import com.stripe.model.StripeObject; +import com.stripe.net.StripeResponseGetter; +import lombok.Getter; + +/** Returned when the PayoutMethod object is set as default_for_currency and cannot be archived. */ +public final class CannotProceedException extends ApiException { + private static final long serialVersionUID = 2L; + @Getter String reason; + + private CannotProceedException( + String message, + String requestId, + String code, + Integer statusCode, + Throwable e, + String reason) { + super(message, requestId, code, statusCode, e); + this.reason = reason; + } + + static CannotProceedException parse( + JsonObject body, int statusCode, String requestId, StripeResponseGetter responseGetter) { + CannotProceedException.CannotProceedError error = + (CannotProceedException.CannotProceedError) + StripeObject.deserializeStripeObject( + body, CannotProceedException.CannotProceedError.class, responseGetter); + CannotProceedException exception = + new CannotProceedException( + error.getMessage(), requestId, error.getCode(), statusCode, null, error.getReason()); + exception.setStripeError(error); + return exception; + } + + public static class CannotProceedError extends StripeError { + @Getter + @SerializedName("reason") + String reason; + } +} diff --git a/src/main/java/com/stripe/exception/StripeException.java b/src/main/java/com/stripe/exception/StripeException.java index 2588a593e86..18e92150c16 100644 --- a/src/main/java/com/stripe/exception/StripeException.java +++ b/src/main/java/com/stripe/exception/StripeException.java @@ -122,6 +122,9 @@ public static StripeException parseV2Exception( case "blocked_by_stripe": return com.stripe.exception.BlockedByStripeException.parse( body, statusCode, requestId, responseGetter); + case "cannot_proceed": + return com.stripe.exception.CannotProceedException.parse( + body, statusCode, requestId, responseGetter); case "controlled_by_alternate_resource": return com.stripe.exception.ControlledByAlternateResourceException.parse( body, statusCode, requestId, responseGetter); diff --git a/src/main/java/com/stripe/model/v2/EventDataClassLookup.java b/src/main/java/com/stripe/model/v2/EventDataClassLookup.java index 102f426ca4a..cd24c943d41 100644 --- a/src/main/java/com/stripe/model/v2/EventDataClassLookup.java +++ b/src/main/java/com/stripe/model/v2/EventDataClassLookup.java @@ -43,6 +43,10 @@ public final class EventDataClassLookup { "v2.billing.meter_event_session", com.stripe.model.v2.billing.MeterEventSession.class); classLookup.put("v2.billing.profile", com.stripe.model.v2.billing.Profile.class); + classLookup.put( + "v2.commerce.product_catalog_import", + com.stripe.model.v2.commerce.ProductCatalogImport.class); + classLookup.put("v2.core.account", com.stripe.model.v2.core.Account.class); classLookup.put("v2.core.account_link", com.stripe.model.v2.core.AccountLink.class); classLookup.put("v2.core.account_person", com.stripe.model.v2.core.AccountPerson.class); @@ -58,6 +62,14 @@ public final class EventDataClassLookup { classLookup.put( "v2.core.vault.us_bank_account", com.stripe.model.v2.core.vault.UsBankAccount.class); + classLookup.put( + "v2.data.reporting.query_run", com.stripe.model.v2.data.reporting.QueryRun.class); + + classLookup.put("v2.extend.workflow", com.stripe.model.v2.extend.Workflow.class); + classLookup.put("v2.extend.workflow_run", com.stripe.model.v2.extend.WorkflowRun.class); + + classLookup.put("v2.iam.activity_log", com.stripe.model.v2.iam.ActivityLog.class); + classLookup.put( "v2.money_management.adjustment", com.stripe.model.v2.moneymanagement.Adjustment.class); classLookup.put( @@ -99,11 +111,30 @@ public final class EventDataClassLookup { "v2.money_management.transaction_entry", com.stripe.model.v2.moneymanagement.TransactionEntry.class); + classLookup.put( + "v2.network.business_profile", com.stripe.model.v2.network.BusinessProfile.class); + + classLookup.put( + "v2.orchestrated_commerce.agreement", + com.stripe.model.v2.orchestratedcommerce.Agreement.class); + eventClassLookup.put( "v1.billing.meter.error_report_triggered", com.stripe.events.V1BillingMeterErrorReportTriggeredEvent.class); eventClassLookup.put( "v1.billing.meter.no_meter_found", com.stripe.events.V1BillingMeterNoMeterFoundEvent.class); + eventClassLookup.put( + "v2.commerce.product_catalog.imports.failed", + com.stripe.events.V2CommerceProductCatalogImportsFailedEvent.class); + eventClassLookup.put( + "v2.commerce.product_catalog.imports.processing", + com.stripe.events.V2CommerceProductCatalogImportsProcessingEvent.class); + eventClassLookup.put( + "v2.commerce.product_catalog.imports.succeeded", + com.stripe.events.V2CommerceProductCatalogImportsSucceededEvent.class); + eventClassLookup.put( + "v2.commerce.product_catalog.imports.succeeded_with_errors", + com.stripe.events.V2CommerceProductCatalogImportsSucceededWithErrorsEvent.class); eventClassLookup.put( "v2.core.account.closed", com.stripe.events.V2CoreAccountClosedEvent.class); eventClassLookup.put( @@ -186,6 +217,25 @@ public final class EventDataClassLookup { eventClassLookup.put( "v2.core.health.event_generation_failure.resolved", com.stripe.events.V2CoreHealthEventGenerationFailureResolvedEvent.class); + eventClassLookup.put( + "v2.data.reporting.query_run.created", + com.stripe.events.V2DataReportingQueryRunCreatedEvent.class); + eventClassLookup.put( + "v2.data.reporting.query_run.failed", + com.stripe.events.V2DataReportingQueryRunFailedEvent.class); + eventClassLookup.put( + "v2.data.reporting.query_run.succeeded", + com.stripe.events.V2DataReportingQueryRunSucceededEvent.class); + eventClassLookup.put( + "v2.data.reporting.query_run.updated", + com.stripe.events.V2DataReportingQueryRunUpdatedEvent.class); + eventClassLookup.put( + "v2.extend.workflow_run.failed", com.stripe.events.V2ExtendWorkflowRunFailedEvent.class); + eventClassLookup.put( + "v2.extend.workflow_run.started", com.stripe.events.V2ExtendWorkflowRunStartedEvent.class); + eventClassLookup.put( + "v2.extend.workflow_run.succeeded", + com.stripe.events.V2ExtendWorkflowRunSucceededEvent.class); eventClassLookup.put( "v2.money_management.adjustment.created", com.stripe.events.V2MoneyManagementAdjustmentCreatedEvent.class); @@ -294,5 +344,17 @@ public final class EventDataClassLookup { eventClassLookup.put( "v2.money_management.transaction.updated", com.stripe.events.V2MoneyManagementTransactionUpdatedEvent.class); + eventClassLookup.put( + "v2.orchestrated_commerce.agreement.confirmed", + com.stripe.events.V2OrchestratedCommerceAgreementConfirmedEvent.class); + eventClassLookup.put( + "v2.orchestrated_commerce.agreement.created", + com.stripe.events.V2OrchestratedCommerceAgreementCreatedEvent.class); + eventClassLookup.put( + "v2.orchestrated_commerce.agreement.partially_confirmed", + com.stripe.events.V2OrchestratedCommerceAgreementPartiallyConfirmedEvent.class); + eventClassLookup.put( + "v2.orchestrated_commerce.agreement.terminated", + com.stripe.events.V2OrchestratedCommerceAgreementTerminatedEvent.class); } } diff --git a/src/main/java/com/stripe/model/v2/EventNotificationClassLookup.java b/src/main/java/com/stripe/model/v2/EventNotificationClassLookup.java index 9100e44b428..649d4bcee30 100644 --- a/src/main/java/com/stripe/model/v2/EventNotificationClassLookup.java +++ b/src/main/java/com/stripe/model/v2/EventNotificationClassLookup.java @@ -22,6 +22,19 @@ public final class EventNotificationClassLookup { eventClassLookup.put( "v1.billing.meter.no_meter_found", com.stripe.events.V1BillingMeterNoMeterFoundEventNotification.class); + eventClassLookup.put( + "v2.commerce.product_catalog.imports.failed", + com.stripe.events.V2CommerceProductCatalogImportsFailedEventNotification.class); + eventClassLookup.put( + "v2.commerce.product_catalog.imports.processing", + com.stripe.events.V2CommerceProductCatalogImportsProcessingEventNotification.class); + eventClassLookup.put( + "v2.commerce.product_catalog.imports.succeeded", + com.stripe.events.V2CommerceProductCatalogImportsSucceededEventNotification.class); + eventClassLookup.put( + "v2.commerce.product_catalog.imports.succeeded_with_errors", + com.stripe.events.V2CommerceProductCatalogImportsSucceededWithErrorsEventNotification + .class); eventClassLookup.put( "v2.core.account.closed", com.stripe.events.V2CoreAccountClosedEventNotification.class); eventClassLookup.put( @@ -123,6 +136,27 @@ public final class EventNotificationClassLookup { eventClassLookup.put( "v2.core.health.event_generation_failure.resolved", com.stripe.events.V2CoreHealthEventGenerationFailureResolvedEventNotification.class); + eventClassLookup.put( + "v2.data.reporting.query_run.created", + com.stripe.events.V2DataReportingQueryRunCreatedEventNotification.class); + eventClassLookup.put( + "v2.data.reporting.query_run.failed", + com.stripe.events.V2DataReportingQueryRunFailedEventNotification.class); + eventClassLookup.put( + "v2.data.reporting.query_run.succeeded", + com.stripe.events.V2DataReportingQueryRunSucceededEventNotification.class); + eventClassLookup.put( + "v2.data.reporting.query_run.updated", + com.stripe.events.V2DataReportingQueryRunUpdatedEventNotification.class); + eventClassLookup.put( + "v2.extend.workflow_run.failed", + com.stripe.events.V2ExtendWorkflowRunFailedEventNotification.class); + eventClassLookup.put( + "v2.extend.workflow_run.started", + com.stripe.events.V2ExtendWorkflowRunStartedEventNotification.class); + eventClassLookup.put( + "v2.extend.workflow_run.succeeded", + com.stripe.events.V2ExtendWorkflowRunSucceededEventNotification.class); eventClassLookup.put( "v2.money_management.adjustment.created", com.stripe.events.V2MoneyManagementAdjustmentCreatedEventNotification.class); @@ -233,5 +267,17 @@ public final class EventNotificationClassLookup { eventClassLookup.put( "v2.money_management.transaction.updated", com.stripe.events.V2MoneyManagementTransactionUpdatedEventNotification.class); + eventClassLookup.put( + "v2.orchestrated_commerce.agreement.confirmed", + com.stripe.events.V2OrchestratedCommerceAgreementConfirmedEventNotification.class); + eventClassLookup.put( + "v2.orchestrated_commerce.agreement.created", + com.stripe.events.V2OrchestratedCommerceAgreementCreatedEventNotification.class); + eventClassLookup.put( + "v2.orchestrated_commerce.agreement.partially_confirmed", + com.stripe.events.V2OrchestratedCommerceAgreementPartiallyConfirmedEventNotification.class); + eventClassLookup.put( + "v2.orchestrated_commerce.agreement.terminated", + com.stripe.events.V2OrchestratedCommerceAgreementTerminatedEventNotification.class); } } diff --git a/src/main/java/com/stripe/model/v2/billing/BillSetting.java b/src/main/java/com/stripe/model/v2/billing/BillSetting.java index 822aeafce24..2f6834a9fa4 100644 --- a/src/main/java/com/stripe/model/v2/billing/BillSetting.java +++ b/src/main/java/com/stripe/model/v2/billing/BillSetting.java @@ -44,8 +44,8 @@ public class BillSetting extends StripeObject implements HasId { String invoiceRenderingTemplate; /** - * The latest version of the current settings object. This will be Updated every time an attribute - * of the settings is updated. + * The latest version of the current settings object. This is updated every time an attribute of + * the settings is updated. */ @SerializedName("latest_version") String latestVersion; @@ -95,8 +95,8 @@ public static class Calculation extends StripeObject { @EqualsAndHashCode(callSuper = false) public static class Tax extends StripeObject { /** - * Determines if tax will be calculated automatically based on a PTC or manually based on - * rules defined by the merchant. Defaults to "manual". + * Determines if tax is calculated automatically based on a PTC or manually based on rules + * defined by the business. Defaults to "manual". * *

One of {@code automatic}, or {@code manual}. */ @@ -110,11 +110,11 @@ public static class Tax extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class Invoice extends StripeObject { - /** The amount of time until the invoice will be overdue for payment. */ + /** The amount of time until the invoice is overdue for payment. */ @SerializedName("time_until_due") TimeUntilDue timeUntilDue; - /** The amount of time until the invoice will be overdue for payment. */ + /** The amount of time until the invoice is overdue for payment. */ @Getter @Setter @EqualsAndHashCode(callSuper = false) @@ -129,7 +129,7 @@ public static class TimeUntilDue extends StripeObject { /** * The number of interval units. For example, if interval=day and interval_count=30, the - * invoice will be due in 30 days. + * invoice is due in 30 days. */ @SerializedName("interval_count") Long intervalCount; diff --git a/src/main/java/com/stripe/model/v2/billing/BillSettingVersion.java b/src/main/java/com/stripe/model/v2/billing/BillSettingVersion.java index 819bd5601e4..aa5f127238a 100644 --- a/src/main/java/com/stripe/model/v2/billing/BillSettingVersion.java +++ b/src/main/java/com/stripe/model/v2/billing/BillSettingVersion.java @@ -70,8 +70,8 @@ public static class Calculation extends StripeObject { @EqualsAndHashCode(callSuper = false) public static class Tax extends StripeObject { /** - * Determines if tax will be calculated automatically based on a PTC or manually based on - * rules defined by the merchant. Defaults to "manual". + * Determines if tax is calculated automatically based on a PTC or manually based on rules + * defined by the business. Defaults to "manual". * *

One of {@code automatic}, or {@code manual}. */ @@ -85,11 +85,11 @@ public static class Tax extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class Invoice extends StripeObject { - /** The amount of time until the invoice will be overdue for payment. */ + /** The amount of time until the invoice is overdue for payment. */ @SerializedName("time_until_due") TimeUntilDue timeUntilDue; - /** The amount of time until the invoice will be overdue for payment. */ + /** The amount of time until the invoice is overdue for payment. */ @Getter @Setter @EqualsAndHashCode(callSuper = false) @@ -104,7 +104,7 @@ public static class TimeUntilDue extends StripeObject { /** * The number of interval units. For example, if interval=day and interval_count=30, the - * invoice will be due in 30 days. + * invoice is due in 30 days. */ @SerializedName("interval_count") Long intervalCount; diff --git a/src/main/java/com/stripe/model/v2/billing/Cadence.java b/src/main/java/com/stripe/model/v2/billing/Cadence.java index 99ebfc469d1..07cafa3e733 100644 --- a/src/main/java/com/stripe/model/v2/billing/Cadence.java +++ b/src/main/java/com/stripe/model/v2/billing/Cadence.java @@ -173,8 +173,8 @@ public static class Time extends StripeObject { public static class Month extends StripeObject { /** * The day to anchor the billing on for a type="month" billing cycle from 1-31. If - * this number is greater than the number of days in the month being billed, this will anchor - * to the last day of the month. + * this number is greater than the number of days in the month being billed, this anchors to + * the last day of the month. */ @SerializedName("day_of_month") Long dayOfMonth; @@ -269,15 +269,15 @@ public static class Time extends StripeObject { public static class Year extends StripeObject { /** * The day to anchor the billing on for a type="month" billing cycle from 1-31. If - * this number is greater than the number of days in the month being billed, this will anchor - * to the last day of the month. + * this number is greater than the number of days in the month being billed, this anchors to + * the last day of the month. */ @SerializedName("day_of_month") Long dayOfMonth; /** - * The month to bill on from 1-12. If not provided, this will default to the month the cadence - * was created. + * The month to bill on from 1-12. If not provided, this defaults to the month the cadence was + * created. */ @SerializedName("month_of_year") Long monthOfYear; @@ -320,7 +320,7 @@ public static class Time extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class Payer extends StripeObject { - /** The ID of the Billing Profile object which determines how a bill will be paid. */ + /** The ID of the Billing Profile object which determines how a bill is paid. */ @SerializedName("billing_profile") String billingProfile; @@ -433,8 +433,8 @@ public static class Calculation extends StripeObject { @EqualsAndHashCode(callSuper = false) public static class Tax extends StripeObject { /** - * Determines if tax will be calculated automatically based on a PTC or manually based on - * rules defined by the merchant. Defaults to "manual". + * Determines if tax is calculated automatically based on a PTC or manually based on rules + * defined by the business. Defaults to "manual". * *

One of {@code automatic}, or {@code manual}. */ @@ -448,11 +448,11 @@ public static class Tax extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class Invoice extends StripeObject { - /** The amount of time until the invoice will be overdue for payment. */ + /** The amount of time until the invoice is overdue for payment. */ @SerializedName("time_until_due") TimeUntilDue timeUntilDue; - /** The amount of time until the invoice will be overdue for payment. */ + /** The amount of time until the invoice is overdue for payment. */ @Getter @Setter @EqualsAndHashCode(callSuper = false) @@ -467,7 +467,7 @@ public static class TimeUntilDue extends StripeObject { /** * The number of interval units. For example, if interval=day and interval_count=30, the - * invoice will be due in 30 days. + * invoice is due in 30 days. */ @SerializedName("interval_count") Long intervalCount; @@ -481,9 +481,9 @@ public static class TimeUntilDue extends StripeObject { @EqualsAndHashCode(callSuper = false) public static class Collection extends StripeObject { /** - * Either automatic, or send_invoice. When charging automatically, Stripe will attempt to pay - * this bill at the end of the period using the payment method attached to the payer profile. - * When sending an invoice, Stripe will email your payer profile an invoice with payment + * Either automatic, or send_invoice. When charging automatically, Stripe attempts to pay this + * bill at the end of the period using the payment method attached to the billing profile. + * When sending an invoice, Stripe emails your billing profile an invoice with payment * instructions. Defaults to automatic. * *

One of {@code automatic}, or {@code send_invoice}. @@ -565,11 +565,11 @@ public static class PaymentMethodOptions extends StripeObject { /** This sub-hash contains details about the Konbini payment method options. */ @SerializedName("konbini") - Map konbini; + Konbini konbini; /** This sub-hash contains details about the SEPA Direct Debit payment method options. */ @SerializedName("sepa_debit") - Map sepaDebit; + SepaDebit sepaDebit; /** This sub-hash contains details about the ACH direct debit payment method options. */ @SerializedName("us_bank_account") @@ -741,6 +741,18 @@ public static class EuBankTransfer extends StripeObject { } } + /** This sub-hash contains details about the Konbini payment method options. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Konbini extends StripeObject {} + + /** This sub-hash contains details about the SEPA Direct Debit payment method options. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class SepaDebit extends StripeObject {} + /** This sub-hash contains details about the ACH direct debit payment method options. */ @Getter @Setter diff --git a/src/main/java/com/stripe/model/v2/billing/CollectionSetting.java b/src/main/java/com/stripe/model/v2/billing/CollectionSetting.java index 146ebdd6e6c..bfd997169b6 100644 --- a/src/main/java/com/stripe/model/v2/billing/CollectionSetting.java +++ b/src/main/java/com/stripe/model/v2/billing/CollectionSetting.java @@ -8,7 +8,6 @@ import com.stripe.model.StripeObject; import java.time.Instant; import java.util.List; -import java.util.Map; import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.Setter; @@ -19,9 +18,9 @@ @EqualsAndHashCode(callSuper = false) public class CollectionSetting extends StripeObject implements HasId { /** - * Either automatic, or send_invoice. When charging automatically, Stripe will attempt to pay this - * bill at the end of the period using the payment method attached to the payer profile. When - * sending an invoice, Stripe will email your payer profile an invoice with payment instructions. + * Either automatic, or send_invoice. When charging automatically, Stripe attempts to pay this + * bill at the end of the period using the payment method attached to the billing profile. When + * sending an invoice, Stripe emails your billing profile an invoice with payment instructions. * Defaults to automatic. * *

One of {@code automatic}, or {@code send_invoice}. @@ -47,8 +46,8 @@ public class CollectionSetting extends StripeObject implements HasId { String id; /** - * The latest version of the current settings object. This will be Updated every time an attribute - * of the settings is updated. + * The latest version of the current settings object. This is updated every time an attribute of + * the settings is updated. */ @SerializedName("latest_version") String latestVersion; @@ -153,11 +152,11 @@ public static class PaymentMethodOptions extends StripeObject { /** This sub-hash contains details about the Konbini payment method options. */ @SerializedName("konbini") - Map konbini; + Konbini konbini; /** This sub-hash contains details about the SEPA Direct Debit payment method options. */ @SerializedName("sepa_debit") - Map sepaDebit; + SepaDebit sepaDebit; /** This sub-hash contains details about the ACH direct debit payment method options. */ @SerializedName("us_bank_account") @@ -326,6 +325,18 @@ public static class EuBankTransfer extends StripeObject { } } + /** This sub-hash contains details about the Konbini payment method options. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Konbini extends StripeObject {} + + /** This sub-hash contains details about the SEPA Direct Debit payment method options. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class SepaDebit extends StripeObject {} + /** This sub-hash contains details about the ACH direct debit payment method options. */ @Getter @Setter diff --git a/src/main/java/com/stripe/model/v2/billing/CollectionSettingVersion.java b/src/main/java/com/stripe/model/v2/billing/CollectionSettingVersion.java index 2035073002d..46b348be811 100644 --- a/src/main/java/com/stripe/model/v2/billing/CollectionSettingVersion.java +++ b/src/main/java/com/stripe/model/v2/billing/CollectionSettingVersion.java @@ -8,7 +8,6 @@ import com.stripe.model.StripeObject; import java.time.Instant; import java.util.List; -import java.util.Map; import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.Setter; @@ -23,9 +22,9 @@ @EqualsAndHashCode(callSuper = false) public class CollectionSettingVersion extends StripeObject implements HasId { /** - * Either automatic, or send_invoice. When charging automatically, Stripe will attempt to pay this - * bill at the end of the period using the payment method attached to the payer profile. When - * sending an invoice, Stripe will email your payer profile an invoice with payment instructions. + * Either automatic, or send_invoice. When charging automatically, Stripe attempts to pay this + * bill at the end of the period using the payment method attached to the billing profile. When + * sending an invoice, Stripe emails your billing profile an invoice with payment instructions. * Defaults to automatic. * *

One of {@code automatic}, or {@code send_invoice}. @@ -132,11 +131,11 @@ public static class PaymentMethodOptions extends StripeObject { /** This sub-hash contains details about the Konbini payment method options. */ @SerializedName("konbini") - Map konbini; + Konbini konbini; /** This sub-hash contains details about the SEPA Direct Debit payment method options. */ @SerializedName("sepa_debit") - Map sepaDebit; + SepaDebit sepaDebit; /** This sub-hash contains details about the ACH direct debit payment method options. */ @SerializedName("us_bank_account") @@ -305,6 +304,18 @@ public static class EuBankTransfer extends StripeObject { } } + /** This sub-hash contains details about the Konbini payment method options. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Konbini extends StripeObject {} + + /** This sub-hash contains details about the SEPA Direct Debit payment method options. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class SepaDebit extends StripeObject {} + /** This sub-hash contains details about the ACH direct debit payment method options. */ @Getter @Setter diff --git a/src/main/java/com/stripe/model/v2/billing/MeterEventAdjustment.java b/src/main/java/com/stripe/model/v2/billing/MeterEventAdjustment.java index 1ab06307ce2..c26cb58f4e4 100644 --- a/src/main/java/com/stripe/model/v2/billing/MeterEventAdjustment.java +++ b/src/main/java/com/stripe/model/v2/billing/MeterEventAdjustment.java @@ -30,7 +30,7 @@ public class MeterEventAdjustment extends StripeObject implements HasId { @SerializedName("event_name") String eventName; - /** The unique id of this meter event adjustment. */ + /** The unique ID of this meter event adjustment. */ @Getter(onMethod_ = {@Override}) @SerializedName("id") String id; @@ -60,8 +60,7 @@ public class MeterEventAdjustment extends StripeObject implements HasId { String status; /** - * Open Enum. Specifies whether to cancel a single event or a range of events for a time period. - * Time period cancellation is not supported yet. + * Open Enum. Specifies the type of cancellation. Currently supports canceling a single event. * *

Equal to {@code cancel}. */ @@ -74,8 +73,8 @@ public class MeterEventAdjustment extends StripeObject implements HasId { @EqualsAndHashCode(callSuper = false) public static class Cancel extends StripeObject { /** - * Unique identifier for the event. You can only cancel events within 24 hours of Stripe - * receiving them. + * The identifier that was originally assigned to the meter event. You can only cancel events + * within 24 hours of Stripe receiving them. */ @SerializedName("identifier") String identifier; diff --git a/src/main/java/com/stripe/model/v2/billing/MeterEventSession.java b/src/main/java/com/stripe/model/v2/billing/MeterEventSession.java index 5720ae4e1f3..712b05dfbbb 100644 --- a/src/main/java/com/stripe/model/v2/billing/MeterEventSession.java +++ b/src/main/java/com/stripe/model/v2/billing/MeterEventSession.java @@ -29,11 +29,11 @@ public class MeterEventSession extends StripeObject implements HasId { @SerializedName("created") Instant created; - /** The time at which this session will expire. */ + /** The time at which this session expires. */ @SerializedName("expires_at") Instant expiresAt; - /** The unique id of this auth session. */ + /** The unique ID of this auth session. */ @Getter(onMethod_ = {@Override}) @SerializedName("id") String id; diff --git a/src/main/java/com/stripe/model/v2/commerce/ProductCatalogImport.java b/src/main/java/com/stripe/model/v2/commerce/ProductCatalogImport.java new file mode 100644 index 00000000000..3a6b0953528 --- /dev/null +++ b/src/main/java/com/stripe/model/v2/commerce/ProductCatalogImport.java @@ -0,0 +1,260 @@ +// File generated from our OpenAPI spec +package com.stripe.model.v2.commerce; + +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.stripe.model.HasId; +import com.stripe.model.StringInt64TypeAdapter; +import com.stripe.model.StripeObject; +import java.time.Instant; +import java.util.List; +import java.util.Map; +import lombok.EqualsAndHashCode; +import lombok.Getter; +import lombok.Setter; + +/** + * The product catalog import object tracks the long-running background process that handles + * uploading, processing and validation. + */ +@Getter +@Setter +@EqualsAndHashCode(callSuper = false) +public class ProductCatalogImport extends StripeObject implements HasId { + /** The time this ProductCatalogImport was created. */ + @SerializedName("created") + Instant created; + + /** + * The type of feed data being imported into the product catalog. + * + *

One of {@code inventory}, {@code pricing}, or {@code product}. + */ + @SerializedName("feed_type") + String feedType; + + /** The unique identifier for this ProductCatalogImport. */ + @Getter(onMethod_ = {@Override}) + @SerializedName("id") + String id; + + /** + * Has the value {@code true} if the object exists in live mode or the value {@code false} if the + * object exists in test mode. + */ + @SerializedName("livemode") + Boolean livemode; + + /** Additional information about the object in a structured format. */ + @SerializedName("metadata") + Map metadata; + + /** + * String representing the object's type. Objects of the same type share the same value of the + * object field. + * + *

Equal to {@code v2.commerce.product_catalog_import}. + */ + @SerializedName("object") + String object; + + /** + * The current status of this ProductCatalogImport. + * + *

One of {@code awaiting_upload}, {@code failed}, {@code processing}, {@code succeeded}, or + * {@code succeeded_with_errors}. + */ + @SerializedName("status") + String status; + + /** Details about the current import status. */ + @SerializedName("status_details") + StatusDetails statusDetails; + + /** Details about the current import status. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class StatusDetails extends StripeObject { + /** Details when the import is awaiting file upload. */ + @SerializedName("awaiting_upload") + AwaitingUpload awaitingUpload; + + /** Details when the import didn't complete. */ + @SerializedName("failed") + Failed failed; + + /** Details when the import is processing. */ + @SerializedName("processing") + Processing processing; + + /** Details when the import has succeeded. */ + @SerializedName("succeeded") + Succeeded succeeded; + + /** Details when the import completed but some records failed to process. */ + @SerializedName("succeeded_with_errors") + SucceededWithErrors succeededWithErrors; + + /** Details when the import is awaiting file upload. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class AwaitingUpload extends StripeObject { + /** The pre-signed URL information for uploading the catalog file. */ + @SerializedName("upload_url") + UploadUrl uploadUrl; + + /** The pre-signed URL information for uploading the catalog file. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class UploadUrl extends StripeObject { + /** The timestamp when the upload URL expires. */ + @SerializedName("expires_at") + Instant expiresAt; + + /** The pre-signed URL for uploading the catalog file. */ + @SerializedName("url") + String url; + } + } + + /** Details when the import didn't complete. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Failed extends StripeObject { + /** + * The error code for this product catalog processing failure. + * + *

One of {@code file_not_found}, {@code internal_error}, or {@code invalid_file}. + */ + @SerializedName("code") + String code; + + /** A message explaining why the import failed. */ + @SerializedName("failure_message") + String failureMessage; + + /** + * The error type for this product catalog processing failure. + * + *

One of {@code cannot_proceed}, or {@code transient_failure}. + */ + @SerializedName("type") + String type; + } + + /** Details when the import is processing. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Processing extends StripeObject { + /** The number of records that failed to process so far. */ + @SerializedName("error_count") + @JsonAdapter(StringInt64TypeAdapter.class) + Long errorCount; + + /** The number of records processed so far. */ + @SerializedName("success_count") + @JsonAdapter(StringInt64TypeAdapter.class) + Long successCount; + } + + /** Details when the import has succeeded. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Succeeded extends StripeObject { + /** The total number of records processed. */ + @SerializedName("success_count") + @JsonAdapter(StringInt64TypeAdapter.class) + Long successCount; + } + + /** Details when the import completed but some records failed to process. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class SucceededWithErrors extends StripeObject { + /** The total number of records that failed to process. */ + @SerializedName("error_count") + @JsonAdapter(StringInt64TypeAdapter.class) + Long errorCount; + + /** A file containing details about all errors that occurred. */ + @SerializedName("error_file") + ErrorFile errorFile; + + /** A sample of errors that occurred during processing. */ + @SerializedName("samples") + List samples; + + /** The total number of records processed. */ + @SerializedName("success_count") + @JsonAdapter(StringInt64TypeAdapter.class) + Long successCount; + + /** A file containing details about all errors that occurred. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class ErrorFile extends StripeObject { + /** The MIME type of the error file. */ + @SerializedName("content_type") + String contentType; + + /** The pre-signed URL information for downloading the error file. */ + @SerializedName("download_url") + DownloadUrl downloadUrl; + + /** The size of the error file in bytes. */ + @SerializedName("size") + @JsonAdapter(StringInt64TypeAdapter.class) + Long size; + + /** The pre-signed URL information for downloading the error file. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class DownloadUrl extends StripeObject { + /** The timestamp when the download URL expires. */ + @SerializedName("expires_at") + Instant expiresAt; + + /** The pre-signed URL for downloading the error file. */ + @SerializedName("url") + String url; + } + } + + /** + * For more details about Sample, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Sample extends StripeObject implements HasId { + /** A description of what went wrong with this record. */ + @SerializedName("error_message") + String errorMessage; + + /** The name of the field that caused the error. */ + @SerializedName("field") + String field; + + /** The identifier of the record that failed to process. */ + @Getter(onMethod_ = {@Override}) + @SerializedName("id") + String id; + + /** The row number in the import file where the error occurred. */ + @SerializedName("row") + @JsonAdapter(StringInt64TypeAdapter.class) + Long row; + } + } + } +} diff --git a/src/main/java/com/stripe/model/v2/core/Account.java b/src/main/java/com/stripe/model/v2/core/Account.java index 102ddd8da2d..803e454ec15 100644 --- a/src/main/java/com/stripe/model/v2/core/Account.java +++ b/src/main/java/com/stripe/model/v2/core/Account.java @@ -3744,35 +3744,35 @@ public static class DefaultOutboundDestination extends StripeObject implements H * bg_bank_account}, {@code bh_bank_account}, {@code bj_bank_account}, {@code * bn_bank_account}, {@code bs_bank_account}, {@code bt_bank_account}, {@code * bw_bank_account}, {@code card}, {@code ca_bank_account}, {@code ch_bank_account}, {@code - * ci_bank_account}, {@code co_bank_account}, {@code crypto_wallet}, {@code - * cr_bank_account}, {@code cy_bank_account}, {@code cz_bank_account}, {@code - * de_bank_account}, {@code dk_bank_account}, {@code do_bank_account}, {@code - * dz_bank_account}, {@code ec_bank_account}, {@code ee_bank_account}, {@code - * eg_bank_account}, {@code es_bank_account}, {@code et_bank_account}, {@code - * fi_bank_account}, {@code fr_bank_account}, {@code gb_bank_account}, {@code - * gm_bank_account}, {@code gr_bank_account}, {@code gt_bank_account}, {@code - * gy_bank_account}, {@code hk_bank_account}, {@code hr_bank_account}, {@code - * hu_bank_account}, {@code id_bank_account}, {@code ie_bank_account}, {@code - * il_bank_account}, {@code in_bank_account}, {@code is_bank_account}, {@code - * it_bank_account}, {@code jm_bank_account}, {@code jo_bank_account}, {@code - * ke_bank_account}, {@code kh_bank_account}, {@code kw_bank_account}, {@code - * lc_bank_account}, {@code li_bank_account}, {@code lk_bank_account}, {@code - * lt_bank_account}, {@code lu_bank_account}, {@code lv_bank_account}, {@code - * ma_bank_account}, {@code mc_bank_account}, {@code md_bank_account}, {@code - * mg_bank_account}, {@code mk_bank_account}, {@code mn_bank_account}, {@code - * mo_bank_account}, {@code mt_bank_account}, {@code mu_bank_account}, {@code - * mx_bank_account}, {@code my_bank_account}, {@code mz_bank_account}, {@code - * na_bank_account}, {@code nl_bank_account}, {@code no_bank_account}, {@code - * nz_bank_account}, {@code om_bank_account}, {@code pa_bank_account}, {@code - * pe_bank_account}, {@code ph_bank_account}, {@code pk_bank_account}, {@code - * pl_bank_account}, {@code pt_bank_account}, {@code qa_bank_account}, {@code - * ro_bank_account}, {@code rs_bank_account}, {@code rw_bank_account}, {@code - * se_bank_account}, {@code sg_bank_account}, {@code si_bank_account}, {@code - * sk_bank_account}, {@code sn_bank_account}, {@code sv_bank_account}, {@code - * th_bank_account}, {@code tn_bank_account}, {@code tr_bank_account}, {@code - * tt_bank_account}, {@code tw_bank_account}, {@code tz_bank_account}, {@code - * us_bank_account}, {@code uz_bank_account}, {@code vn_bank_account}, or {@code - * za_bank_account}. + * ci_bank_account}, {@code cn_bank_account}, {@code co_bank_account}, {@code + * crypto_wallet}, {@code cr_bank_account}, {@code cy_bank_account}, {@code + * cz_bank_account}, {@code de_bank_account}, {@code dk_bank_account}, {@code + * do_bank_account}, {@code dz_bank_account}, {@code ec_bank_account}, {@code + * ee_bank_account}, {@code eg_bank_account}, {@code es_bank_account}, {@code + * et_bank_account}, {@code fi_bank_account}, {@code fr_bank_account}, {@code + * gb_bank_account}, {@code gm_bank_account}, {@code gr_bank_account}, {@code + * gt_bank_account}, {@code gy_bank_account}, {@code hk_bank_account}, {@code + * hr_bank_account}, {@code hu_bank_account}, {@code id_bank_account}, {@code + * ie_bank_account}, {@code il_bank_account}, {@code in_bank_account}, {@code + * is_bank_account}, {@code it_bank_account}, {@code jm_bank_account}, {@code + * jo_bank_account}, {@code jp_bank_account}, {@code ke_bank_account}, {@code + * kh_bank_account}, {@code kw_bank_account}, {@code lc_bank_account}, {@code + * li_bank_account}, {@code lk_bank_account}, {@code lt_bank_account}, {@code + * lu_bank_account}, {@code lv_bank_account}, {@code ma_bank_account}, {@code + * mc_bank_account}, {@code md_bank_account}, {@code mg_bank_account}, {@code + * mk_bank_account}, {@code mn_bank_account}, {@code mo_bank_account}, {@code + * mt_bank_account}, {@code mu_bank_account}, {@code mx_bank_account}, {@code + * my_bank_account}, {@code mz_bank_account}, {@code na_bank_account}, {@code + * nl_bank_account}, {@code no_bank_account}, {@code nz_bank_account}, {@code + * om_bank_account}, {@code pa_bank_account}, {@code pe_bank_account}, {@code + * ph_bank_account}, {@code pk_bank_account}, {@code pl_bank_account}, {@code + * pt_bank_account}, {@code qa_bank_account}, {@code ro_bank_account}, {@code + * rs_bank_account}, {@code rw_bank_account}, {@code se_bank_account}, {@code + * sg_bank_account}, {@code si_bank_account}, {@code sk_bank_account}, {@code + * sn_bank_account}, {@code sv_bank_account}, {@code th_bank_account}, {@code + * tn_bank_account}, {@code tr_bank_account}, {@code tt_bank_account}, {@code + * tw_bank_account}, {@code tz_bank_account}, {@code us_bank_account}, {@code + * uz_bank_account}, {@code vn_bank_account}, or {@code za_bank_account}. */ @SerializedName("type") String type; diff --git a/src/main/java/com/stripe/model/v2/core/BatchJob.java b/src/main/java/com/stripe/model/v2/core/BatchJob.java index 9bc1c8bf3e6..2e737877b67 100644 --- a/src/main/java/com/stripe/model/v2/core/BatchJob.java +++ b/src/main/java/com/stripe/model/v2/core/BatchJob.java @@ -12,16 +12,16 @@ import lombok.Getter; import lombok.Setter; -/** BatchJob resource. */ +/** A batch job allows you to perform an API operation on a large set of records asynchronously. */ @Getter @Setter @EqualsAndHashCode(callSuper = false) public class BatchJob extends StripeObject implements HasId { - /** Timestamp at which BatchJob was created. */ + /** Timestamp at which the {@code batch_job} was created. */ @SerializedName("created") Instant created; - /** Unique identifier for the BatchJob. */ + /** Unique identifier for the {@code batch_job}. */ @Getter(onMethod_ = {@Override}) @SerializedName("id") String id; @@ -33,11 +33,11 @@ public class BatchJob extends StripeObject implements HasId { @SerializedName("livemode") Boolean livemode; - /** The maximum rps defined for the {@code BatchJob}. */ + /** The maximum requests per second defined for the {@code batch_job}. */ @SerializedName("maximum_rps") Long maximumRps; - /** The metadata of the {@code BatchJob} object. */ + /** The metadata of the {@code batch_job}. */ @SerializedName("metadata") Map metadata; @@ -50,12 +50,12 @@ public class BatchJob extends StripeObject implements HasId { @SerializedName("object") String object; - /** If the validation will be run previous to the execution of the {@code BatchJob}. */ + /** Whether validation runs before executing the {@code batch_job}. */ @SerializedName("skip_validation") Boolean skipValidation; /** - * The current status of the {@code BatchJob}. + * The current status of the {@code batch_job}. * *

One of {@code batch_failed}, {@code canceled}, {@code cancelling}, {@code complete}, {@code * in_progress}, {@code ready_for_upload}, {@code timeout}, {@code upload_timeout}, {@code @@ -64,58 +64,58 @@ public class BatchJob extends StripeObject implements HasId { @SerializedName("status") String status; - /** Additional details about the current state of the {@code BatchJob}. */ + /** Additional details about the current state of the {@code batch_job}. */ @SerializedName("status_details") StatusDetails statusDetails; - /** Additional details about the current state of the {@code BatchJob}. */ + /** Additional details about the current state of the {@code batch_job}. */ @Getter @Setter @EqualsAndHashCode(callSuper = false) public static class StatusDetails extends StripeObject { - /** Additional details for the {@code BATCH_FAILED} status of the {@code BatchJob}. */ + /** Additional details for the {@code BATCH_FAILED} status of the {@code batch_job}. */ @SerializedName("batch_failed") BatchFailed batchFailed; - /** Additional details for the {@code CANCELED} status of the {@code BatchJob}. */ + /** Additional details for the {@code CANCELED} status of the {@code batch_job}. */ @SerializedName("canceled") Canceled canceled; - /** Additional details for the {@code COMPLETE} status of the {@code BatchJob}. */ + /** Additional details for the {@code COMPLETE} status of the {@code batch_job}. */ @SerializedName("complete") Complete complete; - /** Additional details for the {@code IN_PROGRESS} status of the {@code BatchJob}. */ + /** Additional details for the {@code IN_PROGRESS} status of the {@code batch_job}. */ @SerializedName("in_progress") InProgress inProgress; - /** Additional details for the {@code READY_FOR_UPLOAD} status of the {@code BatchJob}. */ + /** Additional details for the {@code READY_FOR_UPLOAD} status of the {@code batch_job}. */ @SerializedName("ready_for_upload") ReadyForUpload readyForUpload; - /** Additional details for the {@code TIMEOUT} status of the {@code BatchJob}. */ + /** Additional details for the {@code TIMEOUT} status of the {@code batch_job}. */ @SerializedName("timeout") Timeout timeout; - /** Additional details for the {@code VALIDATING} status of the {@code BatchJob}. */ + /** Additional details for the {@code VALIDATING} status of the {@code batch_job}. */ @SerializedName("validating") Validating validating; - /** Additional details for the {@code VALIDATION_FAILED} status of the {@code BatchJob}. */ + /** Additional details for the {@code VALIDATION_FAILED} status of the {@code batch_job}. */ @SerializedName("validation_failed") ValidationFailed validationFailed; - /** Additional details for the {@code BATCH_FAILED} status of the {@code BatchJob}. */ + /** Additional details for the {@code BATCH_FAILED} status of the {@code batch_job}. */ @Getter @Setter @EqualsAndHashCode(callSuper = false) public static class BatchFailed extends StripeObject { - /** Details about the {@code BatchJob} failure. */ + /** Details about the {@code batch_job} failure. */ @SerializedName("error") String error; } - /** Additional details for the {@code CANCELED} status of the {@code BatchJob}. */ + /** Additional details for the {@code CANCELED} status of the {@code batch_job}. */ @Getter @Setter @EqualsAndHashCode(callSuper = false) @@ -126,8 +126,8 @@ public static class Canceled extends StripeObject { Long failureCount; /** - * The output file details. If BatchJob is cancelled it's provided only if there is already - * output at this point. + * The output file details. If the {@code batch_job} is canceled, this is provided only if + * there is already output at this point. */ @SerializedName("output_file") OutputFile outputFile; @@ -138,8 +138,8 @@ public static class Canceled extends StripeObject { Long successCount; /** - * The output file details. If BatchJob is cancelled it's provided only if there is already - * output at this point. + * The output file details. If the {@code batch_job} is canceled, this is provided only if + * there is already output at this point. */ @Getter @Setter @@ -174,7 +174,7 @@ public static class DownloadUrl extends StripeObject { } } - /** Additional details for the {@code COMPLETE} status of the {@code BatchJob}. */ + /** Additional details for the {@code COMPLETE} status of the {@code batch_job}. */ @Getter @Setter @EqualsAndHashCode(callSuper = false) @@ -185,8 +185,8 @@ public static class Complete extends StripeObject { Long failureCount; /** - * The output file details. If BatchJob is cancelled it's provided only if there is already - * output at this point. + * The output file details. If the {@code batch_job} is canceled, this is provided only if + * there is already output at this point. */ @SerializedName("output_file") OutputFile outputFile; @@ -197,8 +197,8 @@ public static class Complete extends StripeObject { Long successCount; /** - * The output file details. If BatchJob is cancelled it's provided only if there is already - * output at this point. + * The output file details. If the {@code batch_job} is canceled, this is provided only if + * there is already output at this point. */ @Getter @Setter @@ -233,7 +233,7 @@ public static class DownloadUrl extends StripeObject { } } - /** Additional details for the {@code IN_PROGRESS} status of the {@code BatchJob}. */ + /** Additional details for the {@code IN_PROGRESS} status of the {@code batch_job}. */ @Getter @Setter @EqualsAndHashCode(callSuper = false) @@ -249,7 +249,7 @@ public static class InProgress extends StripeObject { Long successCount; } - /** Additional details for the {@code READY_FOR_UPLOAD} status of the {@code BatchJob}. */ + /** Additional details for the {@code READY_FOR_UPLOAD} status of the {@code batch_job}. */ @Getter @Setter @EqualsAndHashCode(callSuper = false) @@ -273,7 +273,7 @@ public static class UploadUrl extends StripeObject { } } - /** Additional details for the {@code TIMEOUT} status of the {@code BatchJob}. */ + /** Additional details for the {@code TIMEOUT} status of the {@code batch_job}. */ @Getter @Setter @EqualsAndHashCode(callSuper = false) @@ -284,8 +284,8 @@ public static class Timeout extends StripeObject { Long failureCount; /** - * The output file details. If BatchJob is cancelled it's provided only if there is already - * output at this point. + * The output file details. If the {@code batch_job} is canceled, this is provided only if + * there is already output at this point. */ @SerializedName("output_file") OutputFile outputFile; @@ -296,8 +296,8 @@ public static class Timeout extends StripeObject { Long successCount; /** - * The output file details. If BatchJob is cancelled it's provided only if there is already - * output at this point. + * The output file details. If the {@code batch_job} is canceled, this is provided only if + * there is already output at this point. */ @Getter @Setter @@ -332,7 +332,7 @@ public static class DownloadUrl extends StripeObject { } } - /** Additional details for the {@code VALIDATING} status of the {@code BatchJob}. */ + /** Additional details for the {@code VALIDATING} status of the {@code batch_job}. */ @Getter @Setter @EqualsAndHashCode(callSuper = false) @@ -346,7 +346,7 @@ public static class Validating extends StripeObject { Long validatedCount; } - /** Additional details for the {@code VALIDATION_FAILED} status of the {@code BatchJob}. */ + /** Additional details for the {@code VALIDATION_FAILED} status of the {@code batch_job}. */ @Getter @Setter @EqualsAndHashCode(callSuper = false) @@ -357,8 +357,8 @@ public static class ValidationFailed extends StripeObject { Long failureCount; /** - * The output file details. If BatchJob is cancelled it's provided only if there is already - * output at this point. + * The output file details. If the {@code batch_job} is canceled, this is provided only if + * there is already output at this point. */ @SerializedName("output_file") OutputFile outputFile; @@ -369,8 +369,8 @@ public static class ValidationFailed extends StripeObject { Long successCount; /** - * The output file details. If BatchJob is cancelled it's provided only if there is already - * output at this point. + * The output file details. If the {@code batch_job} is canceled, this is provided only if + * there is already output at this point. */ @Getter @Setter diff --git a/src/main/java/com/stripe/model/v2/core/vault/GbBankAccount.java b/src/main/java/com/stripe/model/v2/core/vault/GbBankAccount.java index f43af389910..5b2a525a0bb 100644 --- a/src/main/java/com/stripe/model/v2/core/vault/GbBankAccount.java +++ b/src/main/java/com/stripe/model/v2/core/vault/GbBankAccount.java @@ -31,7 +31,7 @@ public class GbBankAccount extends StripeObject implements HasId { /** * Closed Enum. The type of the bank account (checking or savings). * - *

One of {@code checking}, or {@code savings}. + *

One of {@code checking}, {@code futsu}, {@code savings}, or {@code toza}. */ @SerializedName("bank_account_type") String bankAccountType; diff --git a/src/main/java/com/stripe/model/v2/data/reporting/QueryRun.java b/src/main/java/com/stripe/model/v2/data/reporting/QueryRun.java new file mode 100644 index 00000000000..99a6aab79b5 --- /dev/null +++ b/src/main/java/com/stripe/model/v2/data/reporting/QueryRun.java @@ -0,0 +1,170 @@ +// File generated from our OpenAPI spec +package com.stripe.model.v2.data.reporting; + +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.stripe.model.HasId; +import com.stripe.model.StringInt64TypeAdapter; +import com.stripe.model.StripeObject; +import java.time.Instant; +import java.util.Map; +import lombok.EqualsAndHashCode; +import lombok.Getter; +import lombok.Setter; + +/** + * The {@code QueryRun} object represents an ad-hoc SQL execution. Once created, Stripe processes + * the query. When the query has finished running, the object provides a reference to the results. + */ +@Getter +@Setter +@EqualsAndHashCode(callSuper = false) +public class QueryRun extends StripeObject implements HasId { + /** Time at which the object was created. */ + @SerializedName("created") + Instant created; + + /** The unique identifier of the {@code QueryRun} object. */ + @Getter(onMethod_ = {@Override}) + @SerializedName("id") + String id; + + /** + * Has the value {@code true} if the object exists in live mode or the value {@code false} if the + * object exists in test mode. + */ + @SerializedName("livemode") + Boolean livemode; + + /** + * String representing the object's type. Objects of the same type share the same value of the + * object field. + * + *

Equal to {@code v2.data.reporting.query_run}. + */ + @SerializedName("object") + String object; + + /** Details how to retrieve the results of a successfully completed {@code QueryRun}. */ + @SerializedName("result") + Result result; + + /** The options specified for customizing the output of the {@code QueryRun}. */ + @SerializedName("result_options") + ResultOptions resultOptions; + + /** The SQL that was executed. */ + @SerializedName("sql") + String sql; + + /** + * The current status of the {@code QueryRun}. + * + *

One of {@code failed}, {@code running}, or {@code succeeded}. + */ + @SerializedName("status") + String status; + + /** + * Additional details about the current state of the {@code QueryRun}. Populated when the {@code + * QueryRun} is in the {@code failed} state, providing more information about why the query + * failed. + */ + @SerializedName("status_details") + Map statusDetails; + + /** Details how to retrieve the results of a successfully completed {@code QueryRun}. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Result extends StripeObject { + /** + * Contains metadata about the file produced by the {@code ReportRun} or {@code QueryRun}, + * including its content type, size, and a URL to download its contents. + */ + @SerializedName("file") + File file; + + /** + * The type of the {@code ReportRun} or {@code QueryRun} result. + * + *

Equal to {@code file}. + */ + @SerializedName("type") + String type; + + /** + * Contains metadata about the file produced by the {@code ReportRun} or {@code QueryRun}, + * including its content type, size, and a URL to download its contents. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class File extends StripeObject { + /** + * The content type of the file. + * + *

One of {@code csv}, or {@code zip}. + */ + @SerializedName("content_type") + String contentType; + + /** A pre-signed URL that allows secure, time-limited access to download the file. */ + @SerializedName("download_url") + DownloadUrl downloadUrl; + + /** The total size of the file in bytes. */ + @SerializedName("size") + @JsonAdapter(StringInt64TypeAdapter.class) + Long size; + + /** A pre-signed URL that allows secure, time-limited access to download the file. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class DownloadUrl extends StripeObject { + /** The time that the URL expires. */ + @SerializedName("expires_at") + Instant expiresAt; + + /** The URL that can be used for accessing the file. */ + @SerializedName("url") + String url; + } + } + } + + /** The options specified for customizing the output of the {@code QueryRun}. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class ResultOptions extends StripeObject { + /** + * If set, the generated results file will be compressed into a ZIP folder. This is useful for + * reducing file size and download time for large results. + */ + @SerializedName("compress_file") + Boolean compressFile; + } + + /** + * For more details about StatusDetail, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class StatusDetail extends StripeObject { + /** + * Error code categorizing the reason the {@code QueryRun} failed. + * + *

One of {@code file_size_above_limit}, or {@code internal_error}. + */ + @SerializedName("error_code") + String errorCode; + + /** Error message with additional details about the failure. */ + @SerializedName("error_message") + String errorMessage; + } +} diff --git a/src/main/java/com/stripe/model/v2/extend/Workflow.java b/src/main/java/com/stripe/model/v2/extend/Workflow.java new file mode 100644 index 00000000000..92c468ad893 --- /dev/null +++ b/src/main/java/com/stripe/model/v2/extend/Workflow.java @@ -0,0 +1,113 @@ +// File generated from our OpenAPI spec +package com.stripe.model.v2.extend; + +import com.google.gson.annotations.SerializedName; +import com.stripe.model.HasId; +import com.stripe.model.StripeObject; +import java.time.Instant; +import java.util.List; +import lombok.EqualsAndHashCode; +import lombok.Getter; +import lombok.Setter; + +/** + * A Stripe Workflow is a sequence of actions, like Stripe API calls, that are taken in response to + * an initiating trigger. A trigger can be a Stripe API event, or a manual invocation. + */ +@Getter +@Setter +@EqualsAndHashCode(callSuper = false) +public class Workflow extends StripeObject implements HasId { + /** When the Workflow was created. */ + @SerializedName("created") + Instant created; + + /** The unique ID of the Workflow. */ + @Getter(onMethod_ = {@Override}) + @SerializedName("id") + String id; + + /** + * Has the value {@code true} if the object exists in live mode or the value {@code false} if the + * object exists in test mode. + */ + @SerializedName("livemode") + Boolean livemode; + + /** + * String representing the object's type. Objects of the same type share the same value of the + * object field. + * + *

Equal to {@code v2.extend.workflow}. + */ + @SerializedName("object") + String object; + + /** + * Whether this Workflow is active, inactive, or in some other state. Only active Workflows may be + * invoked. + * + *

One of {@code active}, {@code archived}, {@code draft}, or {@code inactive}. + */ + @SerializedName("status") + String status; + + /** Workflow title. */ + @SerializedName("title") + String title; + + /** Under what conditions will this Workflow launch. */ + @SerializedName("triggers") + List triggers; + + /** + * For more details about Trigger, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Trigger extends StripeObject { + /** The Workflow can be launched when Stripe emits a certain event. */ + @SerializedName("event_trigger") + EventTrigger eventTrigger; + + /** + * The Workflow can be launched through a direct call, using either the Dashboard or the Stripe + * API. + */ + @SerializedName("manual") + Manual manual; + + /** + * Which type of trigger this is. + * + *

One of {@code event_trigger}, or {@code manual}. + */ + @SerializedName("type") + String type; + + /** The Workflow can be launched when Stripe emits a certain event. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class EventTrigger extends StripeObject { + /** Specifies which accounts' events will trigger this Workflow. */ + @SerializedName("events_from") + List eventsFrom; + + /** The Stripe event type that will trigger this Workflow. */ + @SerializedName("type") + String type; + } + + /** + * The Workflow can be launched through a direct call, using either the Dashboard or the Stripe + * API. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Manual extends StripeObject {} + } +} diff --git a/src/main/java/com/stripe/model/v2/extend/WorkflowRun.java b/src/main/java/com/stripe/model/v2/extend/WorkflowRun.java new file mode 100644 index 00000000000..bcbc8b70539 --- /dev/null +++ b/src/main/java/com/stripe/model/v2/extend/WorkflowRun.java @@ -0,0 +1,181 @@ +// File generated from our OpenAPI spec +package com.stripe.model.v2.extend; + +import com.google.gson.annotations.SerializedName; +import com.stripe.model.HasId; +import com.stripe.model.StripeObject; +import java.time.Instant; +import java.util.Map; +import lombok.EqualsAndHashCode; +import lombok.Getter; +import lombok.Setter; + +/** An execution of a Workflow in response to a triggering event. */ +@Getter +@Setter +@EqualsAndHashCode(callSuper = false) +public class WorkflowRun extends StripeObject implements HasId { + /** When the Workflow Run was created. */ + @SerializedName("created") + Instant created; + + /** The unique ID of the Workflow Run. */ + @Getter(onMethod_ = {@Override}) + @SerializedName("id") + String id; + + /** + * Has the value {@code true} if the object exists in live mode or the value {@code false} if the + * object exists in test mode. + */ + @SerializedName("livemode") + Boolean livemode; + + /** + * String representing the object's type. Objects of the same type share the same value of the + * object field. + * + *

Equal to {@code v2.extend.workflow_run}. + */ + @SerializedName("object") + String object; + + /** + * The current Workflow Run execution status. + * + *

One of {@code failed}, {@code started}, or {@code succeeded}. + */ + @SerializedName("status") + String status; + + /** Details about the Workflow Run's status transitions. */ + @SerializedName("status_details") + StatusDetails statusDetails; + + /** Summary information about the Workflow Run's status transitions. */ + @SerializedName("status_transitions") + StatusTransitions statusTransitions; + + /** A record of the trigger that launched this Workflow Run. */ + @SerializedName("trigger") + Trigger trigger; + + /** The Workflow this Run belongs to. */ + @SerializedName("workflow") + String workflow; + + /** Details about the Workflow Run's status transitions. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class StatusDetails extends StripeObject { + /** Details about the Workflow Run's transition into the FAILED state. */ + @SerializedName("failed") + Failed failed; + + /** Details about the Workflow Run's transition in to the STARTED state. */ + @SerializedName("started") + Started started; + + /** Details about the Workflow Run's transition into the SUCCEEDED state. */ + @SerializedName("succeeded") + Succeeded succeeded; + + /** Details about the Workflow Run's transition into the FAILED state. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Failed extends StripeObject { + /** Optional details about the failure result. */ + @SerializedName("error_message") + String errorMessage; + } + + /** Details about the Workflow Run's transition in to the STARTED state. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Started extends StripeObject {} + + /** Details about the Workflow Run's transition into the SUCCEEDED state. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Succeeded extends StripeObject {} + } + + /** Summary information about the Workflow Run's status transitions. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class StatusTransitions extends StripeObject { + /** When the Workflow Run failed. */ + @SerializedName("failed_at") + Instant failedAt; + + /** When the Workflow Run was started. */ + @SerializedName("started_at") + Instant startedAt; + + /** When the Workflow Run succeeded. */ + @SerializedName("succeeded_at") + Instant succeededAt; + } + + /** A record of the trigger that launched this Workflow Run. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Trigger extends StripeObject { + /** The Workflow Run was launched when Stripe emitted a certain event. */ + @SerializedName("event_trigger") + EventTrigger eventTrigger; + + /** + * The Workflow Run was launched through a direct call, using either the Dashboard or the Stripe + * API. + */ + @SerializedName("manual") + Manual manual; + + /** + * Which type of trigger this is. + * + *

One of {@code event_trigger}, or {@code manual}. + */ + @SerializedName("type") + String type; + + /** The Workflow Run was launched when Stripe emitted a certain event. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class EventTrigger extends StripeObject implements HasId { + /** The account that generated the triggering event. */ + @SerializedName("context") + String context; + + /** The Stripe event that triggered this Run. */ + @Getter(onMethod_ = {@Override}) + @SerializedName("id") + String id; + + /** The Stripe event type triggered this Run. */ + @SerializedName("type") + String type; + } + + /** + * The Workflow Run was launched through a direct call, using either the Dashboard or the Stripe + * API. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Manual extends StripeObject { + /** The input parameters used when launching the Run. */ + @SerializedName("input_parameters") + Map inputParameters; + } + } +} diff --git a/src/main/java/com/stripe/model/v2/iam/ActivityLog.java b/src/main/java/com/stripe/model/v2/iam/ActivityLog.java new file mode 100644 index 00000000000..fadbbbe57e1 --- /dev/null +++ b/src/main/java/com/stripe/model/v2/iam/ActivityLog.java @@ -0,0 +1,238 @@ +// File generated from our OpenAPI spec +package com.stripe.model.v2.iam; + +import com.google.gson.annotations.SerializedName; +import com.stripe.model.HasId; +import com.stripe.model.StripeObject; +import java.time.Instant; +import java.util.List; +import lombok.EqualsAndHashCode; +import lombok.Getter; +import lombok.Setter; + +/** An activity log records a single action performed on an account. */ +@Getter +@Setter +@EqualsAndHashCode(callSuper = false) +public class ActivityLog extends StripeObject implements HasId { + /** The actor that performed the action. */ + @SerializedName("actor") + Actor actor; + + /** The account on which the action was performed. */ + @SerializedName("context") + String context; + + /** Timestamp when the activity log entry was created. */ + @SerializedName("created") + Instant created; + + /** Action-specific details of the activity log entry. */ + @SerializedName("details") + Details details; + + /** Unique identifier of the activity log entry. */ + @Getter(onMethod_ = {@Override}) + @SerializedName("id") + String id; + + /** Whether the action was performed in live mode. */ + @SerializedName("livemode") + Boolean livemode; + + /** + * String representing the object's type. Objects of the same type share the same value of the + * object field. + * + *

Equal to {@code v2.iam.activity_log}. + */ + @SerializedName("object") + String object; + + /** + * The type of action that was performed. + * + *

One of {@code api_key_created}, {@code api_key_deleted}, {@code api_key_updated}, {@code + * api_key_viewed}, {@code user_invite_accepted}, {@code user_invite_created}, {@code + * user_invite_deleted}, {@code user_roles_deleted}, or {@code user_roles_updated}. + */ + @SerializedName("type") + String type; + + /** The actor that performed the action. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Actor extends StripeObject { + /** Set when the actor is an API key. */ + @SerializedName("api_key") + ApiKey apiKey; + + /** + * The type of actor. + * + *

One of {@code api_key}, or {@code user}. + */ + @SerializedName("type") + String type; + + /** Set when the actor is a user. */ + @SerializedName("user") + User user; + + /** Set when the actor is an API key. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class ApiKey extends StripeObject implements HasId { + /** Unique identifier of the API key. */ + @Getter(onMethod_ = {@Override}) + @SerializedName("id") + String id; + } + + /** Set when the actor is a user. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class User extends StripeObject { + /** Email address of the user. */ + @SerializedName("email") + String email; + } + } + + /** Action-specific details of the activity log entry. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Details extends StripeObject { + /** Details of an API key action. */ + @SerializedName("api_key") + ApiKey apiKey; + + /** + * The action group type of the activity log entry. + * + *

One of {@code api_key}, {@code user_invite}, or {@code user_roles}. + */ + @SerializedName("type") + String type; + + /** Details of a user invite action. */ + @SerializedName("user_invite") + UserInvite userInvite; + + /** Details of a user role change action. */ + @SerializedName("user_roles") + UserRoles userRoles; + + /** Details of an API key action. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class ApiKey extends StripeObject implements HasId { + /** Timestamp when the API key was created. */ + @SerializedName("created") + Instant created; + + /** Timestamp when the API key expires. */ + @SerializedName("expires_at") + Instant expiresAt; + + /** Unique identifier of the API key. */ + @Getter(onMethod_ = {@Override}) + @SerializedName("id") + String id; + + /** List of IP addresses allowed to use this API key. */ + @SerializedName("ip_allowlist") + List ipAllowlist; + + /** Information about the entity managing this API key. */ + @SerializedName("managed_by") + ManagedBy managedBy; + + /** Name of the API key. */ + @SerializedName("name") + String name; + + /** Unique identifier of the new API key, set when this key was rotated. */ + @SerializedName("new_key") + String newKey; + + /** Note or description for the API key. */ + @SerializedName("note") + String note; + + /** + * Type of the API key. + * + *

One of {@code publishable_key}, or {@code secret_key}. + */ + @SerializedName("type") + String type; + + /** Information about the entity managing this API key. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class ManagedBy extends StripeObject { + /** An application. */ + @SerializedName("application") + Application application; + + /** + * The type of entity. + * + *

Equal to {@code application}. + */ + @SerializedName("type") + String type; + + /** An application. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Application extends StripeObject implements HasId { + /** Identifier of the application. */ + @Getter(onMethod_ = {@Override}) + @SerializedName("id") + String id; + } + } + } + + /** Details of a user invite action. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class UserInvite extends StripeObject { + /** Email address of the invited user. */ + @SerializedName("invited_user_email") + String invitedUserEmail; + + /** Roles assigned to the invited user. */ + @SerializedName("roles") + List roles; + } + + /** Details of a user role change action. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class UserRoles extends StripeObject { + /** Roles the user has after the change. */ + @SerializedName("new_roles") + List newRoles; + + /** Roles the user had before the change. */ + @SerializedName("old_roles") + List oldRoles; + + /** Email address of the user whose roles were changed. */ + @SerializedName("user_email") + String userEmail; + } + } +} diff --git a/src/main/java/com/stripe/model/v2/moneymanagement/InboundTransfer.java b/src/main/java/com/stripe/model/v2/moneymanagement/InboundTransfer.java index 4816f0ba479..6a48397ee62 100644 --- a/src/main/java/com/stripe/model/v2/moneymanagement/InboundTransfer.java +++ b/src/main/java/com/stripe/model/v2/moneymanagement/InboundTransfer.java @@ -7,7 +7,6 @@ import com.stripe.v2.Amount; import java.time.Instant; import java.util.List; -import java.util.Map; import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.Setter; @@ -134,11 +133,11 @@ public static class TransferHistory extends StripeObject implements HasId { /** The history entry for a processing InboundTransfer. */ @SerializedName("bank_debit_processing") - Map bankDebitProcessing; + BankDebitProcessing bankDebitProcessing; /** The history entry for a queued InboundTransfer. */ @SerializedName("bank_debit_queued") - Map bankDebitQueued; + BankDebitQueued bankDebitQueued; /** The history entry for a returned InboundTransfer. */ @SerializedName("bank_debit_returned") @@ -146,7 +145,7 @@ public static class TransferHistory extends StripeObject implements HasId { /** The history entry for a succeeded InboundTransfer. */ @SerializedName("bank_debit_succeeded") - Map bankDebitSucceeded; + BankDebitSucceeded bankDebitSucceeded; /** Creation time of the HistoryEntry in RFC 3339 format and UTC. */ @SerializedName("created") @@ -194,6 +193,18 @@ public static class BankDebitFailed extends StripeObject { String failureReason; } + /** The history entry for a processing InboundTransfer. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class BankDebitProcessing extends StripeObject {} + + /** The history entry for a queued InboundTransfer. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class BankDebitQueued extends StripeObject {} + /** The history entry for a returned InboundTransfer. */ @Getter @Setter @@ -209,5 +220,11 @@ public static class BankDebitReturned extends StripeObject { @SerializedName("return_reason") String returnReason; } + + /** The history entry for a succeeded InboundTransfer. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class BankDebitSucceeded extends StripeObject {} } } diff --git a/src/main/java/com/stripe/model/v2/moneymanagement/OutboundTransfer.java b/src/main/java/com/stripe/model/v2/moneymanagement/OutboundTransfer.java index c052f60f631..864078c9315 100644 --- a/src/main/java/com/stripe/model/v2/moneymanagement/OutboundTransfer.java +++ b/src/main/java/com/stripe/model/v2/moneymanagement/OutboundTransfer.java @@ -181,9 +181,10 @@ public static class Failed extends StripeObject { /** * Open Enum. The {@code failed} status reason. * - *

One of {@code payout_method_declined}, {@code payout_method_does_not_exist}, {@code - * payout_method_expired}, {@code payout_method_unsupported}, {@code - * payout_method_usage_frequency_limit_exceeded}, or {@code unknown_failure}. + *

One of {@code payout_method_amount_limit_exceeded}, {@code payout_method_declined}, + * {@code payout_method_does_not_exist}, {@code payout_method_expired}, {@code + * payout_method_unsupported}, {@code payout_method_usage_frequency_limit_exceeded}, or {@code + * unknown_failure}. */ @SerializedName("reason") String reason; diff --git a/src/main/java/com/stripe/model/v2/moneymanagement/PayoutMethod.java b/src/main/java/com/stripe/model/v2/moneymanagement/PayoutMethod.java index 3635800ffb6..170fdee8b75 100644 --- a/src/main/java/com/stripe/model/v2/moneymanagement/PayoutMethod.java +++ b/src/main/java/com/stripe/model/v2/moneymanagement/PayoutMethod.java @@ -118,7 +118,7 @@ public static class BankAccount extends StripeObject { /** * The type of bank account (checking or savings). * - *

One of {@code checking}, or {@code savings}. + *

One of {@code checking}, {@code futsu}, {@code savings}, or {@code toza}. */ @SerializedName("bank_account_type") String bankAccountType; diff --git a/src/main/java/com/stripe/model/v2/moneymanagement/Transaction.java b/src/main/java/com/stripe/model/v2/moneymanagement/Transaction.java index bb463978436..db8d31ac62d 100644 --- a/src/main/java/com/stripe/model/v2/moneymanagement/Transaction.java +++ b/src/main/java/com/stripe/model/v2/moneymanagement/Transaction.java @@ -36,8 +36,10 @@ public class Transaction extends StripeObject implements HasId { * Open Enum. A descriptive category used to classify the Transaction. * *

One of {@code adjustment}, {@code currency_conversion}, {@code inbound_transfer}, {@code - * outbound_payment}, {@code outbound_transfer}, {@code received_credit}, {@code received_debit}, - * {@code return}, or {@code stripe_fee}. + * inbound_transfer_reversal}, {@code outbound_payment}, {@code outbound_payment_reversal}, {@code + * outbound_transfer}, {@code outbound_transfer_reversal}, {@code received_credit}, {@code + * received_credit_reversal}, {@code received_debit}, {@code received_debit_reversal}, {@code + * stripe_fee}, or {@code stripe_fee_tax}. */ @SerializedName("category") String category; diff --git a/src/main/java/com/stripe/model/v2/moneymanagement/TransactionEntry.java b/src/main/java/com/stripe/model/v2/moneymanagement/TransactionEntry.java index 87d1e6f2e15..e738941e82c 100644 --- a/src/main/java/com/stripe/model/v2/moneymanagement/TransactionEntry.java +++ b/src/main/java/com/stripe/model/v2/moneymanagement/TransactionEntry.java @@ -90,8 +90,10 @@ public static class TransactionDetails extends StripeObject { * to classify the Transaction. * *

One of {@code adjustment}, {@code currency_conversion}, {@code inbound_transfer}, {@code - * outbound_payment}, {@code outbound_transfer}, {@code received_credit}, {@code - * received_debit}, {@code return}, or {@code stripe_fee}. + * inbound_transfer_reversal}, {@code outbound_payment}, {@code outbound_payment_reversal}, + * {@code outbound_transfer}, {@code outbound_transfer_reversal}, {@code received_credit}, + * {@code received_credit_reversal}, {@code received_debit}, {@code received_debit_reversal}, + * {@code stripe_fee}, or {@code stripe_fee_tax}. */ @SerializedName("category") String category; diff --git a/src/main/java/com/stripe/model/v2/network/BusinessProfile.java b/src/main/java/com/stripe/model/v2/network/BusinessProfile.java new file mode 100644 index 00000000000..79c44dd89af --- /dev/null +++ b/src/main/java/com/stripe/model/v2/network/BusinessProfile.java @@ -0,0 +1,101 @@ +// File generated from our OpenAPI spec +package com.stripe.model.v2.network; + +import com.google.gson.annotations.SerializedName; +import com.stripe.model.HasId; +import com.stripe.model.StripeObject; +import lombok.EqualsAndHashCode; +import lombok.Getter; +import lombok.Setter; + +/** The Stripe profile represents a business' public identity on the Stripe network. */ +@Getter +@Setter +@EqualsAndHashCode(callSuper = false) +public class BusinessProfile extends StripeObject implements HasId { + /** Branding data for the business. */ + @SerializedName("branding") + Branding branding; + + /** The description of the business. */ + @SerializedName("description") + String description; + + /** The display name of the Stripe profile. */ + @SerializedName("display_name") + String displayName; + + /** + * The ID of the Stripe business profile; also known as the Network ID. This is the ID used to + * identify the business on the Stripe network. + */ + @Getter(onMethod_ = {@Override}) + @SerializedName("id") + String id; + + /** + * Has the value {@code true} if the object exists in live mode or the value {@code false} if the + * object exists in test mode. + */ + @SerializedName("livemode") + Boolean livemode; + + /** + * String representing the object's type. Objects of the same type share the same value of the + * object field. + * + *

Equal to {@code v2.network.business_profile}. + */ + @SerializedName("object") + String object; + + /** The URL of the business. */ + @SerializedName("url") + String url; + + /** The username of the Stripe profile. */ + @SerializedName("username") + String username; + + /** Branding data for the business. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Branding extends StripeObject { + /** URL of the icon for the business. The image will be square and at least 128px x 128px. */ + @SerializedName("icon") + Icon icon; + + /** URL of the logo for the business. The image will be at least 128px x 128px. */ + @SerializedName("logo") + Logo logo; + + /** A CSS hex color value representing the primary branding color for this business. */ + @SerializedName("primary_color") + String primaryColor; + + /** A CSS hex color value representing the secondary branding color for this business. */ + @SerializedName("secondary_color") + String secondaryColor; + + /** URL of the icon for the business. The image will be square and at least 128px x 128px. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Icon extends StripeObject { + /** The URL of the image in its original size. */ + @SerializedName("original") + String original; + } + + /** URL of the logo for the business. The image will be at least 128px x 128px. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Logo extends StripeObject { + /** The URL of the image in its original size. */ + @SerializedName("original") + String original; + } + } +} diff --git a/src/main/java/com/stripe/model/v2/orchestratedcommerce/Agreement.java b/src/main/java/com/stripe/model/v2/orchestratedcommerce/Agreement.java new file mode 100644 index 00000000000..6d567f837e1 --- /dev/null +++ b/src/main/java/com/stripe/model/v2/orchestratedcommerce/Agreement.java @@ -0,0 +1,125 @@ +// File generated from our OpenAPI spec +package com.stripe.model.v2.orchestratedcommerce; + +import com.google.gson.annotations.SerializedName; +import com.stripe.model.HasId; +import com.stripe.model.StripeObject; +import java.time.Instant; +import lombok.EqualsAndHashCode; +import lombok.Getter; +import lombok.Setter; + +/** + * An Orchestrated Commerce Agreement represents a mutual agreement between a seller and an + * orchestrator/agent on the Stripe network. + */ +@Getter +@Setter +@EqualsAndHashCode(callSuper = false) +public class Agreement extends StripeObject implements HasId { + /** The time at which the agreement was created. */ + @SerializedName("created") + Instant created; + + /** The unique identifier for the agreement. */ + @Getter(onMethod_ = {@Override}) + @SerializedName("id") + String id; + + /** + * The party that initiated the agreement. + * + *

One of {@code orchestrator}, or {@code seller}. + */ + @SerializedName("initiated_by") + String initiatedBy; + + /** + * Has the value {@code true} if the object exists in live mode or the value {@code false} if the + * object exists in test mode. + */ + @SerializedName("livemode") + Boolean livemode; + + /** + * String representing the object's type. Objects of the same type share the same value of the + * object field. + * + *

Equal to {@code v2.orchestrated_commerce.agreement}. + */ + @SerializedName("object") + String object; + + /** Details about the orchestrator. */ + @SerializedName("orchestrator_details") + OrchestratorDetails orchestratorDetails; + + /** Details about the seller. */ + @SerializedName("seller_details") + SellerDetails sellerDetails; + + /** + * The current status of the agreement. + * + *

One of {@code confirmed}, {@code initiated}, {@code partially_confirmed}, or {@code + * terminated}. + */ + @SerializedName("status") + String status; + + /** Timestamps of key status transitions for the agreement. */ + @SerializedName("status_transitions") + StatusTransitions statusTransitions; + + /** + * The party that terminated the agreement, if applicable. + * + *

One of {@code orchestrator}, or {@code seller}. + */ + @SerializedName("terminated_by") + String terminatedBy; + + /** Details about the orchestrator. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class OrchestratorDetails extends StripeObject { + /** + * The name of the orchestrator. This can be the name of the agent or the name of the business. + */ + @SerializedName("name") + String name; + + /** The Network ID of the orchestrator. */ + @SerializedName("network_business_profile") + String networkBusinessProfile; + } + + /** Details about the seller. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class SellerDetails extends StripeObject { + /** The Network ID of the seller. */ + @SerializedName("network_business_profile") + String networkBusinessProfile; + } + + /** Timestamps of key status transitions for the agreement. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class StatusTransitions extends StripeObject { + /** The time at which the orchestrator confirmed the agreement. */ + @SerializedName("orchestrator_confirmed_at") + Instant orchestratorConfirmedAt; + + /** The time at which the seller confirmed the agreement. */ + @SerializedName("seller_confirmed_at") + Instant sellerConfirmedAt; + + /** The time at which the agreement was terminated. */ + @SerializedName("terminated_at") + Instant terminatedAt; + } +} diff --git a/src/main/java/com/stripe/param/v2/billing/BillSettingCreateParams.java b/src/main/java/com/stripe/param/v2/billing/BillSettingCreateParams.java index 606585fd130..52f5cb43c99 100644 --- a/src/main/java/com/stripe/param/v2/billing/BillSettingCreateParams.java +++ b/src/main/java/com/stripe/param/v2/billing/BillSettingCreateParams.java @@ -233,8 +233,8 @@ public static class Tax { Map extraParams; /** - * Required. Determines if tax will be calculated automatically based on a - * PTC or manually based on rules defined by the merchant. Defaults to "manual". + * Required. Determines if tax is calculated automatically based on a PTC or + * manually based on rules defined by the business. Defaults to "manual". */ @SerializedName("type") Type type; @@ -287,8 +287,8 @@ public Builder putAllExtraParam(Map map) { } /** - * Required. Determines if tax will be calculated automatically based on a - * PTC or manually based on rules defined by the merchant. Defaults to "manual". + * Required. Determines if tax is calculated automatically based on a PTC + * or manually based on rules defined by the business. Defaults to "manual". */ public Builder setType(BillSettingCreateParams.Calculation.Tax.Type type) { this.type = type; @@ -325,7 +325,7 @@ public static class Invoice { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** The amount of time until the invoice will be overdue for payment. */ + /** The amount of time until the invoice is overdue for payment. */ @SerializedName("time_until_due") TimeUntilDue timeUntilDue; @@ -374,7 +374,7 @@ public Builder putAllExtraParam(Map map) { return this; } - /** The amount of time until the invoice will be overdue for payment. */ + /** The amount of time until the invoice is overdue for payment. */ public Builder setTimeUntilDue(BillSettingCreateParams.Invoice.TimeUntilDue timeUntilDue) { this.timeUntilDue = timeUntilDue; return this; @@ -399,7 +399,7 @@ public static class TimeUntilDue { /** * Required. The number of interval units. For example, if interval=day and - * interval_count=30, the invoice will be due in 30 days. + * interval_count=30, the invoice is due in 30 days. */ @SerializedName("interval_count") Long intervalCount; @@ -463,7 +463,7 @@ public Builder setInterval(BillSettingCreateParams.Invoice.TimeUntilDue.Interval /** * Required. The number of interval units. For example, if interval=day and - * interval_count=30, the invoice will be due in 30 days. + * interval_count=30, the invoice is due in 30 days. */ public Builder setIntervalCount(Long intervalCount) { this.intervalCount = intervalCount; diff --git a/src/main/java/com/stripe/param/v2/billing/BillSettingUpdateParams.java b/src/main/java/com/stripe/param/v2/billing/BillSettingUpdateParams.java index e9aeba82b85..ae7dfd484d2 100644 --- a/src/main/java/com/stripe/param/v2/billing/BillSettingUpdateParams.java +++ b/src/main/java/com/stripe/param/v2/billing/BillSettingUpdateParams.java @@ -42,7 +42,7 @@ public class BillSettingUpdateParams extends ApiRequestParams { /** * Optionally change the live version of the BillSetting. Providing {@code live_version = - * "latest"} will set the BillSetting' {@code live_version} to its latest version. + * "latest"} sets the BillSetting' {@code live_version} to its latest version. */ @SerializedName("live_version") Object liveVersion; @@ -172,7 +172,7 @@ public Builder setInvoiceRenderingTemplate(EmptyParam invoiceRenderingTemplate) /** * Optionally change the live version of the BillSetting. Providing {@code live_version = - * "latest"} will set the BillSetting' {@code live_version} to its latest version. + * "latest"} sets the BillSetting' {@code live_version} to its latest version. */ public Builder setLiveVersion(String liveVersion) { this.liveVersion = liveVersion; @@ -181,7 +181,7 @@ public Builder setLiveVersion(String liveVersion) { /** * Optionally change the live version of the BillSetting. Providing {@code live_version = - * "latest"} will set the BillSetting' {@code live_version} to its latest version. + * "latest"} sets the BillSetting' {@code live_version} to its latest version. */ public Builder setLiveVersion(EmptyParam liveVersion) { this.liveVersion = liveVersion; @@ -288,8 +288,8 @@ public static class Tax { Map extraParams; /** - * Required. Determines if tax will be calculated automatically based on a - * PTC or manually based on rules defined by the merchant. Defaults to "manual". + * Required. Determines if tax is calculated automatically based on a PTC or + * manually based on rules defined by the business. Defaults to "manual". */ @SerializedName("type") Type type; @@ -342,8 +342,8 @@ public Builder putAllExtraParam(Map map) { } /** - * Required. Determines if tax will be calculated automatically based on a - * PTC or manually based on rules defined by the merchant. Defaults to "manual". + * Required. Determines if tax is calculated automatically based on a PTC + * or manually based on rules defined by the business. Defaults to "manual". */ public Builder setType(BillSettingUpdateParams.Calculation.Tax.Type type) { this.type = type; @@ -380,7 +380,7 @@ public static class Invoice { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** The amount of time until the invoice will be overdue for payment. */ + /** The amount of time until the invoice is overdue for payment. */ @SerializedName("time_until_due") TimeUntilDue timeUntilDue; @@ -429,7 +429,7 @@ public Builder putAllExtraParam(Map map) { return this; } - /** The amount of time until the invoice will be overdue for payment. */ + /** The amount of time until the invoice is overdue for payment. */ public Builder setTimeUntilDue(BillSettingUpdateParams.Invoice.TimeUntilDue timeUntilDue) { this.timeUntilDue = timeUntilDue; return this; @@ -454,7 +454,7 @@ public static class TimeUntilDue { /** * Required. The number of interval units. For example, if interval=day and - * interval_count=30, the invoice will be due in 30 days. + * interval_count=30, the invoice is due in 30 days. */ @SerializedName("interval_count") Long intervalCount; @@ -518,7 +518,7 @@ public Builder setInterval(BillSettingUpdateParams.Invoice.TimeUntilDue.Interval /** * Required. The number of interval units. For example, if interval=day and - * interval_count=30, the invoice will be due in 30 days. + * interval_count=30, the invoice is due in 30 days. */ public Builder setIntervalCount(Long intervalCount) { this.intervalCount = intervalCount; diff --git a/src/main/java/com/stripe/param/v2/billing/CadenceCreateParams.java b/src/main/java/com/stripe/param/v2/billing/CadenceCreateParams.java index 47cc41179bc..e0ddab3fb86 100644 --- a/src/main/java/com/stripe/param/v2/billing/CadenceCreateParams.java +++ b/src/main/java/com/stripe/param/v2/billing/CadenceCreateParams.java @@ -200,8 +200,8 @@ public static class BillingCycle { /** * The number of intervals (specified in the interval attribute) between cadence billings. For - * example, type=month and interval_count=3 bills every 3 months. If this is not provided, it - * will default to 1. + * example, type=month and interval_count=3 bills every 3 months. If not provided, this defaults + * to 1. */ @SerializedName("interval_count") Long intervalCount; @@ -304,8 +304,8 @@ public Builder putAllExtraParam(Map map) { /** * The number of intervals (specified in the interval attribute) between cadence billings. For - * example, type=month and interval_count=3 bills every 3 months. If this is not provided, it - * will default to 1. + * example, type=month and interval_count=3 bills every 3 months. If not provided, this + * defaults to 1. */ public Builder setIntervalCount(Long intervalCount) { this.intervalCount = intervalCount; @@ -351,7 +351,7 @@ public static class Day { /** * The time at which the billing cycle ends. This field is optional, and if not provided, it - * will default to the time at which the cadence was created in UTC timezone. + * defaults to the time at which the cadence was created in UTC timezone. */ @SerializedName("time") Time time; @@ -405,7 +405,7 @@ public Builder putAllExtraParam(Map map) { /** * The time at which the billing cycle ends. This field is optional, and if not provided, it - * will default to the time at which the cadence was created in UTC timezone. + * defaults to the time at which the cadence was created in UTC timezone. */ public Builder setTime(CadenceCreateParams.BillingCycle.Day.Time time) { this.time = time; @@ -537,8 +537,8 @@ public static class Month { /** * Required. The day to anchor the billing on for a type="month" * billing cycle from 1-31. If this number is greater than the number of days in the month - * being billed, this will anchor to the last day of the month. If not provided, this will - * default to the day the cadence was created. + * being billed, this anchors to the last day of the month. If not provided, this defaults to + * the day the cadence was created. */ @SerializedName("day_of_month") Long dayOfMonth; @@ -554,16 +554,16 @@ public static class Month { /** * The month to anchor the billing on for a type="month" billing cycle from 1-12. If - * not provided, this will default to the month the cadence was created. This setting can only - * be used for monthly billing cycles with {@code interval_count} of 2, 3, 4 or 6. All - * occurrences will be calculated from month provided. + * not provided, this defaults to the month the cadence was created. This setting can only be + * used for monthly billing cycles with {@code interval_count} of 2, 3, 4 or 6. All + * occurrences are calculated from the month provided. */ @SerializedName("month_of_year") Long monthOfYear; /** * The time at which the billing cycle ends. This field is optional, and if not provided, it - * will default to the time at which the cadence was created in UTC timezone. + * defaults to the time at which the cadence was created in UTC timezone. */ @SerializedName("time") Time time; @@ -597,8 +597,8 @@ public CadenceCreateParams.BillingCycle.Month build() { /** * Required. The day to anchor the billing on for a type="month" * billing cycle from 1-31. If this number is greater than the number of days in the month - * being billed, this will anchor to the last day of the month. If not provided, this will - * default to the day the cadence was created. + * being billed, this anchors to the last day of the month. If not provided, this defaults + * to the day the cadence was created. */ public Builder setDayOfMonth(Long dayOfMonth) { this.dayOfMonth = dayOfMonth; @@ -635,9 +635,9 @@ public Builder putAllExtraParam(Map map) { /** * The month to anchor the billing on for a type="month" billing cycle from 1-12. - * If not provided, this will default to the month the cadence was created. This setting can + * If not provided, this defaults to the month the cadence was created. This setting can * only be used for monthly billing cycles with {@code interval_count} of 2, 3, 4 or 6. All - * occurrences will be calculated from month provided. + * occurrences are calculated from the month provided. */ public Builder setMonthOfYear(Long monthOfYear) { this.monthOfYear = monthOfYear; @@ -646,7 +646,7 @@ public Builder setMonthOfYear(Long monthOfYear) { /** * The time at which the billing cycle ends. This field is optional, and if not provided, it - * will default to the time at which the cadence was created in UTC timezone. + * defaults to the time at which the cadence was created in UTC timezone. */ public Builder setTime(CadenceCreateParams.BillingCycle.Month.Time time) { this.time = time; @@ -778,7 +778,7 @@ public static class Week { /** * Required. The day of the week to bill the type=week billing cycle on. * Numbered from 1-7 for Monday to Sunday respectively, based on the ISO-8601 week day - * numbering. If not provided, this will default to the day the cadence was created. + * numbering. If not provided, this defaults to the day the cadence was created. */ @SerializedName("day_of_week") Long dayOfWeek; @@ -794,7 +794,7 @@ public static class Week { /** * The time at which the billing cycle ends. This field is optional, and if not provided, it - * will default to the time at which the cadence was created in UTC timezone. + * defaults to the time at which the cadence was created in UTC timezone. */ @SerializedName("time") Time time; @@ -825,7 +825,7 @@ public CadenceCreateParams.BillingCycle.Week build() { /** * Required. The day of the week to bill the type=week billing cycle on. * Numbered from 1-7 for Monday to Sunday respectively, based on the ISO-8601 week day - * numbering. If not provided, this will default to the day the cadence was created. + * numbering. If not provided, this defaults to the day the cadence was created. */ public Builder setDayOfWeek(Long dayOfWeek) { this.dayOfWeek = dayOfWeek; @@ -862,7 +862,7 @@ public Builder putAllExtraParam(Map map) { /** * The time at which the billing cycle ends. This field is optional, and if not provided, it - * will default to the time at which the cadence was created in UTC timezone. + * defaults to the time at which the cadence was created in UTC timezone. */ public Builder setTime(CadenceCreateParams.BillingCycle.Week.Time time) { this.time = time; @@ -993,8 +993,8 @@ public Builder setSecond(Long second) { public static class Year { /** * The day to anchor the billing on for a type="month" billing cycle from 1-31. If - * this number is greater than the number of days in the month being billed, this will anchor - * to the last day of the month. If not provided, this will default to the day the cadence was + * this number is greater than the number of days in the month being billed, this anchors to + * the last day of the month. If not provided, this defaults to the day the cadence was * created. */ @SerializedName("day_of_month") @@ -1010,15 +1010,15 @@ public static class Year { Map extraParams; /** - * The month to bill on from 1-12. If not provided, this will default to the month the cadence - * was created. + * The month to bill on from 1-12. If not provided, this defaults to the month the cadence was + * created. */ @SerializedName("month_of_year") Long monthOfYear; /** * The time at which the billing cycle ends. This field is optional, and if not provided, it - * will default to the time at which the cadence was created in UTC timezone. + * defaults to the time at which the cadence was created in UTC timezone. */ @SerializedName("time") Time time; @@ -1051,9 +1051,9 @@ public CadenceCreateParams.BillingCycle.Year build() { /** * The day to anchor the billing on for a type="month" billing cycle from 1-31. If - * this number is greater than the number of days in the month being billed, this will - * anchor to the last day of the month. If not provided, this will default to the day the - * cadence was created. + * this number is greater than the number of days in the month being billed, this anchors to + * the last day of the month. If not provided, this defaults to the day the cadence was + * created. */ public Builder setDayOfMonth(Long dayOfMonth) { this.dayOfMonth = dayOfMonth; @@ -1089,8 +1089,8 @@ public Builder putAllExtraParam(Map map) { } /** - * The month to bill on from 1-12. If not provided, this will default to the month the - * cadence was created. + * The month to bill on from 1-12. If not provided, this defaults to the month the cadence + * was created. */ public Builder setMonthOfYear(Long monthOfYear) { this.monthOfYear = monthOfYear; @@ -1099,7 +1099,7 @@ public Builder setMonthOfYear(Long monthOfYear) { /** * The time at which the billing cycle ends. This field is optional, and if not provided, it - * will default to the time at which the cadence was created in UTC timezone. + * defaults to the time at which the cadence was created in UTC timezone. */ public Builder setTime(CadenceCreateParams.BillingCycle.Year.Time time) { this.time = time; @@ -1252,7 +1252,7 @@ public enum Type implements ApiRequestParams.EnumParam { public static class Payer { /** * Required. The ID of the Billing Profile object which determines how a bill - * will be paid. + * is paid. */ @SerializedName("billing_profile") String billingProfile; @@ -1287,7 +1287,7 @@ public CadenceCreateParams.Payer build() { /** * Required. The ID of the Billing Profile object which determines how a bill - * will be paid. + * is paid. */ public Builder setBillingProfile(String billingProfile) { this.billingProfile = billingProfile; @@ -1439,8 +1439,8 @@ public static class Bill { String id; /** - * An optional field to specify the version of the Settings to use. If not provided, this will - * always default to the live version any time the settings are used. + * An optional field to specify the version of the Settings to use. If not provided, this + * defaults to the live version any time the settings are used. */ @SerializedName("version") String version; @@ -1503,7 +1503,7 @@ public Builder setId(String id) { /** * An optional field to specify the version of the Settings to use. If not provided, this - * will always default to the live version any time the settings are used. + * defaults to the live version any time the settings are used. */ public Builder setVersion(String version) { this.version = version; @@ -1529,8 +1529,8 @@ public static class Collection { String id; /** - * An optional field to specify the version of the Settings to use. If not provided, this will - * always default to the live version any time the settings are used. + * An optional field to specify the version of the Settings to use. If not provided, this + * defaults to the live version any time the settings are used. */ @SerializedName("version") String version; @@ -1594,7 +1594,7 @@ public Builder setId(String id) { /** * An optional field to specify the version of the Settings to use. If not provided, this - * will always default to the live version any time the settings are used. + * defaults to the live version any time the settings are used. */ public Builder setVersion(String version) { this.version = version; diff --git a/src/main/java/com/stripe/param/v2/billing/CadenceUpdateParams.java b/src/main/java/com/stripe/param/v2/billing/CadenceUpdateParams.java index 25d57dff2cd..188cd14a13a 100644 --- a/src/main/java/com/stripe/param/v2/billing/CadenceUpdateParams.java +++ b/src/main/java/com/stripe/param/v2/billing/CadenceUpdateParams.java @@ -182,7 +182,7 @@ public Builder setSettings(CadenceUpdateParams.Settings settings) { @Getter @EqualsAndHashCode(callSuper = false) public static class Payer { - /** The ID of the Billing Profile object which determines how a bill will be paid. */ + /** The ID of the Billing Profile object which determines how a bill is paid. */ @SerializedName("billing_profile") Object billingProfile; @@ -214,13 +214,13 @@ public CadenceUpdateParams.Payer build() { return new CadenceUpdateParams.Payer(this.billingProfile, this.extraParams); } - /** The ID of the Billing Profile object which determines how a bill will be paid. */ + /** The ID of the Billing Profile object which determines how a bill is paid. */ public Builder setBillingProfile(String billingProfile) { this.billingProfile = billingProfile; return this; } - /** The ID of the Billing Profile object which determines how a bill will be paid. */ + /** The ID of the Billing Profile object which determines how a bill is paid. */ public Builder setBillingProfile(EmptyParam billingProfile) { this.billingProfile = billingProfile; return this; @@ -366,10 +366,10 @@ public static class Bill { Object id; /** - * An optional field to specify the version of Settings to use. If not provided, this will - * always default to the {@code live_version} specified on the setting, any time the settings - * are used. Using a specific version here will prevent the settings from updating, and is - * discouraged for cadences. To clear a pinned version, set the version to null. + * An optional field to specify the version of Settings to use. If not provided, this defaults + * to the {@code live_version} specified on the setting, any time the settings are used. Using + * a specific version here prevents the settings from updating, and is discouraged for + * cadences. To clear a pinned version, set the version to null. */ @SerializedName("version") Object version; @@ -437,10 +437,10 @@ public Builder setId(EmptyParam id) { } /** - * An optional field to specify the version of Settings to use. If not provided, this will - * always default to the {@code live_version} specified on the setting, any time the - * settings are used. Using a specific version here will prevent the settings from updating, - * and is discouraged for cadences. To clear a pinned version, set the version to null. + * An optional field to specify the version of Settings to use. If not provided, this + * defaults to the {@code live_version} specified on the setting, any time the settings are + * used. Using a specific version here prevents the settings from updating, and is + * discouraged for cadences. To clear a pinned version, set the version to null. */ public Builder setVersion(String version) { this.version = version; @@ -448,10 +448,10 @@ public Builder setVersion(String version) { } /** - * An optional field to specify the version of Settings to use. If not provided, this will - * always default to the {@code live_version} specified on the setting, any time the - * settings are used. Using a specific version here will prevent the settings from updating, - * and is discouraged for cadences. To clear a pinned version, set the version to null. + * An optional field to specify the version of Settings to use. If not provided, this + * defaults to the {@code live_version} specified on the setting, any time the settings are + * used. Using a specific version here prevents the settings from updating, and is + * discouraged for cadences. To clear a pinned version, set the version to null. */ public Builder setVersion(EmptyParam version) { this.version = version; @@ -477,10 +477,10 @@ public static class Collection { Object id; /** - * An optional field to specify the version of Settings to use. If not provided, this will - * always default to the {@code live_version} specified on the setting, any time the settings - * are used. Using a specific version here will prevent the settings from updating, and is - * discouraged for cadences. To clear a pinned version, set the version to null. + * An optional field to specify the version of Settings to use. If not provided, this defaults + * to the {@code live_version} specified on the setting, any time the settings are used. Using + * a specific version here prevents the settings from updating, and is discouraged for + * cadences. To clear a pinned version, set the version to null. */ @SerializedName("version") Object version; @@ -549,10 +549,10 @@ public Builder setId(EmptyParam id) { } /** - * An optional field to specify the version of Settings to use. If not provided, this will - * always default to the {@code live_version} specified on the setting, any time the - * settings are used. Using a specific version here will prevent the settings from updating, - * and is discouraged for cadences. To clear a pinned version, set the version to null. + * An optional field to specify the version of Settings to use. If not provided, this + * defaults to the {@code live_version} specified on the setting, any time the settings are + * used. Using a specific version here prevents the settings from updating, and is + * discouraged for cadences. To clear a pinned version, set the version to null. */ public Builder setVersion(String version) { this.version = version; @@ -560,10 +560,10 @@ public Builder setVersion(String version) { } /** - * An optional field to specify the version of Settings to use. If not provided, this will - * always default to the {@code live_version} specified on the setting, any time the - * settings are used. Using a specific version here will prevent the settings from updating, - * and is discouraged for cadences. To clear a pinned version, set the version to null. + * An optional field to specify the version of Settings to use. If not provided, this + * defaults to the {@code live_version} specified on the setting, any time the settings are + * used. Using a specific version here prevents the settings from updating, and is + * discouraged for cadences. To clear a pinned version, set the version to null. */ public Builder setVersion(EmptyParam version) { this.version = version; diff --git a/src/main/java/com/stripe/param/v2/billing/CollectionSettingCreateParams.java b/src/main/java/com/stripe/param/v2/billing/CollectionSettingCreateParams.java index 6eab345b23f..32dfaca1813 100644 --- a/src/main/java/com/stripe/param/v2/billing/CollectionSettingCreateParams.java +++ b/src/main/java/com/stripe/param/v2/billing/CollectionSettingCreateParams.java @@ -16,9 +16,9 @@ @EqualsAndHashCode(callSuper = false) public class CollectionSettingCreateParams extends ApiRequestParams { /** - * Either automatic, or send_invoice. When charging automatically, Stripe will attempt to pay this - * bill at the end of the period using the payment method attached to the payer profile. When - * sending an invoice, Stripe will email your payer profile an invoice with payment instructions. + * Either automatic, or send_invoice. When charging automatically, Stripe attempts to pay this + * bill at the end of the period using the payment method attached to the billing profile. When + * sending an invoice, Stripe emails your billing profile an invoice with payment instructions. * Defaults to automatic. */ @SerializedName("collection_method") @@ -111,10 +111,10 @@ public CollectionSettingCreateParams build() { } /** - * Either automatic, or send_invoice. When charging automatically, Stripe will attempt to pay - * this bill at the end of the period using the payment method attached to the payer profile. - * When sending an invoice, Stripe will email your payer profile an invoice with payment - * instructions. Defaults to automatic. + * Either automatic, or send_invoice. When charging automatically, Stripe attempts to pay this + * bill at the end of the period using the payment method attached to the billing profile. When + * sending an invoice, Stripe emails your billing profile an invoice with payment instructions. + * Defaults to automatic. */ public Builder setCollectionMethod( CollectionSettingCreateParams.CollectionMethod collectionMethod) { @@ -397,11 +397,11 @@ public static class PaymentMethodOptions { /** This sub-hash contains details about the Konbini payment method options. */ @SerializedName("konbini") - Map konbini; + Konbini konbini; /** This sub-hash contains details about the SEPA Direct Debit payment method options. */ @SerializedName("sepa_debit") - Map sepaDebit; + SepaDebit sepaDebit; /** This sub-hash contains details about the ACH direct debit payment method options. */ @SerializedName("us_bank_account") @@ -413,8 +413,8 @@ private PaymentMethodOptions( Card card, CustomerBalance customerBalance, Map extraParams, - Map konbini, - Map sepaDebit, + Konbini konbini, + SepaDebit sepaDebit, UsBankAccount usBankAccount) { this.acssDebit = acssDebit; this.bancontact = bancontact; @@ -441,9 +441,9 @@ public static class Builder { private Map extraParams; - private Map konbini; + private Konbini konbini; - private Map sepaDebit; + private SepaDebit sepaDebit; private UsBankAccount usBankAccount; @@ -518,57 +518,17 @@ public Builder putAllExtraParam(Map map) { return this; } - /** - * Add a key/value pair to `konbini` map. A map is initialized for the first `put/putAll` - * call, and subsequent calls add additional key/value pairs to the original map. See {@link - * CollectionSettingCreateParams.PaymentMethodOptions#konbini} for the field documentation. - */ - public Builder putKonbini(String key, Object value) { - if (this.konbini == null) { - this.konbini = new HashMap<>(); - } - this.konbini.put(key, value); - return this; - } - - /** - * Add all map key/value pairs to `konbini` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. - * See {@link CollectionSettingCreateParams.PaymentMethodOptions#konbini} for the field - * documentation. - */ - public Builder putAllKonbini(Map map) { - if (this.konbini == null) { - this.konbini = new HashMap<>(); - } - this.konbini.putAll(map); - return this; - } - - /** - * Add a key/value pair to `sepaDebit` map. A map is initialized for the first `put/putAll` - * call, and subsequent calls add additional key/value pairs to the original map. See {@link - * CollectionSettingCreateParams.PaymentMethodOptions#sepaDebit} for the field documentation. - */ - public Builder putSepaDebit(String key, Object value) { - if (this.sepaDebit == null) { - this.sepaDebit = new HashMap<>(); - } - this.sepaDebit.put(key, value); + /** This sub-hash contains details about the Konbini payment method options. */ + public Builder setKonbini( + CollectionSettingCreateParams.PaymentMethodOptions.Konbini konbini) { + this.konbini = konbini; return this; } - /** - * Add all map key/value pairs to `sepaDebit` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. - * See {@link CollectionSettingCreateParams.PaymentMethodOptions#sepaDebit} for the field - * documentation. - */ - public Builder putAllSepaDebit(Map map) { - if (this.sepaDebit == null) { - this.sepaDebit = new HashMap<>(); - } - this.sepaDebit.putAll(map); + /** This sub-hash contains details about the SEPA Direct Debit payment method options. */ + public Builder setSepaDebit( + CollectionSettingCreateParams.PaymentMethodOptions.SepaDebit sepaDebit) { + this.sepaDebit = sepaDebit; return this; } @@ -1507,6 +1467,122 @@ public enum FundingType implements ApiRequestParams.EnumParam { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Konbini { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Konbini(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public CollectionSettingCreateParams.PaymentMethodOptions.Konbini build() { + return new CollectionSettingCreateParams.PaymentMethodOptions.Konbini(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link CollectionSettingCreateParams.PaymentMethodOptions.Konbini#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link CollectionSettingCreateParams.PaymentMethodOptions.Konbini#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class SepaDebit { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private SepaDebit(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public CollectionSettingCreateParams.PaymentMethodOptions.SepaDebit build() { + return new CollectionSettingCreateParams.PaymentMethodOptions.SepaDebit(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link CollectionSettingCreateParams.PaymentMethodOptions.SepaDebit#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link CollectionSettingCreateParams.PaymentMethodOptions.SepaDebit#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class UsBankAccount { diff --git a/src/main/java/com/stripe/param/v2/billing/CollectionSettingUpdateParams.java b/src/main/java/com/stripe/param/v2/billing/CollectionSettingUpdateParams.java index 95fb6832134..9c520c61bf6 100644 --- a/src/main/java/com/stripe/param/v2/billing/CollectionSettingUpdateParams.java +++ b/src/main/java/com/stripe/param/v2/billing/CollectionSettingUpdateParams.java @@ -17,9 +17,9 @@ @EqualsAndHashCode(callSuper = false) public class CollectionSettingUpdateParams extends ApiRequestParams { /** - * Either automatic, or send_invoice. When charging automatically, Stripe will attempt to pay this - * bill at the end of the period using the payment method attached to the payer profile. When - * sending an invoice, Stripe will email your payer profile an invoice with payment instructions. + * Either automatic, or send_invoice. When charging automatically, Stripe attempts to pay this + * bill at the end of the period using the payment method attached to the billing profile. When + * sending an invoice, Stripe emails your billing profile an invoice with payment instructions. */ @SerializedName("collection_method") CollectionMethod collectionMethod; @@ -46,9 +46,9 @@ public class CollectionSettingUpdateParams extends ApiRequestParams { /** * Optionally change the live version of the CollectionSetting. Billing Cadences and other objects - * that refer to this CollectionSetting will use this version when no overrides are set. Providing - * {@code live_version = "latest"} will set the CollectionSetting's {@code live_version} to its - * latest version. + * that refer to this CollectionSetting uses this version when no overrides are set. Providing + * {@code live_version = "latest"} sets the CollectionSetting's {@code live_version} to its latest + * version. */ @SerializedName("live_version") Object liveVersion; @@ -125,10 +125,9 @@ public CollectionSettingUpdateParams build() { } /** - * Either automatic, or send_invoice. When charging automatically, Stripe will attempt to pay - * this bill at the end of the period using the payment method attached to the payer profile. - * When sending an invoice, Stripe will email your payer profile an invoice with payment - * instructions. + * Either automatic, or send_invoice. When charging automatically, Stripe attempts to pay this + * bill at the end of the period using the payment method attached to the billing profile. When + * sending an invoice, Stripe emails your billing profile an invoice with payment instructions. */ public Builder setCollectionMethod( CollectionSettingUpdateParams.CollectionMethod collectionMethod) { @@ -188,9 +187,9 @@ public Builder putAllExtraParam(Map map) { /** * Optionally change the live version of the CollectionSetting. Billing Cadences and other - * objects that refer to this CollectionSetting will use this version when no overrides are set. - * Providing {@code live_version = "latest"} will set the CollectionSetting's {@code - * live_version} to its latest version. + * objects that refer to this CollectionSetting uses this version when no overrides are set. + * Providing {@code live_version = "latest"} sets the CollectionSetting's {@code live_version} + * to its latest version. */ public Builder setLiveVersion(String liveVersion) { this.liveVersion = liveVersion; @@ -199,9 +198,9 @@ public Builder setLiveVersion(String liveVersion) { /** * Optionally change the live version of the CollectionSetting. Billing Cadences and other - * objects that refer to this CollectionSetting will use this version when no overrides are set. - * Providing {@code live_version = "latest"} will set the CollectionSetting's {@code - * live_version} to its latest version. + * objects that refer to this CollectionSetting uses this version when no overrides are set. + * Providing {@code live_version = "latest"} sets the CollectionSetting's {@code live_version} + * to its latest version. */ public Builder setLiveVersion(EmptyParam liveVersion) { this.liveVersion = liveVersion; @@ -460,11 +459,11 @@ public static class PaymentMethodOptions { /** This sub-hash contains details about the Konbini payment method options. */ @SerializedName("konbini") - Map konbini; + Konbini konbini; /** This sub-hash contains details about the SEPA Direct Debit payment method options. */ @SerializedName("sepa_debit") - Map sepaDebit; + SepaDebit sepaDebit; /** This sub-hash contains details about the ACH direct debit payment method options. */ @SerializedName("us_bank_account") @@ -476,8 +475,8 @@ private PaymentMethodOptions( Card card, CustomerBalance customerBalance, Map extraParams, - Map konbini, - Map sepaDebit, + Konbini konbini, + SepaDebit sepaDebit, UsBankAccount usBankAccount) { this.acssDebit = acssDebit; this.bancontact = bancontact; @@ -504,9 +503,9 @@ public static class Builder { private Map extraParams; - private Map konbini; + private Konbini konbini; - private Map sepaDebit; + private SepaDebit sepaDebit; private UsBankAccount usBankAccount; @@ -581,57 +580,17 @@ public Builder putAllExtraParam(Map map) { return this; } - /** - * Add a key/value pair to `konbini` map. A map is initialized for the first `put/putAll` - * call, and subsequent calls add additional key/value pairs to the original map. See {@link - * CollectionSettingUpdateParams.PaymentMethodOptions#konbini} for the field documentation. - */ - public Builder putKonbini(String key, Object value) { - if (this.konbini == null) { - this.konbini = new HashMap<>(); - } - this.konbini.put(key, value); - return this; - } - - /** - * Add all map key/value pairs to `konbini` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. - * See {@link CollectionSettingUpdateParams.PaymentMethodOptions#konbini} for the field - * documentation. - */ - public Builder putAllKonbini(Map map) { - if (this.konbini == null) { - this.konbini = new HashMap<>(); - } - this.konbini.putAll(map); - return this; - } - - /** - * Add a key/value pair to `sepaDebit` map. A map is initialized for the first `put/putAll` - * call, and subsequent calls add additional key/value pairs to the original map. See {@link - * CollectionSettingUpdateParams.PaymentMethodOptions#sepaDebit} for the field documentation. - */ - public Builder putSepaDebit(String key, Object value) { - if (this.sepaDebit == null) { - this.sepaDebit = new HashMap<>(); - } - this.sepaDebit.put(key, value); + /** This sub-hash contains details about the Konbini payment method options. */ + public Builder setKonbini( + CollectionSettingUpdateParams.PaymentMethodOptions.Konbini konbini) { + this.konbini = konbini; return this; } - /** - * Add all map key/value pairs to `sepaDebit` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. - * See {@link CollectionSettingUpdateParams.PaymentMethodOptions#sepaDebit} for the field - * documentation. - */ - public Builder putAllSepaDebit(Map map) { - if (this.sepaDebit == null) { - this.sepaDebit = new HashMap<>(); - } - this.sepaDebit.putAll(map); + /** This sub-hash contains details about the SEPA Direct Debit payment method options. */ + public Builder setSepaDebit( + CollectionSettingUpdateParams.PaymentMethodOptions.SepaDebit sepaDebit) { + this.sepaDebit = sepaDebit; return this; } @@ -1585,6 +1544,122 @@ public enum FundingType implements ApiRequestParams.EnumParam { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Konbini { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Konbini(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public CollectionSettingUpdateParams.PaymentMethodOptions.Konbini build() { + return new CollectionSettingUpdateParams.PaymentMethodOptions.Konbini(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link CollectionSettingUpdateParams.PaymentMethodOptions.Konbini#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 CollectionSettingUpdateParams.PaymentMethodOptions.Konbini#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class SepaDebit { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private SepaDebit(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public CollectionSettingUpdateParams.PaymentMethodOptions.SepaDebit build() { + return new CollectionSettingUpdateParams.PaymentMethodOptions.SepaDebit(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link CollectionSettingUpdateParams.PaymentMethodOptions.SepaDebit#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 CollectionSettingUpdateParams.PaymentMethodOptions.SepaDebit#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class UsBankAccount { diff --git a/src/main/java/com/stripe/param/v2/billing/MeterEventAdjustmentCreateParams.java b/src/main/java/com/stripe/param/v2/billing/MeterEventAdjustmentCreateParams.java index 60fac7a0f06..9f92ba5a7dc 100644 --- a/src/main/java/com/stripe/param/v2/billing/MeterEventAdjustmentCreateParams.java +++ b/src/main/java/com/stripe/param/v2/billing/MeterEventAdjustmentCreateParams.java @@ -32,8 +32,8 @@ public class MeterEventAdjustmentCreateParams extends ApiRequestParams { Map extraParams; /** - * Required. Specifies whether to cancel a single event or a range of events for - * a time period. Time period cancellation is not supported yet. + * Required. Specifies the type of cancellation. Currently supports canceling a + * single event. */ @SerializedName("type") Type type; @@ -107,8 +107,8 @@ public Builder putAllExtraParam(Map map) { } /** - * Required. Specifies whether to cancel a single event or a range of events - * for a time period. Time period cancellation is not supported yet. + * Required. Specifies the type of cancellation. Currently supports canceling a + * single event. */ public Builder setType(MeterEventAdjustmentCreateParams.Type type) { this.type = type; @@ -129,8 +129,8 @@ public static class Cancel { Map extraParams; /** - * Required. Unique identifier for the event. You can only cancel events within - * 24 hours of Stripe receiving them. + * Required. The identifier that was originally assigned to the meter event. + * You can only cancel events within 24 hours of Stripe receiving them. */ @SerializedName("identifier") String identifier; @@ -182,8 +182,8 @@ public Builder putAllExtraParam(Map map) { } /** - * Required. Unique identifier for the event. You can only cancel events - * within 24 hours of Stripe receiving them. + * Required. The identifier that was originally assigned to the meter event. + * You can only cancel events within 24 hours of Stripe receiving them. */ public Builder setIdentifier(String identifier) { this.identifier = identifier; diff --git a/src/main/java/com/stripe/param/v2/billing/ProfileListParams.java b/src/main/java/com/stripe/param/v2/billing/ProfileListParams.java index 07204f7c48b..e991fee13cf 100644 --- a/src/main/java/com/stripe/param/v2/billing/ProfileListParams.java +++ b/src/main/java/com/stripe/param/v2/billing/ProfileListParams.java @@ -49,7 +49,7 @@ public class ProfileListParams extends ApiRequestParams { /** * Filter billing profiles by status. Can be combined with all other filters. If not provided, all - * billing profiles will be returned. + * billing profiles are returned. */ @SerializedName("status") Status status; @@ -175,7 +175,7 @@ public Builder addAllLookupKey(List elements) { /** * Filter billing profiles by status. Can be combined with all other filters. If not provided, - * all billing profiles will be returned. + * all billing profiles are returned. */ public Builder setStatus(ProfileListParams.Status status) { this.status = status; diff --git a/src/main/java/com/stripe/param/v2/commerce/productcatalog/ImportCreateParams.java b/src/main/java/com/stripe/param/v2/commerce/productcatalog/ImportCreateParams.java new file mode 100644 index 00000000000..0e2c5950d38 --- /dev/null +++ b/src/main/java/com/stripe/param/v2/commerce/productcatalog/ImportCreateParams.java @@ -0,0 +1,158 @@ +// File generated from our OpenAPI spec +package com.stripe.param.v2.commerce.productcatalog; + +import com.google.gson.annotations.SerializedName; +import com.stripe.net.ApiRequestParams; +import java.util.HashMap; +import java.util.Map; +import lombok.EqualsAndHashCode; +import lombok.Getter; + +@Getter +@EqualsAndHashCode(callSuper = false) +public class ImportCreateParams extends ApiRequestParams { + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Required. The type of catalog data to import. */ + @SerializedName("feed_type") + FeedType feedType; + + /** Required. Additional information about the import in a structured format. */ + @SerializedName("metadata") + Map metadata; + + /** Required. The strategy for handling existing catalog data during import. */ + @SerializedName("mode") + Mode mode; + + private ImportCreateParams( + Map extraParams, FeedType feedType, Map metadata, Mode mode) { + this.extraParams = extraParams; + this.feedType = feedType; + this.metadata = metadata; + this.mode = mode; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private FeedType feedType; + + private Map metadata; + + private Mode mode; + + /** Finalize and obtain parameter instance from this builder. */ + public ImportCreateParams build() { + return new ImportCreateParams(this.extraParams, this.feedType, this.metadata, this.mode); + } + + /** + * 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 + * ImportCreateParams#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 ImportCreateParams#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Required. The type of catalog data to import. */ + public Builder setFeedType(ImportCreateParams.FeedType feedType) { + this.feedType = feedType; + 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 + * ImportCreateParams#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 ImportCreateParams#metadata} for the field documentation. + */ + public Builder putAllMetadata(Map map) { + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.putAll(map); + return this; + } + + /** Required. The strategy for handling existing catalog data during import. */ + public Builder setMode(ImportCreateParams.Mode mode) { + this.mode = mode; + return this; + } + } + + public enum FeedType implements ApiRequestParams.EnumParam { + @SerializedName("inventory") + INVENTORY("inventory"), + + @SerializedName("pricing") + PRICING("pricing"), + + @SerializedName("product") + PRODUCT("product"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + FeedType(String value) { + this.value = value; + } + } + + public enum Mode implements ApiRequestParams.EnumParam { + @SerializedName("replace") + REPLACE("replace"), + + @SerializedName("upsert") + UPSERT("upsert"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Mode(String value) { + this.value = value; + } + } +} diff --git a/src/main/java/com/stripe/param/v2/commerce/productcatalog/ImportListParams.java b/src/main/java/com/stripe/param/v2/commerce/productcatalog/ImportListParams.java new file mode 100644 index 00000000000..b36fd6a08c0 --- /dev/null +++ b/src/main/java/com/stripe/param/v2/commerce/productcatalog/ImportListParams.java @@ -0,0 +1,260 @@ +// File generated from our OpenAPI spec +package com.stripe.param.v2.commerce.productcatalog; + +import com.google.gson.annotations.SerializedName; +import com.stripe.net.ApiRequestParams; +import java.time.Instant; +import java.util.HashMap; +import java.util.Map; +import lombok.EqualsAndHashCode; +import lombok.Getter; + +@Getter +@EqualsAndHashCode(callSuper = false) +public class ImportListParams extends ApiRequestParams { + /** + * Filter for objects created at the specified timestamp. Must be an RFC 3339 date & time + * value, for example: 2022-09-18T13:22:00Z. + */ + @SerializedName("created") + Instant created; + + /** + * Filter for objects created after the specified timestamp. Must be an RFC 3339 date & time + * value, for example: 2022-09-18T13:22:00Z. + */ + @SerializedName("created_gt") + Instant createdGt; + + /** + * Filter for objects created on or after the specified timestamp. Must be an RFC 3339 date & + * time value, for example: 2022-09-18T13:22:00Z. + */ + @SerializedName("created_gte") + Instant createdGte; + + /** + * Filter for objects created before the specified timestamp. Must be an RFC 3339 date & time + * value, for example: 2022-09-18T13:22:00Z. + */ + @SerializedName("created_lt") + Instant createdLt; + + /** + * Filter for objects created on or before the specified timestamp. Must be an RFC 3339 date & + * time value, for example: 2022-09-18T13:22:00Z. + */ + @SerializedName("created_lte") + Instant createdLte; + + /** + * 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; + + /** Filter by the type of feed data being imported. */ + @SerializedName("feed_type") + FeedType feedType; + + /** The maximum number of results per page. */ + @SerializedName("limit") + Long limit; + + /** Filter by import status. */ + @SerializedName("status") + Status status; + + private ImportListParams( + Instant created, + Instant createdGt, + Instant createdGte, + Instant createdLt, + Instant createdLte, + Map extraParams, + FeedType feedType, + Long limit, + Status status) { + this.created = created; + this.createdGt = createdGt; + this.createdGte = createdGte; + this.createdLt = createdLt; + this.createdLte = createdLte; + this.extraParams = extraParams; + this.feedType = feedType; + this.limit = limit; + this.status = status; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Instant created; + + private Instant createdGt; + + private Instant createdGte; + + private Instant createdLt; + + private Instant createdLte; + + private Map extraParams; + + private FeedType feedType; + + private Long limit; + + private Status status; + + /** Finalize and obtain parameter instance from this builder. */ + public ImportListParams build() { + return new ImportListParams( + this.created, + this.createdGt, + this.createdGte, + this.createdLt, + this.createdLte, + this.extraParams, + this.feedType, + this.limit, + this.status); + } + + /** + * Filter for objects created at the specified timestamp. Must be an RFC 3339 date & time + * value, for example: 2022-09-18T13:22:00Z. + */ + public Builder setCreated(Instant created) { + this.created = created; + return this; + } + + /** + * Filter for objects created after the specified timestamp. Must be an RFC 3339 date & time + * value, for example: 2022-09-18T13:22:00Z. + */ + public Builder setCreatedGt(Instant createdGt) { + this.createdGt = createdGt; + return this; + } + + /** + * Filter for objects created on or after the specified timestamp. Must be an RFC 3339 date + * & time value, for example: 2022-09-18T13:22:00Z. + */ + public Builder setCreatedGte(Instant createdGte) { + this.createdGte = createdGte; + return this; + } + + /** + * Filter for objects created before the specified timestamp. Must be an RFC 3339 date & + * time value, for example: 2022-09-18T13:22:00Z. + */ + public Builder setCreatedLt(Instant createdLt) { + this.createdLt = createdLt; + return this; + } + + /** + * Filter for objects created on or before the specified timestamp. Must be an RFC 3339 date + * & time value, for example: 2022-09-18T13:22:00Z. + */ + public Builder setCreatedLte(Instant createdLte) { + this.createdLte = createdLte; + 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 + * ImportListParams#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 ImportListParams#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Filter by the type of feed data being imported. */ + public Builder setFeedType(ImportListParams.FeedType feedType) { + this.feedType = feedType; + return this; + } + + /** The maximum number of results per page. */ + public Builder setLimit(Long limit) { + this.limit = limit; + return this; + } + + /** Filter by import status. */ + public Builder setStatus(ImportListParams.Status status) { + this.status = status; + return this; + } + } + + public enum FeedType implements ApiRequestParams.EnumParam { + @SerializedName("inventory") + INVENTORY("inventory"), + + @SerializedName("pricing") + PRICING("pricing"), + + @SerializedName("product") + PRODUCT("product"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + FeedType(String value) { + this.value = value; + } + } + + public enum Status implements ApiRequestParams.EnumParam { + @SerializedName("awaiting_upload") + AWAITING_UPLOAD("awaiting_upload"), + + @SerializedName("failed") + FAILED("failed"), + + @SerializedName("processing") + PROCESSING("processing"), + + @SerializedName("succeeded") + SUCCEEDED("succeeded"), + + @SerializedName("succeeded_with_errors") + SUCCEEDED_WITH_ERRORS("succeeded_with_errors"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Status(String value) { + this.value = value; + } + } +} diff --git a/src/main/java/com/stripe/param/v2/core/BatchJobCreateParams.java b/src/main/java/com/stripe/param/v2/core/BatchJobCreateParams.java index 518846968df..254627dbfb6 100644 --- a/src/main/java/com/stripe/param/v2/core/BatchJobCreateParams.java +++ b/src/main/java/com/stripe/param/v2/core/BatchJobCreateParams.java @@ -31,7 +31,7 @@ public class BatchJobCreateParams extends ApiRequestParams { @SerializedName("maximum_rps") Long maximumRps; - /** Required. The metadata of the {@code BatchJob} object. */ + /** Required. The metadata of the {@code batch_job}. */ @SerializedName("metadata") Map metadata; @@ -257,6 +257,9 @@ public Builder setPath(BatchJobCreateParams.Endpoint.Path path) { } public enum HttpMethod implements ApiRequestParams.EnumParam { + @SerializedName("delete") + DELETE("delete"), + @SerializedName("post") POST("post"); diff --git a/src/main/java/com/stripe/param/v2/core/vault/GbBankAccountCreateParams.java b/src/main/java/com/stripe/param/v2/core/vault/GbBankAccountCreateParams.java index d2d92082548..33864c0cda5 100644 --- a/src/main/java/com/stripe/param/v2/core/vault/GbBankAccountCreateParams.java +++ b/src/main/java/com/stripe/param/v2/core/vault/GbBankAccountCreateParams.java @@ -294,8 +294,14 @@ public enum BankAccountType implements ApiRequestParams.EnumParam { @SerializedName("checking") CHECKING("checking"), + @SerializedName("futsu") + FUTSU("futsu"), + @SerializedName("savings") - SAVINGS("savings"); + SAVINGS("savings"), + + @SerializedName("toza") + TOZA("toza"); @Getter(onMethod_ = {@Override}) private final String value; diff --git a/src/main/java/com/stripe/param/v2/data/reporting/QueryRunCreateParams.java b/src/main/java/com/stripe/param/v2/data/reporting/QueryRunCreateParams.java new file mode 100644 index 00000000000..718ac58a53f --- /dev/null +++ b/src/main/java/com/stripe/param/v2/data/reporting/QueryRunCreateParams.java @@ -0,0 +1,167 @@ +// File generated from our OpenAPI spec +package com.stripe.param.v2.data.reporting; + +import com.google.gson.annotations.SerializedName; +import com.stripe.net.ApiRequestParams; +import java.util.HashMap; +import java.util.Map; +import lombok.EqualsAndHashCode; +import lombok.Getter; + +@Getter +@EqualsAndHashCode(callSuper = false) +public class QueryRunCreateParams extends ApiRequestParams { + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Optional settings to customize the results of the {@code QueryRun}. */ + @SerializedName("result_options") + ResultOptions resultOptions; + + /** Required. The SQL to execute. */ + @SerializedName("sql") + String sql; + + private QueryRunCreateParams( + Map extraParams, ResultOptions resultOptions, String sql) { + this.extraParams = extraParams; + this.resultOptions = resultOptions; + this.sql = sql; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private ResultOptions resultOptions; + + private String sql; + + /** Finalize and obtain parameter instance from this builder. */ + public QueryRunCreateParams build() { + return new QueryRunCreateParams(this.extraParams, this.resultOptions, this.sql); + } + + /** + * 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 + * QueryRunCreateParams#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 QueryRunCreateParams#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Optional settings to customize the results of the {@code QueryRun}. */ + public Builder setResultOptions(QueryRunCreateParams.ResultOptions resultOptions) { + this.resultOptions = resultOptions; + return this; + } + + /** Required. The SQL to execute. */ + public Builder setSql(String sql) { + this.sql = sql; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class ResultOptions { + /** + * If set, the generated results file will be compressed into a ZIP folder. This is useful for + * reducing file size and download time for large results. + */ + @SerializedName("compress_file") + Boolean compressFile; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private ResultOptions(Boolean compressFile, Map extraParams) { + this.compressFile = compressFile; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Boolean compressFile; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public QueryRunCreateParams.ResultOptions build() { + return new QueryRunCreateParams.ResultOptions(this.compressFile, this.extraParams); + } + + /** + * If set, the generated results file will be compressed into a ZIP folder. This is useful for + * reducing file size and download time for large results. + */ + public Builder setCompressFile(Boolean compressFile) { + this.compressFile = compressFile; + 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 + * QueryRunCreateParams.ResultOptions#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 QueryRunCreateParams.ResultOptions#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } +} diff --git a/src/main/java/com/stripe/param/v2/extend/WorkflowInvokeParams.java b/src/main/java/com/stripe/param/v2/extend/WorkflowInvokeParams.java new file mode 100644 index 00000000000..2793fb904cf --- /dev/null +++ b/src/main/java/com/stripe/param/v2/extend/WorkflowInvokeParams.java @@ -0,0 +1,99 @@ +// File generated from our OpenAPI spec +package com.stripe.param.v2.extend; + +import com.google.gson.annotations.SerializedName; +import com.stripe.net.ApiRequestParams; +import java.util.HashMap; +import java.util.Map; +import lombok.EqualsAndHashCode; +import lombok.Getter; + +@Getter +@EqualsAndHashCode(callSuper = false) +public class WorkflowInvokeParams extends ApiRequestParams { + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Required. Parameters used to invoke the Workflow Run. */ + @SerializedName("input_parameters") + Map inputParameters; + + private WorkflowInvokeParams( + Map extraParams, Map inputParameters) { + this.extraParams = extraParams; + this.inputParameters = inputParameters; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Map inputParameters; + + /** Finalize and obtain parameter instance from this builder. */ + public WorkflowInvokeParams build() { + return new WorkflowInvokeParams(this.extraParams, this.inputParameters); + } + + /** + * 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 + * WorkflowInvokeParams#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 WorkflowInvokeParams#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 `inputParameters` 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 WorkflowInvokeParams#inputParameters} for the field documentation. + */ + public Builder putInputParameter(String key, Object value) { + if (this.inputParameters == null) { + this.inputParameters = new HashMap<>(); + } + this.inputParameters.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `inputParameters` 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 WorkflowInvokeParams#inputParameters} for the field documentation. + */ + public Builder putAllInputParameter(Map map) { + if (this.inputParameters == null) { + this.inputParameters = new HashMap<>(); + } + this.inputParameters.putAll(map); + return this; + } + } +} diff --git a/src/main/java/com/stripe/param/v2/extend/WorkflowListParams.java b/src/main/java/com/stripe/param/v2/extend/WorkflowListParams.java new file mode 100644 index 00000000000..167bcefb6d9 --- /dev/null +++ b/src/main/java/com/stripe/param/v2/extend/WorkflowListParams.java @@ -0,0 +1,138 @@ +// File generated from our OpenAPI spec +package com.stripe.param.v2.extend; + +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 WorkflowListParams extends ApiRequestParams { + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Restrict page size to no more than this number. */ + @SerializedName("limit") + Long limit; + + /** + * When retrieving Workflows, include only those with the specified status values. If not + * specified, all Workflows in active and inactive status are returned. + */ + @SerializedName("status") + List status; + + private WorkflowListParams( + Map extraParams, Long limit, List status) { + this.extraParams = extraParams; + this.limit = limit; + this.status = status; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Long limit; + + private List status; + + /** Finalize and obtain parameter instance from this builder. */ + public WorkflowListParams build() { + return new WorkflowListParams(this.extraParams, this.limit, this.status); + } + + /** + * 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 + * WorkflowListParams#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 WorkflowListParams#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Restrict page size to no more than this number. */ + public Builder setLimit(Long limit) { + this.limit = limit; + return this; + } + + /** + * Add an element to `status` list. A list is initialized for the first `add/addAll` call, and + * subsequent calls adds additional elements to the original list. See {@link + * WorkflowListParams#status} for the field documentation. + */ + public Builder addStatus(WorkflowListParams.Status element) { + if (this.status == null) { + this.status = new ArrayList<>(); + } + this.status.add(element); + return this; + } + + /** + * Add all elements to `status` list. A list is initialized for the first `add/addAll` call, and + * subsequent calls adds additional elements to the original list. See {@link + * WorkflowListParams#status} for the field documentation. + */ + public Builder addAllStatus(List elements) { + if (this.status == null) { + this.status = new ArrayList<>(); + } + this.status.addAll(elements); + return this; + } + } + + public enum Status implements ApiRequestParams.EnumParam { + @SerializedName("active") + ACTIVE("active"), + + @SerializedName("archived") + ARCHIVED("archived"), + + @SerializedName("draft") + DRAFT("draft"), + + @SerializedName("inactive") + INACTIVE("inactive"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Status(String value) { + this.value = value; + } + } +} diff --git a/src/main/java/com/stripe/param/v2/extend/WorkflowRunListParams.java b/src/main/java/com/stripe/param/v2/extend/WorkflowRunListParams.java new file mode 100644 index 00000000000..498d31052bc --- /dev/null +++ b/src/main/java/com/stripe/param/v2/extend/WorkflowRunListParams.java @@ -0,0 +1,174 @@ +// File generated from our OpenAPI spec +package com.stripe.param.v2.extend; + +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 WorkflowRunListParams extends ApiRequestParams { + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Restrict page size to no more than this number. */ + @SerializedName("limit") + Long limit; + + /** + * When retrieving Workflow Runs, include only those with the specified status values. If not + * specified, all Runs are returned. + */ + @SerializedName("status") + List status; + + /** + * When retrieving Workflow Runs, include only those associated with the Workflows specified. If + * not specified, all Runs are returned. + */ + @SerializedName("workflow") + List workflow; + + private WorkflowRunListParams( + Map extraParams, + Long limit, + List status, + List workflow) { + this.extraParams = extraParams; + this.limit = limit; + this.status = status; + this.workflow = workflow; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Long limit; + + private List status; + + private List workflow; + + /** Finalize and obtain parameter instance from this builder. */ + public WorkflowRunListParams build() { + return new WorkflowRunListParams(this.extraParams, this.limit, this.status, this.workflow); + } + + /** + * 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 + * WorkflowRunListParams#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 WorkflowRunListParams#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Restrict page size to no more than this number. */ + public Builder setLimit(Long limit) { + this.limit = limit; + return this; + } + + /** + * Add an element to `status` list. A list is initialized for the first `add/addAll` call, and + * subsequent calls adds additional elements to the original list. See {@link + * WorkflowRunListParams#status} for the field documentation. + */ + public Builder addStatus(WorkflowRunListParams.Status element) { + if (this.status == null) { + this.status = new ArrayList<>(); + } + this.status.add(element); + return this; + } + + /** + * Add all elements to `status` list. A list is initialized for the first `add/addAll` call, and + * subsequent calls adds additional elements to the original list. See {@link + * WorkflowRunListParams#status} for the field documentation. + */ + public Builder addAllStatus(List elements) { + if (this.status == null) { + this.status = new ArrayList<>(); + } + this.status.addAll(elements); + return this; + } + + /** + * Add an element to `workflow` list. A list is initialized for the first `add/addAll` call, and + * subsequent calls adds additional elements to the original list. See {@link + * WorkflowRunListParams#workflow} for the field documentation. + */ + public Builder addWorkflow(String element) { + if (this.workflow == null) { + this.workflow = new ArrayList<>(); + } + this.workflow.add(element); + return this; + } + + /** + * Add all elements to `workflow` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * WorkflowRunListParams#workflow} for the field documentation. + */ + public Builder addAllWorkflow(List elements) { + if (this.workflow == null) { + this.workflow = new ArrayList<>(); + } + this.workflow.addAll(elements); + return this; + } + } + + public enum Status implements ApiRequestParams.EnumParam { + @SerializedName("failed") + FAILED("failed"), + + @SerializedName("started") + STARTED("started"), + + @SerializedName("succeeded") + SUCCEEDED("succeeded"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Status(String value) { + this.value = value; + } + } +} diff --git a/src/main/java/com/stripe/param/v2/iam/ActivityLogListParams.java b/src/main/java/com/stripe/param/v2/iam/ActivityLogListParams.java new file mode 100644 index 00000000000..66105f56bec --- /dev/null +++ b/src/main/java/com/stripe/param/v2/iam/ActivityLogListParams.java @@ -0,0 +1,205 @@ +// File generated from our OpenAPI spec +package com.stripe.param.v2.iam; + +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 ActivityLogListParams extends ApiRequestParams { + /** Filter results to only include activity logs for the specified action group types. */ + @SerializedName("action_groups") + List actionGroups; + + /** Filter results to only include activity logs for the specified action types. */ + @SerializedName("actions") + List actions; + + /** + * 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; + + /** Maximum number of results to return per page. */ + @SerializedName("limit") + Long limit; + + private ActivityLogListParams( + List actionGroups, + List actions, + Map extraParams, + Long limit) { + this.actionGroups = actionGroups; + this.actions = actions; + this.extraParams = extraParams; + this.limit = limit; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private List actionGroups; + + private List actions; + + private Map extraParams; + + private Long limit; + + /** Finalize and obtain parameter instance from this builder. */ + public ActivityLogListParams build() { + return new ActivityLogListParams( + this.actionGroups, this.actions, this.extraParams, this.limit); + } + + /** + * Add an element to `actionGroups` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * ActivityLogListParams#actionGroups} for the field documentation. + */ + public Builder addActionGroup(ActivityLogListParams.ActionGroup element) { + if (this.actionGroups == null) { + this.actionGroups = new ArrayList<>(); + } + this.actionGroups.add(element); + return this; + } + + /** + * Add all elements to `actionGroups` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * ActivityLogListParams#actionGroups} for the field documentation. + */ + public Builder addAllActionGroup(List elements) { + if (this.actionGroups == null) { + this.actionGroups = new ArrayList<>(); + } + this.actionGroups.addAll(elements); + return this; + } + + /** + * Add an element to `actions` list. A list is initialized for the first `add/addAll` call, and + * subsequent calls adds additional elements to the original list. See {@link + * ActivityLogListParams#actions} for the field documentation. + */ + public Builder addAction(ActivityLogListParams.Action element) { + if (this.actions == null) { + this.actions = new ArrayList<>(); + } + this.actions.add(element); + return this; + } + + /** + * Add all elements to `actions` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * ActivityLogListParams#actions} for the field documentation. + */ + public Builder addAllAction(List elements) { + if (this.actions == null) { + this.actions = new ArrayList<>(); + } + this.actions.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 + * ActivityLogListParams#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 ActivityLogListParams#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Maximum number of results to return per page. */ + public Builder setLimit(Long limit) { + this.limit = limit; + return this; + } + } + + public enum Action implements ApiRequestParams.EnumParam { + @SerializedName("api_key_created") + API_KEY_CREATED("api_key_created"), + + @SerializedName("api_key_deleted") + API_KEY_DELETED("api_key_deleted"), + + @SerializedName("api_key_updated") + API_KEY_UPDATED("api_key_updated"), + + @SerializedName("api_key_viewed") + API_KEY_VIEWED("api_key_viewed"), + + @SerializedName("user_invite_accepted") + USER_INVITE_ACCEPTED("user_invite_accepted"), + + @SerializedName("user_invite_created") + USER_INVITE_CREATED("user_invite_created"), + + @SerializedName("user_invite_deleted") + USER_INVITE_DELETED("user_invite_deleted"), + + @SerializedName("user_roles_deleted") + USER_ROLES_DELETED("user_roles_deleted"), + + @SerializedName("user_roles_updated") + USER_ROLES_UPDATED("user_roles_updated"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Action(String value) { + this.value = value; + } + } + + public enum ActionGroup implements ApiRequestParams.EnumParam { + @SerializedName("api_key") + API_KEY("api_key"), + + @SerializedName("user_invite") + USER_INVITE("user_invite"), + + @SerializedName("user_roles") + USER_ROLES("user_roles"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + ActionGroup(String value) { + this.value = value; + } + } +} diff --git a/src/main/java/com/stripe/param/v2/moneymanagement/OutboundSetupIntentCreateParams.java b/src/main/java/com/stripe/param/v2/moneymanagement/OutboundSetupIntentCreateParams.java index 43d39e9c4a3..d2f36612090 100644 --- a/src/main/java/com/stripe/param/v2/moneymanagement/OutboundSetupIntentCreateParams.java +++ b/src/main/java/com/stripe/param/v2/moneymanagement/OutboundSetupIntentCreateParams.java @@ -398,8 +398,14 @@ public enum BankAccountType implements ApiRequestParams.EnumParam { @SerializedName("checking") CHECKING("checking"), + @SerializedName("futsu") + FUTSU("futsu"), + @SerializedName("savings") - SAVINGS("savings"); + SAVINGS("savings"), + + @SerializedName("toza") + TOZA("toza"); @Getter(onMethod_ = {@Override}) private final String value; diff --git a/src/main/java/com/stripe/param/v2/moneymanagement/OutboundSetupIntentUpdateParams.java b/src/main/java/com/stripe/param/v2/moneymanagement/OutboundSetupIntentUpdateParams.java index 6b0199fbf5d..3fd1e6d5519 100644 --- a/src/main/java/com/stripe/param/v2/moneymanagement/OutboundSetupIntentUpdateParams.java +++ b/src/main/java/com/stripe/param/v2/moneymanagement/OutboundSetupIntentUpdateParams.java @@ -413,8 +413,14 @@ public enum BankAccountType implements ApiRequestParams.EnumParam { @SerializedName("checking") CHECKING("checking"), + @SerializedName("futsu") + FUTSU("futsu"), + @SerializedName("savings") - SAVINGS("savings"); + SAVINGS("savings"), + + @SerializedName("toza") + TOZA("toza"); @Getter(onMethod_ = {@Override}) private final String value; diff --git a/src/main/java/com/stripe/param/v2/orchestratedcommerce/AgreementCreateParams.java b/src/main/java/com/stripe/param/v2/orchestratedcommerce/AgreementCreateParams.java new file mode 100644 index 00000000000..9f1413401bb --- /dev/null +++ b/src/main/java/com/stripe/param/v2/orchestratedcommerce/AgreementCreateParams.java @@ -0,0 +1,80 @@ +// File generated from our OpenAPI spec +package com.stripe.param.v2.orchestratedcommerce; + +import com.google.gson.annotations.SerializedName; +import com.stripe.net.ApiRequestParams; +import java.util.HashMap; +import java.util.Map; +import lombok.EqualsAndHashCode; +import lombok.Getter; + +@Getter +@EqualsAndHashCode(callSuper = false) +public class AgreementCreateParams extends ApiRequestParams { + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Required. The Network ID of the orchestrator to create an agreement with. */ + @SerializedName("orchestrator") + String orchestrator; + + private AgreementCreateParams(Map extraParams, String orchestrator) { + this.extraParams = extraParams; + this.orchestrator = orchestrator; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String orchestrator; + + /** Finalize and obtain parameter instance from this builder. */ + public AgreementCreateParams build() { + return new AgreementCreateParams(this.extraParams, this.orchestrator); + } + + /** + * 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 + * AgreementCreateParams#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 AgreementCreateParams#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. The Network ID of the orchestrator to create an agreement with. + */ + public Builder setOrchestrator(String orchestrator) { + this.orchestrator = orchestrator; + return this; + } + } +} diff --git a/src/main/java/com/stripe/param/v2/orchestratedcommerce/AgreementListParams.java b/src/main/java/com/stripe/param/v2/orchestratedcommerce/AgreementListParams.java new file mode 100644 index 00000000000..437c607e8ba --- /dev/null +++ b/src/main/java/com/stripe/param/v2/orchestratedcommerce/AgreementListParams.java @@ -0,0 +1,92 @@ +// File generated from our OpenAPI spec +package com.stripe.param.v2.orchestratedcommerce; + +import com.google.gson.annotations.SerializedName; +import com.stripe.net.ApiRequestParams; +import java.util.HashMap; +import java.util.Map; +import lombok.EqualsAndHashCode; +import lombok.Getter; + +@Getter +@EqualsAndHashCode(callSuper = false) +public class AgreementListParams extends ApiRequestParams { + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The limit for the number of results per page. */ + @SerializedName("limit") + Long limit; + + /** Filter list to Orchestrated Commerce Agreements with a specific counterparty. */ + @SerializedName("network_business_profile") + String networkBusinessProfile; + + private AgreementListParams( + Map extraParams, Long limit, String networkBusinessProfile) { + this.extraParams = extraParams; + this.limit = limit; + this.networkBusinessProfile = networkBusinessProfile; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Long limit; + + private String networkBusinessProfile; + + /** Finalize and obtain parameter instance from this builder. */ + public AgreementListParams build() { + return new AgreementListParams(this.extraParams, this.limit, this.networkBusinessProfile); + } + + /** + * 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 + * AgreementListParams#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 AgreementListParams#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 limit for the number of results per page. */ + public Builder setLimit(Long limit) { + this.limit = limit; + return this; + } + + /** Filter list to Orchestrated Commerce Agreements with a specific counterparty. */ + public Builder setNetworkBusinessProfile(String networkBusinessProfile) { + this.networkBusinessProfile = networkBusinessProfile; + return this; + } + } +} diff --git a/src/main/java/com/stripe/service/V2Services.java b/src/main/java/com/stripe/service/V2Services.java index 5a6b65a5334..b69848f3579 100644 --- a/src/main/java/com/stripe/service/V2Services.java +++ b/src/main/java/com/stripe/service/V2Services.java @@ -13,14 +13,38 @@ public com.stripe.service.v2.BillingService billing() { return new com.stripe.service.v2.BillingService(this.getResponseGetter()); } + public com.stripe.service.v2.CommerceService commerce() { + return new com.stripe.service.v2.CommerceService(this.getResponseGetter()); + } + public com.stripe.service.v2.CoreService core() { return new com.stripe.service.v2.CoreService(this.getResponseGetter()); } + public com.stripe.service.v2.DatumService data() { + return new com.stripe.service.v2.DatumService(this.getResponseGetter()); + } + + public com.stripe.service.v2.ExtendService extend() { + return new com.stripe.service.v2.ExtendService(this.getResponseGetter()); + } + + public com.stripe.service.v2.IamService iam() { + return new com.stripe.service.v2.IamService(this.getResponseGetter()); + } + public com.stripe.service.v2.MoneyManagementService moneyManagement() { return new com.stripe.service.v2.MoneyManagementService(this.getResponseGetter()); } + public com.stripe.service.v2.NetworkService network() { + return new com.stripe.service.v2.NetworkService(this.getResponseGetter()); + } + + public com.stripe.service.v2.OrchestratedCommerceService orchestratedCommerce() { + return new com.stripe.service.v2.OrchestratedCommerceService(this.getResponseGetter()); + } + public com.stripe.service.v2.TestHelperService testHelpers() { return new com.stripe.service.v2.TestHelperService(this.getResponseGetter()); } diff --git a/src/main/java/com/stripe/service/v2/CommerceService.java b/src/main/java/com/stripe/service/v2/CommerceService.java new file mode 100644 index 00000000000..75500c1055d --- /dev/null +++ b/src/main/java/com/stripe/service/v2/CommerceService.java @@ -0,0 +1,15 @@ +// File generated from our OpenAPI spec +package com.stripe.service.v2; + +import com.stripe.net.ApiService; +import com.stripe.net.StripeResponseGetter; + +public final class CommerceService extends ApiService { + public CommerceService(StripeResponseGetter responseGetter) { + super(responseGetter); + } + + public com.stripe.service.v2.commerce.ProductCatalogService productCatalog() { + return new com.stripe.service.v2.commerce.ProductCatalogService(this.getResponseGetter()); + } +} diff --git a/src/main/java/com/stripe/service/v2/DatumService.java b/src/main/java/com/stripe/service/v2/DatumService.java new file mode 100644 index 00000000000..a8199e24c3b --- /dev/null +++ b/src/main/java/com/stripe/service/v2/DatumService.java @@ -0,0 +1,15 @@ +// File generated from our OpenAPI spec +package com.stripe.service.v2; + +import com.stripe.net.ApiService; +import com.stripe.net.StripeResponseGetter; + +public final class DatumService extends ApiService { + public DatumService(StripeResponseGetter responseGetter) { + super(responseGetter); + } + + public com.stripe.service.v2.data.ReportingService reporting() { + return new com.stripe.service.v2.data.ReportingService(this.getResponseGetter()); + } +} diff --git a/src/main/java/com/stripe/service/v2/ExtendService.java b/src/main/java/com/stripe/service/v2/ExtendService.java new file mode 100644 index 00000000000..58c3993e6b2 --- /dev/null +++ b/src/main/java/com/stripe/service/v2/ExtendService.java @@ -0,0 +1,19 @@ +// File generated from our OpenAPI spec +package com.stripe.service.v2; + +import com.stripe.net.ApiService; +import com.stripe.net.StripeResponseGetter; + +public final class ExtendService extends ApiService { + public ExtendService(StripeResponseGetter responseGetter) { + super(responseGetter); + } + + public com.stripe.service.v2.extend.WorkflowRunService workflowRuns() { + return new com.stripe.service.v2.extend.WorkflowRunService(this.getResponseGetter()); + } + + public com.stripe.service.v2.extend.WorkflowService workflows() { + return new com.stripe.service.v2.extend.WorkflowService(this.getResponseGetter()); + } +} diff --git a/src/main/java/com/stripe/service/v2/IamService.java b/src/main/java/com/stripe/service/v2/IamService.java new file mode 100644 index 00000000000..63533659693 --- /dev/null +++ b/src/main/java/com/stripe/service/v2/IamService.java @@ -0,0 +1,15 @@ +// File generated from our OpenAPI spec +package com.stripe.service.v2; + +import com.stripe.net.ApiService; +import com.stripe.net.StripeResponseGetter; + +public final class IamService extends ApiService { + public IamService(StripeResponseGetter responseGetter) { + super(responseGetter); + } + + public com.stripe.service.v2.iam.ActivityLogService activityLogs() { + return new com.stripe.service.v2.iam.ActivityLogService(this.getResponseGetter()); + } +} diff --git a/src/main/java/com/stripe/service/v2/NetworkService.java b/src/main/java/com/stripe/service/v2/NetworkService.java new file mode 100644 index 00000000000..c2029dc261c --- /dev/null +++ b/src/main/java/com/stripe/service/v2/NetworkService.java @@ -0,0 +1,15 @@ +// File generated from our OpenAPI spec +package com.stripe.service.v2; + +import com.stripe.net.ApiService; +import com.stripe.net.StripeResponseGetter; + +public final class NetworkService extends ApiService { + public NetworkService(StripeResponseGetter responseGetter) { + super(responseGetter); + } + + public com.stripe.service.v2.network.BusinessProfileService businessProfiles() { + return new com.stripe.service.v2.network.BusinessProfileService(this.getResponseGetter()); + } +} diff --git a/src/main/java/com/stripe/service/v2/OrchestratedCommerceService.java b/src/main/java/com/stripe/service/v2/OrchestratedCommerceService.java new file mode 100644 index 00000000000..844612d0270 --- /dev/null +++ b/src/main/java/com/stripe/service/v2/OrchestratedCommerceService.java @@ -0,0 +1,16 @@ +// File generated from our OpenAPI spec +package com.stripe.service.v2; + +import com.stripe.net.ApiService; +import com.stripe.net.StripeResponseGetter; + +public final class OrchestratedCommerceService extends ApiService { + public OrchestratedCommerceService(StripeResponseGetter responseGetter) { + super(responseGetter); + } + + public com.stripe.service.v2.orchestratedcommerce.AgreementService agreements() { + return new com.stripe.service.v2.orchestratedcommerce.AgreementService( + this.getResponseGetter()); + } +} diff --git a/src/main/java/com/stripe/service/v2/billing/MeterEventSessionService.java b/src/main/java/com/stripe/service/v2/billing/MeterEventSessionService.java index 31658d1ebc0..f583764b5ef 100644 --- a/src/main/java/com/stripe/service/v2/billing/MeterEventSessionService.java +++ b/src/main/java/com/stripe/service/v2/billing/MeterEventSessionService.java @@ -17,16 +17,16 @@ public MeterEventSessionService(StripeResponseGetter responseGetter) { /** * Creates a meter event session to send usage on the high-throughput meter event stream. - * Authentication tokens are only valid for 15 minutes, so you will need to create a new meter - * event session when your token expires. + * Authentication tokens are only valid for 15 minutes, so you need to create a new meter event + * session when your token expires. */ public MeterEventSession create() throws StripeException { return create((RequestOptions) null); } /** * Creates a meter event session to send usage on the high-throughput meter event stream. - * Authentication tokens are only valid for 15 minutes, so you will need to create a new meter - * event session when your token expires. + * Authentication tokens are only valid for 15 minutes, so you need to create a new meter event + * session when your token expires. */ public MeterEventSession create(RequestOptions options) throws StripeException { String path = "/v2/billing/meter_event_session"; diff --git a/src/main/java/com/stripe/service/v2/commerce/ProductCatalogService.java b/src/main/java/com/stripe/service/v2/commerce/ProductCatalogService.java new file mode 100644 index 00000000000..a122b86b99a --- /dev/null +++ b/src/main/java/com/stripe/service/v2/commerce/ProductCatalogService.java @@ -0,0 +1,16 @@ +// File generated from our OpenAPI spec +package com.stripe.service.v2.commerce; + +import com.stripe.net.ApiService; +import com.stripe.net.StripeResponseGetter; + +public final class ProductCatalogService extends ApiService { + public ProductCatalogService(StripeResponseGetter responseGetter) { + super(responseGetter); + } + + public com.stripe.service.v2.commerce.productcatalog.ImportService imports() { + return new com.stripe.service.v2.commerce.productcatalog.ImportService( + this.getResponseGetter()); + } +} diff --git a/src/main/java/com/stripe/service/v2/commerce/productcatalog/ImportService.java b/src/main/java/com/stripe/service/v2/commerce/productcatalog/ImportService.java new file mode 100644 index 00000000000..43e0d403812 --- /dev/null +++ b/src/main/java/com/stripe/service/v2/commerce/productcatalog/ImportService.java @@ -0,0 +1,80 @@ +// File generated from our OpenAPI spec +package com.stripe.service.v2.commerce.productcatalog; + +import com.google.gson.reflect.TypeToken; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.StripeCollection; +import com.stripe.model.v2.commerce.ProductCatalogImport; +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.v2.commerce.productcatalog.ImportCreateParams; +import com.stripe.param.v2.commerce.productcatalog.ImportListParams; + +public final class ImportService extends ApiService { + public ImportService(StripeResponseGetter responseGetter) { + super(responseGetter); + } + + /** Returns a list of ProductCatalogImport objects. */ + public StripeCollection list(ImportListParams params) + throws StripeException { + return list(params, (RequestOptions) null); + } + /** Returns a list of ProductCatalogImport objects. */ + public StripeCollection list(RequestOptions options) + throws StripeException { + return list((ImportListParams) null, options); + } + /** Returns a list of ProductCatalogImport objects. */ + public StripeCollection list() throws StripeException { + return list((ImportListParams) null, (RequestOptions) null); + } + /** Returns a list of ProductCatalogImport objects. */ + public StripeCollection list( + ImportListParams params, RequestOptions options) throws StripeException { + String path = "/v2/commerce/product_catalog/imports"; + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request( + request, new TypeToken>() {}.getType()); + } + /** Creates a ProductCatalogImport. */ + public ProductCatalogImport create(ImportCreateParams params) throws StripeException { + return create(params, (RequestOptions) null); + } + /** Creates a ProductCatalogImport. */ + public ProductCatalogImport create(ImportCreateParams params, RequestOptions options) + throws StripeException { + String path = "/v2/commerce/product_catalog/imports"; + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, ProductCatalogImport.class); + } + /** Retrieves a ProductCatalogImport by ID. */ + public ProductCatalogImport retrieve(String id) throws StripeException { + return retrieve(id, (RequestOptions) null); + } + /** Retrieves a ProductCatalogImport by ID. */ + public ProductCatalogImport retrieve(String id, RequestOptions options) throws StripeException { + String path = + String.format("/v2/commerce/product_catalog/imports/%s", ApiResource.urlEncodeId(id)); + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.GET, path, null, options); + return this.request(request, ProductCatalogImport.class); + } +} diff --git a/src/main/java/com/stripe/service/v2/core/accounts/PersonTokenService.java b/src/main/java/com/stripe/service/v2/core/accounts/PersonTokenService.java index b6180a4b7d7..e2564c1cdcf 100644 --- a/src/main/java/com/stripe/service/v2/core/accounts/PersonTokenService.java +++ b/src/main/java/com/stripe/service/v2/core/accounts/PersonTokenService.java @@ -18,21 +18,45 @@ public PersonTokenService(StripeResponseGetter responseGetter) { super(responseGetter); } - /** Creates a Person Token associated with an Account. */ + /** + * Creates a single-use token that represents the details for a person. Use this when you create + * or update persons associated with an Account v2. Learn more about account tokens. You can only create + * person tokens with your application's publishable key and in live mode. You can use your + * application's secret key to create person tokens only in test mode. + */ public AccountPersonToken create(String accountId, PersonTokenCreateParams params) throws StripeException, RateLimitException { return create(accountId, params, (RequestOptions) null); } - /** Creates a Person Token associated with an Account. */ + /** + * Creates a single-use token that represents the details for a person. Use this when you create + * or update persons associated with an Account v2. Learn more about account tokens. You can only create + * person tokens with your application's publishable key and in live mode. You can use your + * application's secret key to create person tokens only in test mode. + */ public AccountPersonToken create(String accountId, RequestOptions options) throws StripeException, RateLimitException { return create(accountId, (PersonTokenCreateParams) null, options); } - /** Creates a Person Token associated with an Account. */ + /** + * Creates a single-use token that represents the details for a person. Use this when you create + * or update persons associated with an Account v2. Learn more about account tokens. You can only create + * person tokens with your application's publishable key and in live mode. You can use your + * application's secret key to create person tokens only in test mode. + */ public AccountPersonToken create(String accountId) throws StripeException, RateLimitException { return create(accountId, (PersonTokenCreateParams) null, (RequestOptions) null); } - /** Creates a Person Token associated with an Account. */ + /** + * Creates a single-use token that represents the details for a person. Use this when you create + * or update persons associated with an Account v2. Learn more about account tokens. You can only create + * person tokens with your application's publishable key and in live mode. You can use your + * application's secret key to create person tokens only in test mode. + */ public AccountPersonToken create( String accountId, PersonTokenCreateParams params, RequestOptions options) throws StripeException, RateLimitException { diff --git a/src/main/java/com/stripe/service/v2/data/ReportingService.java b/src/main/java/com/stripe/service/v2/data/ReportingService.java new file mode 100644 index 00000000000..db6a321d413 --- /dev/null +++ b/src/main/java/com/stripe/service/v2/data/ReportingService.java @@ -0,0 +1,15 @@ +// File generated from our OpenAPI spec +package com.stripe.service.v2.data; + +import com.stripe.net.ApiService; +import com.stripe.net.StripeResponseGetter; + +public final class ReportingService extends ApiService { + public ReportingService(StripeResponseGetter responseGetter) { + super(responseGetter); + } + + public com.stripe.service.v2.data.reporting.QueryRunService queryRuns() { + return new com.stripe.service.v2.data.reporting.QueryRunService(this.getResponseGetter()); + } +} diff --git a/src/main/java/com/stripe/service/v2/data/reporting/QueryRunService.java b/src/main/java/com/stripe/service/v2/data/reporting/QueryRunService.java new file mode 100644 index 00000000000..d3e21b5e851 --- /dev/null +++ b/src/main/java/com/stripe/service/v2/data/reporting/QueryRunService.java @@ -0,0 +1,60 @@ +// File generated from our OpenAPI spec +package com.stripe.service.v2.data.reporting; + +import com.stripe.exception.StripeException; +import com.stripe.model.v2.data.reporting.QueryRun; +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.v2.data.reporting.QueryRunCreateParams; + +public final class QueryRunService extends ApiService { + public QueryRunService(StripeResponseGetter responseGetter) { + super(responseGetter); + } + + /** + * Creates a query run to execute ad-hoc SQL and returns a {@code QueryRun} object to track + * progress and retrieve results. + */ + public QueryRun create(QueryRunCreateParams params) throws StripeException { + return create(params, (RequestOptions) null); + } + /** + * Creates a query run to execute ad-hoc SQL and returns a {@code QueryRun} object to track + * progress and retrieve results. + */ + public QueryRun create(QueryRunCreateParams params, RequestOptions options) + throws StripeException { + String path = "/v2/data/reporting/query_runs"; + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, QueryRun.class); + } + /** + * Fetches the current state and details of a previously created {@code QueryRun}. If the {@code + * QueryRun} has succeeded, the endpoint will provide details for how to retrieve the results. + */ + public QueryRun retrieve(String id) throws StripeException { + return retrieve(id, (RequestOptions) null); + } + /** + * Fetches the current state and details of a previously created {@code QueryRun}. If the {@code + * QueryRun} has succeeded, the endpoint will provide details for how to retrieve the results. + */ + public QueryRun retrieve(String id, RequestOptions options) throws StripeException { + String path = String.format("/v2/data/reporting/query_runs/%s", ApiResource.urlEncodeId(id)); + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.GET, path, null, options); + return this.request(request, QueryRun.class); + } +} diff --git a/src/main/java/com/stripe/service/v2/extend/WorkflowRunService.java b/src/main/java/com/stripe/service/v2/extend/WorkflowRunService.java new file mode 100644 index 00000000000..d19fd3c485b --- /dev/null +++ b/src/main/java/com/stripe/service/v2/extend/WorkflowRunService.java @@ -0,0 +1,58 @@ +// File generated from our OpenAPI spec +package com.stripe.service.v2.extend; + +import com.google.gson.reflect.TypeToken; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.StripeCollection; +import com.stripe.model.v2.extend.WorkflowRun; +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.v2.extend.WorkflowRunListParams; + +public final class WorkflowRunService extends ApiService { + public WorkflowRunService(StripeResponseGetter responseGetter) { + super(responseGetter); + } + + /** List all Workflow Runs. */ + public StripeCollection list(WorkflowRunListParams params) throws StripeException { + return list(params, (RequestOptions) null); + } + /** List all Workflow Runs. */ + public StripeCollection list(RequestOptions options) throws StripeException { + return list((WorkflowRunListParams) null, options); + } + /** List all Workflow Runs. */ + public StripeCollection list() throws StripeException { + return list((WorkflowRunListParams) null, (RequestOptions) null); + } + /** List all Workflow Runs. */ + public StripeCollection list(WorkflowRunListParams params, RequestOptions options) + throws StripeException { + String path = "/v2/extend/workflow_runs"; + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, new TypeToken>() {}.getType()); + } + /** Retrieves the details of a Workflow Run by ID. */ + public WorkflowRun retrieve(String id) throws StripeException { + return retrieve(id, (RequestOptions) null); + } + /** Retrieves the details of a Workflow Run by ID. */ + public WorkflowRun retrieve(String id, RequestOptions options) throws StripeException { + String path = String.format("/v2/extend/workflow_runs/%s", ApiResource.urlEncodeId(id)); + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.GET, path, null, options); + return this.request(request, WorkflowRun.class); + } +} diff --git a/src/main/java/com/stripe/service/v2/extend/WorkflowService.java b/src/main/java/com/stripe/service/v2/extend/WorkflowService.java new file mode 100644 index 00000000000..f7145ae6c31 --- /dev/null +++ b/src/main/java/com/stripe/service/v2/extend/WorkflowService.java @@ -0,0 +1,79 @@ +// File generated from our OpenAPI spec +package com.stripe.service.v2.extend; + +import com.google.gson.reflect.TypeToken; +import com.stripe.exception.CannotProceedException; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.StripeCollection; +import com.stripe.model.v2.extend.Workflow; +import com.stripe.model.v2.extend.WorkflowRun; +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.v2.extend.WorkflowInvokeParams; +import com.stripe.param.v2.extend.WorkflowListParams; + +public final class WorkflowService extends ApiService { + public WorkflowService(StripeResponseGetter responseGetter) { + super(responseGetter); + } + + /** List all Workflows. */ + public StripeCollection list(WorkflowListParams params) throws StripeException { + return list(params, (RequestOptions) null); + } + /** List all Workflows. */ + public StripeCollection list(RequestOptions options) throws StripeException { + return list((WorkflowListParams) null, options); + } + /** List all Workflows. */ + public StripeCollection list() throws StripeException { + return list((WorkflowListParams) null, (RequestOptions) null); + } + /** List all Workflows. */ + public StripeCollection list(WorkflowListParams params, RequestOptions options) + throws StripeException { + String path = "/v2/extend/workflows"; + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, new TypeToken>() {}.getType()); + } + /** Retrieves the details of a Workflow by ID. */ + public Workflow retrieve(String id) throws StripeException { + return retrieve(id, (RequestOptions) null); + } + /** Retrieves the details of a Workflow by ID. */ + public Workflow retrieve(String id, RequestOptions options) throws StripeException { + String path = String.format("/v2/extend/workflows/%s", ApiResource.urlEncodeId(id)); + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.GET, path, null, options); + return this.request(request, Workflow.class); + } + /** Invokes an on-demand Workflow with parameters, to launch a new Workflow Run. */ + public WorkflowRun invoke(String id, WorkflowInvokeParams params) + throws StripeException, CannotProceedException { + return invoke(id, params, (RequestOptions) null); + } + /** Invokes an on-demand Workflow with parameters, to launch a new Workflow Run. */ + public WorkflowRun invoke(String id, WorkflowInvokeParams params, RequestOptions options) + throws StripeException, CannotProceedException { + String path = String.format("/v2/extend/workflows/%s/invoke", ApiResource.urlEncodeId(id)); + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, WorkflowRun.class); + } +} diff --git a/src/main/java/com/stripe/service/v2/iam/ActivityLogService.java b/src/main/java/com/stripe/service/v2/iam/ActivityLogService.java new file mode 100644 index 00000000000..ce305b51b32 --- /dev/null +++ b/src/main/java/com/stripe/service/v2/iam/ActivityLogService.java @@ -0,0 +1,47 @@ +// File generated from our OpenAPI spec +package com.stripe.service.v2.iam; + +import com.google.gson.reflect.TypeToken; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.StripeCollection; +import com.stripe.model.v2.iam.ActivityLog; +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.v2.iam.ActivityLogListParams; + +public final class ActivityLogService extends ApiService { + public ActivityLogService(StripeResponseGetter responseGetter) { + super(responseGetter); + } + + /** List activity logs of an account. */ + public StripeCollection list(ActivityLogListParams params) throws StripeException { + return list(params, (RequestOptions) null); + } + /** List activity logs of an account. */ + public StripeCollection list(RequestOptions options) throws StripeException { + return list((ActivityLogListParams) null, options); + } + /** List activity logs of an account. */ + public StripeCollection list() throws StripeException { + return list((ActivityLogListParams) null, (RequestOptions) null); + } + /** List activity logs of an account. */ + public StripeCollection list(ActivityLogListParams params, RequestOptions options) + throws StripeException { + String path = "/v2/iam/activity_logs"; + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, new TypeToken>() {}.getType()); + } +} diff --git a/src/main/java/com/stripe/service/v2/moneymanagement/PayoutMethodService.java b/src/main/java/com/stripe/service/v2/moneymanagement/PayoutMethodService.java index e9ae637ca52..2d529c24ffb 100644 --- a/src/main/java/com/stripe/service/v2/moneymanagement/PayoutMethodService.java +++ b/src/main/java/com/stripe/service/v2/moneymanagement/PayoutMethodService.java @@ -2,6 +2,7 @@ package com.stripe.service.v2.moneymanagement; import com.google.gson.reflect.TypeToken; +import com.stripe.exception.CannotProceedException; import com.stripe.exception.ControlledByAlternateResourceException; import com.stripe.exception.ControlledByDashboardException; import com.stripe.exception.InvalidPayoutMethodException; @@ -65,8 +66,8 @@ public PayoutMethod retrieve(String id, RequestOptions options) * appear in the payout method list. */ public PayoutMethod archive(String id) - throws StripeException, ControlledByDashboardException, InvalidPayoutMethodException, - ControlledByAlternateResourceException { + throws StripeException, ControlledByDashboardException, CannotProceedException, + InvalidPayoutMethodException, ControlledByAlternateResourceException { return archive(id, (RequestOptions) null); } /** @@ -74,8 +75,8 @@ public PayoutMethod archive(String id) * appear in the payout method list. */ public PayoutMethod archive(String id, RequestOptions options) - throws StripeException, ControlledByDashboardException, InvalidPayoutMethodException, - ControlledByAlternateResourceException { + throws StripeException, ControlledByDashboardException, CannotProceedException, + InvalidPayoutMethodException, ControlledByAlternateResourceException { String path = String.format( "/v2/money_management/payout_methods/%s/archive", ApiResource.urlEncodeId(id)); diff --git a/src/main/java/com/stripe/service/v2/network/BusinessProfileService.java b/src/main/java/com/stripe/service/v2/network/BusinessProfileService.java new file mode 100644 index 00000000000..c67102754e3 --- /dev/null +++ b/src/main/java/com/stripe/service/v2/network/BusinessProfileService.java @@ -0,0 +1,40 @@ +// File generated from our OpenAPI spec +package com.stripe.service.v2.network; + +import com.stripe.exception.StripeException; +import com.stripe.model.v2.network.BusinessProfile; +import com.stripe.net.ApiRequest; +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; + +public final class BusinessProfileService extends ApiService { + public BusinessProfileService(StripeResponseGetter responseGetter) { + super(responseGetter); + } + + /** Retrieve the Stripe profile associated with the requesting merchant and livemode. */ + public BusinessProfile me() throws StripeException { + return me((RequestOptions) null); + } + /** Retrieve the Stripe profile associated with the requesting merchant and livemode. */ + public BusinessProfile me(RequestOptions options) throws StripeException { + String path = "/v2/network/business_profiles/me"; + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.GET, path, null, options); + return this.request(request, BusinessProfile.class); + } + /** Retrieve a Stripe profile by its Network ID. */ + public BusinessProfile retrieve(String id) throws StripeException { + return retrieve(id, (RequestOptions) null); + } + /** Retrieve a Stripe profile by its Network ID. */ + public BusinessProfile retrieve(String id, RequestOptions options) throws StripeException { + String path = String.format("/v2/network/business_profiles/%s", ApiResource.urlEncodeId(id)); + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.GET, path, null, options); + return this.request(request, BusinessProfile.class); + } +} diff --git a/src/main/java/com/stripe/service/v2/orchestratedcommerce/AgreementService.java b/src/main/java/com/stripe/service/v2/orchestratedcommerce/AgreementService.java new file mode 100644 index 00000000000..ad906ee45ad --- /dev/null +++ b/src/main/java/com/stripe/service/v2/orchestratedcommerce/AgreementService.java @@ -0,0 +1,103 @@ +// File generated from our OpenAPI spec +package com.stripe.service.v2.orchestratedcommerce; + +import com.google.gson.reflect.TypeToken; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.StripeCollection; +import com.stripe.model.v2.orchestratedcommerce.Agreement; +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.v2.orchestratedcommerce.AgreementCreateParams; +import com.stripe.param.v2.orchestratedcommerce.AgreementListParams; + +public final class AgreementService extends ApiService { + public AgreementService(StripeResponseGetter responseGetter) { + super(responseGetter); + } + + /** List Agreements for the profile associated with the authenticated merchant. */ + public StripeCollection list(AgreementListParams params) throws StripeException { + return list(params, (RequestOptions) null); + } + /** List Agreements for the profile associated with the authenticated merchant. */ + public StripeCollection list(RequestOptions options) throws StripeException { + return list((AgreementListParams) null, options); + } + /** List Agreements for the profile associated with the authenticated merchant. */ + public StripeCollection list() throws StripeException { + return list((AgreementListParams) null, (RequestOptions) null); + } + /** List Agreements for the profile associated with the authenticated merchant. */ + public StripeCollection list(AgreementListParams params, RequestOptions options) + throws StripeException { + String path = "/v2/orchestrated_commerce/agreements"; + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, new TypeToken>() {}.getType()); + } + /** Create a new Agreement. */ + public Agreement create(AgreementCreateParams params) throws StripeException { + return create(params, (RequestOptions) null); + } + /** Create a new Agreement. */ + public Agreement create(AgreementCreateParams params, RequestOptions options) + throws StripeException { + String path = "/v2/orchestrated_commerce/agreements"; + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, Agreement.class); + } + /** Retrieve an Agreement by ID. */ + public Agreement retrieve(String id) throws StripeException { + return retrieve(id, (RequestOptions) null); + } + /** Retrieve an Agreement by ID. */ + public Agreement retrieve(String id, RequestOptions options) throws StripeException { + String path = + String.format("/v2/orchestrated_commerce/agreements/%s", ApiResource.urlEncodeId(id)); + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.GET, path, null, options); + return this.request(request, Agreement.class); + } + /** Confirm an Agreement. */ + public Agreement confirm(String id) throws StripeException { + return confirm(id, (RequestOptions) null); + } + /** Confirm an Agreement. */ + public Agreement confirm(String id, RequestOptions options) throws StripeException { + String path = + String.format( + "/v2/orchestrated_commerce/agreements/%s/confirm", ApiResource.urlEncodeId(id)); + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, null, options); + return this.request(request, Agreement.class); + } + /** Terminate an Agreement. */ + public Agreement terminate(String id) throws StripeException { + return terminate(id, (RequestOptions) null); + } + /** Terminate an Agreement. */ + public Agreement terminate(String id, RequestOptions options) throws StripeException { + String path = + String.format( + "/v2/orchestrated_commerce/agreements/%s/terminate", ApiResource.urlEncodeId(id)); + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, null, options); + return this.request(request, Agreement.class); + } +} diff --git a/src/test/java/com/stripe/functional/GeneratedExamples.java b/src/test/java/com/stripe/functional/GeneratedExamples.java index 423bffb20bd..96db460e69f 100644 --- a/src/test/java/com/stripe/functional/GeneratedExamples.java +++ b/src/test/java/com/stripe/functional/GeneratedExamples.java @@ -13,6 +13,9 @@ import com.stripe.param.*; import java.math.BigDecimal; import java.time.Instant; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; import org.junit.jupiter.api.Test; class GeneratedExamples extends BaseStripeTest { @@ -25140,6 +25143,88 @@ public void testV2BillingProfilePost2Services() throws StripeException { null); } + @Test + public void testV2CommerceProductCatalogImportGetServices() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/commerce/product_catalog/imports", + null, + null, + new TypeToken< + com.stripe.model.v2.StripeCollection< + com.stripe.model.v2.commerce.ProductCatalogImport>>() {}.getType(), + "{\"data\":[{\"object\":\"v2.commerce.product_catalog_import\",\"created\":\"1970-01-12T21:42:34.472Z\",\"feed_type\":\"pricing\",\"id\":\"obj_123\",\"livemode\":true,\"metadata\":{\"key\":\"metadata\"},\"status\":\"awaiting_upload\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.param.v2.commerce.productcatalog.ImportListParams params = + com.stripe.param.v2.commerce.productcatalog.ImportListParams.builder().build(); + + com.stripe.model.v2.StripeCollection + stripeCollection = client.v2().commerce().productCatalog().imports().list(params); + assertNotNull(stripeCollection); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/commerce/product_catalog/imports", + params.toMap(), + null); + } + + @Test + public void testV2CommerceProductCatalogImportPostServices() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/commerce/product_catalog/imports", + null, + null, + com.stripe.model.v2.commerce.ProductCatalogImport.class, + "{\"object\":\"v2.commerce.product_catalog_import\",\"created\":\"1970-01-12T21:42:34.472Z\",\"feed_type\":\"pricing\",\"id\":\"obj_123\",\"livemode\":true,\"metadata\":{\"key\":\"metadata\"},\"status\":\"awaiting_upload\"}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.param.v2.commerce.productcatalog.ImportCreateParams params = + com.stripe.param.v2.commerce.productcatalog.ImportCreateParams.builder() + .setFeedType( + com.stripe.param.v2.commerce.productcatalog.ImportCreateParams.FeedType.PRICING) + .putMetadata("key", "metadata") + .setMode(com.stripe.param.v2.commerce.productcatalog.ImportCreateParams.Mode.UPSERT) + .build(); + + com.stripe.model.v2.commerce.ProductCatalogImport productCatalogImport = + client.v2().commerce().productCatalog().imports().create(params); + assertNotNull(productCatalogImport); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/commerce/product_catalog/imports", + params.toMap(), + null); + } + + @Test + public void testV2CommerceProductCatalogImportGet2Services() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/commerce/product_catalog/imports/id_123", + null, + null, + com.stripe.model.v2.commerce.ProductCatalogImport.class, + "{\"object\":\"v2.commerce.product_catalog_import\",\"created\":\"1970-01-12T21:42:34.472Z\",\"feed_type\":\"pricing\",\"id\":\"obj_123\",\"livemode\":true,\"metadata\":{\"key\":\"metadata\"},\"status\":\"awaiting_upload\"}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.model.v2.commerce.ProductCatalogImport productCatalogImport = + client.v2().commerce().productCatalog().imports().retrieve("id_123"); + assertNotNull(productCatalogImport); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/commerce/product_catalog/imports/id_123", + null, + null); + } + @Test public void testV2CoreAccountGetServices() throws StripeException { stubRequest( @@ -25578,7 +25663,7 @@ public void testV2CoreBatchJobPostServices() throws StripeException { .setEndpoint( com.stripe.param.v2.core.BatchJobCreateParams.Endpoint.builder() .setHttpMethod( - com.stripe.param.v2.core.BatchJobCreateParams.Endpoint.HttpMethod.POST) + com.stripe.param.v2.core.BatchJobCreateParams.Endpoint.HttpMethod.DELETE) .setPath( com.stripe.param.v2.core.BatchJobCreateParams.Endpoint.Path .V1_SUBSCRIPTION_SCHEDULE_CREATE) @@ -25892,7 +25977,7 @@ public void testV2CoreVaultGbBankAccountGetServices() throws StripeException { new TypeToken< com.stripe.model.v2.StripeCollection< com.stripe.model.v2.core.vault.GbBankAccount>>() {}.getType(), - "{\"data\":[{\"object\":\"v2.core.vault.gb_bank_account\",\"archived\":true,\"bank_account_type\":\"savings\",\"bank_name\":\"bank_name\",\"confirmation_of_payee\":{\"result\":{\"created\":\"1970-01-12T21:42:34.472Z\",\"match_result\":\"unavailable\",\"matched\":{},\"message\":\"message\",\"provided\":{\"business_type\":\"personal\",\"name\":\"name\"}},\"status\":\"awaiting_acknowledgement\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"last4\":\"last4\",\"livemode\":true,\"supported_currencies\":[\"supported_currencies\"]}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"object\":\"v2.core.vault.gb_bank_account\",\"archived\":true,\"bank_account_type\":\"toza\",\"bank_name\":\"bank_name\",\"confirmation_of_payee\":{\"result\":{\"created\":\"1970-01-12T21:42:34.472Z\",\"match_result\":\"unavailable\",\"matched\":{},\"message\":\"message\",\"provided\":{\"business_type\":\"personal\",\"name\":\"name\"}},\"status\":\"awaiting_acknowledgement\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"last4\":\"last4\",\"livemode\":true,\"supported_currencies\":[\"supported_currencies\"]}],\"next_page_url\":null,\"previous_page_url\":null}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.core.vault.GbBankAccountListParams params = @@ -25918,7 +26003,7 @@ public void testV2CoreVaultGbBankAccountPostServices() throws StripeException { null, null, com.stripe.model.v2.core.vault.GbBankAccount.class, - "{\"object\":\"v2.core.vault.gb_bank_account\",\"archived\":true,\"bank_account_type\":\"savings\",\"bank_name\":\"bank_name\",\"confirmation_of_payee\":{\"result\":{\"created\":\"1970-01-12T21:42:34.472Z\",\"match_result\":\"unavailable\",\"matched\":{},\"message\":\"message\",\"provided\":{\"business_type\":\"personal\",\"name\":\"name\"}},\"status\":\"awaiting_acknowledgement\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"last4\":\"last4\",\"livemode\":true,\"supported_currencies\":[\"supported_currencies\"]}"); + "{\"object\":\"v2.core.vault.gb_bank_account\",\"archived\":true,\"bank_account_type\":\"toza\",\"bank_name\":\"bank_name\",\"confirmation_of_payee\":{\"result\":{\"created\":\"1970-01-12T21:42:34.472Z\",\"match_result\":\"unavailable\",\"matched\":{},\"message\":\"message\",\"provided\":{\"business_type\":\"personal\",\"name\":\"name\"}},\"status\":\"awaiting_acknowledgement\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"last4\":\"last4\",\"livemode\":true,\"supported_currencies\":[\"supported_currencies\"]}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.core.vault.GbBankAccountCreateParams params = @@ -25946,7 +26031,7 @@ public void testV2CoreVaultGbBankAccountGet2Services() throws StripeException { null, null, com.stripe.model.v2.core.vault.GbBankAccount.class, - "{\"object\":\"v2.core.vault.gb_bank_account\",\"archived\":true,\"bank_account_type\":\"savings\",\"bank_name\":\"bank_name\",\"confirmation_of_payee\":{\"result\":{\"created\":\"1970-01-12T21:42:34.472Z\",\"match_result\":\"unavailable\",\"matched\":{},\"message\":\"message\",\"provided\":{\"business_type\":\"personal\",\"name\":\"name\"}},\"status\":\"awaiting_acknowledgement\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"last4\":\"last4\",\"livemode\":true,\"supported_currencies\":[\"supported_currencies\"]}"); + "{\"object\":\"v2.core.vault.gb_bank_account\",\"archived\":true,\"bank_account_type\":\"toza\",\"bank_name\":\"bank_name\",\"confirmation_of_payee\":{\"result\":{\"created\":\"1970-01-12T21:42:34.472Z\",\"match_result\":\"unavailable\",\"matched\":{},\"message\":\"message\",\"provided\":{\"business_type\":\"personal\",\"name\":\"name\"}},\"status\":\"awaiting_acknowledgement\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"last4\":\"last4\",\"livemode\":true,\"supported_currencies\":[\"supported_currencies\"]}"); StripeClient client = new StripeClient(networkSpy); com.stripe.model.v2.core.vault.GbBankAccount gbBankAccount = @@ -25969,7 +26054,7 @@ public void testV2CoreVaultGbBankAccountPost2Services() throws StripeException { null, null, com.stripe.model.v2.core.vault.GbBankAccount.class, - "{\"object\":\"v2.core.vault.gb_bank_account\",\"archived\":true,\"bank_account_type\":\"savings\",\"bank_name\":\"bank_name\",\"confirmation_of_payee\":{\"result\":{\"created\":\"1970-01-12T21:42:34.472Z\",\"match_result\":\"unavailable\",\"matched\":{},\"message\":\"message\",\"provided\":{\"business_type\":\"personal\",\"name\":\"name\"}},\"status\":\"awaiting_acknowledgement\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"last4\":\"last4\",\"livemode\":true,\"supported_currencies\":[\"supported_currencies\"]}"); + "{\"object\":\"v2.core.vault.gb_bank_account\",\"archived\":true,\"bank_account_type\":\"toza\",\"bank_name\":\"bank_name\",\"confirmation_of_payee\":{\"result\":{\"created\":\"1970-01-12T21:42:34.472Z\",\"match_result\":\"unavailable\",\"matched\":{},\"message\":\"message\",\"provided\":{\"business_type\":\"personal\",\"name\":\"name\"}},\"status\":\"awaiting_acknowledgement\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"last4\":\"last4\",\"livemode\":true,\"supported_currencies\":[\"supported_currencies\"]}"); StripeClient client = new StripeClient(networkSpy); com.stripe.model.v2.core.vault.GbBankAccount gbBankAccount = @@ -25992,7 +26077,7 @@ public void testV2CoreVaultGbBankAccountPost3Services() throws StripeException { null, null, com.stripe.model.v2.core.vault.GbBankAccount.class, - "{\"object\":\"v2.core.vault.gb_bank_account\",\"archived\":true,\"bank_account_type\":\"savings\",\"bank_name\":\"bank_name\",\"confirmation_of_payee\":{\"result\":{\"created\":\"1970-01-12T21:42:34.472Z\",\"match_result\":\"unavailable\",\"matched\":{},\"message\":\"message\",\"provided\":{\"business_type\":\"personal\",\"name\":\"name\"}},\"status\":\"awaiting_acknowledgement\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"last4\":\"last4\",\"livemode\":true,\"supported_currencies\":[\"supported_currencies\"]}"); + "{\"object\":\"v2.core.vault.gb_bank_account\",\"archived\":true,\"bank_account_type\":\"toza\",\"bank_name\":\"bank_name\",\"confirmation_of_payee\":{\"result\":{\"created\":\"1970-01-12T21:42:34.472Z\",\"match_result\":\"unavailable\",\"matched\":{},\"message\":\"message\",\"provided\":{\"business_type\":\"personal\",\"name\":\"name\"}},\"status\":\"awaiting_acknowledgement\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"last4\":\"last4\",\"livemode\":true,\"supported_currencies\":[\"supported_currencies\"]}"); StripeClient client = new StripeClient(networkSpy); com.stripe.model.v2.core.vault.GbBankAccount gbBankAccount = @@ -26015,7 +26100,7 @@ public void testV2CoreVaultGbBankAccountPost4Services() throws StripeException { null, null, com.stripe.model.v2.core.vault.GbBankAccount.class, - "{\"object\":\"v2.core.vault.gb_bank_account\",\"archived\":true,\"bank_account_type\":\"savings\",\"bank_name\":\"bank_name\",\"confirmation_of_payee\":{\"result\":{\"created\":\"1970-01-12T21:42:34.472Z\",\"match_result\":\"unavailable\",\"matched\":{},\"message\":\"message\",\"provided\":{\"business_type\":\"personal\",\"name\":\"name\"}},\"status\":\"awaiting_acknowledgement\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"last4\":\"last4\",\"livemode\":true,\"supported_currencies\":[\"supported_currencies\"]}"); + "{\"object\":\"v2.core.vault.gb_bank_account\",\"archived\":true,\"bank_account_type\":\"toza\",\"bank_name\":\"bank_name\",\"confirmation_of_payee\":{\"result\":{\"created\":\"1970-01-12T21:42:34.472Z\",\"match_result\":\"unavailable\",\"matched\":{},\"message\":\"message\",\"provided\":{\"business_type\":\"personal\",\"name\":\"name\"}},\"status\":\"awaiting_acknowledgement\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"last4\":\"last4\",\"livemode\":true,\"supported_currencies\":[\"supported_currencies\"]}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.core.vault.GbBankAccountInitiateConfirmationOfPayeeParams params = @@ -26211,6 +26296,224 @@ public void testV2CoreVaultUsBankAccountPost5Services() throws StripeException { null); } + @Test + public void testV2DataReportingQueryRunPostServices() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/data/reporting/query_runs", + null, + null, + com.stripe.model.v2.data.reporting.QueryRun.class, + "{\"object\":\"v2.data.reporting.query_run\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"sql\":\"sql\",\"status\":\"failed\",\"status_details\":{\"key\":{}}}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.param.v2.data.reporting.QueryRunCreateParams params = + com.stripe.param.v2.data.reporting.QueryRunCreateParams.builder().setSql("sql").build(); + + com.stripe.model.v2.data.reporting.QueryRun queryRun = + client.v2().data().reporting().queryRuns().create(params); + assertNotNull(queryRun); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/data/reporting/query_runs", + params.toMap(), + null); + } + + @Test + public void testV2DataReportingQueryRunGetServices() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/data/reporting/query_runs/id_123", + null, + null, + com.stripe.model.v2.data.reporting.QueryRun.class, + "{\"object\":\"v2.data.reporting.query_run\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"sql\":\"sql\",\"status\":\"failed\",\"status_details\":{\"key\":{}}}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.model.v2.data.reporting.QueryRun queryRun = + client.v2().data().reporting().queryRuns().retrieve("id_123"); + assertNotNull(queryRun); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/data/reporting/query_runs/id_123", + null, + null); + } + + @Test + public void testV2ExtendWorkflowGetServices() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/extend/workflows", + null, + null, + new TypeToken< + com.stripe.model.v2.StripeCollection< + com.stripe.model.v2.extend.Workflow>>() {}.getType(), + "{\"data\":[{\"object\":\"v2.extend.workflow\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"draft\",\"title\":\"title\",\"triggers\":[{\"type\":\"event_trigger\"}]}],\"next_page_url\":null,\"previous_page_url\":null}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.param.v2.extend.WorkflowListParams params = + com.stripe.param.v2.extend.WorkflowListParams.builder().build(); + + com.stripe.model.v2.StripeCollection stripeCollection = + client.v2().extend().workflows().list(params); + assertNotNull(stripeCollection); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/extend/workflows", + params.toMap(), + null); + } + + @Test + public void testV2ExtendWorkflowGet2Services() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/extend/workflows/id_123", + null, + null, + com.stripe.model.v2.extend.Workflow.class, + "{\"object\":\"v2.extend.workflow\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"draft\",\"title\":\"title\",\"triggers\":[{\"type\":\"event_trigger\"}]}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.model.v2.extend.Workflow workflow = + client.v2().extend().workflows().retrieve("id_123"); + assertNotNull(workflow); + verifyRequest( + BaseAddress.API, ApiResource.RequestMethod.GET, "/v2/extend/workflows/id_123", null, null); + } + + @Test + public void testV2ExtendWorkflowPostServices() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/extend/workflows/id_123/invoke", + null, + null, + com.stripe.model.v2.extend.WorkflowRun.class, + "{\"object\":\"v2.extend.workflow_run\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"failed\",\"status_transitions\":{},\"trigger\":{\"type\":\"event_trigger\"},\"workflow\":\"workflow\"}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.param.v2.extend.WorkflowInvokeParams params = + com.stripe.param.v2.extend.WorkflowInvokeParams.builder() + .putInputParameter("int_key", new BigDecimal(123)) + .putInputParameter("string_key", "value") + .putInputParameter("boolean_key", true) + .putInputParameter( + "object_key", + new HashMap() { + { + put("object_int_key", new BigDecimal(123)); + put("object_string_key", "value"); + put("object_boolean_key", true); + } + }) + .putInputParameter( + "array_key", + new ArrayList<>( + Arrays.asList(new BigDecimal(1), new BigDecimal(2), new BigDecimal(3)))) + .build(); + + com.stripe.model.v2.extend.WorkflowRun workflowRun = + client.v2().extend().workflows().invoke("id_123", params); + assertNotNull(workflowRun); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/extend/workflows/id_123/invoke", + params.toMap(), + null); + } + + @Test + public void testV2ExtendWorkflowRunGetServices() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/extend/workflow_runs", + null, + null, + new TypeToken< + com.stripe.model.v2.StripeCollection< + com.stripe.model.v2.extend.WorkflowRun>>() {}.getType(), + "{\"data\":[{\"object\":\"v2.extend.workflow_run\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"failed\",\"status_transitions\":{},\"trigger\":{\"type\":\"event_trigger\"},\"workflow\":\"workflow\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.param.v2.extend.WorkflowRunListParams params = + com.stripe.param.v2.extend.WorkflowRunListParams.builder().build(); + + com.stripe.model.v2.StripeCollection stripeCollection = + client.v2().extend().workflowRuns().list(params); + assertNotNull(stripeCollection); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/extend/workflow_runs", + params.toMap(), + null); + } + + @Test + public void testV2ExtendWorkflowRunGet2Services() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/extend/workflow_runs/id_123", + null, + null, + com.stripe.model.v2.extend.WorkflowRun.class, + "{\"object\":\"v2.extend.workflow_run\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"failed\",\"status_transitions\":{},\"trigger\":{\"type\":\"event_trigger\"},\"workflow\":\"workflow\"}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.model.v2.extend.WorkflowRun workflowRun = + client.v2().extend().workflowRuns().retrieve("id_123"); + assertNotNull(workflowRun); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/extend/workflow_runs/id_123", + null, + null); + } + + @Test + public void testV2IamActivityLogGetServices() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/iam/activity_logs", + null, + null, + new TypeToken< + com.stripe.model.v2.StripeCollection< + com.stripe.model.v2.iam.ActivityLog>>() {}.getType(), + "{\"data\":[{\"object\":\"v2.iam.activity_log\",\"actor\":{\"type\":\"api_key\"},\"context\":\"context\",\"created\":\"1970-01-12T21:42:34.472Z\",\"details\":{\"type\":\"api_key\"},\"id\":\"obj_123\",\"livemode\":true,\"type\":\"api_key_created\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.param.v2.iam.ActivityLogListParams params = + com.stripe.param.v2.iam.ActivityLogListParams.builder().build(); + + com.stripe.model.v2.StripeCollection stripeCollection = + client.v2().iam().activityLogs().list(params); + assertNotNull(stripeCollection); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/iam/activity_logs", + params.toMap(), + null); + } + @Test public void testV2MoneyManagementAdjustmentGetServices() throws StripeException { stubRequest( @@ -27218,7 +27521,7 @@ public void testV2MoneyManagementTransactionGetServices() throws StripeException new TypeToken< com.stripe.model.v2.StripeCollection< com.stripe.model.v2.moneymanagement.Transaction>>() {}.getType(), - "{\"data\":[{\"object\":\"v2.money_management.transaction\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"balance_impact\":{\"available\":{\"currency\":\"USD\",\"value\":35},\"inbound_pending\":{\"currency\":\"USD\",\"value\":11},\"outbound_pending\":{\"currency\":\"USD\",\"value\":60}},\"category\":\"received_debit\",\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"pending\",\"status_transitions\":{}}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"object\":\"v2.money_management.transaction\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"balance_impact\":{\"available\":{\"currency\":\"USD\",\"value\":35},\"inbound_pending\":{\"currency\":\"USD\",\"value\":11},\"outbound_pending\":{\"currency\":\"USD\",\"value\":60}},\"category\":\"stripe_fee\",\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"pending\",\"status_transitions\":{}}],\"next_page_url\":null,\"previous_page_url\":null}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.moneymanagement.TransactionListParams params = @@ -27244,7 +27547,7 @@ public void testV2MoneyManagementTransactionGet2Services() throws StripeExceptio null, null, com.stripe.model.v2.moneymanagement.Transaction.class, - "{\"object\":\"v2.money_management.transaction\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"balance_impact\":{\"available\":{\"currency\":\"USD\",\"value\":35},\"inbound_pending\":{\"currency\":\"USD\",\"value\":11},\"outbound_pending\":{\"currency\":\"USD\",\"value\":60}},\"category\":\"received_debit\",\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"pending\",\"status_transitions\":{}}"); + "{\"object\":\"v2.money_management.transaction\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"balance_impact\":{\"available\":{\"currency\":\"USD\",\"value\":35},\"inbound_pending\":{\"currency\":\"USD\",\"value\":11},\"outbound_pending\":{\"currency\":\"USD\",\"value\":60}},\"category\":\"stripe_fee\",\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"pending\",\"status_transitions\":{}}"); StripeClient client = new StripeClient(networkSpy); com.stripe.model.v2.moneymanagement.Transaction transaction = @@ -27269,7 +27572,7 @@ public void testV2MoneyManagementTransactionEntryGetServices() throws StripeExce new TypeToken< com.stripe.model.v2.StripeCollection< com.stripe.model.v2.moneymanagement.TransactionEntry>>() {}.getType(), - "{\"data\":[{\"object\":\"v2.money_management.transaction_entry\",\"balance_impact\":{\"available\":{\"currency\":\"USD\",\"value\":35},\"inbound_pending\":{\"currency\":\"USD\",\"value\":11},\"outbound_pending\":{\"currency\":\"USD\",\"value\":60}},\"created\":\"1970-01-12T21:42:34.472Z\",\"effective_at\":\"1970-01-03T20:38:28.043Z\",\"id\":\"obj_123\",\"livemode\":true,\"transaction\":\"transaction\",\"transaction_details\":{\"category\":\"received_debit\",\"financial_account\":\"financial_account\"}}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"object\":\"v2.money_management.transaction_entry\",\"balance_impact\":{\"available\":{\"currency\":\"USD\",\"value\":35},\"inbound_pending\":{\"currency\":\"USD\",\"value\":11},\"outbound_pending\":{\"currency\":\"USD\",\"value\":60}},\"created\":\"1970-01-12T21:42:34.472Z\",\"effective_at\":\"1970-01-03T20:38:28.043Z\",\"id\":\"obj_123\",\"livemode\":true,\"transaction\":\"transaction\",\"transaction_details\":{\"category\":\"stripe_fee\",\"financial_account\":\"financial_account\"}}],\"next_page_url\":null,\"previous_page_url\":null}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.moneymanagement.TransactionEntryListParams params = @@ -27295,7 +27598,7 @@ public void testV2MoneyManagementTransactionEntryGet2Services() throws StripeExc null, null, com.stripe.model.v2.moneymanagement.TransactionEntry.class, - "{\"object\":\"v2.money_management.transaction_entry\",\"balance_impact\":{\"available\":{\"currency\":\"USD\",\"value\":35},\"inbound_pending\":{\"currency\":\"USD\",\"value\":11},\"outbound_pending\":{\"currency\":\"USD\",\"value\":60}},\"created\":\"1970-01-12T21:42:34.472Z\",\"effective_at\":\"1970-01-03T20:38:28.043Z\",\"id\":\"obj_123\",\"livemode\":true,\"transaction\":\"transaction\",\"transaction_details\":{\"category\":\"received_debit\",\"financial_account\":\"financial_account\"}}"); + "{\"object\":\"v2.money_management.transaction_entry\",\"balance_impact\":{\"available\":{\"currency\":\"USD\",\"value\":35},\"inbound_pending\":{\"currency\":\"USD\",\"value\":11},\"outbound_pending\":{\"currency\":\"USD\",\"value\":60}},\"created\":\"1970-01-12T21:42:34.472Z\",\"effective_at\":\"1970-01-03T20:38:28.043Z\",\"id\":\"obj_123\",\"livemode\":true,\"transaction\":\"transaction\",\"transaction_details\":{\"category\":\"stripe_fee\",\"financial_account\":\"financial_account\"}}"); StripeClient client = new StripeClient(networkSpy); com.stripe.model.v2.moneymanagement.TransactionEntry transactionEntry = @@ -27309,6 +27612,177 @@ public void testV2MoneyManagementTransactionEntryGet2Services() throws StripeExc null); } + @Test + public void testV2NetworkBusinessProfileGetServices() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/network/business_profiles/me", + null, + null, + com.stripe.model.v2.network.BusinessProfile.class, + "{\"object\":\"v2.network.business_profile\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"livemode\":true,\"username\":\"username\"}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.model.v2.network.BusinessProfile businessProfile = + client.v2().network().businessProfiles().me(); + assertNotNull(businessProfile); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/network/business_profiles/me", + null, + null); + } + + @Test + public void testV2NetworkBusinessProfileGet2Services() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/network/business_profiles/id_123", + null, + null, + com.stripe.model.v2.network.BusinessProfile.class, + "{\"object\":\"v2.network.business_profile\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"livemode\":true,\"username\":\"username\"}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.model.v2.network.BusinessProfile businessProfile = + client.v2().network().businessProfiles().retrieve("id_123"); + assertNotNull(businessProfile); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/network/business_profiles/id_123", + null, + null); + } + + @Test + public void testV2OrchestratedCommerceAgreementGetServices() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/orchestrated_commerce/agreements", + null, + null, + new TypeToken< + com.stripe.model.v2.StripeCollection< + com.stripe.model.v2.orchestratedcommerce.Agreement>>() {}.getType(), + "{\"data\":[{\"object\":\"v2.orchestrated_commerce.agreement\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"initiated_by\":\"seller\",\"livemode\":true,\"orchestrator_details\":{\"name\":\"name\",\"network_business_profile\":\"network_business_profile\"},\"seller_details\":{\"network_business_profile\":\"network_business_profile\"},\"status\":\"partially_confirmed\",\"status_transitions\":{}}],\"next_page_url\":null,\"previous_page_url\":null}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.param.v2.orchestratedcommerce.AgreementListParams params = + com.stripe.param.v2.orchestratedcommerce.AgreementListParams.builder().build(); + + com.stripe.model.v2.StripeCollection + stripeCollection = client.v2().orchestratedCommerce().agreements().list(params); + assertNotNull(stripeCollection); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/orchestrated_commerce/agreements", + params.toMap(), + null); + } + + @Test + public void testV2OrchestratedCommerceAgreementPostServices() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/orchestrated_commerce/agreements", + null, + null, + com.stripe.model.v2.orchestratedcommerce.Agreement.class, + "{\"object\":\"v2.orchestrated_commerce.agreement\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"initiated_by\":\"seller\",\"livemode\":true,\"orchestrator_details\":{\"name\":\"name\",\"network_business_profile\":\"network_business_profile\"},\"seller_details\":{\"network_business_profile\":\"network_business_profile\"},\"status\":\"partially_confirmed\",\"status_transitions\":{}}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.param.v2.orchestratedcommerce.AgreementCreateParams params = + com.stripe.param.v2.orchestratedcommerce.AgreementCreateParams.builder() + .setOrchestrator("orchestrator") + .build(); + + com.stripe.model.v2.orchestratedcommerce.Agreement agreement = + client.v2().orchestratedCommerce().agreements().create(params); + assertNotNull(agreement); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/orchestrated_commerce/agreements", + params.toMap(), + null); + } + + @Test + public void testV2OrchestratedCommerceAgreementGet2Services() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/orchestrated_commerce/agreements/id_123", + null, + null, + com.stripe.model.v2.orchestratedcommerce.Agreement.class, + "{\"object\":\"v2.orchestrated_commerce.agreement\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"initiated_by\":\"seller\",\"livemode\":true,\"orchestrator_details\":{\"name\":\"name\",\"network_business_profile\":\"network_business_profile\"},\"seller_details\":{\"network_business_profile\":\"network_business_profile\"},\"status\":\"partially_confirmed\",\"status_transitions\":{}}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.model.v2.orchestratedcommerce.Agreement agreement = + client.v2().orchestratedCommerce().agreements().retrieve("id_123"); + assertNotNull(agreement); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/orchestrated_commerce/agreements/id_123", + null, + null); + } + + @Test + public void testV2OrchestratedCommerceAgreementPost2Services() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/orchestrated_commerce/agreements/id_123/confirm", + null, + null, + com.stripe.model.v2.orchestratedcommerce.Agreement.class, + "{\"object\":\"v2.orchestrated_commerce.agreement\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"initiated_by\":\"seller\",\"livemode\":true,\"orchestrator_details\":{\"name\":\"name\",\"network_business_profile\":\"network_business_profile\"},\"seller_details\":{\"network_business_profile\":\"network_business_profile\"},\"status\":\"partially_confirmed\",\"status_transitions\":{}}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.model.v2.orchestratedcommerce.Agreement agreement = + client.v2().orchestratedCommerce().agreements().confirm("id_123"); + assertNotNull(agreement); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/orchestrated_commerce/agreements/id_123/confirm", + null, + null); + } + + @Test + public void testV2OrchestratedCommerceAgreementPost3Services() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/orchestrated_commerce/agreements/id_123/terminate", + null, + null, + com.stripe.model.v2.orchestratedcommerce.Agreement.class, + "{\"object\":\"v2.orchestrated_commerce.agreement\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"initiated_by\":\"seller\",\"livemode\":true,\"orchestrator_details\":{\"name\":\"name\",\"network_business_profile\":\"network_business_profile\"},\"seller_details\":{\"network_business_profile\":\"network_business_profile\"},\"status\":\"partially_confirmed\",\"status_transitions\":{}}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.model.v2.orchestratedcommerce.Agreement agreement = + client.v2().orchestratedCommerce().agreements().terminate("id_123"); + assertNotNull(agreement); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/orchestrated_commerce/agreements/id_123/terminate", + null, + null); + } + @Test public void testV2TestHelpersFinancialAddressPostServices() throws StripeException { stubRequest( @@ -27451,6 +27925,52 @@ public void testBlockedByStripeErrorServices() throws StripeException { null); } + @Test + public void testCannotProceedErrorServices() throws StripeException { + stubRequestReturnError( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/extend/workflows/id_123/invoke", + null, + null, + "{\"error\":{\"type\":\"cannot_proceed\",\"code\":\"default_payout_method_cannot_be_archived\"}}", + 400); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.param.v2.extend.WorkflowInvokeParams params = + com.stripe.param.v2.extend.WorkflowInvokeParams.builder() + .putInputParameter("int_key", new BigDecimal(123)) + .putInputParameter("string_key", "value") + .putInputParameter("boolean_key", true) + .putInputParameter( + "object_key", + new HashMap() { + { + put("object_int_key", new BigDecimal(123)); + put("object_string_key", "value"); + put("object_boolean_key", true); + } + }) + .putInputParameter( + "array_key", + new ArrayList<>( + Arrays.asList(new BigDecimal(1), new BigDecimal(2), new BigDecimal(3)))) + .build(); + + try { + client.v2().extend().workflows().invoke("id_123", params); + } catch (CannotProceedException e) { + + } + ; + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/extend/workflows/id_123/invoke", + params.toMap(), + null); + } + @Test public void testControlledByAlternateResourceErrorServices() throws StripeException { stubRequestReturnError(