From a20d3c78afdbc1ea89f254093b0413c2ea7ce91b Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Mon, 27 Jan 2025 20:07:20 +0000 Subject: [PATCH 1/5] Update generated code for v1463 --- CONTRIBUTING.md | 25 ------------------------- OPENAPI_VERSION | 2 +- 2 files changed, 1 insertion(+), 26 deletions(-) delete mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md deleted file mode 100644 index 11efda67a0a..00000000000 --- a/CONTRIBUTING.md +++ /dev/null @@ -1,25 +0,0 @@ - -# Contributing - -We welcome bug reports, feature requests, and code contributions in a pull request. - -For most pull requests, we request that you identify or create an associated issue that has the necessary context. We use these issues to reach agreement on an approach and save the PR author from having to redo work. Fixing typos or documentation issues likely do not need an issue; for any issue that introduces substantial code changes, changes the public interface, or if you aren't sure, please find or [create an issue](https://www.github.com/stripe/stripe-java/issues/new/choose). - -## Contributor License Agreement - -All contributors must sign the Contributor License Agreement (CLA) before we can accept their contribution. If you have not yet signed the agreement, you will be given an option to do so when you open a pull request. You can then sign by clicking on the badge in the comment from @CLAassistant. - -## Generated code - -This project has a combination of manually maintained code and code generated from our private code generator. If your contribution involves changes to generated code, please call this out in the issue or pull request as we will likely need to make a change to our code generator before accepting the contribution. - -To identify files with purely generated code, look for the comment `File generated from our OpenAPI spec.` at the start of the file. Generated blocks of code within hand-written files will be between comments that say `The beginning of the section generated from our OpenAPI spec` and `The end of the section generated from our OpenAPI spec`. - -## Compatibility with supported language and runtime versions - -This project supports [many different langauge and runtime versions](README.md#requirements) and we are unable to accept any contribution that does not work on _all_ supported versions. If, after discussing the approach in the associated issue, your change must use an API / feature that isn't available in all supported versions, please call this out explicitly in the issue or pull request so we can help figure out the best way forward. - -## Set up your dev environment - -Please refer to this project's [README.md](README.md#development) for instructions on how to set up your development environment. - diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 217ac84ad04..7991f3354cc 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1455 \ No newline at end of file +v1463 \ No newline at end of file From 1fb00c37395fa39d893bc25eee46e94c7824b06f Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 14 Feb 2025 22:06:38 +0000 Subject: [PATCH 2/5] Update generated code for v1494 --- OPENAPI_VERSION | 2 +- src/main/java/com/stripe/ApiVersion.java | 2 +- src/main/java/com/stripe/model/Balance.java | 90 ++++- src/main/java/com/stripe/model/Charge.java | 30 +- .../com/stripe/model/ConfirmationToken.java | 21 +- .../java/com/stripe/model/CreditNote.java | 10 +- src/main/java/com/stripe/model/Invoice.java | 10 +- src/main/java/com/stripe/model/LineItem.java | 10 +- .../java/com/stripe/model/PaymentIntent.java | 53 ++- .../java/com/stripe/model/PaymentMethod.java | 21 +- src/main/java/com/stripe/model/Quote.java | 28 +- src/main/java/com/stripe/model/TaxRate.java | 13 +- .../com/stripe/model/billing/CreditGrant.java | 29 ++ .../model/billing/MeterEventSummary.java | 3 + .../com/stripe/model/checkout/Session.java | 97 ++++- .../com/stripe/model/tax/Calculation.java | 2 +- .../stripe/model/tax/CalculationLineItem.java | 4 +- .../com/stripe/model/tax/Transaction.java | 2 +- .../param/AccountPersonCreateParams.java | 24 +- .../param/AccountPersonUpdateParams.java | 34 +- .../param/PaymentIntentConfirmParams.java | 125 +++++- .../param/PaymentIntentCreateParams.java | 125 +++++- .../param/PaymentIntentUpdateParams.java | 175 +++++++- .../param/PersonCollectionCreateParams.java | 24 +- .../com/stripe/param/PersonUpdateParams.java | 33 +- .../com/stripe/param/ProductCreateParams.java | 40 ++ .../com/stripe/param/TaxRateCreateParams.java | 6 +- .../com/stripe/param/TaxRateUpdateParams.java | 10 +- .../com/stripe/param/TokenCreateParams.java | 24 +- .../param/WebhookEndpointCreateParams.java | 5 +- .../CreditBalanceSummaryRetrieveParams.java | 129 +++++- .../billing/CreditGrantCreateParams.java | 161 +++++++- .../param/checkout/SessionCreateParams.java | 272 ++++++++++++- .../param/checkout/SessionUpdateParams.java | 380 +++++++++++++++++- 34 files changed, 1792 insertions(+), 202 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 7991f3354cc..d9f1c75b6c7 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1463 \ No newline at end of file +v1494 \ 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 40e6e8ec23f..df1ff179ecd 100644 --- a/src/main/java/com/stripe/ApiVersion.java +++ b/src/main/java/com/stripe/ApiVersion.java @@ -2,5 +2,5 @@ package com.stripe; final class ApiVersion { - public static final String CURRENT = "2025-01-27.acacia"; + public static final String CURRENT = "2025-02-24.acacia"; } diff --git a/src/main/java/com/stripe/model/Balance.java b/src/main/java/com/stripe/model/Balance.java index deb715064ae..1e0c70549d6 100644 --- a/src/main/java/com/stripe/model/Balance.java +++ b/src/main/java/com/stripe/model/Balance.java @@ -166,15 +166,24 @@ public static class Available extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class SourceTypes extends StripeObject { - /** Amount for bank account. */ + /** + * Amount coming from legacy US ACH + * payments. + */ @SerializedName("bank_account") Long bankAccount; - /** Amount for card. */ + /** + * Amount coming from most payment methods, including cards as well as non-legacy bank debits. + */ @SerializedName("card") Long card; - /** Amount for FPX. */ + /** + * Amount coming from FPX, a Malaysian + * payment method. + */ @SerializedName("fpx") Long fpx; } @@ -211,15 +220,24 @@ public static class ConnectReserved extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class SourceTypes extends StripeObject { - /** Amount for bank account. */ + /** + * Amount coming from legacy US ACH + * payments. + */ @SerializedName("bank_account") Long bankAccount; - /** Amount for card. */ + /** + * Amount coming from most payment methods, including cards as well as non-legacy bank debits. + */ @SerializedName("card") Long card; - /** Amount for FPX. */ + /** + * Amount coming from FPX, a Malaysian + * payment method. + */ @SerializedName("fpx") Long fpx; } @@ -279,15 +297,24 @@ public static class NetAvailable extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class SourceTypes extends StripeObject { - /** Amount for bank account. */ + /** + * Amount coming from legacy US ACH + * payments. + */ @SerializedName("bank_account") Long bankAccount; - /** Amount for card. */ + /** + * Amount coming from most payment methods, including cards as well as non-legacy bank debits. + */ @SerializedName("card") Long card; - /** Amount for FPX. */ + /** + * Amount coming from FPX, a Malaysian + * payment method. + */ @SerializedName("fpx") Long fpx; } @@ -301,15 +328,24 @@ public static class SourceTypes extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class SourceTypes extends StripeObject { - /** Amount for bank account. */ + /** + * Amount coming from legacy US ACH + * payments. + */ @SerializedName("bank_account") Long bankAccount; - /** Amount for card. */ + /** + * Amount coming from most payment methods, including cards as well as non-legacy bank debits. + */ @SerializedName("card") Long card; - /** Amount for FPX. */ + /** + * Amount coming from FPX, a Malaysian + * payment method. + */ @SerializedName("fpx") Long fpx; } @@ -358,15 +394,24 @@ public static class Available extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class SourceTypes extends StripeObject { - /** Amount for bank account. */ + /** + * Amount coming from legacy US ACH + * payments. + */ @SerializedName("bank_account") Long bankAccount; - /** Amount for card. */ + /** + * Amount coming from most payment methods, including cards as well as non-legacy bank debits. + */ @SerializedName("card") Long card; - /** Amount for FPX. */ + /** + * Amount coming from FPX, a Malaysian + * payment method. + */ @SerializedName("fpx") Long fpx; } @@ -404,15 +449,24 @@ public static class Pending extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class SourceTypes extends StripeObject { - /** Amount for bank account. */ + /** + * Amount coming from legacy US ACH + * payments. + */ @SerializedName("bank_account") Long bankAccount; - /** Amount for card. */ + /** + * Amount coming from most payment methods, including cards as well as non-legacy bank debits. + */ @SerializedName("card") Long card; - /** Amount for FPX. */ + /** + * Amount coming from FPX, a Malaysian + * payment method. + */ @SerializedName("fpx") Long fpx; } diff --git a/src/main/java/com/stripe/model/Charge.java b/src/main/java/com/stripe/model/Charge.java index 8c8f3527f61..d8acaa6062f 100644 --- a/src/main/java/com/stripe/model/Charge.java +++ b/src/main/java/com/stripe/model/Charge.java @@ -1305,13 +1305,11 @@ public static class PaymentMethodDetails extends StripeObject { Twint twint; /** - * The type of transaction-specific details of the payment method used in the payment, one of - * {@code ach_credit_transfer}, {@code ach_debit}, {@code acss_debit}, {@code alipay}, {@code - * au_becs_debit}, {@code bancontact}, {@code card}, {@code card_present}, {@code eps}, {@code - * giropay}, {@code ideal}, {@code klarna}, {@code multibanco}, {@code p24}, {@code sepa_debit}, - * {@code sofort}, {@code stripe_account}, or {@code wechat}. An additional hash is included on - * {@code payment_method_details} with a name matching this value. It contains information - * specific to the payment method. + * The type of transaction-specific details of the payment method used in the payment. See PaymentMethod.type + * for the full list of possible types. An additional hash is included on {@code + * payment_method_details} with a name matching this value. It contains information specific to + * the payment method. */ @SerializedName("type") String type; @@ -1889,10 +1887,8 @@ public static class Card extends StripeObject { /** * This is used by the financial networks to identify a transaction. Visa calls this the * Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the - * Acquirer Reference Data. The first three digits of the Trace ID is the Financial Network - * Code, the next 6 digits is the Banknet Reference Number, and the last 4 digits represent - * the date (MM/DD). This field will be available for successful Visa, Mastercard, or American - * Express transactions and always null for other card brands. + * Acquirer Reference Data. This value will be present if it is returned by the financial + * network in the authorization response, and null otherwise. */ @SerializedName("network_transaction_id") String networkTransactionId; @@ -2454,10 +2450,8 @@ public static class CardPresent extends StripeObject { /** * This is used by the financial networks to identify a transaction. Visa calls this the * Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the - * Acquirer Reference Data. The first three digits of the Trace ID is the Financial Network - * Code, the next 6 digits is the Banknet Reference Number, and the last 4 digits represent - * the date (MM/DD). This field will be available for successful Visa, Mastercard, or American - * Express transactions and always null for other card brands. + * Acquirer Reference Data. This value will be present if it is returned by the financial + * network in the authorization response, and null otherwise. */ @SerializedName("network_transaction_id") String networkTransactionId; @@ -2917,10 +2911,8 @@ public static class InteracPresent extends StripeObject { /** * This is used by the financial networks to identify a transaction. Visa calls this the * Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the - * Acquirer Reference Data. The first three digits of the Trace ID is the Financial Network - * Code, the next 6 digits is the Banknet Reference Number, and the last 4 digits represent - * the date (MM/DD). This field will be available for successful Visa, Mastercard, or American - * Express transactions and always null for other card brands. + * Acquirer Reference Data. This value will be present if it is returned by the financial + * network in the authorization response, and null otherwise. */ @SerializedName("network_transaction_id") String networkTransactionId; diff --git a/src/main/java/com/stripe/model/ConfirmationToken.java b/src/main/java/com/stripe/model/ConfirmationToken.java index b498b819d9e..592da3f2828 100644 --- a/src/main/java/com/stripe/model/ConfirmationToken.java +++ b/src/main/java/com/stripe/model/ConfirmationToken.java @@ -942,10 +942,8 @@ public static class CardPresent extends StripeObject { /** * This is used by the financial networks to identify a transaction. Visa calls this the * Transaction ID, Mastercard calls this the Trace ID, and American Express calls this - * the Acquirer Reference Data. The first three digits of the Trace ID is the Financial - * Network Code, the next 6 digits is the Banknet Reference Number, and the last 4 - * digits represent the date (MM/DD). This field will be available for successful Visa, - * Mastercard, or American Express transactions and always null for other card brands. + * the Acquirer Reference Data. This value will be present if it is returned by the + * financial network in the authorization response, and null otherwise. */ @SerializedName("network_transaction_id") String networkTransactionId; @@ -1087,7 +1085,10 @@ public static class Wallet extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class Networks extends StripeObject { - /** All available networks for the card. */ + /** + * All networks available for selection via payment_method_options.card.network. + */ @SerializedName("available") List available; @@ -1405,7 +1406,10 @@ public static class CardPresent extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class Networks extends StripeObject { - /** All available networks for the card. */ + /** + * All networks available for selection via payment_method_options.card.network. + */ @SerializedName("available") List available; @@ -1682,7 +1686,10 @@ public static class InteracPresent extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class Networks extends StripeObject { - /** All available networks for the card. */ + /** + * All networks available for selection via payment_method_options.card.network. + */ @SerializedName("available") List available; diff --git a/src/main/java/com/stripe/model/CreditNote.java b/src/main/java/com/stripe/model/CreditNote.java index 73213a64086..a4c582853f0 100644 --- a/src/main/java/com/stripe/model/CreditNote.java +++ b/src/main/java/com/stripe/model/CreditNote.java @@ -792,12 +792,12 @@ public static class Tax extends StripeObject { /** * Tax rates can be applied to invoices, subscriptions and Checkout - * Sessions to collect tax. + * href="https://stripe.com/invoicing/taxes/tax-rates">invoices, subscriptions and Checkout Sessions to + * collect tax. * - *

Related guide: Tax rates + *

