diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index e0b27350867..6eb80deb21c 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v972 \ No newline at end of file +v992 \ No newline at end of file diff --git a/src/main/java/com/stripe/model/Account.java b/src/main/java/com/stripe/model/Account.java index 1e2cb9c6dc3..eb9dce8a3b5 100644 --- a/src/main/java/com/stripe/model/Account.java +++ b/src/main/java/com/stripe/model/Account.java @@ -29,12 +29,17 @@ * account like its current requirements or if the account is enabled to make live charges or * receive payouts. * - *

For Custom accounts, the properties below are always returned. For other accounts, some - * properties are returned until that account has started to go through Connect Onboarding. Once you - * create an Account Link or Account Session, some properties are only - * returned for Custom accounts. Learn about the differences between accounts. + *

For accounts where controller.requirement_collection + * is {@code application}, which includes Custom accounts, the properties below are always returned. + * + *

For accounts where controller.requirement_collection + * is {@code stripe}, which includes Standard and Express accounts, some properties are only + * returned until you create an Account Link or + * Account Session to start Connect + * Onboarding. Learn about the differences between + * accounts. */ @Getter @Setter @@ -45,10 +50,11 @@ public class Account extends ApiResource implements MetadataStore, Paym BusinessProfile businessProfile; /** - * The business type. Once you create an Account Link or Account Session, this property is only - * returned for Custom accounts. + * The business type. After you create an Account + * Link or Account Session, this + * property is only returned for accounts where controller.requirement_collection + * is {@code application}, which includes Custom accounts. * *

One of {@code company}, {@code government_entity}, {@code individual}, or {@code * non_profit}. @@ -90,8 +96,8 @@ public class Account extends ApiResource implements MetadataStore, Paym Boolean deleted; /** - * Whether account details have been submitted. Standard accounts cannot receive payouts before - * this is true. + * Whether account details have been submitted. Accounts with Stripe Dashboard access, which + * includes Standard accounts, cannot receive payouts before this is true. */ @SerializedName("details_submitted") Boolean detailsSubmitted; @@ -121,15 +127,16 @@ public class Account extends ApiResource implements MetadataStore, Paym /** * This is an object representing a person associated with a Stripe account. * - *

A platform cannot access a Standard or Express account's persons after the account starts - * onboarding, such as after generating an account link for the account. See the Standard onboarding or Express onboarding documentation - * for information about platform prefilling and account onboarding steps. + *

A platform cannot access a person for an account where account.controller.requirement_collection + * is {@code stripe}, which includes Standard and Express accounts, after creating an Account Link + * or Account Session to start Connect onboarding. * - *

Related guide: Handling - * identity verification with the API + *

See the Standard onboarding or Express onboarding documentation for + * information about prefilling information and account onboarding steps. Learn more about handling + * identity verification with the API. */ @SerializedName("individual") Person individual; @@ -165,7 +172,10 @@ public class Account extends ApiResource implements MetadataStore, Paym @SerializedName("tos_acceptance") TosAcceptance tosAcceptance; - /** The Stripe account type. Can be {@code standard}, {@code express}, or {@code custom}. */ + /** + * The Stripe account type. Can be {@code standard}, {@code express}, {@code custom}, or {@code + * none}. + */ @SerializedName("type") String type; @@ -301,11 +311,14 @@ public static Account create(AccountCreateParams params, RequestOptions options) } /** - * With Connect, you can delete accounts you manage. + * With Connect, you can delete accounts you manage. * - *

Accounts created using test-mode keys can be deleted at any time. Standard accounts created - * using live-mode keys cannot be deleted. Custom or Express accounts created using live-mode keys - * can only be deleted once all balances are zero. + *

Test-mode accounts can be deleted at any time. + * + *

Live-mode accounts where Stripe is responsible for negative account balances cannot be + * deleted, which includes Standard accounts. Live-mode accounts where your platform is liable for + * negative account balances, which includes Custom and Express accounts, can be deleted when all + * balances are zero. * *

If you want to delete your own account, use the account information tab in your account @@ -316,11 +329,14 @@ public Account delete() throws StripeException { } /** - * With Connect, you can delete accounts you manage. + * With Connect, you can delete accounts you manage. + * + *

Test-mode accounts can be deleted at any time. * - *

Accounts created using test-mode keys can be deleted at any time. Standard accounts created - * using live-mode keys cannot be deleted. Custom or Express accounts created using live-mode keys - * can only be deleted once all balances are zero. + *

Live-mode accounts where Stripe is responsible for negative account balances cannot be + * deleted, which includes Standard accounts. Live-mode accounts where your platform is liable for + * negative account balances, which includes Custom and Express accounts, can be deleted when all + * balances are zero. * *

If you want to delete your own account, use the account information tab in your account @@ -331,11 +347,14 @@ public Account delete(RequestOptions options) throws StripeException { } /** - * With Connect, you can delete accounts you manage. + * With Connect, you can delete accounts you manage. + * + *

Test-mode accounts can be deleted at any time. * - *

Accounts created using test-mode keys can be deleted at any time. Standard accounts created - * using live-mode keys cannot be deleted. Custom or Express accounts created using live-mode keys - * can only be deleted once all balances are zero. + *

Live-mode accounts where Stripe is responsible for negative account balances cannot be + * deleted, which includes Standard accounts. Live-mode accounts where your platform is liable for + * negative account balances, which includes Custom and Express accounts, can be deleted when all + * balances are zero. * *

If you want to delete your own account, use the account information tab in your account @@ -346,11 +365,14 @@ public Account delete(Map params) throws StripeException { } /** - * With Connect, you can delete accounts you manage. + * With Connect, you can delete accounts you manage. * - *

Accounts created using test-mode keys can be deleted at any time. Standard accounts created - * using live-mode keys cannot be deleted. Custom or Express accounts created using live-mode keys - * can only be deleted once all balances are zero. + *

Test-mode accounts can be deleted at any time. + * + *

Live-mode accounts where Stripe is responsible for negative account balances cannot be + * deleted, which includes Standard accounts. Live-mode accounts where your platform is liable for + * negative account balances, which includes Custom and Express accounts, can be deleted when all + * balances are zero. * *

If you want to delete your own account, use the account information tab in your account @@ -473,22 +495,24 @@ public PersonCollection persons(AccountPersonsParams params, RequestOptions opti } /** - * With Connect, you may flag accounts as - * suspicious. + * With Connect, you can reject accounts that you have + * flagged as suspicious. * - *

Test-mode Custom and Express accounts can be rejected at any time. Accounts created using - * live-mode keys may only be rejected once all balances are zero. + *

Only accounts where your platform is liable for negative account balances, which includes + * Custom and Express accounts, can be rejected. Test-mode accounts can be rejected at any time. + * Live-mode accounts can only be rejected after all balances are zero. */ public Account reject(Map params) throws StripeException { return reject(params, (RequestOptions) null); } /** - * With Connect, you may flag accounts as - * suspicious. + * With Connect, you can reject accounts that you have + * flagged as suspicious. * - *

Test-mode Custom and Express accounts can be rejected at any time. Accounts created using - * live-mode keys may only be rejected once all balances are zero. + *

Only accounts where your platform is liable for negative account balances, which includes + * Custom and Express accounts, can be rejected. Test-mode accounts can be rejected at any time. + * Live-mode accounts can only be rejected after all balances are zero. */ public Account reject(Map params, RequestOptions options) throws StripeException { String path = String.format("/v1/accounts/%s/reject", ApiResource.urlEncodeId(this.getId())); @@ -499,22 +523,24 @@ public Account reject(Map params, RequestOptions options) throws } /** - * With Connect, you may flag accounts as - * suspicious. + * With Connect, you can reject accounts that you have + * flagged as suspicious. * - *

Test-mode Custom and Express accounts can be rejected at any time. Accounts created using - * live-mode keys may only be rejected once all balances are zero. + *

Only accounts where your platform is liable for negative account balances, which includes + * Custom and Express accounts, can be rejected. Test-mode accounts can be rejected at any time. + * Live-mode accounts can only be rejected after all balances are zero. */ public Account reject(AccountRejectParams params) throws StripeException { return reject(params, (RequestOptions) null); } /** - * With Connect, you may flag accounts as - * suspicious. + * With Connect, you can reject accounts that you have + * flagged as suspicious. * - *

Test-mode Custom and Express accounts can be rejected at any time. Accounts created using - * live-mode keys may only be rejected once all balances are zero. + *

Only accounts where your platform is liable for negative account balances, which includes + * Custom and Express accounts, can be rejected. Test-mode accounts can be rejected at any time. + * Live-mode accounts can only be rejected after all balances are zero. */ public Account reject(AccountRejectParams params, RequestOptions options) throws StripeException { String path = String.format("/v1/accounts/%s/reject", ApiResource.urlEncodeId(this.getId())); @@ -603,14 +629,20 @@ public static Account retrieve(AccountRetrieveParams params, RequestOptions opti } /** - * Updates a connected account by setting - * the values of the parameters passed. Any parameters not provided are left unchanged. + * Updates a connected account by setting the + * values of the parameters passed. Any parameters not provided are left unchanged. + * + *

For accounts where controller.requirement_collection + * is {@code application}, which includes Custom accounts, you can update any information on the + * account. * - *

For Custom accounts, you can update any information on the account. For other accounts, you - * can update all information until that account has started to go through Connect Onboarding. - * Once you create an Account Link or Account Session, some properties can - * only be changed or updated for Custom accounts. + *

For accounts where controller.requirement_collection + * is {@code stripe}, which includes Standard and Express accounts, you can update all information + * until you create an Account Link or Account Session to start Connect onboarding, + * after which some properties can no longer be updated. * *

To update your own account, use the Dashboard. Refer to our params) throws StripeException { } /** - * Updates a connected account by setting - * the values of the parameters passed. Any parameters not provided are left unchanged. + * Updates a connected account by setting the + * values of the parameters passed. Any parameters not provided are left unchanged. + * + *

For accounts where controller.requirement_collection + * is {@code application}, which includes Custom accounts, you can update any information on the + * account. * - *

For Custom accounts, you can update any information on the account. For other accounts, you - * can update all information until that account has started to go through Connect Onboarding. - * Once you create an Account Link or Account Session, some properties can - * only be changed or updated for Custom accounts. + *

For accounts where controller.requirement_collection + * is {@code stripe}, which includes Standard and Express accounts, you can update all information + * until you create an Account Link or Account Session to start Connect onboarding, + * after which some properties can no longer be updated. * *

To update your own account, use the Dashboard. Refer to our params, RequestOptions options) throws } /** - * Updates a connected account by setting - * the values of the parameters passed. Any parameters not provided are left unchanged. + * Updates a connected account by setting the + * values of the parameters passed. Any parameters not provided are left unchanged. * - *

For Custom accounts, you can update any information on the account. For other accounts, you - * can update all information until that account has started to go through Connect Onboarding. - * Once you create an Account Link or Account Session, some properties can - * only be changed or updated for Custom accounts. + *

For accounts where controller.requirement_collection + * is {@code application}, which includes Custom accounts, you can update any information on the + * account. + * + *

For accounts where controller.requirement_collection + * is {@code stripe}, which includes Standard and Express accounts, you can update all information + * until you create an Account Link or Account Session to start Connect onboarding, + * after which some properties can no longer be updated. * *

To update your own account, use the Dashboard. Refer to our connected account by setting - * the values of the parameters passed. Any parameters not provided are left unchanged. + * Updates a connected account by setting the + * values of the parameters passed. Any parameters not provided are left unchanged. + * + *

For accounts where controller.requirement_collection + * is {@code application}, which includes Custom accounts, you can update any information on the + * account. * - *

For Custom accounts, you can update any information on the account. For other accounts, you - * can update all information until that account has started to go through Connect Onboarding. - * Once you create an Account Link or Account Session, some properties can - * only be changed or updated for Custom accounts. + *

For accounts where controller.requirement_collection + * is {@code stripe}, which includes Standard and Express accounts, you can update all information + * until you create an Account Link or Account Session to start Connect onboarding, + * after which some properties can no longer be updated. * *

To update your own account, use the Dashboard. Refer to our fee behavior on + * connected accounts. * *

One of {@code account}, {@code application}, {@code application_custom}, or {@code * application_express}. @@ -2205,10 +2257,10 @@ public static class Payments extends StripeObject { public static class Payouts extends StripeObject { /** * A Boolean indicating if Stripe should try to reclaim negative balances from an attached - * bank account. See our Understanding Connect Account - * Balances documentation for details. Default value is {@code false} for Custom accounts, - * otherwise {@code true}. + * bank account. See Understanding + * Connect account balances for details. The default value is {@code false} when controller.requirement_collection + * is {@code application}, which includes Custom accounts, otherwise {@code true}. */ @SerializedName("debit_negative_balances") Boolean debitNegativeBalances; diff --git a/src/main/java/com/stripe/model/Balance.java b/src/main/java/com/stripe/model/Balance.java index 7f4bbf7a542..f1d056f3533 100644 --- a/src/main/java/com/stripe/model/Balance.java +++ b/src/main/java/com/stripe/model/Balance.java @@ -45,8 +45,10 @@ public class Balance extends ApiResource { List available; /** - * Funds held due to negative balances on connected Custom accounts. You can find the connect - * reserve balance for each currency and payment type in the {@code source_types} property. + * Funds held due to negative balances on connected accounts where account.controller.requirement_collection + * is {@code application}, which includes Custom accounts. You can find the connect reserve + * balance for each currency and payment type in the {@code source_types} property. */ @SerializedName("connect_reserved") List connectReserved; diff --git a/src/main/java/com/stripe/model/BankAccount.java b/src/main/java/com/stripe/model/BankAccount.java index 1a544855c35..66e83d3a74c 100644 --- a/src/main/java/com/stripe/model/BankAccount.java +++ b/src/main/java/com/stripe/model/BankAccount.java @@ -23,13 +23,15 @@ /** * These bank accounts are payment methods on {@code Customer} objects. * - *

On the other hand External - * Accounts are transfer destinations on {@code Account} objects for Custom accounts. They can be bank - * accounts or debit cards as well, and are documented in the links above. + *

On the other hand External Accounts are + * transfer destinations on {@code Account} objects for accounts where controller.requirement_collection + * is {@code application}, which includes Custom accounts. They can be bank accounts + * or debit cards as well, and are documented in the links above. * - *

Related guide: Bank debits - * and transfers + *

Related guide: Bank debits and + * transfers */ @Getter @Setter diff --git a/src/main/java/com/stripe/model/Capability.java b/src/main/java/com/stripe/model/Capability.java index 79ed5b62d65..0efd8ecc523 100644 --- a/src/main/java/com/stripe/model/Capability.java +++ b/src/main/java/com/stripe/model/Capability.java @@ -333,18 +333,23 @@ public static class Requirements extends StripeObject { /** * If the capability is disabled, this string describes why. Can be {@code - * requirements.past_due}, {@code requirements.pending_verification}, {@code listed}, {@code - * platform_paused}, {@code rejected.fraud}, {@code rejected.listed}, {@code - * rejected.terms_of_service}, {@code rejected.other}, {@code under_review}, or {@code other}. + * requirements.fields_needed}, {@code pending.onboarding}, {@code pending.review}, {@code + * rejected.fraud}, {@code rejected.other}, {@code platform_paused}, {@code + * action_required.requested_capabilities}, {@code rejected.inactivty}, or {@code + * rejected.unsupported_business}. * *

{@code rejected.unsupported_business} means that the account's business is not supported * by the capability. For example, payment methods may restrict the businesses they support in - * their terms of service: + * their terms of service, such as in Afterpay Clearpay's + * terms of service. * - *

- Afterpay - * Clearpay's terms of service + *

{@code rejected.inactivity} means that the capability has been paused for inactivity. This + * disabled reason currently only applies to the Issuing capability. See Issuing: + * Managing Inactive Connects for more details. * - *

If you believe that the rejection is in error, please contact support at + *

If you believe that a rejection is in error, please contact support at * https://support.stripe.com/contact/ for assistance. */ @SerializedName("disabled_reason") diff --git a/src/main/java/com/stripe/model/Card.java b/src/main/java/com/stripe/model/Card.java index 748e835a287..570012472a9 100644 --- a/src/main/java/com/stripe/model/Card.java +++ b/src/main/java/com/stripe/model/Card.java @@ -31,7 +31,10 @@ public class Card extends ApiResource implements MetadataStore, ExternalAccount, PaymentSource { /** * The account this card belongs to. This attribute will not be in the card object if the card - * belongs to a customer or recipient instead. + * belongs to a customer or recipient instead. This property is only available for accounts where + * controller.requirement_collection + * is {@code application}, which includes Custom accounts. */ @SerializedName("account") @Getter(lombok.AccessLevel.NONE) @@ -101,7 +104,9 @@ public class Card extends ApiResource /** * Three-letter ISO code for currency. Only * applicable on accounts (not customers or recipients). The card can be used as a transfer - * destination for funds in this currency. + * destination for funds in this currency. This property is only available for accounts where controller.requirement_collection + * is {@code application}, which includes Custom accounts. */ @SerializedName("currency") String currency; @@ -126,7 +131,12 @@ public class Card extends ApiResource @SerializedName("cvc_check") String cvcCheck; - /** Whether this card is the default external account for its currency. */ + /** + * Whether this card is the default external account for its currency. This property is only + * available for accounts where controller.requirement_collection + * is {@code application}, which includes Custom accounts. + */ @SerializedName("default_for_currency") Boolean defaultForCurrency; diff --git a/src/main/java/com/stripe/model/ConfirmationToken.java b/src/main/java/com/stripe/model/ConfirmationToken.java index b2825b22faf..ca1351c9162 100644 --- a/src/main/java/com/stripe/model/ConfirmationToken.java +++ b/src/main/java/com/stripe/model/ConfirmationToken.java @@ -38,7 +38,7 @@ public class ConfirmationToken extends ApiResource implements HasId { /** * Time at which this ConfirmationToken expires and can no longer be used to confirm a - * PaymentIntent or SetupIntent. This is set to null once this ConfirmationToken has been used. + * PaymentIntent or SetupIntent. */ @SerializedName("expires_at") Long expiresAt; diff --git a/src/main/java/com/stripe/model/Event.java b/src/main/java/com/stripe/model/Event.java index aa31da51894..0985b665f7b 100644 --- a/src/main/java/com/stripe/model/Event.java +++ b/src/main/java/com/stripe/model/Event.java @@ -37,10 +37,10 @@ * separate webhooks system for sending the * {@code Event} objects directly to an endpoint on your server. You can manage webhooks in your account settings. Learn how to listen for events so that your integration can + * href="https://docs.stripe.com/webhooks">listen for events so that your integration can * automatically trigger reactions. * - *

When using Connect, you can also receive event + *

When using Connect, you can also receive event * notifications that occur in connected accounts. For these events, there's an additional {@code * account} attribute in the received {@code Event} object. * @@ -208,7 +208,7 @@ public class Event extends ApiResource implements HasId { /** * List events, going back up to 30 days. Each event data is rendered according to Stripe API * version at its creation time, specified in event object {@code api_version} attribute + * href="https://docs.stripe.com/api/events/object">event object {@code api_version} attribute * (not according to your current Stripe API version or {@code Stripe-Version} header). */ public static EventCollection list(Map params) throws StripeException { @@ -218,7 +218,7 @@ public static EventCollection list(Map params) throws StripeExce /** * List events, going back up to 30 days. Each event data is rendered according to Stripe API * version at its creation time, specified in event object {@code api_version} attribute + * href="https://docs.stripe.com/api/events/object">event object {@code api_version} attribute * (not according to your current Stripe API version or {@code Stripe-Version} header). */ public static EventCollection list(Map params, RequestOptions options) @@ -233,7 +233,7 @@ public static EventCollection list(Map params, RequestOptions op /** * List events, going back up to 30 days. Each event data is rendered according to Stripe API * version at its creation time, specified in event object {@code api_version} attribute + * href="https://docs.stripe.com/api/events/object">event object {@code api_version} attribute * (not according to your current Stripe API version or {@code Stripe-Version} header). */ public static EventCollection list(EventListParams params) throws StripeException { @@ -243,7 +243,7 @@ public static EventCollection list(EventListParams params) throws StripeExceptio /** * List events, going back up to 30 days. Each event data is rendered according to Stripe API * version at its creation time, specified in event object {@code api_version} attribute + * href="https://docs.stripe.com/api/events/object">event object {@code api_version} attribute * (not according to your current Stripe API version or {@code Stripe-Version} header). */ public static EventCollection list(EventListParams params, RequestOptions options) diff --git a/src/main/java/com/stripe/model/Invoice.java b/src/main/java/com/stripe/model/Invoice.java index 709b19ebca0..46c1a152a44 100644 --- a/src/main/java/com/stripe/model/Invoice.java +++ b/src/main/java/com/stripe/model/Invoice.java @@ -1618,10 +1618,10 @@ public Invoice sendInvoice(InvoiceSendInvoiceParams params, RequestOptions optio * *

You can preview the effects of updating a subscription, including a preview of what * proration will take place. To ensure that the actual proration is calculated exactly the same - * as the previewed proration, you should pass the {@code subscription_proration_date} parameter - * when doing the actual subscription update. The recommended way to get only the prorations being - * previewed is to consider only proration line items where {@code period[start]} is equal to the - * {@code subscription_proration_date} value passed in the request. + * as the previewed proration, you should pass the {@code subscription_details.proration_date} + * parameter when doing the actual subscription update. The recommended way to get only the + * prorations being previewed is to consider only proration line items where {@code period[start]} + * is equal to the {@code subscription_details.proration_date} value passed in the request. */ public static Invoice upcoming() throws StripeException { return upcoming((Map) null, (RequestOptions) null); @@ -1640,10 +1640,10 @@ public static Invoice upcoming() throws StripeException { * *

You can preview the effects of updating a subscription, including a preview of what * proration will take place. To ensure that the actual proration is calculated exactly the same - * as the previewed proration, you should pass the {@code subscription_proration_date} parameter - * when doing the actual subscription update. The recommended way to get only the prorations being - * previewed is to consider only proration line items where {@code period[start]} is equal to the - * {@code subscription_proration_date} value passed in the request. + * as the previewed proration, you should pass the {@code subscription_details.proration_date} + * parameter when doing the actual subscription update. The recommended way to get only the + * prorations being previewed is to consider only proration line items where {@code period[start]} + * is equal to the {@code subscription_details.proration_date} value passed in the request. */ public static Invoice upcoming(Map params) throws StripeException { return upcoming(params, (RequestOptions) null); @@ -1662,10 +1662,10 @@ public static Invoice upcoming(Map params) throws StripeExceptio * *

You can preview the effects of updating a subscription, including a preview of what * proration will take place. To ensure that the actual proration is calculated exactly the same - * as the previewed proration, you should pass the {@code subscription_proration_date} parameter - * when doing the actual subscription update. The recommended way to get only the prorations being - * previewed is to consider only proration line items where {@code period[start]} is equal to the - * {@code subscription_proration_date} value passed in the request. + * as the previewed proration, you should pass the {@code subscription_details.proration_date} + * parameter when doing the actual subscription update. The recommended way to get only the + * prorations being previewed is to consider only proration line items where {@code period[start]} + * is equal to the {@code subscription_details.proration_date} value passed in the request. */ public static Invoice upcoming(Map params, RequestOptions options) throws StripeException { @@ -1689,10 +1689,10 @@ public static Invoice upcoming(Map params, RequestOptions option * *

You can preview the effects of updating a subscription, including a preview of what * proration will take place. To ensure that the actual proration is calculated exactly the same - * as the previewed proration, you should pass the {@code subscription_proration_date} parameter - * when doing the actual subscription update. The recommended way to get only the prorations being - * previewed is to consider only proration line items where {@code period[start]} is equal to the - * {@code subscription_proration_date} value passed in the request. + * as the previewed proration, you should pass the {@code subscription_details.proration_date} + * parameter when doing the actual subscription update. The recommended way to get only the + * prorations being previewed is to consider only proration line items where {@code period[start]} + * is equal to the {@code subscription_details.proration_date} value passed in the request. */ public static Invoice upcoming(InvoiceUpcomingParams params) throws StripeException { return upcoming(params, (RequestOptions) null); @@ -1711,10 +1711,10 @@ public static Invoice upcoming(InvoiceUpcomingParams params) throws StripeExcept * *

You can preview the effects of updating a subscription, including a preview of what * proration will take place. To ensure that the actual proration is calculated exactly the same - * as the previewed proration, you should pass the {@code subscription_proration_date} parameter - * when doing the actual subscription update. The recommended way to get only the prorations being - * previewed is to consider only proration line items where {@code period[start]} is equal to the - * {@code subscription_proration_date} value passed in the request. + * as the previewed proration, you should pass the {@code subscription_details.proration_date} + * parameter when doing the actual subscription update. The recommended way to get only the + * prorations being previewed is to consider only proration line items where {@code period[start]} + * is equal to the {@code subscription_details.proration_date} value passed in the request. */ public static Invoice upcoming(InvoiceUpcomingParams params, RequestOptions options) throws StripeException { diff --git a/src/main/java/com/stripe/model/InvoiceLineItem.java b/src/main/java/com/stripe/model/InvoiceLineItem.java index e4f1d7173ef..fec132b62d9 100644 --- a/src/main/java/com/stripe/model/InvoiceLineItem.java +++ b/src/main/java/com/stripe/model/InvoiceLineItem.java @@ -88,8 +88,9 @@ public class InvoiceLineItem extends ApiResource implements HasId, MetadataStore /** * 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. Note that for line items with {@code type=subscription} this will reflect - * the metadata of the subscription that caused the line item to be created. + * structured format. Note that for line items with {@code type=subscription}, {@code metadata} + * reflects the current metadata from the subscription associated with the line item, unless the + * invoice line was directly updated with different metadata after creation. */ @Getter(onMethod_ = {@Override}) @SerializedName("metadata") diff --git a/src/main/java/com/stripe/model/LoginLink.java b/src/main/java/com/stripe/model/LoginLink.java index d1e362a7513..352dcbb36a8 100644 --- a/src/main/java/com/stripe/model/LoginLink.java +++ b/src/main/java/com/stripe/model/LoginLink.java @@ -16,7 +16,10 @@ import lombok.Setter; /** - * Login Links are single-use login link for an Express account to access their Stripe dashboard. + * Login Links are single-use URLs for a connected account to access the Express Dashboard. The + * connected account's account.controller.stripe_dashboard.type + * must be {@code express} to have access to the Express Dashboard. */ @Getter @Setter @@ -39,22 +42,22 @@ public class LoginLink extends ApiResource { String url; /** - * Creates a single-use login link for an Express account to access their Stripe dashboard. + * Creates a single-use login link for a connected account to access the Express Dashboard. * - *

You may only create login links for Express accounts connected to your - * platform. + *

You can only create login links for accounts that use the Express Dashboard and are connected to + * your platform. */ public static LoginLink createOnAccount(String account) throws StripeException { return createOnAccount(account, (Map) null, (RequestOptions) null); } /** - * Creates a single-use login link for an Express account to access their Stripe dashboard. + * Creates a single-use login link for a connected account to access the Express Dashboard. * - *

You may only create login links for Express accounts connected to your - * platform. + *

You can only create login links for accounts that use the Express Dashboard and are connected to + * your platform. */ public static LoginLink createOnAccount(String account, RequestOptions options) throws StripeException { @@ -62,11 +65,11 @@ public static LoginLink createOnAccount(String account, RequestOptions options) } /** - * Creates a single-use login link for an Express account to access their Stripe dashboard. + * Creates a single-use login link for a connected account to access the Express Dashboard. * - *

You may only create login links for Express accounts connected to your - * platform. + *

You can only create login links for accounts that use the Express Dashboard and are connected to + * your platform. */ public static LoginLink createOnAccount(String account, Map params) throws StripeException { @@ -74,11 +77,11 @@ public static LoginLink createOnAccount(String account, Map para } /** - * Creates a single-use login link for an Express account to access their Stripe dashboard. + * Creates a single-use login link for a connected account to access the Express Dashboard. * - *

You may only create login links for Express accounts connected to your - * platform. + *

You can only create login links for accounts that use the Express Dashboard and are connected to + * your platform. */ public static LoginLink createOnAccount( String account, Map params, RequestOptions options) throws StripeException { @@ -90,11 +93,11 @@ public static LoginLink createOnAccount( } /** - * Creates a single-use login link for an Express account to access their Stripe dashboard. + * Creates a single-use login link for a connected account to access the Express Dashboard. * - *

You may only create login links for Express accounts connected to your - * platform. + *

You can only create login links for accounts that use the Express Dashboard and are connected to + * your platform. */ public static LoginLink createOnAccount(String account, LoginLinkCreateOnAccountParams params) throws StripeException { @@ -102,11 +105,11 @@ public static LoginLink createOnAccount(String account, LoginLinkCreateOnAccount } /** - * Creates a single-use login link for an Express account to access their Stripe dashboard. + * Creates a single-use login link for a connected account to access the Express Dashboard. * - *

You may only create login links for Express accounts connected to your - * platform. + *

You can only create login links for accounts that use the Express Dashboard and are connected to + * your platform. */ public static LoginLink createOnAccount( String account, LoginLinkCreateOnAccountParams params, RequestOptions options) diff --git a/src/main/java/com/stripe/model/Mandate.java b/src/main/java/com/stripe/model/Mandate.java index 4149e5e62d3..b183a0c3915 100644 --- a/src/main/java/com/stripe/model/Mandate.java +++ b/src/main/java/com/stripe/model/Mandate.java @@ -192,6 +192,9 @@ public static class PaymentMethodDetails extends StripeObject { @SerializedName("acss_debit") AcssDebit acssDebit; + @SerializedName("amazon_pay") + AmazonPay amazonPay; + @SerializedName("au_becs_debit") AuBecsDebit auBecsDebit; @@ -210,6 +213,9 @@ public static class PaymentMethodDetails extends StripeObject { @SerializedName("paypal") Paypal paypal; + @SerializedName("revolut_pay") + RevolutPay revolutPay; + @SerializedName("sepa_debit") SepaDebit sepaDebit; @@ -256,6 +262,11 @@ public static class AcssDebit extends StripeObject { String transactionType; } + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class AmazonPay extends StripeObject {} + @Getter @Setter @EqualsAndHashCode(callSuper = false) @@ -329,6 +340,11 @@ public static class Paypal extends StripeObject { String payerId; } + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class RevolutPay extends StripeObject {} + @Getter @Setter @EqualsAndHashCode(callSuper = false) diff --git a/src/main/java/com/stripe/model/PaymentIntent.java b/src/main/java/com/stripe/model/PaymentIntent.java index d8b7f65b010..3ea0311e2b0 100644 --- a/src/main/java/com/stripe/model/PaymentIntent.java +++ b/src/main/java/com/stripe/model/PaymentIntent.java @@ -2570,6 +2570,26 @@ public static class AmazonPay extends StripeObject { */ @SerializedName("capture_method") String captureMethod; + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + *

Providing this parameter will attach the payment method + * to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any + * required actions from the user are complete. If no Customer was provided, the payment + * method can still be attached to a Customer after + * the transaction completes. + * + *

When processing card payments, Stripe also uses {@code setup_future_usage} to + * dynamically optimize your payment flow and comply with regional legislation and network + * rules, such as SCA. + * + *

One of {@code none}, or {@code off_session}. + */ + @SerializedName("setup_future_usage") + String setupFutureUsage; } @Getter @@ -3598,6 +3618,26 @@ public static class RevolutPay extends StripeObject { */ @SerializedName("capture_method") String captureMethod; + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + *

Providing this parameter will attach the payment method + * to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any + * required actions from the user are complete. If no Customer was provided, the payment + * method can still be attached to a Customer after + * the transaction completes. + * + *

When processing card payments, Stripe also uses {@code setup_future_usage} to + * dynamically optimize your payment flow and comply with regional legislation and network + * rules, such as SCA. + * + *

One of {@code none}, or {@code off_session}. + */ + @SerializedName("setup_future_usage") + String setupFutureUsage; } @Getter diff --git a/src/main/java/com/stripe/model/PaymentMethodConfiguration.java b/src/main/java/com/stripe/model/PaymentMethodConfiguration.java index bac951c0d22..238c8e176be 100644 --- a/src/main/java/com/stripe/model/PaymentMethodConfiguration.java +++ b/src/main/java/com/stripe/model/PaymentMethodConfiguration.java @@ -152,6 +152,9 @@ public class PaymentMethodConfiguration extends ApiResource implements HasId { @SerializedName("livemode") Boolean livemode; + @SerializedName("mobilepay") + Mobilepay mobilepay; + /** The configuration's name. */ @SerializedName("name") String name; @@ -1441,6 +1444,49 @@ public static class DisplayPreference extends StripeObject { } } + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Mobilepay extends StripeObject { + /** + * Whether this payment method may be offered at checkout. True if {@code display_preference} is + * {@code on} and the payment method's capability is active. + */ + @SerializedName("available") + Boolean available; + + @SerializedName("display_preference") + DisplayPreference displayPreference; + + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class DisplayPreference extends StripeObject { + /** + * For child configs, whether or not the account's preference will be observed. If {@code + * false}, the parent configuration's default is used. + */ + @SerializedName("overridable") + Boolean overridable; + + /** + * The account's display preference. + * + *

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

One of {@code off}, or {@code on}. + */ + @SerializedName("value") + String value; + } + } + @Getter @Setter @EqualsAndHashCode(callSuper = false) @@ -1985,6 +2031,7 @@ public void setResponseGetter(StripeResponseGetter responseGetter) { trySetResponseGetter(klarna, responseGetter); trySetResponseGetter(konbini, responseGetter); trySetResponseGetter(link, responseGetter); + trySetResponseGetter(mobilepay, responseGetter); trySetResponseGetter(oxxo, responseGetter); trySetResponseGetter(p24, responseGetter); trySetResponseGetter(paynow, responseGetter); diff --git a/src/main/java/com/stripe/model/Person.java b/src/main/java/com/stripe/model/Person.java index bb27327fa45..5cab04c11b5 100644 --- a/src/main/java/com/stripe/model/Person.java +++ b/src/main/java/com/stripe/model/Person.java @@ -21,15 +21,16 @@ /** * This is an object representing a person associated with a Stripe account. * - *

A platform cannot access a Standard or Express account's persons after the account starts - * onboarding, such as after generating an account link for the account. See the Standard onboarding or Express onboarding documentation for - * information about platform prefilling and account onboarding steps. + *

A platform cannot access a person for an account where account.controller.requirement_collection + * is {@code stripe}, which includes Standard and Express accounts, after creating an Account Link + * or Account Session to start Connect onboarding. * - *

Related guide: Handling - * identity verification with the API + *

See the Standard onboarding or Express onboarding documentation for + * information about prefilling information and account onboarding steps. Learn more about handling identity + * verification with the API. */ @Getter @Setter diff --git a/src/main/java/com/stripe/model/SetupAttempt.java b/src/main/java/com/stripe/model/SetupAttempt.java index d9a679854c6..0fc0a7a8f24 100644 --- a/src/main/java/com/stripe/model/SetupAttempt.java +++ b/src/main/java/com/stripe/model/SetupAttempt.java @@ -270,6 +270,9 @@ public static class PaymentMethodDetails extends StripeObject { @SerializedName("acss_debit") AcssDebit acssDebit; + @SerializedName("amazon_pay") + AmazonPay amazonPay; + @SerializedName("au_becs_debit") AuBecsDebit auBecsDebit; @@ -303,6 +306,9 @@ public static class PaymentMethodDetails extends StripeObject { @SerializedName("paypal") Paypal paypal; + @SerializedName("revolut_pay") + RevolutPay revolutPay; + @SerializedName("sepa_debit") SepaDebit sepaDebit; @@ -325,6 +331,11 @@ public static class PaymentMethodDetails extends StripeObject { @EqualsAndHashCode(callSuper = false) public static class AcssDebit extends StripeObject {} + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class AmazonPay extends StripeObject {} + @Getter @Setter @EqualsAndHashCode(callSuper = false) @@ -793,6 +804,11 @@ public static class Link extends StripeObject {} @EqualsAndHashCode(callSuper = false) public static class Paypal extends StripeObject {} + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class RevolutPay extends StripeObject {} + @Getter @Setter @EqualsAndHashCode(callSuper = false) diff --git a/src/main/java/com/stripe/model/Token.java b/src/main/java/com/stripe/model/Token.java index cecad6f2404..7f97e8638e7 100644 --- a/src/main/java/com/stripe/model/Token.java +++ b/src/main/java/com/stripe/model/Token.java @@ -33,7 +33,7 @@ * *

You can't store or use tokens more than once. To store card or bank account information for * later use, create Customer objects or Custom accounts. External accounts. Radar, our integrated solution for automatic fraud * protection, performs best with integrations that use client-side tokenization. */ @@ -44,13 +44,15 @@ public class Token extends ApiResource implements HasId { /** * These bank accounts are payment methods on {@code Customer} objects. * - *

On the other hand External - * Accounts are transfer destinations on {@code Account} objects for Custom accounts. They can be bank + *

On the other hand External Accounts + * are transfer destinations on {@code Account} objects for accounts where controller.requirement_collection + * is {@code application}, which includes Custom accounts. They can be bank * accounts or debit cards as well, and are documented in the links above. * - *

Related guide: Bank debits - * and transfers + *

Related guide: Bank debits and + * transfers */ @SerializedName("bank_account") BankAccount bankAccount; @@ -104,7 +106,10 @@ public class Token extends ApiResource implements HasId { /** * Creates a single-use token that represents a bank account’s details. You can use this token * with any API method in place of a bank account dictionary. You can only use this token once. To - * do so, attach it to a Custom account. + * do so, attach it to a connected account + * where controller.requirement_collection + * is {@code application}, which includes Custom accounts. */ public static Token create(Map params) throws StripeException { return create(params, (RequestOptions) null); @@ -113,7 +118,10 @@ public static Token create(Map params) throws StripeException { /** * Creates a single-use token that represents a bank account’s details. You can use this token * with any API method in place of a bank account dictionary. You can only use this token once. To - * do so, attach it to a Custom account. + * do so, attach it to a connected account + * where controller.requirement_collection + * is {@code application}, which includes Custom accounts. */ public static Token create(Map params, RequestOptions options) throws StripeException { @@ -127,7 +135,10 @@ public static Token create(Map params, RequestOptions options) /** * Creates a single-use token that represents a bank account’s details. You can use this token * with any API method in place of a bank account dictionary. You can only use this token once. To - * do so, attach it to a Custom account. + * do so, attach it to a connected account + * where controller.requirement_collection + * is {@code application}, which includes Custom accounts. */ public static Token create(TokenCreateParams params) throws StripeException { return create(params, (RequestOptions) null); @@ -136,7 +147,10 @@ public static Token create(TokenCreateParams params) throws StripeException { /** * Creates a single-use token that represents a bank account’s details. You can use this token * with any API method in place of a bank account dictionary. You can only use this token once. To - * do so, attach it to a Custom account. + * do so, attach it to a connected account + * where controller.requirement_collection + * is {@code application}, which includes Custom accounts. */ public static Token create(TokenCreateParams params, RequestOptions options) throws StripeException { diff --git a/src/main/java/com/stripe/model/WebhookEndpoint.java b/src/main/java/com/stripe/model/WebhookEndpoint.java index 218e0582963..1e22e7352bc 100644 --- a/src/main/java/com/stripe/model/WebhookEndpoint.java +++ b/src/main/java/com/stripe/model/WebhookEndpoint.java @@ -20,14 +20,14 @@ import lombok.Setter; /** - * You can configure webhook endpoints via the API + * You can configure webhook endpoints via the API * to be notified about events that happen in your Stripe account or connected accounts. * *

Most users configure webhooks from the * dashboard, which provides a user interface for registering and testing your webhook * endpoints. * - *

Related guide: Setting up webhooks + *

Related guide: Setting up webhooks */ @Getter @Setter @@ -91,7 +91,7 @@ public class WebhookEndpoint extends ApiResource implements HasId, MetadataStore /** * The endpoint's secret, used to generate webhook signatures. Only returned at + * href="https://docs.stripe.com/webhooks/signatures">webhook signatures. Only returned at * creation. */ @SerializedName("secret") diff --git a/src/main/java/com/stripe/model/checkout/Session.java b/src/main/java/com/stripe/model/checkout/Session.java index 7702bf6d6d1..5e6d0563ed1 100644 --- a/src/main/java/com/stripe/model/checkout/Session.java +++ b/src/main/java/com/stripe/model/checkout/Session.java @@ -1630,7 +1630,27 @@ public static class Alipay extends StripeObject { @Getter @Setter @EqualsAndHashCode(callSuper = false) - public static class AmazonPay extends StripeObject {} + public static class AmazonPay extends StripeObject { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + *

Providing this parameter will attach the payment method + * to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any + * required actions from the user are complete. If no Customer was provided, the payment + * method can still be attached to a Customer after + * the transaction completes. + * + *

When processing card payments, Stripe also uses {@code setup_future_usage} to + * dynamically optimize your payment flow and comply with regional legislation and network + * rules, such as SCA. + * + *

One of {@code none}, or {@code off_session}. + */ + @SerializedName("setup_future_usage") + String setupFutureUsage; + } @Getter @Setter @@ -2292,7 +2312,27 @@ public static class Pix extends StripeObject { @Getter @Setter @EqualsAndHashCode(callSuper = false) - public static class RevolutPay extends StripeObject {} + public static class RevolutPay extends StripeObject { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + *

Providing this parameter will attach the payment method + * to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any + * required actions from the user are complete. If no Customer was provided, the payment + * method can still be attached to a Customer after + * the transaction completes. + * + *

When processing card payments, Stripe also uses {@code setup_future_usage} to + * dynamically optimize your payment flow and comply with regional legislation and network + * rules, such as SCA. + * + *

One of {@code none}, or {@code off_session}. + */ + @SerializedName("setup_future_usage") + String setupFutureUsage; + } @Getter @Setter diff --git a/src/main/java/com/stripe/model/entitlements/ActiveEntitlement.java b/src/main/java/com/stripe/model/entitlements/ActiveEntitlement.java index 720a5008042..f65ad2b80d8 100644 --- a/src/main/java/com/stripe/model/entitlements/ActiveEntitlement.java +++ b/src/main/java/com/stripe/model/entitlements/ActiveEntitlement.java @@ -3,6 +3,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.exception.StripeException; +import com.stripe.model.ExpandableField; import com.stripe.model.HasId; import com.stripe.net.ApiMode; import com.stripe.net.ApiRequest; @@ -10,6 +11,7 @@ import com.stripe.net.ApiResource; import com.stripe.net.BaseAddress; import com.stripe.net.RequestOptions; +import com.stripe.net.StripeResponseGetter; import com.stripe.param.entitlements.ActiveEntitlementListParams; import com.stripe.param.entitlements.ActiveEntitlementRetrieveParams; import java.util.Map; @@ -22,9 +24,14 @@ @Setter @EqualsAndHashCode(callSuper = false) public class ActiveEntitlement extends ApiResource implements HasId { - /** The feature that the customer is entitled to. */ + /** + * The Feature that the customer is + * entitled to. + */ @SerializedName("feature") - String feature; + @Getter(lombok.AccessLevel.NONE) + @Setter(lombok.AccessLevel.NONE) + ExpandableField feature; /** Unique identifier for the object. */ @Getter(onMethod_ = {@Override}) @@ -50,6 +57,24 @@ public class ActiveEntitlement extends ApiResource implements HasId { @SerializedName("object") String object; + /** Get ID of expandable {@code feature} object. */ + public String getFeature() { + return (this.feature != null) ? this.feature.getId() : null; + } + + public void setFeature(String id) { + this.feature = ApiResource.setExpandableFieldId(id, this.feature); + } + + /** Get expanded {@code feature}. */ + public Feature getFeatureObject() { + return (this.feature != null) ? this.feature.getExpanded() : null; + } + + public void setFeatureObject(Feature expandableObject) { + this.feature = new ExpandableField(expandableObject.getId(), expandableObject); + } + /** Retrieve a list of active entitlements for a customer. */ public static ActiveEntitlementCollection list(Map params) throws StripeException { @@ -127,4 +152,10 @@ public static ActiveEntitlement retrieve( ApiMode.V1); return getGlobalResponseGetter().request(request, ActiveEntitlement.class); } + + @Override + public void setResponseGetter(StripeResponseGetter responseGetter) { + super.setResponseGetter(responseGetter); + trySetResponseGetter(feature, responseGetter); + } } diff --git a/src/main/java/com/stripe/model/issuing/Authorization.java b/src/main/java/com/stripe/model/issuing/Authorization.java index 7f402f577a1..bd78d35ac69 100644 --- a/src/main/java/com/stripe/model/issuing/Authorization.java +++ b/src/main/java/com/stripe/model/issuing/Authorization.java @@ -263,6 +263,7 @@ public void setTokenObject(Token expandableObject) { * href="https://stripe.com/docs/issuing/controls/real-time-authorizations#authorization-handling">respond * directly to the webhook request to approve an authorization. */ + @Deprecated public Authorization approve() throws StripeException { return approve((Map) null, (RequestOptions) null); } @@ -275,6 +276,7 @@ public Authorization approve() throws StripeException { * href="https://stripe.com/docs/issuing/controls/real-time-authorizations#authorization-handling">respond * directly to the webhook request to approve an authorization. */ + @Deprecated public Authorization approve(RequestOptions options) throws StripeException { return approve((Map) null, options); } @@ -287,6 +289,7 @@ public Authorization approve(RequestOptions options) throws StripeException { * href="https://stripe.com/docs/issuing/controls/real-time-authorizations#authorization-handling">respond * directly to the webhook request to approve an authorization. */ + @Deprecated public Authorization approve(Map params) throws StripeException { return approve(params, (RequestOptions) null); } @@ -299,6 +302,7 @@ public Authorization approve(Map params) throws StripeException * href="https://stripe.com/docs/issuing/controls/real-time-authorizations#authorization-handling">respond * directly to the webhook request to approve an authorization. */ + @Deprecated public Authorization approve(Map params, RequestOptions options) throws StripeException { String path = @@ -318,6 +322,7 @@ public Authorization approve(Map params, RequestOptions options) * href="https://stripe.com/docs/issuing/controls/real-time-authorizations#authorization-handling">respond * directly to the webhook request to approve an authorization. */ + @Deprecated public Authorization approve(AuthorizationApproveParams params) throws StripeException { return approve(params, (RequestOptions) null); } @@ -330,6 +335,7 @@ public Authorization approve(AuthorizationApproveParams params) throws StripeExc * href="https://stripe.com/docs/issuing/controls/real-time-authorizations#authorization-handling">respond * directly to the webhook request to approve an authorization. */ + @Deprecated public Authorization approve(AuthorizationApproveParams params, RequestOptions options) throws StripeException { String path = @@ -355,6 +361,7 @@ public Authorization approve(AuthorizationApproveParams params, RequestOptions o * href="https://stripe.com/docs/issuing/controls/real-time-authorizations#authorization-handling">respond * directly to the webhook request to decline an authorization. */ + @Deprecated public Authorization decline() throws StripeException { return decline((Map) null, (RequestOptions) null); } @@ -367,6 +374,7 @@ public Authorization decline() throws StripeException { * href="https://stripe.com/docs/issuing/controls/real-time-authorizations#authorization-handling">respond * directly to the webhook request to decline an authorization. */ + @Deprecated public Authorization decline(RequestOptions options) throws StripeException { return decline((Map) null, options); } @@ -379,6 +387,7 @@ public Authorization decline(RequestOptions options) throws StripeException { * href="https://stripe.com/docs/issuing/controls/real-time-authorizations#authorization-handling">respond * directly to the webhook request to decline an authorization. */ + @Deprecated public Authorization decline(Map params) throws StripeException { return decline(params, (RequestOptions) null); } @@ -391,6 +400,7 @@ public Authorization decline(Map params) throws StripeException * href="https://stripe.com/docs/issuing/controls/real-time-authorizations#authorization-handling">respond * directly to the webhook request to decline an authorization. */ + @Deprecated public Authorization decline(Map params, RequestOptions options) throws StripeException { String path = @@ -410,6 +420,7 @@ public Authorization decline(Map params, RequestOptions options) * href="https://stripe.com/docs/issuing/controls/real-time-authorizations#authorization-handling">respond * directly to the webhook request to decline an authorization. */ + @Deprecated public Authorization decline(AuthorizationDeclineParams params) throws StripeException { return decline(params, (RequestOptions) null); } @@ -422,6 +433,7 @@ public Authorization decline(AuthorizationDeclineParams params) throws StripeExc * href="https://stripe.com/docs/issuing/controls/real-time-authorizations#authorization-handling">respond * directly to the webhook request to decline an authorization. */ + @Deprecated public Authorization decline(AuthorizationDeclineParams params, RequestOptions options) throws StripeException { String path = diff --git a/src/main/java/com/stripe/param/AccountCreateParams.java b/src/main/java/com/stripe/param/AccountCreateParams.java index 17ad3a09523..47766a85dad 100644 --- a/src/main/java/com/stripe/param/AccountCreateParams.java +++ b/src/main/java/com/stripe/param/AccountCreateParams.java @@ -25,28 +25,35 @@ public class AccountCreateParams extends ApiRequestParams { BusinessProfile businessProfile; /** - * The business type. Once you create an Account Link or Account Session, this property can only - * be updated for Custom accounts. + * The business type. Once you create an Account + * Link or Account Session, this + * property can only be updated for accounts where controller.requirement_collection + * is {@code application}, which includes Custom accounts. */ @SerializedName("business_type") BusinessType businessType; /** * Each key of the dictionary represents a capability, and each capability maps to its settings - * (e.g. whether it has been requested or not). Each capability will be inactive until you have - * provided its specific requirements and Stripe has verified them. An account may have some of + * (for example, whether it has been requested or not). Each capability is inactive until you have + * provided its specific requirements and Stripe has verified them. An account might have some of * its requested capabilities be active and some be inactive. + * + *

Required when account.controller.stripe_dashboard.type + * is {@code none}, which includes Custom accounts. */ @SerializedName("capabilities") Capabilities capabilities; /** * Information about the company or business. This field is available for any {@code - * business_type}. Once you create an Account - * Link or Account Session, this - * property can only be updated for Custom accounts. + * business_type}. Once you create an Account + * Link or Account Session, this + * property can only be updated for accounts where controller.requirement_collection + * is {@code application}, which includes Custom accounts. */ @SerializedName("company") Company company; @@ -81,7 +88,10 @@ public class AccountCreateParams extends ApiRequestParams { /** * The email address of the account holder. This is only to make the account easier to identify to - * you. Stripe only emails Custom accounts with your consent. + * you. If controller.requirement_collection + * is {@code application}, which includes Custom accounts, Stripe doesn't email the account + * without your consent. */ @SerializedName("email") String email; @@ -92,20 +102,22 @@ public class AccountCreateParams extends ApiRequestParams { /** * A card or bank account to attach to the account for receiving payouts (you won’t be able - * to use it for top-ups). You can provide either a token, like the ones returned by Stripe.js, or a dictionary, as documented in the {@code + * href="https://stripe.com/connect/bank-debit-card-payouts">payouts (you won’t be able to use + * it for top-ups). You can provide either a token, like the ones returned by Stripe.js, or a dictionary, as documented in the {@code * external_account} parameter for bank account creation.
+ * href="https://stripe.com/api#account_create_bank_account">bank account creation.
*
* By default, providing an external account sets it as the new default external account for its * currency, and deletes the old default if one exists. To add additional external accounts * without replacing the existing default for the currency, use the bank account or card creation APIs. After you create - * an Account Link or Account Session, this property can only - * be updated for Custom accounts. + * href="https://stripe.com/api#account_create_bank_account">bank account or card creation APIs. After you create an + * Account Link or Account Session, this property can only be + * updated for accounts where controller.requirement_collection + * is {@code application}, which includes Custom accounts. */ @SerializedName("external_account") String externalAccount; @@ -122,9 +134,11 @@ public class AccountCreateParams extends ApiRequestParams { /** * Information about the person represented by the account. This field is null unless {@code * business_type} is set to {@code individual}. Once you create an Account Link or Account Session, this property can only - * be updated for Custom accounts. + * href="https://stripe.com/api/account_links">Account Link or Account Session, this property can only be + * updated for accounts where controller.requirement_collection + * is {@code application}, which includes Custom accounts. */ @SerializedName("individual") Individual individual; @@ -144,8 +158,10 @@ public class AccountCreateParams extends ApiRequestParams { /** * Details on the account's acceptance of the Stripe Services - * Agreement This property can only be updated for Custom accounts. + * href="https://stripe.com/connect/updating-accounts#tos-acceptance">Stripe Services + * Agreement. This property can only be updated for accounts where controller.requirement_collection + * is {@code application}, which includes Custom accounts. */ @SerializedName("tos_acceptance") TosAcceptance tosAcceptance; @@ -276,10 +292,11 @@ public Builder setBusinessProfile(AccountCreateParams.BusinessProfile businessPr } /** - * The business type. Once you create an Account Link or Account Session, this property can - * only be updated for Custom accounts. + * The business type. Once you create an Account + * Link or Account Session, this + * property can only be updated for accounts where controller.requirement_collection + * is {@code application}, which includes Custom accounts. */ public Builder setBusinessType(AccountCreateParams.BusinessType businessType) { this.businessType = businessType; @@ -288,9 +305,13 @@ public Builder setBusinessType(AccountCreateParams.BusinessType businessType) { /** * Each key of the dictionary represents a capability, and each capability maps to its settings - * (e.g. whether it has been requested or not). Each capability will be inactive until you have - * provided its specific requirements and Stripe has verified them. An account may have some of - * its requested capabilities be active and some be inactive. + * (for example, whether it has been requested or not). Each capability is inactive until you + * have provided its specific requirements and Stripe has verified them. An account might have + * some of its requested capabilities be active and some be inactive. + * + *

Required when account.controller.stripe_dashboard.type + * is {@code none}, which includes Custom accounts. */ public Builder setCapabilities(AccountCreateParams.Capabilities capabilities) { this.capabilities = capabilities; @@ -299,10 +320,11 @@ public Builder setCapabilities(AccountCreateParams.Capabilities capabilities) { /** * Information about the company or business. This field is available for any {@code - * business_type}. Once you create an Account Link or Account Session, this property can - * only be updated for Custom accounts. + * business_type}. Once you create an Account + * Link or Account Session, this + * property can only be updated for accounts where controller.requirement_collection + * is {@code application}, which includes Custom accounts. */ public Builder setCompany(AccountCreateParams.Company company) { this.company = company; @@ -348,7 +370,10 @@ public Builder setDocuments(AccountCreateParams.Documents documents) { /** * The email address of the account holder. This is only to make the account easier to identify - * to you. Stripe only emails Custom accounts with your consent. + * to you. If controller.requirement_collection + * is {@code application}, which includes Custom accounts, Stripe doesn't email the account + * without your consent. */ public Builder setEmail(String email) { this.email = email; @@ -383,21 +408,22 @@ public Builder addAllExpand(List elements) { /** * A card or bank account to attach to the account for receiving payouts (you won’t be able - * to use it for top-ups). You can provide either a token, like the ones returned by Stripe.js, or a dictionary, as documented in the {@code + * href="https://stripe.com/connect/bank-debit-card-payouts">payouts (you won’t be able to + * use it for top-ups). You can provide either a token, like the ones returned by Stripe.js, or a dictionary, as documented in the {@code * external_account} parameter for bank account creation. - *
+ * href="https://stripe.com/api#account_create_bank_account">bank account creation.
*
* By default, providing an external account sets it as the new default external account for its * currency, and deletes the old default if one exists. To add additional external accounts * without replacing the existing default for the currency, use the bank account or card creation APIs. After you - * create an Account Link or Account Session, this property can - * only be updated for Custom accounts. + * href="https://stripe.com/api#account_create_bank_account">bank account or card creation APIs. After you create an + * Account Link or Account Session, this property can only be + * updated for accounts where controller.requirement_collection + * is {@code application}, which includes Custom accounts. */ public Builder setExternalAccount(String externalAccount) { this.externalAccount = externalAccount; @@ -433,9 +459,11 @@ public Builder putAllExtraParam(Map map) { /** * Information about the person represented by the account. This field is null unless {@code * business_type} is set to {@code individual}. Once you create an Account Link or Account Session, this property can - * only be updated for Custom accounts. + * href="https://stripe.com/api/account_links">Account Link or Account Session, this property can only be + * updated for accounts where controller.requirement_collection + * is {@code application}, which includes Custom accounts. */ public Builder setIndividual(AccountCreateParams.Individual individual) { this.individual = individual; @@ -500,8 +528,10 @@ public Builder setSettings(AccountCreateParams.Settings settings) { /** * Details on the account's acceptance of the Stripe Services - * Agreement This property can only be updated for Custom accounts. + * href="https://stripe.com/connect/updating-accounts#tos-acceptance">Stripe Services + * Agreement. This property can only be updated for accounts where controller.requirement_collection + * is {@code application}, which includes Custom accounts. */ public Builder setTosAcceptance(AccountCreateParams.TosAcceptance tosAcceptance) { this.tosAcceptance = tosAcceptance; @@ -6401,7 +6431,9 @@ public static class Fees { /** * A value indicating the responsible payer of Stripe fees on this account. Defaults to {@code - * account}. + * account}. Learn more about fee behavior on + * connected accounts. */ @SerializedName("payer") Payer payer; @@ -6455,7 +6487,9 @@ public Builder putAllExtraParam(Map map) { /** * A value indicating the responsible payer of Stripe fees on this account. Defaults to - * {@code account}. + * {@code account}. Learn more about fee behavior on + * connected accounts. */ public Builder setPayer(AccountCreateParams.Controller.Fees.Payer payer) { this.payer = payer; diff --git a/src/main/java/com/stripe/param/AccountUpdateParams.java b/src/main/java/com/stripe/param/AccountUpdateParams.java index 9e69d31967f..dfca684107b 100644 --- a/src/main/java/com/stripe/param/AccountUpdateParams.java +++ b/src/main/java/com/stripe/param/AccountUpdateParams.java @@ -25,28 +25,35 @@ public class AccountUpdateParams extends ApiRequestParams { BusinessProfile businessProfile; /** - * The business type. Once you create an Account Link or Account Session, this property can only - * be updated for Custom accounts. + * The business type. Once you create an Account + * Link or Account Session, this + * property can only be updated for accounts where controller.requirement_collection + * is {@code application}, which includes Custom accounts. */ @SerializedName("business_type") BusinessType businessType; /** * Each key of the dictionary represents a capability, and each capability maps to its settings - * (e.g. whether it has been requested or not). Each capability will be inactive until you have - * provided its specific requirements and Stripe has verified them. An account may have some of + * (for example, whether it has been requested or not). Each capability is inactive until you have + * provided its specific requirements and Stripe has verified them. An account might have some of * its requested capabilities be active and some be inactive. + * + *

Required when account.controller.stripe_dashboard.type + * is {@code none}, which includes Custom accounts. */ @SerializedName("capabilities") Capabilities capabilities; /** * Information about the company or business. This field is available for any {@code - * business_type}. Once you create an Account - * Link or Account Session, this - * property can only be updated for Custom accounts. + * business_type}. Once you create an Account + * Link or Account Session, this + * property can only be updated for accounts where controller.requirement_collection + * is {@code application}, which includes Custom accounts. */ @SerializedName("company") Company company; @@ -65,7 +72,10 @@ public class AccountUpdateParams extends ApiRequestParams { /** * The email address of the account holder. This is only to make the account easier to identify to - * you. Stripe only emails Custom accounts with your consent. + * you. If controller.requirement_collection + * is {@code application}, which includes Custom accounts, Stripe doesn't email the account + * without your consent. */ @SerializedName("email") Object email; @@ -76,20 +86,22 @@ public class AccountUpdateParams extends ApiRequestParams { /** * A card or bank account to attach to the account for receiving payouts (you won’t be able - * to use it for top-ups). You can provide either a token, like the ones returned by Stripe.js, or a dictionary, as documented in the {@code + * href="https://stripe.com/connect/bank-debit-card-payouts">payouts (you won’t be able to use + * it for top-ups). You can provide either a token, like the ones returned by Stripe.js, or a dictionary, as documented in the {@code * external_account} parameter for bank account creation.
+ * href="https://stripe.com/api#account_create_bank_account">bank account creation.
*
* By default, providing an external account sets it as the new default external account for its * currency, and deletes the old default if one exists. To add additional external accounts * without replacing the existing default for the currency, use the bank account or card creation APIs. After you create - * an Account Link or Account Session, this property can only - * be updated for Custom accounts. + * href="https://stripe.com/api#account_create_bank_account">bank account or card creation APIs. After you create an + * Account Link or Account Session, this property can only be + * updated for accounts where controller.requirement_collection + * is {@code application}, which includes Custom accounts. */ @SerializedName("external_account") Object externalAccount; @@ -106,9 +118,11 @@ public class AccountUpdateParams extends ApiRequestParams { /** * Information about the person represented by the account. This field is null unless {@code * business_type} is set to {@code individual}. Once you create an Account Link or Account Session, this property can only - * be updated for Custom accounts. + * href="https://stripe.com/api/account_links">Account Link or Account Session, this property can only be + * updated for accounts where controller.requirement_collection + * is {@code application}, which includes Custom accounts. */ @SerializedName("individual") Individual individual; @@ -128,8 +142,10 @@ public class AccountUpdateParams extends ApiRequestParams { /** * Details on the account's acceptance of the Stripe Services - * Agreement This property can only be updated for Custom accounts. + * href="https://stripe.com/connect/updating-accounts#tos-acceptance">Stripe Services + * Agreement. This property can only be updated for accounts where controller.requirement_collection + * is {@code application}, which includes Custom accounts. */ @SerializedName("tos_acceptance") TosAcceptance tosAcceptance; @@ -247,10 +263,11 @@ public Builder setBusinessProfile(AccountUpdateParams.BusinessProfile businessPr } /** - * The business type. Once you create an Account Link or Account Session, this property can - * only be updated for Custom accounts. + * The business type. Once you create an Account + * Link or Account Session, this + * property can only be updated for accounts where controller.requirement_collection + * is {@code application}, which includes Custom accounts. */ public Builder setBusinessType(AccountUpdateParams.BusinessType businessType) { this.businessType = businessType; @@ -259,9 +276,13 @@ public Builder setBusinessType(AccountUpdateParams.BusinessType businessType) { /** * Each key of the dictionary represents a capability, and each capability maps to its settings - * (e.g. whether it has been requested or not). Each capability will be inactive until you have - * provided its specific requirements and Stripe has verified them. An account may have some of - * its requested capabilities be active and some be inactive. + * (for example, whether it has been requested or not). Each capability is inactive until you + * have provided its specific requirements and Stripe has verified them. An account might have + * some of its requested capabilities be active and some be inactive. + * + *

Required when account.controller.stripe_dashboard.type + * is {@code none}, which includes Custom accounts. */ public Builder setCapabilities(AccountUpdateParams.Capabilities capabilities) { this.capabilities = capabilities; @@ -270,10 +291,11 @@ public Builder setCapabilities(AccountUpdateParams.Capabilities capabilities) { /** * Information about the company or business. This field is available for any {@code - * business_type}. Once you create an Account Link or Account Session, this property can - * only be updated for Custom accounts. + * business_type}. Once you create an Account + * Link or Account Session, this + * property can only be updated for accounts where controller.requirement_collection + * is {@code application}, which includes Custom accounts. */ public Builder setCompany(AccountUpdateParams.Company company) { this.company = company; @@ -308,7 +330,10 @@ public Builder setDocuments(AccountUpdateParams.Documents documents) { /** * The email address of the account holder. This is only to make the account easier to identify - * to you. Stripe only emails Custom accounts with your consent. + * to you. If controller.requirement_collection + * is {@code application}, which includes Custom accounts, Stripe doesn't email the account + * without your consent. */ public Builder setEmail(String email) { this.email = email; @@ -317,7 +342,10 @@ public Builder setEmail(String email) { /** * The email address of the account holder. This is only to make the account easier to identify - * to you. Stripe only emails Custom accounts with your consent. + * to you. If controller.requirement_collection + * is {@code application}, which includes Custom accounts, Stripe doesn't email the account + * without your consent. */ public Builder setEmail(EmptyParam email) { this.email = email; @@ -352,21 +380,22 @@ public Builder addAllExpand(List elements) { /** * A card or bank account to attach to the account for receiving payouts (you won’t be able - * to use it for top-ups). You can provide either a token, like the ones returned by Stripe.js, or a dictionary, as documented in the {@code + * href="https://stripe.com/connect/bank-debit-card-payouts">payouts (you won’t be able to + * use it for top-ups). You can provide either a token, like the ones returned by Stripe.js, or a dictionary, as documented in the {@code * external_account} parameter for bank account creation. - *
+ * href="https://stripe.com/api#account_create_bank_account">bank account creation.
*
* By default, providing an external account sets it as the new default external account for its * currency, and deletes the old default if one exists. To add additional external accounts * without replacing the existing default for the currency, use the bank account or card creation APIs. After you - * create an Account Link or Account Session, this property can - * only be updated for Custom accounts. + * href="https://stripe.com/api#account_create_bank_account">bank account or card creation APIs. After you create an + * Account Link or Account Session, this property can only be + * updated for accounts where controller.requirement_collection + * is {@code application}, which includes Custom accounts. */ public Builder setExternalAccount(String externalAccount) { this.externalAccount = externalAccount; @@ -375,21 +404,22 @@ public Builder setExternalAccount(String externalAccount) { /** * A card or bank account to attach to the account for receiving payouts (you won’t be able - * to use it for top-ups). You can provide either a token, like the ones returned by Stripe.js, or a dictionary, as documented in the {@code + * href="https://stripe.com/connect/bank-debit-card-payouts">payouts (you won’t be able to + * use it for top-ups). You can provide either a token, like the ones returned by Stripe.js, or a dictionary, as documented in the {@code * external_account} parameter for bank account creation. - *
+ * href="https://stripe.com/api#account_create_bank_account">bank account creation.
*
* By default, providing an external account sets it as the new default external account for its * currency, and deletes the old default if one exists. To add additional external accounts * without replacing the existing default for the currency, use the bank account or card creation APIs. After you - * create an Account Link or Account Session, this property can - * only be updated for Custom accounts. + * href="https://stripe.com/api#account_create_bank_account">bank account or card creation APIs. After you create an + * Account Link or Account Session, this property can only be + * updated for accounts where controller.requirement_collection + * is {@code application}, which includes Custom accounts. */ public Builder setExternalAccount(EmptyParam externalAccount) { this.externalAccount = externalAccount; @@ -425,9 +455,11 @@ public Builder putAllExtraParam(Map map) { /** * Information about the person represented by the account. This field is null unless {@code * business_type} is set to {@code individual}. Once you create an Account Link or Account Session, this property can - * only be updated for Custom accounts. + * href="https://stripe.com/api/account_links">Account Link or Account Session, this property can only be + * updated for accounts where controller.requirement_collection + * is {@code application}, which includes Custom accounts. */ public Builder setIndividual(AccountUpdateParams.Individual individual) { this.individual = individual; @@ -492,8 +524,10 @@ public Builder setSettings(AccountUpdateParams.Settings settings) { /** * Details on the account's acceptance of the Stripe Services - * Agreement This property can only be updated for Custom accounts. + * href="https://stripe.com/connect/updating-accounts#tos-acceptance">Stripe Services + * Agreement. This property can only be updated for accounts where controller.requirement_collection + * is {@code application}, which includes Custom accounts. */ public Builder setTosAcceptance(AccountUpdateParams.TosAcceptance tosAcceptance) { this.tosAcceptance = tosAcceptance; diff --git a/src/main/java/com/stripe/param/InvoiceCreateParams.java b/src/main/java/com/stripe/param/InvoiceCreateParams.java index cec11aca7ed..3fd7b19ca8e 100644 --- a/src/main/java/com/stripe/param/InvoiceCreateParams.java +++ b/src/main/java/com/stripe/param/InvoiceCreateParams.java @@ -3377,6 +3377,9 @@ public enum PaymentMethodType implements ApiRequestParams.EnumParam { @SerializedName("acss_debit") ACSS_DEBIT("acss_debit"), + @SerializedName("amazon_pay") + AMAZON_PAY("amazon_pay"), + @SerializedName("au_becs_debit") AU_BECS_DEBIT("au_becs_debit"), @@ -3431,6 +3434,9 @@ public enum PaymentMethodType implements ApiRequestParams.EnumParam { @SerializedName("promptpay") PROMPTPAY("promptpay"), + @SerializedName("revolut_pay") + REVOLUT_PAY("revolut_pay"), + @SerializedName("sepa_credit_transfer") SEPA_CREDIT_TRANSFER("sepa_credit_transfer"), diff --git a/src/main/java/com/stripe/param/InvoiceLineItemUpdateParams.java b/src/main/java/com/stripe/param/InvoiceLineItemUpdateParams.java index 21f7db93784..c81e26e12ac 100644 --- a/src/main/java/com/stripe/param/InvoiceLineItemUpdateParams.java +++ b/src/main/java/com/stripe/param/InvoiceLineItemUpdateParams.java @@ -59,7 +59,10 @@ public class InvoiceLineItemUpdateParams extends ApiRequestParams { * 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}. + * be unset by posting an empty value to {@code metadata}. For {@code type=recurring} line items, + * the incoming metadata specified on the request is directly used to set this value, in contrast + * to {@code type=invoiceitem} line items, where any existing metadata on the invoice line is + * merged with the incoming data. */ @SerializedName("metadata") Object metadata; @@ -357,7 +360,10 @@ public Builder putAllMetadata(Map map) { * 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}. + * can be unset by posting an empty value to {@code metadata}. For {@code type=recurring} line + * items, the incoming metadata specified on the request is directly used to set this value, in + * contrast to {@code type=invoiceitem} line items, where any existing metadata on the invoice + * line is merged with the incoming data. */ public Builder setMetadata(EmptyParam metadata) { this.metadata = metadata; @@ -368,7 +374,10 @@ public Builder setMetadata(EmptyParam metadata) { * 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}. + * can be unset by posting an empty value to {@code metadata}. For {@code type=recurring} line + * items, the incoming metadata specified on the request is directly used to set this value, in + * contrast to {@code type=invoiceitem} line items, where any existing metadata on the invoice + * line is merged with the incoming data. */ public Builder setMetadata(Map metadata) { this.metadata = metadata; diff --git a/src/main/java/com/stripe/param/InvoiceUpdateParams.java b/src/main/java/com/stripe/param/InvoiceUpdateParams.java index 13c6aac69e8..a60c77969fb 100644 --- a/src/main/java/com/stripe/param/InvoiceUpdateParams.java +++ b/src/main/java/com/stripe/param/InvoiceUpdateParams.java @@ -3385,6 +3385,9 @@ public enum PaymentMethodType implements ApiRequestParams.EnumParam { @SerializedName("acss_debit") ACSS_DEBIT("acss_debit"), + @SerializedName("amazon_pay") + AMAZON_PAY("amazon_pay"), + @SerializedName("au_becs_debit") AU_BECS_DEBIT("au_becs_debit"), @@ -3439,6 +3442,9 @@ public enum PaymentMethodType implements ApiRequestParams.EnumParam { @SerializedName("promptpay") PROMPTPAY("promptpay"), + @SerializedName("revolut_pay") + REVOLUT_PAY("revolut_pay"), + @SerializedName("sepa_credit_transfer") SEPA_CREDIT_TRANSFER("sepa_credit_transfer"), diff --git a/src/main/java/com/stripe/param/PaymentMethodConfigurationCreateParams.java b/src/main/java/com/stripe/param/PaymentMethodConfigurationCreateParams.java index 9ad7ec7fb14..fc4af6c8a4b 100644 --- a/src/main/java/com/stripe/param/PaymentMethodConfigurationCreateParams.java +++ b/src/main/java/com/stripe/param/PaymentMethodConfigurationCreateParams.java @@ -258,6 +258,16 @@ public class PaymentMethodConfigurationCreateParams extends ApiRequestParams { @SerializedName("link") Link link; + /** + * MobilePay is a single-use + * card wallet payment method used in Denmark and Finland. It allows customers to authenticate and + * approve payments using the MobilePay app. Check this page for more details. + */ + @SerializedName("mobilepay") + Mobilepay mobilepay; + /** Configuration name. */ @SerializedName("name") String name; @@ -401,6 +411,7 @@ private PaymentMethodConfigurationCreateParams( Klarna klarna, Konbini konbini, Link link, + Mobilepay mobilepay, String name, Oxxo oxxo, P24 p24, @@ -443,6 +454,7 @@ private PaymentMethodConfigurationCreateParams( this.klarna = klarna; this.konbini = konbini; this.link = link; + this.mobilepay = mobilepay; this.name = name; this.oxxo = oxxo; this.p24 = p24; @@ -520,6 +532,8 @@ public static class Builder { private Link link; + private Mobilepay mobilepay; + private String name; private Oxxo oxxo; @@ -579,6 +593,7 @@ public PaymentMethodConfigurationCreateParams build() { this.klarna, this.konbini, this.link, + this.mobilepay, this.name, this.oxxo, this.p24, @@ -937,6 +952,19 @@ public Builder setLink(PaymentMethodConfigurationCreateParams.Link link) { return this; } + /** + * MobilePay is a single-use card wallet + * payment method used in Denmark and Finland. It allows customers to authenticate and + * approve payments using the MobilePay app. Check this page for more details. + */ + public Builder setMobilepay(PaymentMethodConfigurationCreateParams.Mobilepay mobilepay) { + this.mobilepay = mobilepay; + return this; + } + /** Configuration name. */ public Builder setName(String name) { this.name = name; @@ -5338,6 +5366,170 @@ public enum Preference implements ApiRequestParams.EnumParam { } } + @Getter + public static class Mobilepay { + /** Whether or not the payment method should be displayed. */ + @SerializedName("display_preference") + DisplayPreference displayPreference; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Mobilepay(DisplayPreference displayPreference, Map extraParams) { + this.displayPreference = displayPreference; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private DisplayPreference displayPreference; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentMethodConfigurationCreateParams.Mobilepay build() { + return new PaymentMethodConfigurationCreateParams.Mobilepay( + this.displayPreference, this.extraParams); + } + + /** Whether or not the payment method should be displayed. */ + public Builder setDisplayPreference( + PaymentMethodConfigurationCreateParams.Mobilepay.DisplayPreference displayPreference) { + this.displayPreference = displayPreference; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PaymentMethodConfigurationCreateParams.Mobilepay#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PaymentMethodConfigurationCreateParams.Mobilepay#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + + @Getter + public static class DisplayPreference { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The account's preference for whether or not to display this payment method. */ + @SerializedName("preference") + Preference preference; + + private DisplayPreference(Map extraParams, Preference preference) { + this.extraParams = extraParams; + this.preference = preference; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Preference preference; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentMethodConfigurationCreateParams.Mobilepay.DisplayPreference build() { + return new PaymentMethodConfigurationCreateParams.Mobilepay.DisplayPreference( + this.extraParams, this.preference); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentMethodConfigurationCreateParams.Mobilepay.DisplayPreference#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentMethodConfigurationCreateParams.Mobilepay.DisplayPreference#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The account's preference for whether or not to display this payment method. */ + public Builder setPreference( + PaymentMethodConfigurationCreateParams.Mobilepay.DisplayPreference.Preference + preference) { + this.preference = preference; + return this; + } + } + + public enum Preference implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"), + + @SerializedName("off") + OFF("off"), + + @SerializedName("on") + ON("on"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Preference(String value) { + this.value = value; + } + } + } + } + @Getter public static class Oxxo { /** Whether or not the payment method should be displayed. */ diff --git a/src/main/java/com/stripe/param/PaymentMethodConfigurationListParams.java b/src/main/java/com/stripe/param/PaymentMethodConfigurationListParams.java index b78e8051114..49e8e18aed9 100644 --- a/src/main/java/com/stripe/param/PaymentMethodConfigurationListParams.java +++ b/src/main/java/com/stripe/param/PaymentMethodConfigurationListParams.java @@ -16,6 +16,15 @@ public class PaymentMethodConfigurationListParams extends ApiRequestParams { @SerializedName("application") Object application; + /** + * A cursor for use in pagination. {@code ending_before} is an object ID that defines your place + * in the list. For instance, if you make a list request and receive 100 objects, starting with + * {@code obj_bar}, your subsequent call can include {@code ending_before=obj_bar} in order to + * fetch the previous page of the list. + */ + @SerializedName("ending_before") + String endingBefore; + /** Specifies which fields in the response should be expanded. */ @SerializedName("expand") List expand; @@ -29,11 +38,35 @@ public class PaymentMethodConfigurationListParams extends ApiRequestParams { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** + * A limit on the number of objects to be returned. Limit can range between 1 and 100, and the + * default is 10. + */ + @SerializedName("limit") + Long limit; + + /** + * A cursor for use in pagination. {@code starting_after} is an object ID that defines your place + * in the list. For instance, if you make a list request and receive 100 objects, ending with + * {@code obj_foo}, your subsequent call can include {@code starting_after=obj_foo} in order to + * fetch the next page of the list. + */ + @SerializedName("starting_after") + String startingAfter; + private PaymentMethodConfigurationListParams( - Object application, List expand, Map extraParams) { + Object application, + String endingBefore, + List expand, + Map extraParams, + Long limit, + String startingAfter) { this.application = application; + this.endingBefore = endingBefore; this.expand = expand; this.extraParams = extraParams; + this.limit = limit; + this.startingAfter = startingAfter; } public static Builder builder() { @@ -43,14 +76,25 @@ public static Builder builder() { public static class Builder { private Object application; + private String endingBefore; + private List expand; private Map extraParams; + private Long limit; + + private String startingAfter; + /** Finalize and obtain parameter instance from this builder. */ public PaymentMethodConfigurationListParams build() { return new PaymentMethodConfigurationListParams( - this.application, this.expand, this.extraParams); + this.application, + this.endingBefore, + this.expand, + this.extraParams, + this.limit, + this.startingAfter); } /** The Connect application to filter by. */ @@ -65,6 +109,17 @@ public Builder setApplication(EmptyParam application) { return this; } + /** + * A cursor for use in pagination. {@code ending_before} is an object ID that defines your place + * in the list. For instance, if you make a list request and receive 100 objects, starting with + * {@code obj_bar}, your subsequent call can include {@code ending_before=obj_bar} in order to + * fetch the previous page of the list. + */ + public Builder setEndingBefore(String endingBefore) { + this.endingBefore = endingBefore; + return this; + } + /** * Add an element to `expand` list. A list is initialized for the first `add/addAll` call, and * subsequent calls adds additional elements to the original list. See {@link @@ -116,5 +171,25 @@ public Builder putAllExtraParam(Map map) { this.extraParams.putAll(map); return this; } + + /** + * A limit on the number of objects to be returned. Limit can range between 1 and 100, and the + * default is 10. + */ + public Builder setLimit(Long limit) { + this.limit = limit; + return this; + } + + /** + * A cursor for use in pagination. {@code starting_after} is an object ID that defines your + * place in the list. For instance, if you make a list request and receive 100 objects, ending + * with {@code obj_foo}, your subsequent call can include {@code starting_after=obj_foo} in + * order to fetch the next page of the list. + */ + public Builder setStartingAfter(String startingAfter) { + this.startingAfter = startingAfter; + return this; + } } } diff --git a/src/main/java/com/stripe/param/PaymentMethodConfigurationUpdateParams.java b/src/main/java/com/stripe/param/PaymentMethodConfigurationUpdateParams.java index 7edb85ef186..7a4df88b26f 100644 --- a/src/main/java/com/stripe/param/PaymentMethodConfigurationUpdateParams.java +++ b/src/main/java/com/stripe/param/PaymentMethodConfigurationUpdateParams.java @@ -263,6 +263,16 @@ public class PaymentMethodConfigurationUpdateParams extends ApiRequestParams { @SerializedName("link") Link link; + /** + * MobilePay is a single-use + * card wallet payment method used in Denmark and Finland. It allows customers to authenticate and + * approve payments using the MobilePay app. Check this page for more details. + */ + @SerializedName("mobilepay") + Mobilepay mobilepay; + /** Configuration name. */ @SerializedName("name") Object name; @@ -403,6 +413,7 @@ private PaymentMethodConfigurationUpdateParams( Klarna klarna, Konbini konbini, Link link, + Mobilepay mobilepay, Object name, Oxxo oxxo, P24 p24, @@ -445,6 +456,7 @@ private PaymentMethodConfigurationUpdateParams( this.klarna = klarna; this.konbini = konbini; this.link = link; + this.mobilepay = mobilepay; this.name = name; this.oxxo = oxxo; this.p24 = p24; @@ -523,6 +535,8 @@ public static class Builder { private Link link; + private Mobilepay mobilepay; + private Object name; private Oxxo oxxo; @@ -581,6 +595,7 @@ public PaymentMethodConfigurationUpdateParams build() { this.klarna, this.konbini, this.link, + this.mobilepay, this.name, this.oxxo, this.p24, @@ -944,6 +959,19 @@ public Builder setLink(PaymentMethodConfigurationUpdateParams.Link link) { return this; } + /** + * MobilePay is a single-use card wallet + * payment method used in Denmark and Finland. It allows customers to authenticate and + * approve payments using the MobilePay app. Check this page for more details. + */ + public Builder setMobilepay(PaymentMethodConfigurationUpdateParams.Mobilepay mobilepay) { + this.mobilepay = mobilepay; + return this; + } + /** Configuration name. */ public Builder setName(String name) { this.name = name; @@ -5345,6 +5373,170 @@ public enum Preference implements ApiRequestParams.EnumParam { } } + @Getter + public static class Mobilepay { + /** Whether or not the payment method should be displayed. */ + @SerializedName("display_preference") + DisplayPreference displayPreference; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Mobilepay(DisplayPreference displayPreference, Map extraParams) { + this.displayPreference = displayPreference; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private DisplayPreference displayPreference; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentMethodConfigurationUpdateParams.Mobilepay build() { + return new PaymentMethodConfigurationUpdateParams.Mobilepay( + this.displayPreference, this.extraParams); + } + + /** Whether or not the payment method should be displayed. */ + public Builder setDisplayPreference( + PaymentMethodConfigurationUpdateParams.Mobilepay.DisplayPreference displayPreference) { + this.displayPreference = displayPreference; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PaymentMethodConfigurationUpdateParams.Mobilepay#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PaymentMethodConfigurationUpdateParams.Mobilepay#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + + @Getter + public static class DisplayPreference { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The account's preference for whether or not to display this payment method. */ + @SerializedName("preference") + Preference preference; + + private DisplayPreference(Map extraParams, Preference preference) { + this.extraParams = extraParams; + this.preference = preference; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Preference preference; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentMethodConfigurationUpdateParams.Mobilepay.DisplayPreference build() { + return new PaymentMethodConfigurationUpdateParams.Mobilepay.DisplayPreference( + this.extraParams, this.preference); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentMethodConfigurationUpdateParams.Mobilepay.DisplayPreference#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentMethodConfigurationUpdateParams.Mobilepay.DisplayPreference#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The account's preference for whether or not to display this payment method. */ + public Builder setPreference( + PaymentMethodConfigurationUpdateParams.Mobilepay.DisplayPreference.Preference + preference) { + this.preference = preference; + return this; + } + } + + public enum Preference implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"), + + @SerializedName("off") + OFF("off"), + + @SerializedName("on") + ON("on"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Preference(String value) { + this.value = value; + } + } + } + } + @Getter public static class Oxxo { /** Whether or not the payment method should be displayed. */ diff --git a/src/main/java/com/stripe/param/PriceCreateParams.java b/src/main/java/com/stripe/param/PriceCreateParams.java index 27b67eefbf9..90ae7bf8209 100644 --- a/src/main/java/com/stripe/param/PriceCreateParams.java +++ b/src/main/java/com/stripe/param/PriceCreateParams.java @@ -137,8 +137,8 @@ public class PriceCreateParams extends ApiRequestParams { /** * A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much - * to charge. One of {@code unit_amount} or {@code custom_unit_amount} is required, unless {@code - * billing_scheme=tiered}. + * to charge. One of {@code unit_amount}, {@code unit_amount_decimal}, or {@code + * custom_unit_amount} is required, unless {@code billing_scheme=tiered}. */ @SerializedName("unit_amount") Long unitAmount; @@ -508,8 +508,8 @@ public Builder setTransformQuantity(PriceCreateParams.TransformQuantity transfor /** * A positive integer in cents (or local equivalent) (or 0 for a free price) representing how - * much to charge. One of {@code unit_amount} or {@code custom_unit_amount} is required, unless - * {@code billing_scheme=tiered}. + * much to charge. One of {@code unit_amount}, {@code unit_amount_decimal}, or {@code + * custom_unit_amount} is required, unless {@code billing_scheme=tiered}. */ public Builder setUnitAmount(Long unitAmount) { this.unitAmount = unitAmount; diff --git a/src/main/java/com/stripe/param/ProductFeatureCreateParams.java b/src/main/java/com/stripe/param/ProductFeatureCreateParams.java index 3234caa9662..80b9c20653f 100644 --- a/src/main/java/com/stripe/param/ProductFeatureCreateParams.java +++ b/src/main/java/com/stripe/param/ProductFeatureCreateParams.java @@ -12,8 +12,9 @@ @Getter public class ProductFeatureCreateParams extends ApiRequestParams { /** - * Required. The ID of the Feature - * object attached to this product. + * Required. The ID of the Feature object attached to this + * product. */ @SerializedName("entitlement_feature") String entitlementFeature; @@ -55,8 +56,9 @@ public ProductFeatureCreateParams build() { } /** - * Required. The ID of the Feature - * object attached to this product. + * Required. The ID of the Feature object attached to this + * product. */ public Builder setEntitlementFeature(String entitlementFeature) { this.entitlementFeature = entitlementFeature; diff --git a/src/main/java/com/stripe/param/SubscriptionCreateParams.java b/src/main/java/com/stripe/param/SubscriptionCreateParams.java index 071c6f9973b..6527e212f37 100644 --- a/src/main/java/com/stripe/param/SubscriptionCreateParams.java +++ b/src/main/java/com/stripe/param/SubscriptionCreateParams.java @@ -5026,6 +5026,9 @@ public enum PaymentMethodType implements ApiRequestParams.EnumParam { @SerializedName("acss_debit") ACSS_DEBIT("acss_debit"), + @SerializedName("amazon_pay") + AMAZON_PAY("amazon_pay"), + @SerializedName("au_becs_debit") AU_BECS_DEBIT("au_becs_debit"), @@ -5080,6 +5083,9 @@ public enum PaymentMethodType implements ApiRequestParams.EnumParam { @SerializedName("promptpay") PROMPTPAY("promptpay"), + @SerializedName("revolut_pay") + REVOLUT_PAY("revolut_pay"), + @SerializedName("sepa_credit_transfer") SEPA_CREDIT_TRANSFER("sepa_credit_transfer"), diff --git a/src/main/java/com/stripe/param/SubscriptionUpdateParams.java b/src/main/java/com/stripe/param/SubscriptionUpdateParams.java index 0fd988f5832..44959227527 100644 --- a/src/main/java/com/stripe/param/SubscriptionUpdateParams.java +++ b/src/main/java/com/stripe/param/SubscriptionUpdateParams.java @@ -5441,6 +5441,9 @@ public enum PaymentMethodType implements ApiRequestParams.EnumParam { @SerializedName("acss_debit") ACSS_DEBIT("acss_debit"), + @SerializedName("amazon_pay") + AMAZON_PAY("amazon_pay"), + @SerializedName("au_becs_debit") AU_BECS_DEBIT("au_becs_debit"), @@ -5495,6 +5498,9 @@ public enum PaymentMethodType implements ApiRequestParams.EnumParam { @SerializedName("promptpay") PROMPTPAY("promptpay"), + @SerializedName("revolut_pay") + REVOLUT_PAY("revolut_pay"), + @SerializedName("sepa_credit_transfer") SEPA_CREDIT_TRANSFER("sepa_credit_transfer"), diff --git a/src/main/java/com/stripe/param/identity/VerificationSessionCreateParams.java b/src/main/java/com/stripe/param/identity/VerificationSessionCreateParams.java index b7f49e8c15d..6c10b864dff 100644 --- a/src/main/java/com/stripe/param/identity/VerificationSessionCreateParams.java +++ b/src/main/java/com/stripe/param/identity/VerificationSessionCreateParams.java @@ -55,12 +55,16 @@ public class VerificationSessionCreateParams extends ApiRequestParams { /** * The type of verification - * check to be performed. + * check to be performed. You must provide a {@code type} if not passing {@code + * verification_flow}. */ @SerializedName("type") Type type; - /** The ID of a Verification Flow from the Dashboard. */ + /** + * The ID of a Verification Flow from the Dashboard. See + * https://docs.stripe.com/identity/verification-flows. + */ @SerializedName("verification_flow") String verificationFlow; @@ -230,14 +234,18 @@ public Builder setReturnUrl(String returnUrl) { /** * The type of verification - * check to be performed. + * check to be performed. You must provide a {@code type} if not passing {@code + * verification_flow}. */ public Builder setType(VerificationSessionCreateParams.Type type) { this.type = type; return this; } - /** The ID of a Verification Flow from the Dashboard. */ + /** + * The ID of a Verification Flow from the Dashboard. See + * https://docs.stripe.com/identity/verification-flows. + */ public Builder setVerificationFlow(String verificationFlow) { this.verificationFlow = verificationFlow; return this; @@ -253,10 +261,6 @@ public static class Options { @SerializedName("document") Object document; - /** Options that apply to the email check. */ - @SerializedName("email") - Object email; - /** * Map of extra parameters for custom features not available in this client library. The content * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each @@ -266,15 +270,9 @@ public static class Options { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Options that apply to the phone check. */ - @SerializedName("phone") - Object phone; - - private Options(Object document, Object email, Map extraParams, Object phone) { + private Options(Object document, Map extraParams) { this.document = document; - this.email = email; this.extraParams = extraParams; - this.phone = phone; } public static Builder builder() { @@ -284,16 +282,11 @@ public static Builder builder() { public static class Builder { private Object document; - private Object email; - private Map extraParams; - private Object phone; - /** Finalize and obtain parameter instance from this builder. */ public VerificationSessionCreateParams.Options build() { - return new VerificationSessionCreateParams.Options( - this.document, this.email, this.extraParams, this.phone); + return new VerificationSessionCreateParams.Options(this.document, this.extraParams); } /** @@ -316,18 +309,6 @@ public Builder setDocument(EmptyParam document) { return this; } - /** Options that apply to the email check. */ - public Builder setEmail(VerificationSessionCreateParams.Options.Email email) { - this.email = email; - return this; - } - - /** Options that apply to the email check. */ - public Builder setEmail(EmptyParam email) { - this.email = email; - return this; - } - /** * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` * call, and subsequent calls add additional key/value pairs to the original map. See {@link @@ -354,18 +335,6 @@ public Builder putAllExtraParam(Map map) { this.extraParams.putAll(map); return this; } - - /** Options that apply to the phone check. */ - public Builder setPhone(VerificationSessionCreateParams.Options.Phone phone) { - this.phone = phone; - return this; - } - - /** Options that apply to the phone check. */ - public Builder setPhone(EmptyParam phone) { - this.phone = phone; - return this; - } } @Getter @@ -556,148 +525,6 @@ public enum AllowedType implements ApiRequestParams.EnumParam { } } } - - @Getter - public static class Email { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - - /** Request one time password verification of {@code provided_details.email}. */ - @SerializedName("require_verification") - Boolean requireVerification; - - private Email(Map extraParams, Boolean requireVerification) { - this.extraParams = extraParams; - this.requireVerification = requireVerification; - } - - public static Builder builder() { - return new Builder(); - } - - public static class Builder { - private Map extraParams; - - private Boolean requireVerification; - - /** Finalize and obtain parameter instance from this builder. */ - public VerificationSessionCreateParams.Options.Email build() { - return new VerificationSessionCreateParams.Options.Email( - this.extraParams, this.requireVerification); - } - - /** - * 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 VerificationSessionCreateParams.Options.Email#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 VerificationSessionCreateParams.Options.Email#extraParams} for the field - * documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } - - /** Request one time password verification of {@code provided_details.email}. */ - public Builder setRequireVerification(Boolean requireVerification) { - this.requireVerification = requireVerification; - return this; - } - } - } - - @Getter - public static class Phone { - /** - * 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; - - /** Request one time password verification of {@code provided_details.phone}. */ - @SerializedName("require_verification") - Boolean requireVerification; - - private Phone(Map extraParams, Boolean requireVerification) { - this.extraParams = extraParams; - this.requireVerification = requireVerification; - } - - public static Builder builder() { - return new Builder(); - } - - public static class Builder { - private Map extraParams; - - private Boolean requireVerification; - - /** Finalize and obtain parameter instance from this builder. */ - public VerificationSessionCreateParams.Options.Phone build() { - return new VerificationSessionCreateParams.Options.Phone( - this.extraParams, this.requireVerification); - } - - /** - * 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 VerificationSessionCreateParams.Options.Phone#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 VerificationSessionCreateParams.Options.Phone#extraParams} for the field - * documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } - - /** Request one time password verification of {@code provided_details.phone}. */ - public Builder setRequireVerification(Boolean requireVerification) { - this.requireVerification = requireVerification; - return this; - } - } - } } @Getter diff --git a/src/main/java/com/stripe/param/identity/VerificationSessionUpdateParams.java b/src/main/java/com/stripe/param/identity/VerificationSessionUpdateParams.java index 9983bea36d9..a2795f9d122 100644 --- a/src/main/java/com/stripe/param/identity/VerificationSessionUpdateParams.java +++ b/src/main/java/com/stripe/param/identity/VerificationSessionUpdateParams.java @@ -202,10 +202,6 @@ public static class Options { @SerializedName("document") Object document; - /** Options that apply to the email check. */ - @SerializedName("email") - Object email; - /** * Map of extra parameters for custom features not available in this client library. The content * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each @@ -215,15 +211,9 @@ public static class Options { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Options that apply to the phone check. */ - @SerializedName("phone") - Object phone; - - private Options(Object document, Object email, Map extraParams, Object phone) { + private Options(Object document, Map extraParams) { this.document = document; - this.email = email; this.extraParams = extraParams; - this.phone = phone; } public static Builder builder() { @@ -233,16 +223,11 @@ public static Builder builder() { public static class Builder { private Object document; - private Object email; - private Map extraParams; - private Object phone; - /** Finalize and obtain parameter instance from this builder. */ public VerificationSessionUpdateParams.Options build() { - return new VerificationSessionUpdateParams.Options( - this.document, this.email, this.extraParams, this.phone); + return new VerificationSessionUpdateParams.Options(this.document, this.extraParams); } /** @@ -265,18 +250,6 @@ public Builder setDocument(EmptyParam document) { return this; } - /** Options that apply to the email check. */ - public Builder setEmail(VerificationSessionUpdateParams.Options.Email email) { - this.email = email; - return this; - } - - /** Options that apply to the email check. */ - public Builder setEmail(EmptyParam email) { - this.email = email; - return this; - } - /** * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` * call, and subsequent calls add additional key/value pairs to the original map. See {@link @@ -303,18 +276,6 @@ public Builder putAllExtraParam(Map map) { this.extraParams.putAll(map); return this; } - - /** Options that apply to the phone check. */ - public Builder setPhone(VerificationSessionUpdateParams.Options.Phone phone) { - this.phone = phone; - return this; - } - - /** Options that apply to the phone check. */ - public Builder setPhone(EmptyParam phone) { - this.phone = phone; - return this; - } } @Getter @@ -505,148 +466,6 @@ public enum AllowedType implements ApiRequestParams.EnumParam { } } } - - @Getter - public static class Email { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - - /** Request one time password verification of {@code provided_details.email}. */ - @SerializedName("require_verification") - Boolean requireVerification; - - private Email(Map extraParams, Boolean requireVerification) { - this.extraParams = extraParams; - this.requireVerification = requireVerification; - } - - public static Builder builder() { - return new Builder(); - } - - public static class Builder { - private Map extraParams; - - private Boolean requireVerification; - - /** Finalize and obtain parameter instance from this builder. */ - public VerificationSessionUpdateParams.Options.Email build() { - return new VerificationSessionUpdateParams.Options.Email( - this.extraParams, this.requireVerification); - } - - /** - * 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 VerificationSessionUpdateParams.Options.Email#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 VerificationSessionUpdateParams.Options.Email#extraParams} for the field - * documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } - - /** Request one time password verification of {@code provided_details.email}. */ - public Builder setRequireVerification(Boolean requireVerification) { - this.requireVerification = requireVerification; - return this; - } - } - } - - @Getter - public static class Phone { - /** - * 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; - - /** Request one time password verification of {@code provided_details.phone}. */ - @SerializedName("require_verification") - Boolean requireVerification; - - private Phone(Map extraParams, Boolean requireVerification) { - this.extraParams = extraParams; - this.requireVerification = requireVerification; - } - - public static Builder builder() { - return new Builder(); - } - - public static class Builder { - private Map extraParams; - - private Boolean requireVerification; - - /** Finalize and obtain parameter instance from this builder. */ - public VerificationSessionUpdateParams.Options.Phone build() { - return new VerificationSessionUpdateParams.Options.Phone( - this.extraParams, this.requireVerification); - } - - /** - * 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 VerificationSessionUpdateParams.Options.Phone#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 VerificationSessionUpdateParams.Options.Phone#extraParams} for the field - * documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } - - /** Request one time password verification of {@code provided_details.phone}. */ - public Builder setRequireVerification(Boolean requireVerification) { - this.requireVerification = requireVerification; - return this; - } - } - } } @Getter diff --git a/src/main/java/com/stripe/service/AccountExternalAccountService.java b/src/main/java/com/stripe/service/AccountExternalAccountService.java index 0fcd47505f1..8b722513ca7 100644 --- a/src/main/java/com/stripe/service/AccountExternalAccountService.java +++ b/src/main/java/com/stripe/service/AccountExternalAccountService.java @@ -78,8 +78,13 @@ public ExternalAccount retrieve( } /** * Updates the metadata, account holder name, account holder type of a bank account belonging to a - * Custom account, and optionally - * sets it as the default for its currency. Other bank account details are not editable by design. + * connected account and optionally sets it as the default for its currency. Other bank account + * details are not editable by design. + * + *

You can only update bank accounts when account.controller.requirement_collection + * is {@code application}, which includes Custom accounts. * *

You can re-enable a disabled bank account by performing an update call without providing any * arguments or changes. @@ -90,8 +95,13 @@ public ExternalAccount update( } /** * Updates the metadata, account holder name, account holder type of a bank account belonging to a - * Custom account, and optionally - * sets it as the default for its currency. Other bank account details are not editable by design. + * connected account and optionally sets it as the default for its currency. Other bank account + * details are not editable by design. + * + *

You can only update bank accounts when account.controller.requirement_collection + * is {@code application}, which includes Custom accounts. * *

You can re-enable a disabled bank account by performing an update call without providing any * arguments or changes. @@ -102,8 +112,13 @@ public ExternalAccount update(String account, String id, RequestOptions options) } /** * Updates the metadata, account holder name, account holder type of a bank account belonging to a - * Custom account, and optionally - * sets it as the default for its currency. Other bank account details are not editable by design. + * connected account and optionally sets it as the default for its currency. Other bank account + * details are not editable by design. + * + *

You can only update bank accounts when account.controller.requirement_collection + * is {@code application}, which includes Custom accounts. * *

You can re-enable a disabled bank account by performing an update call without providing any * arguments or changes. @@ -113,8 +128,13 @@ public ExternalAccount update(String account, String id) throws StripeException } /** * Updates the metadata, account holder name, account holder type of a bank account belonging to a - * Custom account, and optionally - * sets it as the default for its currency. Other bank account details are not editable by design. + * connected account and optionally sets it as the default for its currency. Other bank account + * details are not editable by design. + * + *

You can only update bank accounts when account.controller.requirement_collection + * is {@code application}, which includes Custom accounts. * *

You can re-enable a disabled bank account by performing an update call without providing any * arguments or changes. diff --git a/src/main/java/com/stripe/service/AccountLoginLinkService.java b/src/main/java/com/stripe/service/AccountLoginLinkService.java index 9ce2f478e83..47f91d1a9c5 100644 --- a/src/main/java/com/stripe/service/AccountLoginLinkService.java +++ b/src/main/java/com/stripe/service/AccountLoginLinkService.java @@ -19,42 +19,42 @@ public AccountLoginLinkService(StripeResponseGetter responseGetter) { } /** - * Creates a single-use login link for an Express account to access their Stripe dashboard. + * Creates a single-use login link for a connected account to access the Express Dashboard. * - *

You may only create login links for Express accounts connected to your - * platform. + *

You can only create login links for accounts that use the Express Dashboard and are connected to + * your platform. */ public LoginLink create(String account, AccountLoginLinkCreateParams params) throws StripeException { return create(account, params, (RequestOptions) null); } /** - * Creates a single-use login link for an Express account to access their Stripe dashboard. + * Creates a single-use login link for a connected account to access the Express Dashboard. * - *

You may only create login links for Express accounts connected to your - * platform. + *

You can only create login links for accounts that use the Express Dashboard and are connected to + * your platform. */ public LoginLink create(String account, RequestOptions options) throws StripeException { return create(account, (AccountLoginLinkCreateParams) null, options); } /** - * Creates a single-use login link for an Express account to access their Stripe dashboard. + * Creates a single-use login link for a connected account to access the Express Dashboard. * - *

You may only create login links for Express accounts connected to your - * platform. + *

You can only create login links for accounts that use the Express Dashboard and are connected to + * your platform. */ public LoginLink create(String account) throws StripeException { return create(account, (AccountLoginLinkCreateParams) null, (RequestOptions) null); } /** - * Creates a single-use login link for an Express account to access their Stripe dashboard. + * Creates a single-use login link for a connected account to access the Express Dashboard. * - *

You may only create login links for Express accounts connected to your - * platform. + *

You can only create login links for accounts that use the Express Dashboard and are connected to + * your platform. */ public LoginLink create( String account, AccountLoginLinkCreateParams params, RequestOptions options) diff --git a/src/main/java/com/stripe/service/AccountService.java b/src/main/java/com/stripe/service/AccountService.java index 588f148642a..d9f59b62281 100644 --- a/src/main/java/com/stripe/service/AccountService.java +++ b/src/main/java/com/stripe/service/AccountService.java @@ -26,11 +26,14 @@ public AccountService(StripeResponseGetter responseGetter) { } /** - * With Connect, you can delete accounts you manage. + * With Connect, you can delete accounts you manage. * - *

Accounts created using test-mode keys can be deleted at any time. Standard accounts created - * using live-mode keys cannot be deleted. Custom or Express accounts created using live-mode keys - * can only be deleted once all balances are zero. + *

Test-mode accounts can be deleted at any time. + * + *

Live-mode accounts where Stripe is responsible for negative account balances cannot be + * deleted, which includes Standard accounts. Live-mode accounts where your platform is liable for + * negative account balances, which includes Custom and Express accounts, can be deleted when all + * balances are zero. * *

If you want to delete your own account, use the account information tab in your account @@ -40,11 +43,14 @@ public Account delete(String account) throws StripeException { return delete(account, (RequestOptions) null); } /** - * With Connect, you can delete accounts you manage. + * With Connect, you can delete accounts you manage. + * + *

Test-mode accounts can be deleted at any time. * - *

Accounts created using test-mode keys can be deleted at any time. Standard accounts created - * using live-mode keys cannot be deleted. Custom or Express accounts created using live-mode keys - * can only be deleted once all balances are zero. + *

Live-mode accounts where Stripe is responsible for negative account balances cannot be + * deleted, which includes Standard accounts. Live-mode accounts where your platform is liable for + * negative account balances, which includes Custom and Express accounts, can be deleted when all + * balances are zero. * *

If you want to delete your own account, use the account information tab in your account @@ -84,14 +90,20 @@ public Account retrieve(String account, AccountRetrieveParams params, RequestOpt return this.request(request, Account.class); } /** - * Updates a connected account by setting - * the values of the parameters passed. Any parameters not provided are left unchanged. + * Updates a connected account by setting the + * values of the parameters passed. Any parameters not provided are left unchanged. + * + *

For accounts where controller.requirement_collection + * is {@code application}, which includes Custom accounts, you can update any information on the + * account. * - *

For Custom accounts, you can update any information on the account. For other accounts, you - * can update all information until that account has started to go through Connect Onboarding. - * Once you create an Account Link or Account Session, some properties can - * only be changed or updated for Custom accounts. + *

For accounts where controller.requirement_collection + * is {@code stripe}, which includes Standard and Express accounts, you can update all information + * until you create an Account Link or Account Session to start Connect onboarding, + * after which some properties can no longer be updated. * *

To update your own account, use the Dashboard. Refer to our connected account by setting - * the values of the parameters passed. Any parameters not provided are left unchanged. + * Updates a connected account by setting the + * values of the parameters passed. Any parameters not provided are left unchanged. * - *

For Custom accounts, you can update any information on the account. For other accounts, you - * can update all information until that account has started to go through Connect Onboarding. - * Once you create an Account Link or Account Session, some properties can - * only be changed or updated for Custom accounts. + *

For accounts where controller.requirement_collection + * is {@code application}, which includes Custom accounts, you can update any information on the + * account. + * + *

For accounts where controller.requirement_collection + * is {@code stripe}, which includes Standard and Express accounts, you can update all information + * until you create an Account Link or Account Session to start Connect onboarding, + * after which some properties can no longer be updated. * *

To update your own account, use the Dashboard. Refer to our connected account by setting - * the values of the parameters passed. Any parameters not provided are left unchanged. + * Updates a connected account by setting the + * values of the parameters passed. Any parameters not provided are left unchanged. + * + *

For accounts where controller.requirement_collection + * is {@code application}, which includes Custom accounts, you can update any information on the + * account. * - *

For Custom accounts, you can update any information on the account. For other accounts, you - * can update all information until that account has started to go through Connect Onboarding. - * Once you create an Account Link or Account Session, some properties can - * only be changed or updated for Custom accounts. + *

For accounts where controller.requirement_collection + * is {@code stripe}, which includes Standard and Express accounts, you can update all information + * until you create an Account Link or Account Session to start Connect onboarding, + * after which some properties can no longer be updated. * *

To update your own account, use the Dashboard. Refer to our connected account by setting - * the values of the parameters passed. Any parameters not provided are left unchanged. + * Updates a connected account by setting the + * values of the parameters passed. Any parameters not provided are left unchanged. + * + *

For accounts where controller.requirement_collection + * is {@code application}, which includes Custom accounts, you can update any information on the + * account. * - *

For Custom accounts, you can update any information on the account. For other accounts, you - * can update all information until that account has started to go through Connect Onboarding. - * Once you create an Account Link or Account Session, some properties can - * only be changed or updated for Custom accounts. + *

For accounts where controller.requirement_collection + * is {@code stripe}, which includes Standard and Express accounts, you can update all information + * until you create an Account Link or Account Session to start Connect onboarding, + * after which some properties can no longer be updated. * *

To update your own account, use the Dashboard. Refer to our Connect, you may flag accounts as - * suspicious. + * With Connect, you can reject accounts that you have + * flagged as suspicious. * - *

Test-mode Custom and Express accounts can be rejected at any time. Accounts created using - * live-mode keys may only be rejected once all balances are zero. + *

Only accounts where your platform is liable for negative account balances, which includes + * Custom and Express accounts, can be rejected. Test-mode accounts can be rejected at any time. + * Live-mode accounts can only be rejected after all balances are zero. */ public Account reject(String account, AccountRejectParams params) throws StripeException { return reject(account, params, (RequestOptions) null); } /** - * With Connect, you may flag accounts as - * suspicious. + * With Connect, you can reject accounts that you have + * flagged as suspicious. * - *

Test-mode Custom and Express accounts can be rejected at any time. Accounts created using - * live-mode keys may only be rejected once all balances are zero. + *

Only accounts where your platform is liable for negative account balances, which includes + * Custom and Express accounts, can be rejected. Test-mode accounts can be rejected at any time. + * Live-mode accounts can only be rejected after all balances are zero. */ public Account reject(String account, AccountRejectParams params, RequestOptions options) throws StripeException { diff --git a/src/main/java/com/stripe/service/EventService.java b/src/main/java/com/stripe/service/EventService.java index 8a91e4ec0cb..c64a00c9c18 100644 --- a/src/main/java/com/stripe/service/EventService.java +++ b/src/main/java/com/stripe/service/EventService.java @@ -24,7 +24,7 @@ public EventService(StripeResponseGetter responseGetter) { /** * List events, going back up to 30 days. Each event data is rendered according to Stripe API * version at its creation time, specified in event object {@code api_version} attribute + * href="https://docs.stripe.com/api/events/object">event object {@code api_version} attribute * (not according to your current Stripe API version or {@code Stripe-Version} header). */ public StripeCollection list(EventListParams params) throws StripeException { @@ -33,7 +33,7 @@ public StripeCollection list(EventListParams params) throws StripeExcepti /** * List events, going back up to 30 days. Each event data is rendered according to Stripe API * version at its creation time, specified in event object {@code api_version} attribute + * href="https://docs.stripe.com/api/events/object">event object {@code api_version} attribute * (not according to your current Stripe API version or {@code Stripe-Version} header). */ public StripeCollection list(RequestOptions options) throws StripeException { @@ -42,7 +42,7 @@ public StripeCollection list(RequestOptions options) throws StripeExcepti /** * List events, going back up to 30 days. Each event data is rendered according to Stripe API * version at its creation time, specified in event object {@code api_version} attribute + * href="https://docs.stripe.com/api/events/object">event object {@code api_version} attribute * (not according to your current Stripe API version or {@code Stripe-Version} header). */ public StripeCollection list() throws StripeException { @@ -51,7 +51,7 @@ public StripeCollection list() throws StripeException { /** * List events, going back up to 30 days. Each event data is rendered according to Stripe API * version at its creation time, specified in event object {@code api_version} attribute + * href="https://docs.stripe.com/api/events/object">event object {@code api_version} attribute * (not according to your current Stripe API version or {@code Stripe-Version} header). */ public StripeCollection list(EventListParams params, RequestOptions options) diff --git a/src/main/java/com/stripe/service/InvoiceService.java b/src/main/java/com/stripe/service/InvoiceService.java index f3dc032fe7b..9842605455f 100644 --- a/src/main/java/com/stripe/service/InvoiceService.java +++ b/src/main/java/com/stripe/service/InvoiceService.java @@ -270,10 +270,10 @@ public StripeSearchResult search(InvoiceSearchParams params, RequestOpt * *

You can preview the effects of updating a subscription, including a preview of what * proration will take place. To ensure that the actual proration is calculated exactly the same - * as the previewed proration, you should pass the {@code subscription_proration_date} parameter - * when doing the actual subscription update. The recommended way to get only the prorations being - * previewed is to consider only proration line items where {@code period[start]} is equal to the - * {@code subscription_proration_date} value passed in the request. + * as the previewed proration, you should pass the {@code subscription_details.proration_date} + * parameter when doing the actual subscription update. The recommended way to get only the + * prorations being previewed is to consider only proration line items where {@code period[start]} + * is equal to the {@code subscription_details.proration_date} value passed in the request. */ public Invoice upcoming(InvoiceUpcomingParams params) throws StripeException { return upcoming(params, (RequestOptions) null); @@ -291,10 +291,10 @@ public Invoice upcoming(InvoiceUpcomingParams params) throws StripeException { * *

You can preview the effects of updating a subscription, including a preview of what * proration will take place. To ensure that the actual proration is calculated exactly the same - * as the previewed proration, you should pass the {@code subscription_proration_date} parameter - * when doing the actual subscription update. The recommended way to get only the prorations being - * previewed is to consider only proration line items where {@code period[start]} is equal to the - * {@code subscription_proration_date} value passed in the request. + * as the previewed proration, you should pass the {@code subscription_details.proration_date} + * parameter when doing the actual subscription update. The recommended way to get only the + * prorations being previewed is to consider only proration line items where {@code period[start]} + * is equal to the {@code subscription_details.proration_date} value passed in the request. */ public Invoice upcoming(RequestOptions options) throws StripeException { return upcoming((InvoiceUpcomingParams) null, options); @@ -312,10 +312,10 @@ public Invoice upcoming(RequestOptions options) throws StripeException { * *

You can preview the effects of updating a subscription, including a preview of what * proration will take place. To ensure that the actual proration is calculated exactly the same - * as the previewed proration, you should pass the {@code subscription_proration_date} parameter - * when doing the actual subscription update. The recommended way to get only the prorations being - * previewed is to consider only proration line items where {@code period[start]} is equal to the - * {@code subscription_proration_date} value passed in the request. + * as the previewed proration, you should pass the {@code subscription_details.proration_date} + * parameter when doing the actual subscription update. The recommended way to get only the + * prorations being previewed is to consider only proration line items where {@code period[start]} + * is equal to the {@code subscription_details.proration_date} value passed in the request. */ public Invoice upcoming() throws StripeException { return upcoming((InvoiceUpcomingParams) null, (RequestOptions) null); @@ -333,10 +333,10 @@ public Invoice upcoming() throws StripeException { * *

You can preview the effects of updating a subscription, including a preview of what * proration will take place. To ensure that the actual proration is calculated exactly the same - * as the previewed proration, you should pass the {@code subscription_proration_date} parameter - * when doing the actual subscription update. The recommended way to get only the prorations being - * previewed is to consider only proration line items where {@code period[start]} is equal to the - * {@code subscription_proration_date} value passed in the request. + * as the previewed proration, you should pass the {@code subscription_details.proration_date} + * parameter when doing the actual subscription update. The recommended way to get only the + * prorations being previewed is to consider only proration line items where {@code period[start]} + * is equal to the {@code subscription_details.proration_date} value passed in the request. */ public Invoice upcoming(InvoiceUpcomingParams params, RequestOptions options) throws StripeException { diff --git a/src/main/java/com/stripe/service/TokenService.java b/src/main/java/com/stripe/service/TokenService.java index 9913bec3797..1d325d99d4f 100644 --- a/src/main/java/com/stripe/service/TokenService.java +++ b/src/main/java/com/stripe/service/TokenService.java @@ -48,7 +48,10 @@ public Token retrieve(String token, TokenRetrieveParams params, RequestOptions o /** * Creates a single-use token that represents a bank account’s details. You can use this token * with any API method in place of a bank account dictionary. You can only use this token once. To - * do so, attach it to a Custom account. + * do so, attach it to a connected account + * where controller.requirement_collection + * is {@code application}, which includes Custom accounts. */ public Token create(TokenCreateParams params) throws StripeException { return create(params, (RequestOptions) null); @@ -56,7 +59,10 @@ public Token create(TokenCreateParams params) throws StripeException { /** * Creates a single-use token that represents a bank account’s details. You can use this token * with any API method in place of a bank account dictionary. You can only use this token once. To - * do so, attach it to a Custom account. + * do so, attach it to a connected account + * where controller.requirement_collection + * is {@code application}, which includes Custom accounts. */ public Token create(RequestOptions options) throws StripeException { return create((TokenCreateParams) null, options); @@ -64,7 +70,10 @@ public Token create(RequestOptions options) throws StripeException { /** * Creates a single-use token that represents a bank account’s details. You can use this token * with any API method in place of a bank account dictionary. You can only use this token once. To - * do so, attach it to a Custom account. + * do so, attach it to a connected account + * where controller.requirement_collection + * is {@code application}, which includes Custom accounts. */ public Token create() throws StripeException { return create((TokenCreateParams) null, (RequestOptions) null); @@ -72,7 +81,10 @@ public Token create() throws StripeException { /** * Creates a single-use token that represents a bank account’s details. You can use this token * with any API method in place of a bank account dictionary. You can only use this token once. To - * do so, attach it to a Custom account. + * do so, attach it to a connected account + * where controller.requirement_collection + * is {@code application}, which includes Custom accounts. */ public Token create(TokenCreateParams params, RequestOptions options) throws StripeException { String path = "/v1/tokens";