Skip to content

Commit

Permalink
Merge pull request #1735 from stripe/latest-codegen-beta
Browse files Browse the repository at this point in the history
Update generated code for beta
  • Loading branch information
stripe-openapi[bot] committed Jan 25, 2024
2 parents 3d412d3 + 163e3b5 commit d651c21
Show file tree
Hide file tree
Showing 55 changed files with 20,103 additions and 423 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# Changelog

## 24.13.0 - 2024-01-25
* [#1736](https://github.com/stripe/stripe-java/pull/1736) Update generated code
* Add support for `annual_revenue` and `estimated_worker_count` on `Account.business_profile`, `Account.CreateParams.business_profile`, and `Account.UpdateParams.business_profile`
* Add support for new value `registered_charity` on enums `Account.CreateParams.company.structure`, `Account.UpdateParams.company.structure`, and `Token.CreateParams.account.company.structure`
* Add support for `collection_options` on `AccountLink.CreateParams`
* Add support for `liability` on `Checkout.Session.automatic_tax`, `PaymentLink.automatic_tax`, `PaymentLink.CreateParams.automatic_tax`, `PaymentLink.UpdateParams.automatic_tax`, `Quote.automatic_tax`, `Quote.CreateParams.automatic_tax`, `Quote.UpdateParams.automatic_tax`, `SubscriptionSchedule.default_settings.automatic_tax`, `SubscriptionSchedule.phases[].automatic_tax`, `SubscriptionSchedule.CreateParams.default_settings.automatic_tax`, `SubscriptionSchedule.CreateParams.phases[].automatic_tax`, `SubscriptionSchedule.UpdateParams.default_settings.automatic_tax`, `SubscriptionSchedule.UpdateParams.phases[].automatic_tax`, and `checkout.Session.CreateParams.automatic_tax`
* Add support for `issuer` on `Checkout.Session.invoice_creation.invoice_data`, `PaymentLink.invoice_creation.invoice_data`, `PaymentLink.CreateParams.invoice_creation.invoice_data`, `PaymentLink.UpdateParams.invoice_creation.invoice_data`, `Quote.invoice_settings`, `Quote.CreateParams.invoice_settings`, `Quote.UpdateParams.invoice_settings`, `SubscriptionSchedule.default_settings.invoice_settings`, `SubscriptionSchedule.phases[].invoice_settings`, `SubscriptionSchedule.CreateParams.default_settings.invoice_settings`, `SubscriptionSchedule.CreateParams.phases[].invoice_settings`, `SubscriptionSchedule.UpdateParams.default_settings.invoice_settings`, `SubscriptionSchedule.UpdateParams.phases[].invoice_settings`, and `checkout.Session.CreateParams.invoice_creation.invoice_data`
* Add support for `invoice_settings` on `PaymentLink.subscription_data`, `PaymentLink.CreateParams.subscription_data`, `PaymentLink.UpdateParams.subscription_data`, and `checkout.Session.CreateParams.subscription_data`
* Add support for new value `challenge` on enums `Invoice.CreateParams.payment_settings.payment_method_options.card.request_three_d_secure`, `Invoice.UpdateParams.payment_settings.payment_method_options.card.request_three_d_secure`, `Subscription.CreateParams.payment_settings.payment_method_options.card.request_three_d_secure`, and `Subscription.UpdateParams.payment_settings.payment_method_options.card.request_three_d_secure`
* Add support for `promotion_code` on `Invoice.UpcomingLinesParams.discounts[]`, `Invoice.UpcomingLinesParams.invoice_items[].discounts[]`, `Invoice.UpcomingParams.discounts[]`, and `Invoice.UpcomingParams.invoice_items[].discounts[]`
* Add support for `account_type` on `PaymentMethod.UpdateParams.us_bank_account`

## 24.13.0-beta.1 - 2024-01-18
* [#1734](https://github.com/stripe/stripe-java/pull/1734) Update generated code for beta
Release specs are identical.
Expand Down
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v767
v796
86 changes: 65 additions & 21 deletions src/main/java/com/stripe/model/Account.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@
*
* <p>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 <a href="https://stripe.com/docs/api/account_links">Account Link</a> for a Standard or
* Express account, some parameters are no longer returned. These are marked as <strong>Custom
* Only</strong> or <strong>Custom and Express</strong> below. Learn about the differences <a
* create an <a href="https://stripe.com/docs/api/account_links">Account Link</a> or <a
* href="https://stripe.com/docs/api/account_sessions">Account Session</a>, some properties are only
* returned for Custom accounts. Learn about the differences <a
* href="https://stripe.com/docs/connect/accounts">between accounts</a>.
*/
@Getter
Expand All @@ -44,7 +44,10 @@ public class Account extends ApiResource implements MetadataStore<Account>, Paym
BusinessProfile businessProfile;

/**
* The business type.
* The business type. Once you create an <a
* href="https://stripe.com/docs/api/account_links">Account Link</a> or <a
* href="https://stripe.com/docs/api/account_sessions">Account Session</a>, this property is only
* returned for Custom accounts.
*
* <p>One of {@code company}, {@code government_entity}, {@code individual}, or {@code
* non_profit}.
Expand Down Expand Up @@ -99,7 +102,10 @@ public class Account extends ApiResource implements MetadataStore<Account>, Paym
@SerializedName("email")
String email;

/** External accounts (bank accounts and debit cards) currently attached to this account. */
/**
* External accounts (bank accounts and debit cards) currently attached to this account. External
* accounts are only returned for requests where {@code controller[is_controller]} is true.
*/
@SerializedName("external_accounts")
ExternalAccountCollection externalAccounts;

Expand Down Expand Up @@ -601,9 +607,9 @@ public static Account retrieve(AccountRetrieveParams params, RequestOptions opti
*
* <p>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 <a href="https://stripe.com/docs/api/account_links">Account Link</a> for a
* Standard or Express account, some parameters can no longer be changed. These are marked as
* <strong>Custom Only</strong> or <strong>Custom and Express</strong> below.
* Once you create an <a href="https://stripe.com/docs/api/account_links">Account Link</a> or <a
* href="https://stripe.com/docs/api/account_sessions">Account Session</a>, some properties can
* only be changed or updated for Custom accounts.
*
* <p>To update your own account, use the <a
* href="https://dashboard.stripe.com/settings/account">Dashboard</a>. Refer to our <a
Expand All @@ -621,9 +627,9 @@ public Account update(Map<String, Object> params) throws StripeException {
*
* <p>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 <a href="https://stripe.com/docs/api/account_links">Account Link</a> for a
* Standard or Express account, some parameters can no longer be changed. These are marked as
* <strong>Custom Only</strong> or <strong>Custom and Express</strong> below.
* Once you create an <a href="https://stripe.com/docs/api/account_links">Account Link</a> or <a
* href="https://stripe.com/docs/api/account_sessions">Account Session</a>, some properties can
* only be changed or updated for Custom accounts.
*
* <p>To update your own account, use the <a
* href="https://dashboard.stripe.com/settings/account">Dashboard</a>. Refer to our <a
Expand All @@ -645,9 +651,9 @@ public Account update(Map<String, Object> params, RequestOptions options) throws
*
* <p>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 <a href="https://stripe.com/docs/api/account_links">Account Link</a> for a
* Standard or Express account, some parameters can no longer be changed. These are marked as
* <strong>Custom Only</strong> or <strong>Custom and Express</strong> below.
* Once you create an <a href="https://stripe.com/docs/api/account_links">Account Link</a> or <a
* href="https://stripe.com/docs/api/account_sessions">Account Session</a>, some properties can
* only be changed or updated for Custom accounts.
*
* <p>To update your own account, use the <a
* href="https://dashboard.stripe.com/settings/account">Dashboard</a>. Refer to our <a
Expand All @@ -664,9 +670,9 @@ public Account update(AccountUpdateParams params) throws StripeException {
*
* <p>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 <a href="https://stripe.com/docs/api/account_links">Account Link</a> for a
* Standard or Express account, some parameters can no longer be changed. These are marked as
* <strong>Custom Only</strong> or <strong>Custom and Express</strong> below.
* Once you create an <a href="https://stripe.com/docs/api/account_links">Account Link</a> or <a
* href="https://stripe.com/docs/api/account_sessions">Account Session</a>, some properties can
* only be changed or updated for Custom accounts.
*
* <p>To update your own account, use the <a
* href="https://dashboard.stripe.com/settings/account">Dashboard</a>. Refer to our <a
Expand All @@ -691,6 +697,17 @@ public Account update(AccountUpdateParams params, RequestOptions options) throws
@Setter
@EqualsAndHashCode(callSuper = false)
public static class BusinessProfile extends StripeObject {
/** The applicant's gross annual revenue for its preceding fiscal year. */
@SerializedName("annual_revenue")
AnnualRevenue annualRevenue;

/**
* An estimated upper bound of employees, contractors, vendors, etc. currently working for the
* business.
*/
@SerializedName("estimated_worker_count")
Long estimatedWorkerCount;

/**
* <a href="https://stripe.com/docs/connect/setting-mcc">The merchant category code for the
* account</a>. MCCs are used to classify businesses based on the goods or services they
Expand Down Expand Up @@ -733,6 +750,33 @@ public static class BusinessProfile extends StripeObject {
@SerializedName("url")
String url;

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class AnnualRevenue extends StripeObject {
/**
* A non-negative integer representing the amount in the <a
* href="https://stripe.com/docs/currencies#zero-decimal">smallest currency unit</a>.
*/
@SerializedName("amount")
Long amount;

/**
* Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency
* code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported
* currency</a>.
*/
@SerializedName("currency")
String currency;

/**
* The close-out date of the preceding fiscal year in ISO 8601 format. E.g. 2023-12-31 for the
* 31st of December, 2023.
*/
@SerializedName("fiscal_year_end")
String fiscalYearEnd;
}

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
Expand Down Expand Up @@ -1187,10 +1231,10 @@ public static class Company extends StripeObject {
* {@code incorporated_partnership}, {@code limited_liability_partnership}, {@code llc}, {@code
* multi_member_llc}, {@code private_company}, {@code private_corporation}, {@code
* private_partnership}, {@code public_company}, {@code public_corporation}, {@code
* public_partnership}, {@code single_member_llc}, {@code sole_establishment}, {@code
* sole_proprietorship}, {@code tax_exempt_government_instrumentality}, {@code
* unincorporated_association}, {@code unincorporated_non_profit}, or {@code
* unincorporated_partnership}.
* public_partnership}, {@code registered_charity}, {@code single_member_llc}, {@code
* sole_establishment}, {@code sole_proprietorship}, {@code
* tax_exempt_government_instrumentality}, {@code unincorporated_association}, {@code
* unincorporated_non_profit}, or {@code unincorporated_partnership}.
*/
@SerializedName("structure")
String structure;
Expand Down
32 changes: 16 additions & 16 deletions src/main/java/com/stripe/model/Charge.java
Original file line number Diff line number Diff line change
Expand Up @@ -659,20 +659,20 @@ public Charge capture(ChargeCaptureParams params, RequestOptions options) throws
}

/**
* Use the <a href="https://stripe.com/docs/api/payment_intents">Payment Intents API</a> to
* initiate a new payment instead of using this method. Confirmation of the PaymentIntent creates
* the {@code Charge} object used to request payment, so this method is limited to legacy
* integrations.
* This method is no longer recommended—use the <a
* href="https://stripe.com/docs/api/payment_intents">Payment Intents API</a> to initiate a new
* payment instead. Confirmation of the PaymentIntent creates the {@code Charge} object used to
* request payment.
*/
public static Charge create(Map<String, Object> params) throws StripeException {
return create(params, (RequestOptions) null);
}

/**
* Use the <a href="https://stripe.com/docs/api/payment_intents">Payment Intents API</a> to
* initiate a new payment instead of using this method. Confirmation of the PaymentIntent creates
* the {@code Charge} object used to request payment, so this method is limited to legacy
* integrations.
* This method is no longer recommended—use the <a
* href="https://stripe.com/docs/api/payment_intents">Payment Intents API</a> to initiate a new
* payment instead. Confirmation of the PaymentIntent creates the {@code Charge} object used to
* request payment.
*/
public static Charge create(Map<String, Object> params, RequestOptions options)
throws StripeException {
Expand All @@ -684,20 +684,20 @@ public static Charge create(Map<String, Object> params, RequestOptions options)
}

/**
* Use the <a href="https://stripe.com/docs/api/payment_intents">Payment Intents API</a> to
* initiate a new payment instead of using this method. Confirmation of the PaymentIntent creates
* the {@code Charge} object used to request payment, so this method is limited to legacy
* integrations.
* This method is no longer recommended—use the <a
* href="https://stripe.com/docs/api/payment_intents">Payment Intents API</a> to initiate a new
* payment instead. Confirmation of the PaymentIntent creates the {@code Charge} object used to
* request payment.
*/
public static Charge create(ChargeCreateParams params) throws StripeException {
return create(params, (RequestOptions) null);
}

/**
* Use the <a href="https://stripe.com/docs/api/payment_intents">Payment Intents API</a> to
* initiate a new payment instead of using this method. Confirmation of the PaymentIntent creates
* the {@code Charge} object used to request payment, so this method is limited to legacy
* integrations.
* This method is no longer recommended—use the <a
* href="https://stripe.com/docs/api/payment_intents">Payment Intents API</a> to initiate a new
* payment instead. Confirmation of the PaymentIntent creates the {@code Charge} object used to
* request payment.
*/
public static Charge create(ChargeCreateParams params, RequestOptions options)
throws StripeException {
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/com/stripe/model/CustomerSession.java
Original file line number Diff line number Diff line change
Expand Up @@ -182,31 +182,31 @@ public static class Features extends StripeObject {
/**
* Controls whether the Payment Element allows the removal of a saved payment method.
*
* <p>One of {@code auto}, or {@code never}.
* <p>One of {@code disabled}, or {@code enabled}.
*/
@SerializedName("payment_method_remove")
String paymentMethodRemove;

/**
* Controls whether the Payment Element offers to save a new payment method.
*
* <p>One of {@code auto}, or {@code never}.
* <p>One of {@code disabled}, or {@code enabled}.
*/
@SerializedName("payment_method_save")
String paymentMethodSave;

/**
* Controls whether the Payment Element offers to set a payment method as the default.
*
* <p>One of {@code auto}, or {@code never}.
* <p>One of {@code disabled}, or {@code enabled}.
*/
@SerializedName("payment_method_set_as_default")
String paymentMethodSetAsDefault;

/**
* Controls whether the Payment Element allows the updating of a saved payment method.
*
* <p>One of {@code auto}, or {@code never}.
* <p>One of {@code disabled}, or {@code enabled}.
*/
@SerializedName("payment_method_update")
String paymentMethodUpdate;
Expand Down

0 comments on commit d651c21

Please sign in to comment.