Related guide: Tax rates */ @SerializedName("rate") TaxRate rate; diff --git a/src/main/java/com/stripe/model/Invoice.java b/src/main/java/com/stripe/model/Invoice.java index ff87a9cc2c5..51acbd73c90 100644 --- a/src/main/java/com/stripe/model/Invoice.java +++ b/src/main/java/com/stripe/model/Invoice.java @@ -2800,12 +2800,12 @@ public static class Tax extends StripeObject { /** * Tax rates can be applied to invoices, subscriptions and Checkout - * Sessions to collect tax. + * href="https://stripe.com/invoicing/taxes/tax-rates">invoices, subscriptions and Checkout Sessions to + * collect tax. * - *

Related guide: Tax rates + *

Related guide: Tax rates */ @SerializedName("rate") TaxRate rate; diff --git a/src/main/java/com/stripe/model/LineItem.java b/src/main/java/com/stripe/model/LineItem.java index 157e43601dc..101b583063b 100644 --- a/src/main/java/com/stripe/model/LineItem.java +++ b/src/main/java/com/stripe/model/LineItem.java @@ -110,12 +110,12 @@ public static class Tax extends StripeObject { /** * Tax rates can be applied to invoices, subscriptions and Checkout - * Sessions to collect tax. + * href="https://stripe.com/invoicing/taxes/tax-rates">invoices, subscriptions and Checkout Sessions to + * collect tax. * - *

Related guide: Tax rates + *

Related guide: Tax rates */ @SerializedName("rate") TaxRate rate; diff --git a/src/main/java/com/stripe/model/PaymentIntent.java b/src/main/java/com/stripe/model/PaymentIntent.java index bb4b2970ec9..f6c0a3f9dcb 100644 --- a/src/main/java/com/stripe/model/PaymentIntent.java +++ b/src/main/java/com/stripe/model/PaymentIntent.java @@ -2665,6 +2665,14 @@ public static class AcssDebit extends StripeObject { @SerializedName("setup_future_usage") String setupFutureUsage; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date + * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 + * calendar days from now. + */ + @SerializedName("target_date") + String targetDate; + /** * Bank account verification method. * @@ -2926,6 +2934,14 @@ public static class AuBecsDebit extends StripeObject { */ @SerializedName("setup_future_usage") String setupFutureUsage; + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date + * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 + * calendar days from now. + */ + @SerializedName("target_date") + String targetDate; } /** @@ -2963,6 +2979,14 @@ public static class BacsDebit extends StripeObject { @SerializedName("setup_future_usage") String setupFutureUsage; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date + * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 + * calendar days from now. + */ + @SerializedName("target_date") + String targetDate; + /** * For more details about MandateOptions, please refer to the API Reference. @@ -4418,6 +4442,14 @@ public static class SepaDebit extends StripeObject { @SerializedName("setup_future_usage") String setupFutureUsage; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date + * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 + * calendar days from now. + */ + @SerializedName("target_date") + String targetDate; + /** * For more details about MandateOptions, please refer to the API Reference. @@ -4594,6 +4626,14 @@ public static class UsBankAccount extends StripeObject { @SerializedName("setup_future_usage") String setupFutureUsage; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date + * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 + * calendar days from now. + */ + @SerializedName("target_date") + String targetDate; + /** * Bank account verification method. * @@ -4806,13 +4846,12 @@ public static class CustomerNotification extends StripeObject { @EqualsAndHashCode(callSuper = false) public static class TransferData extends StripeObject { /** - * Amount intended to be collected by this PaymentIntent. A positive integer representing how - * much to charge in the smallest - * currency unit (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal - * currency). The minimum amount is $0.50 US or equivalent in - * charge currency. The amount value supports up to eight digits (e.g., a value of 99999999 - * for a USD charge of $999,999.99). + * The amount transferred to the destination account. This transfer will occur automatically + * after the payment succeeds. If no amount is specified, by default the entire payment amount + * is transferred to the destination account. The amount must be less than or equal to the amount, + * and must be a positive integer representing how much to transfer in the smallest currency + * unit (e.g., 100 cents to charge $1.00). */ @SerializedName("amount") Long amount; diff --git a/src/main/java/com/stripe/model/PaymentMethod.java b/src/main/java/com/stripe/model/PaymentMethod.java index 93d71b74d35..ed67319179f 100644 --- a/src/main/java/com/stripe/model/PaymentMethod.java +++ b/src/main/java/com/stripe/model/PaymentMethod.java @@ -1172,10 +1172,8 @@ public static class CardPresent extends StripeObject { /** * This is used by the financial networks to identify a transaction. Visa calls this the * Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the - * Acquirer Reference Data. The first three digits of the Trace ID is the Financial - * Network Code, the next 6 digits is the Banknet Reference Number, and the last 4 digits - * represent the date (MM/DD). This field will be available for successful Visa, - * Mastercard, or American Express transactions and always null for other card brands. + * Acquirer Reference Data. This value will be present if it is returned by the financial + * network in the authorization response, and null otherwise. */ @SerializedName("network_transaction_id") String networkTransactionId; @@ -1316,7 +1314,10 @@ public static class Wallet extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class Networks extends StripeObject { - /** All available networks for the card. */ + /** + * All networks available for selection via payment_method_options.card.network. + */ @SerializedName("available") List available; @@ -1628,7 +1629,10 @@ public static class CardPresent extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class Networks extends StripeObject { - /** All available networks for the card. */ + /** + * All networks available for selection via payment_method_options.card.network. + */ @SerializedName("available") List available; @@ -1904,7 +1908,10 @@ public static class InteracPresent extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class Networks extends StripeObject { - /** All available networks for the card. */ + /** + * All networks available for selection via payment_method_options.card.network. + */ @SerializedName("available") List available; diff --git a/src/main/java/com/stripe/model/Quote.java b/src/main/java/com/stripe/model/Quote.java index abca8061b1f..b0f1f2130a4 100644 --- a/src/main/java/com/stripe/model/Quote.java +++ b/src/main/java/com/stripe/model/Quote.java @@ -1120,13 +1120,12 @@ public static class Tax extends StripeObject { /** * Tax rates can be applied to invoices, subscriptions and Checkout + * href="https://stripe.com/invoicing/taxes/tax-rates">invoices, subscriptions and Checkout * Sessions to collect tax. * - *

Related guide: Tax - * rates + *

Related guide: Tax rates */ @SerializedName("rate") TaxRate rate; @@ -1260,13 +1259,12 @@ public static class Tax extends StripeObject { /** * Tax rates can be applied to invoices, subscriptions and Checkout + * href="https://stripe.com/invoicing/taxes/tax-rates">invoices, subscriptions and Checkout * Sessions to collect tax. * - *

Related guide: Tax - * rates + *

Related guide: Tax rates */ @SerializedName("rate") TaxRate rate; @@ -1535,12 +1533,12 @@ public static class Tax extends StripeObject { /** * Tax rates can be applied to invoices, subscriptions and Checkout - * Sessions to collect tax. + * href="https://stripe.com/invoicing/taxes/tax-rates">invoices, subscriptions and Checkout Sessions to + * collect tax. * - *

Related guide: Tax rates + *

Related guide: Tax rates */ @SerializedName("rate") TaxRate rate; diff --git a/src/main/java/com/stripe/model/TaxRate.java b/src/main/java/com/stripe/model/TaxRate.java index 84195dd5852..f830d614dcf 100644 --- a/src/main/java/com/stripe/model/TaxRate.java +++ b/src/main/java/com/stripe/model/TaxRate.java @@ -20,13 +20,12 @@ import lombok.Setter; /** - * Tax rates can be applied to invoices, subscriptions and Checkout - * Sessions to collect tax. + * Tax rates can be applied to invoices, + * subscriptions and Checkout Sessions to collect + * tax. * - *

Related guide: Tax rates + *

Related guide: Tax rates */ @Getter @Setter @@ -149,7 +148,7 @@ public class TaxRate extends ApiResource implements HasId, MetadataStoreISO 3166-2 subdivision code, without + * ISO 3166-2 subdivision code, without * country prefix. For example, "NY" for New York, United States. */ @SerializedName("state") diff --git a/src/main/java/com/stripe/model/billing/CreditGrant.java b/src/main/java/com/stripe/model/billing/CreditGrant.java index a320d926d4d..ba7d83050e3 100644 --- a/src/main/java/com/stripe/model/billing/CreditGrant.java +++ b/src/main/java/com/stripe/model/billing/CreditGrant.java @@ -21,6 +21,7 @@ import com.stripe.param.billing.CreditGrantRetrieveParams; import com.stripe.param.billing.CreditGrantUpdateParams; import com.stripe.param.billing.CreditGrantVoidGrantParams; +import java.util.List; import java.util.Map; import lombok.EqualsAndHashCode; import lombok.Getter; @@ -104,6 +105,12 @@ public class CreditGrant extends ApiResource implements HasId, MetadataStoreBilling Meter attached to them. + */ + @SerializedName("prices") + List prices; + + /** + * For more details about Price, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Price extends StripeObject implements HasId { + /** Unique identifier for the object. */ + @Getter(onMethod_ = {@Override}) + @SerializedName("id") + String id; + } } } diff --git a/src/main/java/com/stripe/model/billing/MeterEventSummary.java b/src/main/java/com/stripe/model/billing/MeterEventSummary.java index 1aa369178a2..477fa928113 100644 --- a/src/main/java/com/stripe/model/billing/MeterEventSummary.java +++ b/src/main/java/com/stripe/model/billing/MeterEventSummary.java @@ -20,6 +20,9 @@ * A billing meter event summary represents an aggregated view of a customer's billing meter events * within a specified timeframe. It indicates how much usage was accrued by a customer for that * period. + * + *

Note: Meters events are aggregated asynchronously so the meter event summaries provide an + * eventually consistent view of the reported usage. */ @Getter @Setter diff --git a/src/main/java/com/stripe/model/checkout/Session.java b/src/main/java/com/stripe/model/checkout/Session.java index 929fc6b4d12..0229078f496 100644 --- a/src/main/java/com/stripe/model/checkout/Session.java +++ b/src/main/java/com/stripe/model/checkout/Session.java @@ -113,6 +113,10 @@ public class Session extends ApiResource implements HasId, MetadataStoreAPI Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class CollectedInformation extends StripeObject { + /** Shipping information for this Checkout Session. */ + @SerializedName("shipping_details") + ShippingDetails shippingDetails; + } + /** * For more details about Consent, please refer to the API * Reference. @@ -1782,6 +1799,14 @@ public static class AcssDebit extends StripeObject { @SerializedName("setup_future_usage") String setupFutureUsage; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date + * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 + * calendar days from now. + */ + @SerializedName("target_date") + String targetDate; + /** * Bank account verification method. * @@ -1997,6 +2022,14 @@ public static class AuBecsDebit extends StripeObject { */ @SerializedName("setup_future_usage") String setupFutureUsage; + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date + * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 + * calendar days from now. + */ + @SerializedName("target_date") + String targetDate; } /** @@ -2034,6 +2067,14 @@ public static class BacsDebit extends StripeObject { @SerializedName("setup_future_usage") String setupFutureUsage; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date + * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 + * calendar days from now. + */ + @SerializedName("target_date") + String targetDate; + /** * For more details about MandateOptions, please refer to the API Reference. @@ -2190,6 +2231,9 @@ public static class Card extends StripeObject { @SerializedName("request_three_d_secure") String requestThreeDSecure; + @SerializedName("restrictions") + Restrictions restrictions; + /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * @@ -2246,6 +2290,22 @@ public static class Installments extends StripeObject { @SerializedName("enabled") Boolean enabled; } + + /** + * For more details about Restrictions, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Restrictions extends StripeObject { + /** + * Specify the card brands to block in the Checkout Session. If a customer enters or selects + * a card belonging to a blocked brand, they can't complete the Session. + */ + @SerializedName("brands_blocked") + List brandsBlocked; + } } /** @@ -3090,6 +3150,14 @@ public static class SepaDebit extends StripeObject { @SerializedName("setup_future_usage") String setupFutureUsage; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date + * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 + * calendar days from now. + */ + @SerializedName("target_date") + String targetDate; + /** * For more details about MandateOptions, please refer to the API Reference. @@ -3192,6 +3260,14 @@ public static class UsBankAccount extends StripeObject { @SerializedName("setup_future_usage") String setupFutureUsage; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date + * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 + * calendar days from now. + */ + @SerializedName("target_date") + String targetDate; + /** * Bank account verification method. * @@ -3376,12 +3452,12 @@ public static class Tax extends StripeObject { /** * Tax rates can be applied to invoices, subscriptions and Checkout - * Sessions to collect tax. + * href="https://stripe.com/invoicing/taxes/tax-rates">invoices, subscriptions and Checkout Sessions to + * collect tax. * - *

Related guide: Tax rates + *

Related guide: Tax rates */ @SerializedName("rate") TaxRate rate; @@ -3543,12 +3619,12 @@ public static class Tax extends StripeObject { /** * Tax rates can be applied to invoices, subscriptions and Checkout - * Sessions to collect tax. + * href="https://stripe.com/invoicing/taxes/tax-rates">invoices, subscriptions and Checkout Sessions to + * collect tax. * - *

Related guide: Tax rates + *

Related guide: Tax rates */ @SerializedName("rate") TaxRate rate; @@ -3579,6 +3655,7 @@ public void setResponseGetter(StripeResponseGetter responseGetter) { trySetResponseGetter(adaptivePricing, responseGetter); trySetResponseGetter(afterExpiration, responseGetter); trySetResponseGetter(automaticTax, responseGetter); + trySetResponseGetter(collectedInformation, responseGetter); trySetResponseGetter(consent, responseGetter); trySetResponseGetter(consentCollection, responseGetter); trySetResponseGetter(currencyConversion, responseGetter); diff --git a/src/main/java/com/stripe/model/tax/Calculation.java b/src/main/java/com/stripe/model/tax/Calculation.java index f3ca9f71d69..13685e84a62 100644 --- a/src/main/java/com/stripe/model/tax/Calculation.java +++ b/src/main/java/com/stripe/model/tax/Calculation.java @@ -531,7 +531,7 @@ public static class Jurisdiction extends StripeObject { String level; /** - * ISO 3166-2 subdivision code, + * ISO 3166-2 subdivision code, * without country prefix. For example, "NY" for New York, United States. */ @SerializedName("state") diff --git a/src/main/java/com/stripe/model/tax/CalculationLineItem.java b/src/main/java/com/stripe/model/tax/CalculationLineItem.java index 041f16d431a..cd2fe05f733 100644 --- a/src/main/java/com/stripe/model/tax/CalculationLineItem.java +++ b/src/main/java/com/stripe/model/tax/CalculationLineItem.java @@ -165,8 +165,8 @@ public static class Jurisdiction extends StripeObject { String level; /** - * ISO 3166-2 subdivision code, - * without country prefix. For example, "NY" for New York, United States. + * ISO 3166-2 subdivision code, without + * country prefix. For example, "NY" for New York, United States. */ @SerializedName("state") String state; diff --git a/src/main/java/com/stripe/model/tax/Transaction.java b/src/main/java/com/stripe/model/tax/Transaction.java index a3f2bf91d66..469a5972b0c 100644 --- a/src/main/java/com/stripe/model/tax/Transaction.java +++ b/src/main/java/com/stripe/model/tax/Transaction.java @@ -592,7 +592,7 @@ public static class Jurisdiction extends StripeObject { String level; /** - * ISO 3166-2 subdivision code, + * ISO 3166-2 subdivision code, * without country prefix. For example, "NY" for New York, United States. */ @SerializedName("state") diff --git a/src/main/java/com/stripe/param/AccountPersonCreateParams.java b/src/main/java/com/stripe/param/AccountPersonCreateParams.java index e937acbd681..13633627a67 100644 --- a/src/main/java/com/stripe/param/AccountPersonCreateParams.java +++ b/src/main/java/com/stripe/param/AccountPersonCreateParams.java @@ -148,7 +148,7 @@ public class AccountPersonCreateParams extends ApiRequestParams { * any jurisdiction. */ @SerializedName("political_exposure") - String politicalExposure; + PoliticalExposure politicalExposure; /** The person's registered address. */ @SerializedName("registered_address") @@ -191,7 +191,7 @@ private AccountPersonCreateParams( String nationality, String personToken, String phone, - String politicalExposure, + PoliticalExposure politicalExposure, RegisteredAddress registeredAddress, Relationship relationship, String ssnLast4, @@ -280,7 +280,7 @@ public static class Builder { private String phone; - private String politicalExposure; + private PoliticalExposure politicalExposure; private RegisteredAddress registeredAddress; @@ -621,7 +621,8 @@ public Builder setPhone(String phone) { * related persons, declares that they hold or have held an important public job or function, in * any jurisdiction. */ - public Builder setPoliticalExposure(String politicalExposure) { + public Builder setPoliticalExposure( + AccountPersonCreateParams.PoliticalExposure politicalExposure) { this.politicalExposure = politicalExposure; return this; } @@ -2481,4 +2482,19 @@ public Builder setFront(String front) { } } } + + public enum PoliticalExposure implements ApiRequestParams.EnumParam { + @SerializedName("existing") + EXISTING("existing"), + + @SerializedName("none") + NONE("none"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + PoliticalExposure(String value) { + this.value = value; + } + } } diff --git a/src/main/java/com/stripe/param/AccountPersonUpdateParams.java b/src/main/java/com/stripe/param/AccountPersonUpdateParams.java index bab641a2155..a14396de8d6 100644 --- a/src/main/java/com/stripe/param/AccountPersonUpdateParams.java +++ b/src/main/java/com/stripe/param/AccountPersonUpdateParams.java @@ -148,7 +148,7 @@ public class AccountPersonUpdateParams extends ApiRequestParams { * any jurisdiction. */ @SerializedName("political_exposure") - Object politicalExposure; + PoliticalExposure politicalExposure; /** The person's registered address. */ @SerializedName("registered_address") @@ -191,7 +191,7 @@ private AccountPersonUpdateParams( Object nationality, Object personToken, Object phone, - Object politicalExposure, + PoliticalExposure politicalExposure, RegisteredAddress registeredAddress, Relationship relationship, Object ssnLast4, @@ -280,7 +280,7 @@ public static class Builder { private Object phone; - private Object politicalExposure; + private PoliticalExposure politicalExposure; private RegisteredAddress registeredAddress; @@ -726,17 +726,8 @@ public Builder setPhone(EmptyParam phone) { * related persons, declares that they hold or have held an important public job or function, in * any jurisdiction. */ - public Builder setPoliticalExposure(String politicalExposure) { - this.politicalExposure = politicalExposure; - return this; - } - - /** - * Indicates if the person or any of their representatives, family members, or other closely - * related persons, declares that they hold or have held an important public job or function, in - * any jurisdiction. - */ - public Builder setPoliticalExposure(EmptyParam politicalExposure) { + public Builder setPoliticalExposure( + AccountPersonUpdateParams.PoliticalExposure politicalExposure) { this.politicalExposure = politicalExposure; return this; } @@ -2826,4 +2817,19 @@ public Builder setFront(EmptyParam front) { } } } + + public enum PoliticalExposure implements ApiRequestParams.EnumParam { + @SerializedName("existing") + EXISTING("existing"), + + @SerializedName("none") + NONE("none"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + PoliticalExposure(String value) { + this.value = value; + } + } } diff --git a/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java b/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java index d0f510d2cdc..e64121b9f69 100644 --- a/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java @@ -7421,6 +7421,14 @@ public static class AcssDebit { @SerializedName("setup_future_usage") ApiRequestParams.EnumParam setupFutureUsage; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date + * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 + * calendar days from now. + */ + @SerializedName("target_date") + String targetDate; + /** Bank account verification method. */ @SerializedName("verification_method") VerificationMethod verificationMethod; @@ -7429,10 +7437,12 @@ private AcssDebit( Map extraParams, MandateOptions mandateOptions, ApiRequestParams.EnumParam setupFutureUsage, + String targetDate, VerificationMethod verificationMethod) { this.extraParams = extraParams; this.mandateOptions = mandateOptions; this.setupFutureUsage = setupFutureUsage; + this.targetDate = targetDate; this.verificationMethod = verificationMethod; } @@ -7447,6 +7457,8 @@ public static class Builder { private ApiRequestParams.EnumParam setupFutureUsage; + private String targetDate; + private VerificationMethod verificationMethod; /** Finalize and obtain parameter instance from this builder. */ @@ -7455,6 +7467,7 @@ public PaymentIntentConfirmParams.PaymentMethodOptions.AcssDebit build() { this.extraParams, this.mandateOptions, this.setupFutureUsage, + this.targetDate, this.verificationMethod); } @@ -7554,6 +7567,16 @@ public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { return this; } + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The + * date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + * and 15 calendar days from now. + */ + public Builder setTargetDate(String targetDate) { + this.targetDate = targetDate; + return this; + } + /** Bank account verification method. */ public Builder setVerificationMethod( PaymentIntentConfirmParams.PaymentMethodOptions.AcssDebit.VerificationMethod @@ -8741,10 +8764,21 @@ public static class AuBecsDebit { @SerializedName("setup_future_usage") ApiRequestParams.EnumParam setupFutureUsage; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date + * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 + * calendar days from now. + */ + @SerializedName("target_date") + String targetDate; + private AuBecsDebit( - Map extraParams, ApiRequestParams.EnumParam setupFutureUsage) { + Map extraParams, + ApiRequestParams.EnumParam setupFutureUsage, + String targetDate) { this.extraParams = extraParams; this.setupFutureUsage = setupFutureUsage; + this.targetDate = targetDate; } public static Builder builder() { @@ -8756,10 +8790,12 @@ public static class Builder { private ApiRequestParams.EnumParam setupFutureUsage; + private String targetDate; + /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentConfirmParams.PaymentMethodOptions.AuBecsDebit build() { return new PaymentIntentConfirmParams.PaymentMethodOptions.AuBecsDebit( - this.extraParams, this.setupFutureUsage); + this.extraParams, this.setupFutureUsage, this.targetDate); } /** @@ -8849,6 +8885,16 @@ public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { this.setupFutureUsage = setupFutureUsage; return this; } + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The + * date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + * and 15 calendar days from now. + */ + public Builder setTargetDate(String targetDate) { + this.targetDate = targetDate; + return this; + } } public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @@ -8911,13 +8957,23 @@ public static class BacsDebit { @SerializedName("setup_future_usage") ApiRequestParams.EnumParam setupFutureUsage; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date + * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 + * calendar days from now. + */ + @SerializedName("target_date") + String targetDate; + private BacsDebit( Map extraParams, MandateOptions mandateOptions, - ApiRequestParams.EnumParam setupFutureUsage) { + ApiRequestParams.EnumParam setupFutureUsage, + String targetDate) { this.extraParams = extraParams; this.mandateOptions = mandateOptions; this.setupFutureUsage = setupFutureUsage; + this.targetDate = targetDate; } public static Builder builder() { @@ -8931,10 +8987,12 @@ public static class Builder { private ApiRequestParams.EnumParam setupFutureUsage; + private String targetDate; + /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentConfirmParams.PaymentMethodOptions.BacsDebit build() { return new PaymentIntentConfirmParams.PaymentMethodOptions.BacsDebit( - this.extraParams, this.mandateOptions, this.setupFutureUsage); + this.extraParams, this.mandateOptions, this.setupFutureUsage, this.targetDate); } /** @@ -9032,6 +9090,16 @@ public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { this.setupFutureUsage = setupFutureUsage; return this; } + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The + * date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + * and 15 calendar days from now. + */ + public Builder setTargetDate(String targetDate) { + this.targetDate = targetDate; + return this; + } } @Getter @@ -16594,13 +16662,23 @@ public static class SepaDebit { @SerializedName("setup_future_usage") ApiRequestParams.EnumParam setupFutureUsage; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date + * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 + * calendar days from now. + */ + @SerializedName("target_date") + String targetDate; + private SepaDebit( Map extraParams, MandateOptions mandateOptions, - ApiRequestParams.EnumParam setupFutureUsage) { + ApiRequestParams.EnumParam setupFutureUsage, + String targetDate) { this.extraParams = extraParams; this.mandateOptions = mandateOptions; this.setupFutureUsage = setupFutureUsage; + this.targetDate = targetDate; } public static Builder builder() { @@ -16614,10 +16692,12 @@ public static class Builder { private ApiRequestParams.EnumParam setupFutureUsage; + private String targetDate; + /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentConfirmParams.PaymentMethodOptions.SepaDebit build() { return new PaymentIntentConfirmParams.PaymentMethodOptions.SepaDebit( - this.extraParams, this.mandateOptions, this.setupFutureUsage); + this.extraParams, this.mandateOptions, this.setupFutureUsage, this.targetDate); } /** @@ -16715,6 +16795,16 @@ public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { this.setupFutureUsage = setupFutureUsage; return this; } + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The + * date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + * and 15 calendar days from now. + */ + public Builder setTargetDate(String targetDate) { + this.targetDate = targetDate; + return this; + } } @Getter @@ -17377,6 +17467,14 @@ public static class UsBankAccount { @SerializedName("setup_future_usage") ApiRequestParams.EnumParam setupFutureUsage; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date + * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 + * calendar days from now. + */ + @SerializedName("target_date") + String targetDate; + /** Bank account verification method. */ @SerializedName("verification_method") VerificationMethod verificationMethod; @@ -17388,6 +17486,7 @@ private UsBankAccount( Networks networks, ApiRequestParams.EnumParam preferredSettlementSpeed, ApiRequestParams.EnumParam setupFutureUsage, + String targetDate, VerificationMethod verificationMethod) { this.extraParams = extraParams; this.financialConnections = financialConnections; @@ -17395,6 +17494,7 @@ private UsBankAccount( this.networks = networks; this.preferredSettlementSpeed = preferredSettlementSpeed; this.setupFutureUsage = setupFutureUsage; + this.targetDate = targetDate; this.verificationMethod = verificationMethod; } @@ -17415,6 +17515,8 @@ public static class Builder { private ApiRequestParams.EnumParam setupFutureUsage; + private String targetDate; + private VerificationMethod verificationMethod; /** Finalize and obtain parameter instance from this builder. */ @@ -17426,6 +17528,7 @@ public PaymentIntentConfirmParams.PaymentMethodOptions.UsBankAccount build() { this.networks, this.preferredSettlementSpeed, this.setupFutureUsage, + this.targetDate, this.verificationMethod); } @@ -17556,6 +17659,16 @@ public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { return this; } + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The + * date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + * and 15 calendar days from now. + */ + public Builder setTargetDate(String targetDate) { + this.targetDate = targetDate; + return this; + } + /** Bank account verification method. */ public Builder setVerificationMethod( PaymentIntentConfirmParams.PaymentMethodOptions.UsBankAccount.VerificationMethod diff --git a/src/main/java/com/stripe/param/PaymentIntentCreateParams.java b/src/main/java/com/stripe/param/PaymentIntentCreateParams.java index ac7b1733d66..1fa64de201d 100644 --- a/src/main/java/com/stripe/param/PaymentIntentCreateParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentCreateParams.java @@ -7932,6 +7932,14 @@ public static class AcssDebit { @SerializedName("setup_future_usage") ApiRequestParams.EnumParam setupFutureUsage; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date + * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 + * calendar days from now. + */ + @SerializedName("target_date") + String targetDate; + /** Bank account verification method. */ @SerializedName("verification_method") VerificationMethod verificationMethod; @@ -7940,10 +7948,12 @@ private AcssDebit( Map extraParams, MandateOptions mandateOptions, ApiRequestParams.EnumParam setupFutureUsage, + String targetDate, VerificationMethod verificationMethod) { this.extraParams = extraParams; this.mandateOptions = mandateOptions; this.setupFutureUsage = setupFutureUsage; + this.targetDate = targetDate; this.verificationMethod = verificationMethod; } @@ -7958,6 +7968,8 @@ public static class Builder { private ApiRequestParams.EnumParam setupFutureUsage; + private String targetDate; + private VerificationMethod verificationMethod; /** Finalize and obtain parameter instance from this builder. */ @@ -7966,6 +7978,7 @@ public PaymentIntentCreateParams.PaymentMethodOptions.AcssDebit build() { this.extraParams, this.mandateOptions, this.setupFutureUsage, + this.targetDate, this.verificationMethod); } @@ -8065,6 +8078,16 @@ public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { return this; } + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The + * date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + * and 15 calendar days from now. + */ + public Builder setTargetDate(String targetDate) { + this.targetDate = targetDate; + return this; + } + /** Bank account verification method. */ public Builder setVerificationMethod( PaymentIntentCreateParams.PaymentMethodOptions.AcssDebit.VerificationMethod @@ -9252,10 +9275,21 @@ public static class AuBecsDebit { @SerializedName("setup_future_usage") ApiRequestParams.EnumParam setupFutureUsage; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date + * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 + * calendar days from now. + */ + @SerializedName("target_date") + String targetDate; + private AuBecsDebit( - Map extraParams, ApiRequestParams.EnumParam setupFutureUsage) { + Map extraParams, + ApiRequestParams.EnumParam setupFutureUsage, + String targetDate) { this.extraParams = extraParams; this.setupFutureUsage = setupFutureUsage; + this.targetDate = targetDate; } public static Builder builder() { @@ -9267,10 +9301,12 @@ public static class Builder { private ApiRequestParams.EnumParam setupFutureUsage; + private String targetDate; + /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentCreateParams.PaymentMethodOptions.AuBecsDebit build() { return new PaymentIntentCreateParams.PaymentMethodOptions.AuBecsDebit( - this.extraParams, this.setupFutureUsage); + this.extraParams, this.setupFutureUsage, this.targetDate); } /** @@ -9360,6 +9396,16 @@ public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { this.setupFutureUsage = setupFutureUsage; return this; } + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The + * date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + * and 15 calendar days from now. + */ + public Builder setTargetDate(String targetDate) { + this.targetDate = targetDate; + return this; + } } public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @@ -9422,13 +9468,23 @@ public static class BacsDebit { @SerializedName("setup_future_usage") ApiRequestParams.EnumParam setupFutureUsage; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date + * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 + * calendar days from now. + */ + @SerializedName("target_date") + String targetDate; + private BacsDebit( Map extraParams, MandateOptions mandateOptions, - ApiRequestParams.EnumParam setupFutureUsage) { + ApiRequestParams.EnumParam setupFutureUsage, + String targetDate) { this.extraParams = extraParams; this.mandateOptions = mandateOptions; this.setupFutureUsage = setupFutureUsage; + this.targetDate = targetDate; } public static Builder builder() { @@ -9442,10 +9498,12 @@ public static class Builder { private ApiRequestParams.EnumParam setupFutureUsage; + private String targetDate; + /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentCreateParams.PaymentMethodOptions.BacsDebit build() { return new PaymentIntentCreateParams.PaymentMethodOptions.BacsDebit( - this.extraParams, this.mandateOptions, this.setupFutureUsage); + this.extraParams, this.mandateOptions, this.setupFutureUsage, this.targetDate); } /** @@ -9543,6 +9601,16 @@ public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { this.setupFutureUsage = setupFutureUsage; return this; } + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The + * date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + * and 15 calendar days from now. + */ + public Builder setTargetDate(String targetDate) { + this.targetDate = targetDate; + return this; + } } @Getter @@ -17095,13 +17163,23 @@ public static class SepaDebit { @SerializedName("setup_future_usage") ApiRequestParams.EnumParam setupFutureUsage; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date + * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 + * calendar days from now. + */ + @SerializedName("target_date") + String targetDate; + private SepaDebit( Map extraParams, MandateOptions mandateOptions, - ApiRequestParams.EnumParam setupFutureUsage) { + ApiRequestParams.EnumParam setupFutureUsage, + String targetDate) { this.extraParams = extraParams; this.mandateOptions = mandateOptions; this.setupFutureUsage = setupFutureUsage; + this.targetDate = targetDate; } public static Builder builder() { @@ -17115,10 +17193,12 @@ public static class Builder { private ApiRequestParams.EnumParam setupFutureUsage; + private String targetDate; + /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentCreateParams.PaymentMethodOptions.SepaDebit build() { return new PaymentIntentCreateParams.PaymentMethodOptions.SepaDebit( - this.extraParams, this.mandateOptions, this.setupFutureUsage); + this.extraParams, this.mandateOptions, this.setupFutureUsage, this.targetDate); } /** @@ -17216,6 +17296,16 @@ public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { this.setupFutureUsage = setupFutureUsage; return this; } + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The + * date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + * and 15 calendar days from now. + */ + public Builder setTargetDate(String targetDate) { + this.targetDate = targetDate; + return this; + } } @Getter @@ -17878,6 +17968,14 @@ public static class UsBankAccount { @SerializedName("setup_future_usage") ApiRequestParams.EnumParam setupFutureUsage; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date + * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 + * calendar days from now. + */ + @SerializedName("target_date") + String targetDate; + /** Bank account verification method. */ @SerializedName("verification_method") VerificationMethod verificationMethod; @@ -17889,6 +17987,7 @@ private UsBankAccount( Networks networks, ApiRequestParams.EnumParam preferredSettlementSpeed, ApiRequestParams.EnumParam setupFutureUsage, + String targetDate, VerificationMethod verificationMethod) { this.extraParams = extraParams; this.financialConnections = financialConnections; @@ -17896,6 +17995,7 @@ private UsBankAccount( this.networks = networks; this.preferredSettlementSpeed = preferredSettlementSpeed; this.setupFutureUsage = setupFutureUsage; + this.targetDate = targetDate; this.verificationMethod = verificationMethod; } @@ -17916,6 +18016,8 @@ public static class Builder { private ApiRequestParams.EnumParam setupFutureUsage; + private String targetDate; + private VerificationMethod verificationMethod; /** Finalize and obtain parameter instance from this builder. */ @@ -17927,6 +18029,7 @@ public PaymentIntentCreateParams.PaymentMethodOptions.UsBankAccount build() { this.networks, this.preferredSettlementSpeed, this.setupFutureUsage, + this.targetDate, this.verificationMethod); } @@ -18055,6 +18158,16 @@ public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { return this; } + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The + * date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + * and 15 calendar days from now. + */ + public Builder setTargetDate(String targetDate) { + this.targetDate = targetDate; + return this; + } + /** Bank account verification method. */ public Builder setVerificationMethod( PaymentIntentCreateParams.PaymentMethodOptions.UsBankAccount.VerificationMethod diff --git a/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java b/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java index 53e143c2ac5..4cb3d854bc8 100644 --- a/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java @@ -7407,6 +7407,14 @@ public static class AcssDebit { @SerializedName("setup_future_usage") ApiRequestParams.EnumParam setupFutureUsage; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date + * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 + * calendar days from now. + */ + @SerializedName("target_date") + Object targetDate; + /** Bank account verification method. */ @SerializedName("verification_method") VerificationMethod verificationMethod; @@ -7415,10 +7423,12 @@ private AcssDebit( Map extraParams, MandateOptions mandateOptions, ApiRequestParams.EnumParam setupFutureUsage, + Object targetDate, VerificationMethod verificationMethod) { this.extraParams = extraParams; this.mandateOptions = mandateOptions; this.setupFutureUsage = setupFutureUsage; + this.targetDate = targetDate; this.verificationMethod = verificationMethod; } @@ -7433,6 +7443,8 @@ public static class Builder { private ApiRequestParams.EnumParam setupFutureUsage; + private Object targetDate; + private VerificationMethod verificationMethod; /** Finalize and obtain parameter instance from this builder. */ @@ -7441,6 +7453,7 @@ public PaymentIntentUpdateParams.PaymentMethodOptions.AcssDebit build() { this.extraParams, this.mandateOptions, this.setupFutureUsage, + this.targetDate, this.verificationMethod); } @@ -7540,6 +7553,26 @@ public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { return this; } + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The + * date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + * and 15 calendar days from now. + */ + public Builder setTargetDate(String targetDate) { + this.targetDate = targetDate; + return this; + } + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The + * date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + * and 15 calendar days from now. + */ + public Builder setTargetDate(EmptyParam targetDate) { + this.targetDate = targetDate; + return this; + } + /** Bank account verification method. */ public Builder setVerificationMethod( PaymentIntentUpdateParams.PaymentMethodOptions.AcssDebit.VerificationMethod @@ -8754,10 +8787,21 @@ public static class AuBecsDebit { @SerializedName("setup_future_usage") ApiRequestParams.EnumParam setupFutureUsage; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date + * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 + * calendar days from now. + */ + @SerializedName("target_date") + Object targetDate; + private AuBecsDebit( - Map extraParams, ApiRequestParams.EnumParam setupFutureUsage) { + Map extraParams, + ApiRequestParams.EnumParam setupFutureUsage, + Object targetDate) { this.extraParams = extraParams; this.setupFutureUsage = setupFutureUsage; + this.targetDate = targetDate; } public static Builder builder() { @@ -8769,10 +8813,12 @@ public static class Builder { private ApiRequestParams.EnumParam setupFutureUsage; + private Object targetDate; + /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentUpdateParams.PaymentMethodOptions.AuBecsDebit build() { return new PaymentIntentUpdateParams.PaymentMethodOptions.AuBecsDebit( - this.extraParams, this.setupFutureUsage); + this.extraParams, this.setupFutureUsage, this.targetDate); } /** @@ -8862,6 +8908,26 @@ public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { this.setupFutureUsage = setupFutureUsage; return this; } + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The + * date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + * and 15 calendar days from now. + */ + public Builder setTargetDate(String targetDate) { + this.targetDate = targetDate; + return this; + } + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The + * date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + * and 15 calendar days from now. + */ + public Builder setTargetDate(EmptyParam targetDate) { + this.targetDate = targetDate; + return this; + } } public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @@ -8924,13 +8990,23 @@ public static class BacsDebit { @SerializedName("setup_future_usage") ApiRequestParams.EnumParam setupFutureUsage; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date + * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 + * calendar days from now. + */ + @SerializedName("target_date") + Object targetDate; + private BacsDebit( Map extraParams, MandateOptions mandateOptions, - ApiRequestParams.EnumParam setupFutureUsage) { + ApiRequestParams.EnumParam setupFutureUsage, + Object targetDate) { this.extraParams = extraParams; this.mandateOptions = mandateOptions; this.setupFutureUsage = setupFutureUsage; + this.targetDate = targetDate; } public static Builder builder() { @@ -8944,10 +9020,12 @@ public static class Builder { private ApiRequestParams.EnumParam setupFutureUsage; + private Object targetDate; + /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentUpdateParams.PaymentMethodOptions.BacsDebit build() { return new PaymentIntentUpdateParams.PaymentMethodOptions.BacsDebit( - this.extraParams, this.mandateOptions, this.setupFutureUsage); + this.extraParams, this.mandateOptions, this.setupFutureUsage, this.targetDate); } /** @@ -9045,6 +9123,26 @@ public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { this.setupFutureUsage = setupFutureUsage; return this; } + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The + * date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + * and 15 calendar days from now. + */ + public Builder setTargetDate(String targetDate) { + this.targetDate = targetDate; + return this; + } + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The + * date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + * and 15 calendar days from now. + */ + public Builder setTargetDate(EmptyParam targetDate) { + this.targetDate = targetDate; + return this; + } } @Getter @@ -16705,13 +16803,23 @@ public static class SepaDebit { @SerializedName("setup_future_usage") ApiRequestParams.EnumParam setupFutureUsage; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date + * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 + * calendar days from now. + */ + @SerializedName("target_date") + Object targetDate; + private SepaDebit( Map extraParams, MandateOptions mandateOptions, - ApiRequestParams.EnumParam setupFutureUsage) { + ApiRequestParams.EnumParam setupFutureUsage, + Object targetDate) { this.extraParams = extraParams; this.mandateOptions = mandateOptions; this.setupFutureUsage = setupFutureUsage; + this.targetDate = targetDate; } public static Builder builder() { @@ -16725,10 +16833,12 @@ public static class Builder { private ApiRequestParams.EnumParam setupFutureUsage; + private Object targetDate; + /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentUpdateParams.PaymentMethodOptions.SepaDebit build() { return new PaymentIntentUpdateParams.PaymentMethodOptions.SepaDebit( - this.extraParams, this.mandateOptions, this.setupFutureUsage); + this.extraParams, this.mandateOptions, this.setupFutureUsage, this.targetDate); } /** @@ -16826,6 +16936,26 @@ public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { this.setupFutureUsage = setupFutureUsage; return this; } + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The + * date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + * and 15 calendar days from now. + */ + public Builder setTargetDate(String targetDate) { + this.targetDate = targetDate; + return this; + } + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The + * date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + * and 15 calendar days from now. + */ + public Builder setTargetDate(EmptyParam targetDate) { + this.targetDate = targetDate; + return this; + } } @Getter @@ -17488,6 +17618,14 @@ public static class UsBankAccount { @SerializedName("setup_future_usage") ApiRequestParams.EnumParam setupFutureUsage; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date + * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 + * calendar days from now. + */ + @SerializedName("target_date") + Object targetDate; + /** Bank account verification method. */ @SerializedName("verification_method") VerificationMethod verificationMethod; @@ -17499,6 +17637,7 @@ private UsBankAccount( Networks networks, ApiRequestParams.EnumParam preferredSettlementSpeed, ApiRequestParams.EnumParam setupFutureUsage, + Object targetDate, VerificationMethod verificationMethod) { this.extraParams = extraParams; this.financialConnections = financialConnections; @@ -17506,6 +17645,7 @@ private UsBankAccount( this.networks = networks; this.preferredSettlementSpeed = preferredSettlementSpeed; this.setupFutureUsage = setupFutureUsage; + this.targetDate = targetDate; this.verificationMethod = verificationMethod; } @@ -17526,6 +17666,8 @@ public static class Builder { private ApiRequestParams.EnumParam setupFutureUsage; + private Object targetDate; + private VerificationMethod verificationMethod; /** Finalize and obtain parameter instance from this builder. */ @@ -17537,6 +17679,7 @@ public PaymentIntentUpdateParams.PaymentMethodOptions.UsBankAccount build() { this.networks, this.preferredSettlementSpeed, this.setupFutureUsage, + this.targetDate, this.verificationMethod); } @@ -17665,6 +17808,26 @@ public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { return this; } + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The + * date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + * and 15 calendar days from now. + */ + public Builder setTargetDate(String targetDate) { + this.targetDate = targetDate; + return this; + } + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The + * date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + * and 15 calendar days from now. + */ + public Builder setTargetDate(EmptyParam targetDate) { + this.targetDate = targetDate; + return this; + } + /** Bank account verification method. */ public Builder setVerificationMethod( PaymentIntentUpdateParams.PaymentMethodOptions.UsBankAccount.VerificationMethod diff --git a/src/main/java/com/stripe/param/PersonCollectionCreateParams.java b/src/main/java/com/stripe/param/PersonCollectionCreateParams.java index c056d733e01..03d262d3e1b 100644 --- a/src/main/java/com/stripe/param/PersonCollectionCreateParams.java +++ b/src/main/java/com/stripe/param/PersonCollectionCreateParams.java @@ -148,7 +148,7 @@ public class PersonCollectionCreateParams extends ApiRequestParams { * any jurisdiction. */ @SerializedName("political_exposure") - String politicalExposure; + PoliticalExposure politicalExposure; /** The person's registered address. */ @SerializedName("registered_address") @@ -191,7 +191,7 @@ private PersonCollectionCreateParams( String nationality, String personToken, String phone, - String politicalExposure, + PoliticalExposure politicalExposure, RegisteredAddress registeredAddress, Relationship relationship, String ssnLast4, @@ -280,7 +280,7 @@ public static class Builder { private String phone; - private String politicalExposure; + private PoliticalExposure politicalExposure; private RegisteredAddress registeredAddress; @@ -621,7 +621,8 @@ public Builder setPhone(String phone) { * related persons, declares that they hold or have held an important public job or function, in * any jurisdiction. */ - public Builder setPoliticalExposure(String politicalExposure) { + public Builder setPoliticalExposure( + PersonCollectionCreateParams.PoliticalExposure politicalExposure) { this.politicalExposure = politicalExposure; return this; } @@ -2488,4 +2489,19 @@ public Builder setFront(String front) { } } } + + public enum PoliticalExposure implements ApiRequestParams.EnumParam { + @SerializedName("existing") + EXISTING("existing"), + + @SerializedName("none") + NONE("none"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + PoliticalExposure(String value) { + this.value = value; + } + } } diff --git a/src/main/java/com/stripe/param/PersonUpdateParams.java b/src/main/java/com/stripe/param/PersonUpdateParams.java index dc4ed3975da..95fc9763307 100644 --- a/src/main/java/com/stripe/param/PersonUpdateParams.java +++ b/src/main/java/com/stripe/param/PersonUpdateParams.java @@ -148,7 +148,7 @@ public class PersonUpdateParams extends ApiRequestParams { * any jurisdiction. */ @SerializedName("political_exposure") - Object politicalExposure; + PoliticalExposure politicalExposure; /** The person's registered address. */ @SerializedName("registered_address") @@ -191,7 +191,7 @@ private PersonUpdateParams( Object nationality, Object personToken, Object phone, - Object politicalExposure, + PoliticalExposure politicalExposure, RegisteredAddress registeredAddress, Relationship relationship, Object ssnLast4, @@ -280,7 +280,7 @@ public static class Builder { private Object phone; - private Object politicalExposure; + private PoliticalExposure politicalExposure; private RegisteredAddress registeredAddress; @@ -726,17 +726,7 @@ public Builder setPhone(EmptyParam phone) { * related persons, declares that they hold or have held an important public job or function, in * any jurisdiction. */ - public Builder setPoliticalExposure(String politicalExposure) { - this.politicalExposure = politicalExposure; - return this; - } - - /** - * Indicates if the person or any of their representatives, family members, or other closely - * related persons, declares that they hold or have held an important public job or function, in - * any jurisdiction. - */ - public Builder setPoliticalExposure(EmptyParam politicalExposure) { + public Builder setPoliticalExposure(PersonUpdateParams.PoliticalExposure politicalExposure) { this.politicalExposure = politicalExposure; return this; } @@ -2819,4 +2809,19 @@ public Builder setFront(EmptyParam front) { } } } + + public enum PoliticalExposure implements ApiRequestParams.EnumParam { + @SerializedName("existing") + EXISTING("existing"), + + @SerializedName("none") + NONE("none"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + PoliticalExposure(String value) { + this.value = value; + } + } } diff --git a/src/main/java/com/stripe/param/ProductCreateParams.java b/src/main/java/com/stripe/param/ProductCreateParams.java index 6ab9a8a8b8f..a4fae5622df 100644 --- a/src/main/java/com/stripe/param/ProductCreateParams.java +++ b/src/main/java/com/stripe/param/ProductCreateParams.java @@ -482,6 +482,15 @@ public static class DefaultPriceData { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** + * Set of key-value pairs that you can attach + * to an object. This can be useful for storing additional information about the object in a + * structured format. Individual keys can be unset by posting an empty value to them. All keys + * can be unset by posting an empty value to {@code metadata}. + */ + @SerializedName("metadata") + Map metadata; + /** The recurring components of a price such as {@code interval} and {@code interval_count}. */ @SerializedName("recurring") Recurring recurring; @@ -518,6 +527,7 @@ private DefaultPriceData( Map currencyOptions, CustomUnitAmount customUnitAmount, Map extraParams, + Map metadata, Recurring recurring, TaxBehavior taxBehavior, Long unitAmount, @@ -526,6 +536,7 @@ private DefaultPriceData( this.currencyOptions = currencyOptions; this.customUnitAmount = customUnitAmount; this.extraParams = extraParams; + this.metadata = metadata; this.recurring = recurring; this.taxBehavior = taxBehavior; this.unitAmount = unitAmount; @@ -545,6 +556,8 @@ public static class Builder { private Map extraParams; + private Map metadata; + private Recurring recurring; private TaxBehavior taxBehavior; @@ -560,6 +573,7 @@ public ProductCreateParams.DefaultPriceData build() { this.currencyOptions, this.customUnitAmount, this.extraParams, + this.metadata, this.recurring, this.taxBehavior, this.unitAmount, @@ -642,6 +656,32 @@ public Builder putAllExtraParam(Map map) { return this; } + /** + * Add a key/value pair to `metadata` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * ProductCreateParams.DefaultPriceData#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 ProductCreateParams.DefaultPriceData#metadata} for the field documentation. + */ + public Builder putAllMetadata(Map map) { + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.putAll(map); + return this; + } + /** * The recurring components of a price such as {@code interval} and {@code interval_count}. */ diff --git a/src/main/java/com/stripe/param/TaxRateCreateParams.java b/src/main/java/com/stripe/param/TaxRateCreateParams.java index a3df1a13942..7bc582c3e31 100644 --- a/src/main/java/com/stripe/param/TaxRateCreateParams.java +++ b/src/main/java/com/stripe/param/TaxRateCreateParams.java @@ -76,7 +76,7 @@ public class TaxRateCreateParams extends ApiRequestParams { BigDecimal percentage; /** - * ISO 3166-2 subdivision code, without + * ISO 3166-2 subdivision code, without * country prefix. For example, "NY" for New York, United States. */ @SerializedName("state") @@ -295,8 +295,8 @@ public Builder setPercentage(BigDecimal percentage) { } /** - * ISO 3166-2 subdivision code, - * without country prefix. For example, "NY" for New York, United States. + * ISO 3166-2 subdivision code, without + * country prefix. For example, "NY" for New York, United States. */ public Builder setState(String state) { this.state = state; diff --git a/src/main/java/com/stripe/param/TaxRateUpdateParams.java b/src/main/java/com/stripe/param/TaxRateUpdateParams.java index 7e24c42954b..0d9f3f5e9a2 100644 --- a/src/main/java/com/stripe/param/TaxRateUpdateParams.java +++ b/src/main/java/com/stripe/param/TaxRateUpdateParams.java @@ -68,7 +68,7 @@ public class TaxRateUpdateParams extends ApiRequestParams { Object metadata; /** - * ISO 3166-2 subdivision code, without + * ISO 3166-2 subdivision code, without * country prefix. For example, "NY" for New York, United States. */ @SerializedName("state") @@ -320,8 +320,8 @@ public Builder setMetadata(Map metadata) { } /** - * ISO 3166-2 subdivision code, - * without country prefix. For example, "NY" for New York, United States. + * ISO 3166-2 subdivision code, without + * country prefix. For example, "NY" for New York, United States. */ public Builder setState(String state) { this.state = state; @@ -329,8 +329,8 @@ public Builder setState(String state) { } /** - * ISO 3166-2 subdivision code, - * without country prefix. For example, "NY" for New York, United States. + * ISO 3166-2 subdivision code, without + * country prefix. For example, "NY" for New York, United States. */ public Builder setState(EmptyParam state) { this.state = state; diff --git a/src/main/java/com/stripe/param/TokenCreateParams.java b/src/main/java/com/stripe/param/TokenCreateParams.java index b87796f5750..51437598e9d 100644 --- a/src/main/java/com/stripe/param/TokenCreateParams.java +++ b/src/main/java/com/stripe/param/TokenCreateParams.java @@ -4454,7 +4454,7 @@ public static class Person { * any jurisdiction. */ @SerializedName("political_exposure") - String politicalExposure; + PoliticalExposure politicalExposure; /** The person's registered address. */ @SerializedName("registered_address") @@ -4495,7 +4495,7 @@ private Person( Object metadata, String nationality, String phone, - String politicalExposure, + PoliticalExposure politicalExposure, RegisteredAddress registeredAddress, Relationship relationship, String ssnLast4, @@ -4578,7 +4578,7 @@ public static class Builder { private String phone; - private String politicalExposure; + private PoliticalExposure politicalExposure; private RegisteredAddress registeredAddress; @@ -4884,7 +4884,8 @@ public Builder setPhone(String phone) { * related persons, declares that they hold or have held an important public job or function, * in any jurisdiction. */ - public Builder setPoliticalExposure(String politicalExposure) { + public Builder setPoliticalExposure( + TokenCreateParams.Person.PoliticalExposure politicalExposure) { this.politicalExposure = politicalExposure; return this; } @@ -6771,6 +6772,21 @@ public Builder setFront(String front) { } } } + + public enum PoliticalExposure implements ApiRequestParams.EnumParam { + @SerializedName("existing") + EXISTING("existing"), + + @SerializedName("none") + NONE("none"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + PoliticalExposure(String value) { + this.value = value; + } + } } @Getter diff --git a/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java b/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java index 197e3f66946..d5811711606 100644 --- a/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java +++ b/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java @@ -601,7 +601,10 @@ public enum ApiVersion implements ApiRequestParams.EnumParam { VERSION_2024_12_18_ACACIA("2024-12-18.acacia"), @SerializedName("2025-01-27.acacia") - VERSION_2025_01_27_ACACIA("2025-01-27.acacia"); + VERSION_2025_01_27_ACACIA("2025-01-27.acacia"), + + @SerializedName("2025-02-24.acacia") + VERSION_2025_02_24_ACACIA("2025-02-24.acacia"); @Getter(onMethod_ = {@Override}) private final String value; diff --git a/src/main/java/com/stripe/param/billing/CreditBalanceSummaryRetrieveParams.java b/src/main/java/com/stripe/param/billing/CreditBalanceSummaryRetrieveParams.java index cbef780ed3c..c0c48b77389 100644 --- a/src/main/java/com/stripe/param/billing/CreditBalanceSummaryRetrieveParams.java +++ b/src/main/java/com/stripe/param/billing/CreditBalanceSummaryRetrieveParams.java @@ -236,15 +236,26 @@ public static class ApplicabilityScope { Map extraParams; /** - * Required. The price type that credit grants can apply to. We currently - * only support the {@code metered} price type. + * The price type that credit grants can apply to. We currently only support the {@code + * metered} price type. */ @SerializedName("price_type") PriceType priceType; - private ApplicabilityScope(Map extraParams, PriceType priceType) { + /** + * A list of prices that the credit grant can apply to. We currently only support the {@code + * metered} prices. + */ + @SerializedName("prices") + List prices; + + private ApplicabilityScope( + Map extraParams, + PriceType priceType, + List prices) { this.extraParams = extraParams; this.priceType = priceType; + this.prices = prices; } public static Builder builder() { @@ -256,10 +267,12 @@ public static class Builder { private PriceType priceType; + private List prices; + /** Finalize and obtain parameter instance from this builder. */ public CreditBalanceSummaryRetrieveParams.Filter.ApplicabilityScope build() { return new CreditBalanceSummaryRetrieveParams.Filter.ApplicabilityScope( - this.extraParams, this.priceType); + this.extraParams, this.priceType, this.prices); } /** @@ -291,14 +304,118 @@ public Builder putAllExtraParam(Map map) { } /** - * Required. The price type that credit grants can apply to. We currently - * only support the {@code metered} price type. + * The price type that credit grants can apply to. We currently only support the {@code + * metered} price type. */ public Builder setPriceType( CreditBalanceSummaryRetrieveParams.Filter.ApplicabilityScope.PriceType priceType) { this.priceType = priceType; return this; } + + /** + * Add an element to `prices` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * CreditBalanceSummaryRetrieveParams.Filter.ApplicabilityScope#prices} for the field + * documentation. + */ + public Builder addPrice( + CreditBalanceSummaryRetrieveParams.Filter.ApplicabilityScope.Price element) { + if (this.prices == null) { + this.prices = new ArrayList<>(); + } + this.prices.add(element); + return this; + } + + /** + * Add all elements to `prices` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * CreditBalanceSummaryRetrieveParams.Filter.ApplicabilityScope#prices} for the field + * documentation. + */ + public Builder addAllPrice( + List elements) { + if (this.prices == null) { + this.prices = new ArrayList<>(); + } + this.prices.addAll(elements); + return this; + } + } + + @Getter + public static class Price { + /** + * 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 price ID this credit grant should apply to. */ + @SerializedName("id") + String id; + + private Price(Map extraParams, String id) { + this.extraParams = extraParams; + this.id = id; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String id; + + /** Finalize and obtain parameter instance from this builder. */ + public CreditBalanceSummaryRetrieveParams.Filter.ApplicabilityScope.Price build() { + return new CreditBalanceSummaryRetrieveParams.Filter.ApplicabilityScope.Price( + this.extraParams, this.id); + } + + /** + * 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 + * CreditBalanceSummaryRetrieveParams.Filter.ApplicabilityScope.Price#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 + * CreditBalanceSummaryRetrieveParams.Filter.ApplicabilityScope.Price#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 price ID this credit grant should apply to. */ + public Builder setId(String id) { + this.id = id; + return this; + } + } } public enum PriceType implements ApiRequestParams.EnumParam { diff --git a/src/main/java/com/stripe/param/billing/CreditGrantCreateParams.java b/src/main/java/com/stripe/param/billing/CreditGrantCreateParams.java index c5ab4882949..c580a9f73f6 100644 --- a/src/main/java/com/stripe/param/billing/CreditGrantCreateParams.java +++ b/src/main/java/com/stripe/param/billing/CreditGrantCreateParams.java @@ -15,7 +15,11 @@ public class CreditGrantCreateParams extends ApiRequestParams { @SerializedName("amount") Amount amount; - /** Required. Configuration specifying what this credit grant applies to. */ + /** + * Required. Configuration specifying what this credit grant applies to. We + * currently only support {@code metered} prices that have a Billing Meter attached to them. + */ @SerializedName("applicability_config") ApplicabilityConfig applicabilityConfig; @@ -64,6 +68,13 @@ public class CreditGrantCreateParams extends ApiRequestParams { @SerializedName("name") String name; + /** + * The desired priority for applying this credit grant. If not specified, it will be set to the + * default value of 50. The highest priority is 0 and the lowest is 100. + */ + @SerializedName("priority") + Long priority; + private CreditGrantCreateParams( Amount amount, ApplicabilityConfig applicabilityConfig, @@ -74,7 +85,8 @@ private CreditGrantCreateParams( Long expiresAt, Map extraParams, Map metadata, - String name) { + String name, + Long priority) { this.amount = amount; this.applicabilityConfig = applicabilityConfig; this.category = category; @@ -85,6 +97,7 @@ private CreditGrantCreateParams( this.extraParams = extraParams; this.metadata = metadata; this.name = name; + this.priority = priority; } public static Builder builder() { @@ -112,6 +125,8 @@ public static class Builder { private String name; + private Long priority; + /** Finalize and obtain parameter instance from this builder. */ public CreditGrantCreateParams build() { return new CreditGrantCreateParams( @@ -124,7 +139,8 @@ public CreditGrantCreateParams build() { this.expiresAt, this.extraParams, this.metadata, - this.name); + this.name, + this.priority); } /** Required. Amount of this credit grant. */ @@ -133,7 +149,11 @@ public Builder setAmount(CreditGrantCreateParams.Amount amount) { return this; } - /** Required. Configuration specifying what this credit grant applies to. */ + /** + * Required. Configuration specifying what this credit grant applies to. We + * currently only support {@code metered} prices that have a Billing Meter attached to them. + */ public Builder setApplicabilityConfig( CreditGrantCreateParams.ApplicabilityConfig applicabilityConfig) { this.applicabilityConfig = applicabilityConfig; @@ -252,6 +272,15 @@ public Builder setName(String name) { this.name = name; return this; } + + /** + * The desired priority for applying this credit grant. If not specified, it will be set to the + * default value of 50. The highest priority is 0 and the lowest is 100. + */ + public Builder setPriority(Long priority) { + this.priority = priority; + return this; + } } @Getter @@ -528,15 +557,26 @@ public static class Scope { Map extraParams; /** - * Required. The price type that credit grants can apply to. We currently - * only support the {@code metered} price type. + * The price type that credit grants can apply to. We currently only support the {@code + * metered} price type. */ @SerializedName("price_type") PriceType priceType; - private Scope(Map extraParams, PriceType priceType) { + /** + * A list of prices that the credit grant can apply to. We currently only support the {@code + * metered} prices. + */ + @SerializedName("prices") + List prices; + + private Scope( + Map extraParams, + PriceType priceType, + List prices) { this.extraParams = extraParams; this.priceType = priceType; + this.prices = prices; } public static Builder builder() { @@ -548,10 +588,12 @@ public static class Builder { private PriceType priceType; + private List prices; + /** Finalize and obtain parameter instance from this builder. */ public CreditGrantCreateParams.ApplicabilityConfig.Scope build() { return new CreditGrantCreateParams.ApplicabilityConfig.Scope( - this.extraParams, this.priceType); + this.extraParams, this.priceType, this.prices); } /** @@ -583,14 +625,113 @@ public Builder putAllExtraParam(Map map) { } /** - * Required. The price type that credit grants can apply to. We currently - * only support the {@code metered} price type. + * The price type that credit grants can apply to. We currently only support the {@code + * metered} price type. */ public Builder setPriceType( CreditGrantCreateParams.ApplicabilityConfig.Scope.PriceType priceType) { this.priceType = priceType; return this; } + + /** + * Add an element to `prices` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * CreditGrantCreateParams.ApplicabilityConfig.Scope#prices} for the field documentation. + */ + public Builder addPrice(CreditGrantCreateParams.ApplicabilityConfig.Scope.Price element) { + if (this.prices == null) { + this.prices = new ArrayList<>(); + } + this.prices.add(element); + return this; + } + + /** + * Add all elements to `prices` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * CreditGrantCreateParams.ApplicabilityConfig.Scope#prices} for the field documentation. + */ + public Builder addAllPrice( + List elements) { + if (this.prices == null) { + this.prices = new ArrayList<>(); + } + this.prices.addAll(elements); + return this; + } + } + + @Getter + public static class Price { + /** + * 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 price ID this credit grant should apply to. */ + @SerializedName("id") + String id; + + private Price(Map extraParams, String id) { + this.extraParams = extraParams; + this.id = id; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String id; + + /** Finalize and obtain parameter instance from this builder. */ + public CreditGrantCreateParams.ApplicabilityConfig.Scope.Price build() { + return new CreditGrantCreateParams.ApplicabilityConfig.Scope.Price( + this.extraParams, this.id); + } + + /** + * 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 CreditGrantCreateParams.ApplicabilityConfig.Scope.Price#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 CreditGrantCreateParams.ApplicabilityConfig.Scope.Price#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 price ID this credit grant should apply to. */ + public Builder setId(String id) { + this.id = id; + return this; + } + } } public enum PriceType implements ApiRequestParams.EnumParam { diff --git a/src/main/java/com/stripe/param/checkout/SessionCreateParams.java b/src/main/java/com/stripe/param/checkout/SessionCreateParams.java index 181e3f8ca0c..cce77f2ba84 100644 --- a/src/main/java/com/stripe/param/checkout/SessionCreateParams.java +++ b/src/main/java/com/stripe/param/checkout/SessionCreateParams.java @@ -6373,6 +6373,14 @@ public static class AcssDebit { @SerializedName("setup_future_usage") SetupFutureUsage setupFutureUsage; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date + * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 + * calendar days from now. + */ + @SerializedName("target_date") + String targetDate; + /** Verification method for the intent. */ @SerializedName("verification_method") VerificationMethod verificationMethod; @@ -6382,11 +6390,13 @@ private AcssDebit( Map extraParams, MandateOptions mandateOptions, SetupFutureUsage setupFutureUsage, + String targetDate, VerificationMethod verificationMethod) { this.currency = currency; this.extraParams = extraParams; this.mandateOptions = mandateOptions; this.setupFutureUsage = setupFutureUsage; + this.targetDate = targetDate; this.verificationMethod = verificationMethod; } @@ -6403,6 +6413,8 @@ public static class Builder { private SetupFutureUsage setupFutureUsage; + private String targetDate; + private VerificationMethod verificationMethod; /** Finalize and obtain parameter instance from this builder. */ @@ -6412,6 +6424,7 @@ public SessionCreateParams.PaymentMethodOptions.AcssDebit build() { this.extraParams, this.mandateOptions, this.setupFutureUsage, + this.targetDate, this.verificationMethod); } @@ -6487,6 +6500,16 @@ public Builder setSetupFutureUsage( return this; } + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The + * date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + * and 15 calendar days from now. + */ + public Builder setTargetDate(String targetDate) { + this.targetDate = targetDate; + return this; + } + /** Verification method for the intent. */ public Builder setVerificationMethod( SessionCreateParams.PaymentMethodOptions.AcssDebit.VerificationMethod @@ -7317,9 +7340,19 @@ public static class AuBecsDebit { @SerializedName("setup_future_usage") SetupFutureUsage setupFutureUsage; - private AuBecsDebit(Map extraParams, SetupFutureUsage setupFutureUsage) { + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date + * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 + * calendar days from now. + */ + @SerializedName("target_date") + String targetDate; + + private AuBecsDebit( + Map extraParams, SetupFutureUsage setupFutureUsage, String targetDate) { this.extraParams = extraParams; this.setupFutureUsage = setupFutureUsage; + this.targetDate = targetDate; } public static Builder builder() { @@ -7331,10 +7364,12 @@ public static class Builder { private SetupFutureUsage setupFutureUsage; + private String targetDate; + /** Finalize and obtain parameter instance from this builder. */ public SessionCreateParams.PaymentMethodOptions.AuBecsDebit build() { return new SessionCreateParams.PaymentMethodOptions.AuBecsDebit( - this.extraParams, this.setupFutureUsage); + this.extraParams, this.setupFutureUsage, this.targetDate); } /** @@ -7391,6 +7426,16 @@ public Builder setSetupFutureUsage( this.setupFutureUsage = setupFutureUsage; return this; } + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The + * date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + * and 15 calendar days from now. + */ + public Builder setTargetDate(String targetDate) { + this.targetDate = targetDate; + return this; + } } public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @@ -7443,13 +7488,23 @@ public static class BacsDebit { @SerializedName("setup_future_usage") SetupFutureUsage setupFutureUsage; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date + * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 + * calendar days from now. + */ + @SerializedName("target_date") + String targetDate; + private BacsDebit( Map extraParams, MandateOptions mandateOptions, - SetupFutureUsage setupFutureUsage) { + SetupFutureUsage setupFutureUsage, + String targetDate) { this.extraParams = extraParams; this.mandateOptions = mandateOptions; this.setupFutureUsage = setupFutureUsage; + this.targetDate = targetDate; } public static Builder builder() { @@ -7463,10 +7518,12 @@ public static class Builder { private SetupFutureUsage setupFutureUsage; + private String targetDate; + /** Finalize and obtain parameter instance from this builder. */ public SessionCreateParams.PaymentMethodOptions.BacsDebit build() { return new SessionCreateParams.PaymentMethodOptions.BacsDebit( - this.extraParams, this.mandateOptions, this.setupFutureUsage); + this.extraParams, this.mandateOptions, this.setupFutureUsage, this.targetDate); } /** @@ -7529,6 +7586,16 @@ public Builder setSetupFutureUsage( this.setupFutureUsage = setupFutureUsage; return this; } + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The + * date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + * and 15 calendar days from now. + */ + public Builder setTargetDate(String targetDate) { + this.targetDate = targetDate; + return this; + } } @Getter @@ -7972,6 +8039,13 @@ public static class Card { @SerializedName("request_three_d_secure") RequestThreeDSecure requestThreeDSecure; + /** + * Restrictions to apply to the card payment method. For example, you can block specific card + * brands. + */ + @SerializedName("restrictions") + Restrictions restrictions; + /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * @@ -8022,6 +8096,7 @@ private Card( RequestMulticapture requestMulticapture, RequestOvercapture requestOvercapture, RequestThreeDSecure requestThreeDSecure, + Restrictions restrictions, SetupFutureUsage setupFutureUsage, String statementDescriptorSuffixKana, String statementDescriptorSuffixKanji) { @@ -8032,6 +8107,7 @@ private Card( this.requestMulticapture = requestMulticapture; this.requestOvercapture = requestOvercapture; this.requestThreeDSecure = requestThreeDSecure; + this.restrictions = restrictions; this.setupFutureUsage = setupFutureUsage; this.statementDescriptorSuffixKana = statementDescriptorSuffixKana; this.statementDescriptorSuffixKanji = statementDescriptorSuffixKanji; @@ -8056,6 +8132,8 @@ public static class Builder { private RequestThreeDSecure requestThreeDSecure; + private Restrictions restrictions; + private SetupFutureUsage setupFutureUsage; private String statementDescriptorSuffixKana; @@ -8072,6 +8150,7 @@ public SessionCreateParams.PaymentMethodOptions.Card build() { this.requestMulticapture, this.requestOvercapture, this.requestThreeDSecure, + this.restrictions, this.setupFutureUsage, this.statementDescriptorSuffixKana, this.statementDescriptorSuffixKanji); @@ -8172,6 +8251,16 @@ public Builder setRequestThreeDSecure( return this; } + /** + * Restrictions to apply to the card payment method. For example, you can block specific + * card brands. + */ + public Builder setRestrictions( + SessionCreateParams.PaymentMethodOptions.Card.Restrictions restrictions) { + this.restrictions = restrictions; + return this; + } + /** * Indicates that you intend to make future payments with this PaymentIntent's payment * method. @@ -8301,6 +8390,132 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + public static class Restrictions { + /** + * Specify the card brands to block in the Checkout Session. If a customer enters or selects + * a card belonging to a blocked brand, they can't complete the Session. + */ + @SerializedName("brands_blocked") + List + brandsBlocked; + + /** + * 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 Restrictions( + List + brandsBlocked, + Map extraParams) { + this.brandsBlocked = brandsBlocked; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private List + brandsBlocked; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public SessionCreateParams.PaymentMethodOptions.Card.Restrictions build() { + return new SessionCreateParams.PaymentMethodOptions.Card.Restrictions( + this.brandsBlocked, this.extraParams); + } + + /** + * Add an element to `brandsBlocked` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link SessionCreateParams.PaymentMethodOptions.Card.Restrictions#brandsBlocked} + * for the field documentation. + */ + public Builder addBrandsBlocked( + SessionCreateParams.PaymentMethodOptions.Card.Restrictions.BrandsBlocked element) { + if (this.brandsBlocked == null) { + this.brandsBlocked = new ArrayList<>(); + } + this.brandsBlocked.add(element); + return this; + } + + /** + * Add all elements to `brandsBlocked` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link SessionCreateParams.PaymentMethodOptions.Card.Restrictions#brandsBlocked} + * for the field documentation. + */ + public Builder addAllBrandsBlocked( + List + elements) { + if (this.brandsBlocked == null) { + this.brandsBlocked = new ArrayList<>(); + } + this.brandsBlocked.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 SessionCreateParams.PaymentMethodOptions.Card.Restrictions#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.Card.Restrictions#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 BrandsBlocked implements ApiRequestParams.EnumParam { + @SerializedName("american_express") + AMERICAN_EXPRESS("american_express"), + + @SerializedName("discover_global_network") + DISCOVER_GLOBAL_NETWORK("discover_global_network"), + + @SerializedName("mastercard") + MASTERCARD("mastercard"), + + @SerializedName("visa") + VISA("visa"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + BrandsBlocked(String value) { + this.value = value; + } + } + } + public enum RequestExtendedAuthorization implements ApiRequestParams.EnumParam { @SerializedName("if_available") IF_AVAILABLE("if_available"), @@ -11893,13 +12108,23 @@ public static class SepaDebit { @SerializedName("setup_future_usage") SetupFutureUsage setupFutureUsage; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date + * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 + * calendar days from now. + */ + @SerializedName("target_date") + String targetDate; + private SepaDebit( Map extraParams, MandateOptions mandateOptions, - SetupFutureUsage setupFutureUsage) { + SetupFutureUsage setupFutureUsage, + String targetDate) { this.extraParams = extraParams; this.mandateOptions = mandateOptions; this.setupFutureUsage = setupFutureUsage; + this.targetDate = targetDate; } public static Builder builder() { @@ -11913,10 +12138,12 @@ public static class Builder { private SetupFutureUsage setupFutureUsage; + private String targetDate; + /** Finalize and obtain parameter instance from this builder. */ public SessionCreateParams.PaymentMethodOptions.SepaDebit build() { return new SessionCreateParams.PaymentMethodOptions.SepaDebit( - this.extraParams, this.mandateOptions, this.setupFutureUsage); + this.extraParams, this.mandateOptions, this.setupFutureUsage, this.targetDate); } /** @@ -11979,6 +12206,16 @@ public Builder setSetupFutureUsage( this.setupFutureUsage = setupFutureUsage; return this; } + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The + * date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + * and 15 calendar days from now. + */ + public Builder setTargetDate(String targetDate) { + this.targetDate = targetDate; + return this; + } } @Getter @@ -12327,6 +12564,14 @@ public static class UsBankAccount { @SerializedName("setup_future_usage") SetupFutureUsage setupFutureUsage; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date + * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 + * calendar days from now. + */ + @SerializedName("target_date") + String targetDate; + /** Verification method for the intent. */ @SerializedName("verification_method") VerificationMethod verificationMethod; @@ -12335,10 +12580,12 @@ private UsBankAccount( Map extraParams, FinancialConnections financialConnections, SetupFutureUsage setupFutureUsage, + String targetDate, VerificationMethod verificationMethod) { this.extraParams = extraParams; this.financialConnections = financialConnections; this.setupFutureUsage = setupFutureUsage; + this.targetDate = targetDate; this.verificationMethod = verificationMethod; } @@ -12353,6 +12600,8 @@ public static class Builder { private SetupFutureUsage setupFutureUsage; + private String targetDate; + private VerificationMethod verificationMethod; /** Finalize and obtain parameter instance from this builder. */ @@ -12361,6 +12610,7 @@ public SessionCreateParams.PaymentMethodOptions.UsBankAccount build() { this.extraParams, this.financialConnections, this.setupFutureUsage, + this.targetDate, this.verificationMethod); } @@ -12427,6 +12677,16 @@ public Builder setSetupFutureUsage( return this; } + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The + * date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + * and 15 calendar days from now. + */ + public Builder setTargetDate(String targetDate) { + this.targetDate = targetDate; + return this; + } + /** Verification method for the intent. */ public Builder setVerificationMethod( SessionCreateParams.PaymentMethodOptions.UsBankAccount.VerificationMethod diff --git a/src/main/java/com/stripe/param/checkout/SessionUpdateParams.java b/src/main/java/com/stripe/param/checkout/SessionUpdateParams.java index 192847b41b9..e5a238e3554 100644 --- a/src/main/java/com/stripe/param/checkout/SessionUpdateParams.java +++ b/src/main/java/com/stripe/param/checkout/SessionUpdateParams.java @@ -12,6 +12,10 @@ @Getter public class SessionUpdateParams extends ApiRequestParams { + /** Information about the customer collected within the Checkout Session. */ + @SerializedName("collected_information") + CollectedInformation collectedInformation; + /** Specifies which fields in the response should be expanded. */ @SerializedName("expand") List expand; @@ -35,7 +39,11 @@ public class SessionUpdateParams extends ApiRequestParams { Object metadata; private SessionUpdateParams( - List expand, Map extraParams, Object metadata) { + CollectedInformation collectedInformation, + List expand, + Map extraParams, + Object metadata) { + this.collectedInformation = collectedInformation; this.expand = expand; this.extraParams = extraParams; this.metadata = metadata; @@ -46,6 +54,8 @@ public static Builder builder() { } public static class Builder { + private CollectedInformation collectedInformation; + private List expand; private Map extraParams; @@ -54,7 +64,15 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public SessionUpdateParams build() { - return new SessionUpdateParams(this.expand, this.extraParams, this.metadata); + return new SessionUpdateParams( + this.collectedInformation, this.expand, this.extraParams, this.metadata); + } + + /** Information about the customer collected within the Checkout Session. */ + public Builder setCollectedInformation( + SessionUpdateParams.CollectedInformation collectedInformation) { + this.collectedInformation = collectedInformation; + return this; } /** @@ -159,4 +177,362 @@ public Builder setMetadata(Map metadata) { return this; } } + + @Getter + public static class CollectedInformation { + /** + * 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 shipping details to apply to this Session. */ + @SerializedName("shipping_details") + ShippingDetails shippingDetails; + + private CollectedInformation(Map extraParams, ShippingDetails shippingDetails) { + this.extraParams = extraParams; + this.shippingDetails = shippingDetails; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private ShippingDetails shippingDetails; + + /** Finalize and obtain parameter instance from this builder. */ + public SessionUpdateParams.CollectedInformation build() { + return new SessionUpdateParams.CollectedInformation(this.extraParams, this.shippingDetails); + } + + /** + * 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 + * SessionUpdateParams.CollectedInformation#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 SessionUpdateParams.CollectedInformation#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 shipping details to apply to this Session. */ + public Builder setShippingDetails( + SessionUpdateParams.CollectedInformation.ShippingDetails shippingDetails) { + this.shippingDetails = shippingDetails; + return this; + } + } + + @Getter + public static class ShippingDetails { + /** Required. The address of the customer */ + @SerializedName("address") + Address address; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Required. The name of customer */ + @SerializedName("name") + Object name; + + private ShippingDetails(Address address, Map extraParams, Object name) { + this.address = address; + this.extraParams = extraParams; + this.name = name; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Address address; + + private Map extraParams; + + private Object name; + + /** Finalize and obtain parameter instance from this builder. */ + public SessionUpdateParams.CollectedInformation.ShippingDetails build() { + return new SessionUpdateParams.CollectedInformation.ShippingDetails( + this.address, this.extraParams, this.name); + } + + /** Required. The address of the customer */ + public Builder setAddress( + SessionUpdateParams.CollectedInformation.ShippingDetails.Address address) { + this.address = address; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SessionUpdateParams.CollectedInformation.ShippingDetails#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SessionUpdateParams.CollectedInformation.ShippingDetails#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Required. The name of customer */ + public Builder setName(String name) { + this.name = name; + return this; + } + + /** Required. The name of customer */ + public Builder setName(EmptyParam name) { + this.name = name; + return this; + } + } + + @Getter + public static class Address { + /** City, district, suburb, town, or village. */ + @SerializedName("city") + Object city; + + /** + * Required. Two-letter country code (ISO 3166-1 alpha-2). + */ + @SerializedName("country") + Object country; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Required. Address line 1 (e.g., street, PO Box, or company name). */ + @SerializedName("line1") + Object line1; + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + @SerializedName("line2") + Object line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + Object postalCode; + + /** State, county, province, or region. */ + @SerializedName("state") + Object state; + + private Address( + Object city, + Object country, + Map extraParams, + Object line1, + Object line2, + Object postalCode, + Object state) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.line1 = line1; + this.line2 = line2; + this.postalCode = postalCode; + this.state = state; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object city; + + private Object country; + + private Map extraParams; + + private Object line1; + + private Object line2; + + private Object postalCode; + + private Object state; + + /** Finalize and obtain parameter instance from this builder. */ + public SessionUpdateParams.CollectedInformation.ShippingDetails.Address build() { + return new SessionUpdateParams.CollectedInformation.ShippingDetails.Address( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.state); + } + + /** City, district, suburb, town, or village. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** City, district, suburb, town, or village. */ + public Builder setCity(EmptyParam city) { + this.city = city; + return this; + } + + /** + * Required. Two-letter country code (ISO 3166-1 alpha-2). + */ + public Builder setCountry(String country) { + this.country = country; + return this; + } + + /** + * Required. Two-letter country code (ISO 3166-1 alpha-2). + */ + public Builder setCountry(EmptyParam country) { + this.country = country; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * SessionUpdateParams.CollectedInformation.ShippingDetails.Address#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * SessionUpdateParams.CollectedInformation.ShippingDetails.Address#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Required. Address line 1 (e.g., street, PO Box, or company name). */ + public Builder setLine1(String line1) { + this.line1 = line1; + return this; + } + + /** Required. Address line 1 (e.g., street, PO Box, or company name). */ + public Builder setLine1(EmptyParam line1) { + this.line1 = line1; + return this; + } + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + public Builder setLine2(String line2) { + this.line2 = line2; + return this; + } + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + public Builder setLine2(EmptyParam line2) { + this.line2 = line2; + return this; + } + + /** ZIP or postal code. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** ZIP or postal code. */ + public Builder setPostalCode(EmptyParam postalCode) { + this.postalCode = postalCode; + return this; + } + + /** State, county, province, or region. */ + public Builder setState(String state) { + this.state = state; + return this; + } + + /** State, county, province, or region. */ + public Builder setState(EmptyParam state) { + this.state = state; + return this; + } + } + } + } + } } From 04ecbb0543dea08ec23abe8a0e305d90513519ed Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 14 Feb 2025 23:53:10 +0000 Subject: [PATCH 3/5] Update generated code for v1495 --- OPENAPI_VERSION | 2 +- .../stripe/param/v2/core/EventListParams.java | 99 ++++++++++++++++++- .../stripe/service/v2/core/EventService.java | 8 ++ 3 files changed, 104 insertions(+), 5 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index d9f1c75b6c7..6043724bfe5 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1494 \ No newline at end of file +v1495 \ No newline at end of file diff --git a/src/main/java/com/stripe/param/v2/core/EventListParams.java b/src/main/java/com/stripe/param/v2/core/EventListParams.java index a5c9f901bd4..55ae39caac5 100644 --- a/src/main/java/com/stripe/param/v2/core/EventListParams.java +++ b/src/main/java/com/stripe/param/v2/core/EventListParams.java @@ -3,12 +3,37 @@ 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.Getter; @Getter public class EventListParams extends ApiRequestParams { + /** Filter for events created after the specified timestamp. */ + @SerializedName("created_gt") + Instant createdGt; + + /** Filter for events created at or after the specified timestamp. */ + @SerializedName("created_gte") + Instant createdGte; + + /** Filter for events created before the specified timestamp. */ + @SerializedName("created_lt") + Instant createdLt; + + /** Filter for events created at or before the specified timestamp. */ + @SerializedName("created_lte") + Instant createdLte; + + /** + * Filter events based on whether they were successfully delivered to all subscribed event + * destinations. If false, events which are still pending or have failed all delivery attempts to + * a event destination will be returned. + */ + @SerializedName("delivery_success") + Boolean deliverySuccess; + /** * 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 @@ -22,7 +47,7 @@ public class EventListParams extends ApiRequestParams { @SerializedName("limit") Integer limit; - /** Required. Primary object ID used to retrieve related events. */ + /** Primary object ID used to retrieve related events. */ @SerializedName("object_id") String objectId; @@ -31,7 +56,20 @@ public class EventListParams extends ApiRequestParams { String page; private EventListParams( - Map extraParams, Integer limit, String objectId, String page) { + Instant createdGt, + Instant createdGte, + Instant createdLt, + Instant createdLte, + Boolean deliverySuccess, + Map extraParams, + Integer limit, + String objectId, + String page) { + this.createdGt = createdGt; + this.createdGte = createdGte; + this.createdLt = createdLt; + this.createdLte = createdLte; + this.deliverySuccess = deliverySuccess; this.extraParams = extraParams; this.limit = limit; this.objectId = objectId; @@ -43,6 +81,16 @@ public static Builder builder() { } public static class Builder { + private Instant createdGt; + + private Instant createdGte; + + private Instant createdLt; + + private Instant createdLte; + + private Boolean deliverySuccess; + private Map extraParams; private Integer limit; @@ -53,7 +101,50 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public EventListParams build() { - return new EventListParams(this.extraParams, this.limit, this.objectId, this.page); + return new EventListParams( + this.createdGt, + this.createdGte, + this.createdLt, + this.createdLte, + this.deliverySuccess, + this.extraParams, + this.limit, + this.objectId, + this.page); + } + + /** Filter for events created after the specified timestamp. */ + public Builder setCreatedGt(Instant createdGt) { + this.createdGt = createdGt; + return this; + } + + /** Filter for events created at or after the specified timestamp. */ + public Builder setCreatedGte(Instant createdGte) { + this.createdGte = createdGte; + return this; + } + + /** Filter for events created before the specified timestamp. */ + public Builder setCreatedLt(Instant createdLt) { + this.createdLt = createdLt; + return this; + } + + /** Filter for events created at or before the specified timestamp. */ + public Builder setCreatedLte(Instant createdLte) { + this.createdLte = createdLte; + return this; + } + + /** + * Filter events based on whether they were successfully delivered to all subscribed event + * destinations. If false, events which are still pending or have failed all delivery attempts + * to a event destination will be returned. + */ + public Builder setDeliverySuccess(Boolean deliverySuccess) { + this.deliverySuccess = deliverySuccess; + return this; } /** @@ -88,7 +179,7 @@ public Builder setLimit(Integer limit) { return this; } - /** Required. Primary object ID used to retrieve related events. */ + /** Primary object ID used to retrieve related events. */ public Builder setObjectId(String objectId) { this.objectId = objectId; return this; diff --git a/src/main/java/com/stripe/service/v2/core/EventService.java b/src/main/java/com/stripe/service/v2/core/EventService.java index 5732a916f2f..639ff05be6c 100644 --- a/src/main/java/com/stripe/service/v2/core/EventService.java +++ b/src/main/java/com/stripe/service/v2/core/EventService.java @@ -24,6 +24,14 @@ public StripeCollection list(EventListParams params) throws StripeExcepti return list(params, (RequestOptions) null); } /** List events, going back up to 30 days. */ + public StripeCollection list(RequestOptions options) throws StripeException { + return list((EventListParams) null, options); + } + /** List events, going back up to 30 days. */ + public StripeCollection list() throws StripeException { + return list((EventListParams) null, (RequestOptions) null); + } + /** List events, going back up to 30 days. */ public StripeCollection list(EventListParams params, RequestOptions options) throws StripeException { String path = "/v2/core/events"; From 483c92fff9de281814693347c0015a1f5a38f2a5 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 21 Feb 2025 15:20:17 +0000 Subject: [PATCH 4/5] Update generated code for v1501 --- OPENAPI_VERSION | 2 +- .../param/AccountPersonCreateParams.java | 24 +++---------- .../param/AccountPersonUpdateParams.java | 34 ++++++++----------- .../param/PersonCollectionCreateParams.java | 24 +++---------- .../com/stripe/param/PersonUpdateParams.java | 33 ++++++++---------- .../com/stripe/param/TokenCreateParams.java | 24 +++---------- 6 files changed, 41 insertions(+), 100 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 6043724bfe5..b8101af09d2 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1495 \ No newline at end of file +v1501 \ No newline at end of file diff --git a/src/main/java/com/stripe/param/AccountPersonCreateParams.java b/src/main/java/com/stripe/param/AccountPersonCreateParams.java index 13633627a67..e937acbd681 100644 --- a/src/main/java/com/stripe/param/AccountPersonCreateParams.java +++ b/src/main/java/com/stripe/param/AccountPersonCreateParams.java @@ -148,7 +148,7 @@ public class AccountPersonCreateParams extends ApiRequestParams { * any jurisdiction. */ @SerializedName("political_exposure") - PoliticalExposure politicalExposure; + String politicalExposure; /** The person's registered address. */ @SerializedName("registered_address") @@ -191,7 +191,7 @@ private AccountPersonCreateParams( String nationality, String personToken, String phone, - PoliticalExposure politicalExposure, + String politicalExposure, RegisteredAddress registeredAddress, Relationship relationship, String ssnLast4, @@ -280,7 +280,7 @@ public static class Builder { private String phone; - private PoliticalExposure politicalExposure; + private String politicalExposure; private RegisteredAddress registeredAddress; @@ -621,8 +621,7 @@ public Builder setPhone(String phone) { * related persons, declares that they hold or have held an important public job or function, in * any jurisdiction. */ - public Builder setPoliticalExposure( - AccountPersonCreateParams.PoliticalExposure politicalExposure) { + public Builder setPoliticalExposure(String politicalExposure) { this.politicalExposure = politicalExposure; return this; } @@ -2482,19 +2481,4 @@ public Builder setFront(String front) { } } } - - public enum PoliticalExposure implements ApiRequestParams.EnumParam { - @SerializedName("existing") - EXISTING("existing"), - - @SerializedName("none") - NONE("none"); - - @Getter(onMethod_ = {@Override}) - private final String value; - - PoliticalExposure(String value) { - this.value = value; - } - } } diff --git a/src/main/java/com/stripe/param/AccountPersonUpdateParams.java b/src/main/java/com/stripe/param/AccountPersonUpdateParams.java index a14396de8d6..bab641a2155 100644 --- a/src/main/java/com/stripe/param/AccountPersonUpdateParams.java +++ b/src/main/java/com/stripe/param/AccountPersonUpdateParams.java @@ -148,7 +148,7 @@ public class AccountPersonUpdateParams extends ApiRequestParams { * any jurisdiction. */ @SerializedName("political_exposure") - PoliticalExposure politicalExposure; + Object politicalExposure; /** The person's registered address. */ @SerializedName("registered_address") @@ -191,7 +191,7 @@ private AccountPersonUpdateParams( Object nationality, Object personToken, Object phone, - PoliticalExposure politicalExposure, + Object politicalExposure, RegisteredAddress registeredAddress, Relationship relationship, Object ssnLast4, @@ -280,7 +280,7 @@ public static class Builder { private Object phone; - private PoliticalExposure politicalExposure; + private Object politicalExposure; private RegisteredAddress registeredAddress; @@ -726,8 +726,17 @@ public Builder setPhone(EmptyParam phone) { * related persons, declares that they hold or have held an important public job or function, in * any jurisdiction. */ - public Builder setPoliticalExposure( - AccountPersonUpdateParams.PoliticalExposure politicalExposure) { + public Builder setPoliticalExposure(String politicalExposure) { + this.politicalExposure = politicalExposure; + return this; + } + + /** + * Indicates if the person or any of their representatives, family members, or other closely + * related persons, declares that they hold or have held an important public job or function, in + * any jurisdiction. + */ + public Builder setPoliticalExposure(EmptyParam politicalExposure) { this.politicalExposure = politicalExposure; return this; } @@ -2817,19 +2826,4 @@ public Builder setFront(EmptyParam front) { } } } - - public enum PoliticalExposure implements ApiRequestParams.EnumParam { - @SerializedName("existing") - EXISTING("existing"), - - @SerializedName("none") - NONE("none"); - - @Getter(onMethod_ = {@Override}) - private final String value; - - PoliticalExposure(String value) { - this.value = value; - } - } } diff --git a/src/main/java/com/stripe/param/PersonCollectionCreateParams.java b/src/main/java/com/stripe/param/PersonCollectionCreateParams.java index 03d262d3e1b..c056d733e01 100644 --- a/src/main/java/com/stripe/param/PersonCollectionCreateParams.java +++ b/src/main/java/com/stripe/param/PersonCollectionCreateParams.java @@ -148,7 +148,7 @@ public class PersonCollectionCreateParams extends ApiRequestParams { * any jurisdiction. */ @SerializedName("political_exposure") - PoliticalExposure politicalExposure; + String politicalExposure; /** The person's registered address. */ @SerializedName("registered_address") @@ -191,7 +191,7 @@ private PersonCollectionCreateParams( String nationality, String personToken, String phone, - PoliticalExposure politicalExposure, + String politicalExposure, RegisteredAddress registeredAddress, Relationship relationship, String ssnLast4, @@ -280,7 +280,7 @@ public static class Builder { private String phone; - private PoliticalExposure politicalExposure; + private String politicalExposure; private RegisteredAddress registeredAddress; @@ -621,8 +621,7 @@ public Builder setPhone(String phone) { * related persons, declares that they hold or have held an important public job or function, in * any jurisdiction. */ - public Builder setPoliticalExposure( - PersonCollectionCreateParams.PoliticalExposure politicalExposure) { + public Builder setPoliticalExposure(String politicalExposure) { this.politicalExposure = politicalExposure; return this; } @@ -2489,19 +2488,4 @@ public Builder setFront(String front) { } } } - - public enum PoliticalExposure implements ApiRequestParams.EnumParam { - @SerializedName("existing") - EXISTING("existing"), - - @SerializedName("none") - NONE("none"); - - @Getter(onMethod_ = {@Override}) - private final String value; - - PoliticalExposure(String value) { - this.value = value; - } - } } diff --git a/src/main/java/com/stripe/param/PersonUpdateParams.java b/src/main/java/com/stripe/param/PersonUpdateParams.java index 95fc9763307..dc4ed3975da 100644 --- a/src/main/java/com/stripe/param/PersonUpdateParams.java +++ b/src/main/java/com/stripe/param/PersonUpdateParams.java @@ -148,7 +148,7 @@ public class PersonUpdateParams extends ApiRequestParams { * any jurisdiction. */ @SerializedName("political_exposure") - PoliticalExposure politicalExposure; + Object politicalExposure; /** The person's registered address. */ @SerializedName("registered_address") @@ -191,7 +191,7 @@ private PersonUpdateParams( Object nationality, Object personToken, Object phone, - PoliticalExposure politicalExposure, + Object politicalExposure, RegisteredAddress registeredAddress, Relationship relationship, Object ssnLast4, @@ -280,7 +280,7 @@ public static class Builder { private Object phone; - private PoliticalExposure politicalExposure; + private Object politicalExposure; private RegisteredAddress registeredAddress; @@ -726,7 +726,17 @@ public Builder setPhone(EmptyParam phone) { * related persons, declares that they hold or have held an important public job or function, in * any jurisdiction. */ - public Builder setPoliticalExposure(PersonUpdateParams.PoliticalExposure politicalExposure) { + public Builder setPoliticalExposure(String politicalExposure) { + this.politicalExposure = politicalExposure; + return this; + } + + /** + * Indicates if the person or any of their representatives, family members, or other closely + * related persons, declares that they hold or have held an important public job or function, in + * any jurisdiction. + */ + public Builder setPoliticalExposure(EmptyParam politicalExposure) { this.politicalExposure = politicalExposure; return this; } @@ -2809,19 +2819,4 @@ public Builder setFront(EmptyParam front) { } } } - - public enum PoliticalExposure implements ApiRequestParams.EnumParam { - @SerializedName("existing") - EXISTING("existing"), - - @SerializedName("none") - NONE("none"); - - @Getter(onMethod_ = {@Override}) - private final String value; - - PoliticalExposure(String value) { - this.value = value; - } - } } diff --git a/src/main/java/com/stripe/param/TokenCreateParams.java b/src/main/java/com/stripe/param/TokenCreateParams.java index 51437598e9d..b87796f5750 100644 --- a/src/main/java/com/stripe/param/TokenCreateParams.java +++ b/src/main/java/com/stripe/param/TokenCreateParams.java @@ -4454,7 +4454,7 @@ public static class Person { * any jurisdiction. */ @SerializedName("political_exposure") - PoliticalExposure politicalExposure; + String politicalExposure; /** The person's registered address. */ @SerializedName("registered_address") @@ -4495,7 +4495,7 @@ private Person( Object metadata, String nationality, String phone, - PoliticalExposure politicalExposure, + String politicalExposure, RegisteredAddress registeredAddress, Relationship relationship, String ssnLast4, @@ -4578,7 +4578,7 @@ public static class Builder { private String phone; - private PoliticalExposure politicalExposure; + private String politicalExposure; private RegisteredAddress registeredAddress; @@ -4884,8 +4884,7 @@ public Builder setPhone(String phone) { * related persons, declares that they hold or have held an important public job or function, * in any jurisdiction. */ - public Builder setPoliticalExposure( - TokenCreateParams.Person.PoliticalExposure politicalExposure) { + public Builder setPoliticalExposure(String politicalExposure) { this.politicalExposure = politicalExposure; return this; } @@ -6772,21 +6771,6 @@ public Builder setFront(String front) { } } } - - public enum PoliticalExposure implements ApiRequestParams.EnumParam { - @SerializedName("existing") - EXISTING("existing"), - - @SerializedName("none") - NONE("none"); - - @Getter(onMethod_ = {@Override}) - private final String value; - - PoliticalExposure(String value) { - this.value = value; - } - } } @Getter From 5383186b8b44f20c4aa4d23d6ab4061759ed888f Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Mon, 24 Feb 2025 19:28:18 +0000 Subject: [PATCH 5/5] Update generated code for v1505 --- OPENAPI_VERSION | 2 +- .../stripe/param/v2/core/EventListParams.java | 99 +------------------ .../stripe/service/v2/core/EventService.java | 8 -- 3 files changed, 5 insertions(+), 104 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index b8101af09d2..ddf5ac54492 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1501 \ No newline at end of file +v1505 \ No newline at end of file diff --git a/src/main/java/com/stripe/param/v2/core/EventListParams.java b/src/main/java/com/stripe/param/v2/core/EventListParams.java index 55ae39caac5..a5c9f901bd4 100644 --- a/src/main/java/com/stripe/param/v2/core/EventListParams.java +++ b/src/main/java/com/stripe/param/v2/core/EventListParams.java @@ -3,37 +3,12 @@ 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.Getter; @Getter public class EventListParams extends ApiRequestParams { - /** Filter for events created after the specified timestamp. */ - @SerializedName("created_gt") - Instant createdGt; - - /** Filter for events created at or after the specified timestamp. */ - @SerializedName("created_gte") - Instant createdGte; - - /** Filter for events created before the specified timestamp. */ - @SerializedName("created_lt") - Instant createdLt; - - /** Filter for events created at or before the specified timestamp. */ - @SerializedName("created_lte") - Instant createdLte; - - /** - * Filter events based on whether they were successfully delivered to all subscribed event - * destinations. If false, events which are still pending or have failed all delivery attempts to - * a event destination will be returned. - */ - @SerializedName("delivery_success") - Boolean deliverySuccess; - /** * 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 @@ -47,7 +22,7 @@ public class EventListParams extends ApiRequestParams { @SerializedName("limit") Integer limit; - /** Primary object ID used to retrieve related events. */ + /** Required. Primary object ID used to retrieve related events. */ @SerializedName("object_id") String objectId; @@ -56,20 +31,7 @@ public class EventListParams extends ApiRequestParams { String page; private EventListParams( - Instant createdGt, - Instant createdGte, - Instant createdLt, - Instant createdLte, - Boolean deliverySuccess, - Map extraParams, - Integer limit, - String objectId, - String page) { - this.createdGt = createdGt; - this.createdGte = createdGte; - this.createdLt = createdLt; - this.createdLte = createdLte; - this.deliverySuccess = deliverySuccess; + Map extraParams, Integer limit, String objectId, String page) { this.extraParams = extraParams; this.limit = limit; this.objectId = objectId; @@ -81,16 +43,6 @@ public static Builder builder() { } public static class Builder { - private Instant createdGt; - - private Instant createdGte; - - private Instant createdLt; - - private Instant createdLte; - - private Boolean deliverySuccess; - private Map extraParams; private Integer limit; @@ -101,50 +53,7 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public EventListParams build() { - return new EventListParams( - this.createdGt, - this.createdGte, - this.createdLt, - this.createdLte, - this.deliverySuccess, - this.extraParams, - this.limit, - this.objectId, - this.page); - } - - /** Filter for events created after the specified timestamp. */ - public Builder setCreatedGt(Instant createdGt) { - this.createdGt = createdGt; - return this; - } - - /** Filter for events created at or after the specified timestamp. */ - public Builder setCreatedGte(Instant createdGte) { - this.createdGte = createdGte; - return this; - } - - /** Filter for events created before the specified timestamp. */ - public Builder setCreatedLt(Instant createdLt) { - this.createdLt = createdLt; - return this; - } - - /** Filter for events created at or before the specified timestamp. */ - public Builder setCreatedLte(Instant createdLte) { - this.createdLte = createdLte; - return this; - } - - /** - * Filter events based on whether they were successfully delivered to all subscribed event - * destinations. If false, events which are still pending or have failed all delivery attempts - * to a event destination will be returned. - */ - public Builder setDeliverySuccess(Boolean deliverySuccess) { - this.deliverySuccess = deliverySuccess; - return this; + return new EventListParams(this.extraParams, this.limit, this.objectId, this.page); } /** @@ -179,7 +88,7 @@ public Builder setLimit(Integer limit) { return this; } - /** Primary object ID used to retrieve related events. */ + /** Required. Primary object ID used to retrieve related events. */ public Builder setObjectId(String objectId) { this.objectId = objectId; return this; diff --git a/src/main/java/com/stripe/service/v2/core/EventService.java b/src/main/java/com/stripe/service/v2/core/EventService.java index 639ff05be6c..5732a916f2f 100644 --- a/src/main/java/com/stripe/service/v2/core/EventService.java +++ b/src/main/java/com/stripe/service/v2/core/EventService.java @@ -24,14 +24,6 @@ public StripeCollection list(EventListParams params) throws StripeExcepti return list(params, (RequestOptions) null); } /** List events, going back up to 30 days. */ - public StripeCollection list(RequestOptions options) throws StripeException { - return list((EventListParams) null, options); - } - /** List events, going back up to 30 days. */ - public StripeCollection list() throws StripeException { - return list((EventListParams) null, (RequestOptions) null); - } - /** List events, going back up to 30 days. */ public StripeCollection list(EventListParams params, RequestOptions options) throws StripeException { String path = "/v2/core/events";