Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update generated code #1784

Merged
merged 15 commits into from
Apr 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v972
v992
224 changes: 138 additions & 86 deletions src/main/java/com/stripe/model/Account.java

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions src/main/java/com/stripe/model/Balance.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,10 @@ public class Balance extends ApiResource {
List<Balance.Available> 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 <a
* href="https://stripe.com/api/accounts/object#account_object-controller-requirement_collection">account.controller.requirement_collection</a>
* 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<Balance.ConnectReserved> connectReserved;
Expand Down
14 changes: 8 additions & 6 deletions src/main/java/com/stripe/model/BankAccount.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,15 @@
/**
* These bank accounts are payment methods on {@code Customer} objects.
*
* <p>On the other hand <a href="https://stripe.com/docs/api#external_accounts">External
* Accounts</a> are transfer destinations on {@code Account} objects for <a
* href="https://stripe.com/docs/connect/custom-accounts">Custom accounts</a>. They can be bank
* accounts or debit cards as well, and are documented in the links above.
* <p>On the other hand <a href="https://stripe.com/api#external_accounts">External Accounts</a> are
* transfer destinations on {@code Account} objects for accounts where <a
* href="https://stripe.com/api/accounts/object#account_object-controller-requirement_collection">controller.requirement_collection</a>
* is {@code application}, which includes <a
* href="https://stripe.com/connect/custom-accounts">Custom accounts</a>. They can be bank accounts
* or debit cards as well, and are documented in the links above.
*
* <p>Related guide: <a href="https://stripe.com/docs/payments/bank-debits-transfers">Bank debits
* and transfers</a>
* <p>Related guide: <a href="https://stripe.com/payments/bank-debits-transfers">Bank debits and
* transfers</a>
*/
@Getter
@Setter
Expand Down
19 changes: 12 additions & 7 deletions src/main/java/com/stripe/model/Capability.java
Original file line number Diff line number Diff line change
Expand Up @@ -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}.
*
* <p>{@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 <a
* href="https://stripe.com/afterpay-clearpay/legal#restricted-businesses">Afterpay Clearpay's
* terms of service</a>.
*
* <p>- <a href="https://stripe.com/afterpay-clearpay/legal#restricted-businesses">Afterpay
* Clearpay's terms of service</a>
* <p>{@code rejected.inactivity} means that the capability has been paused for inactivity. This
* disabled reason currently only applies to the Issuing capability. See <a
* href="https://support.stripe.com/questions/issuing-managing-inactive-connect-accounts">Issuing:
* Managing Inactive Connects</a> for more details.
*
* <p>If you believe that the rejection is in error, please contact support at
* <p>If you believe that a rejection is in error, please contact support at
* https://support.stripe.com/contact/ for assistance.
*/
@SerializedName("disabled_reason")
Expand Down
16 changes: 13 additions & 3 deletions src/main/java/com/stripe/model/Card.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ public class Card extends ApiResource
implements MetadataStore<Card>, 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
* <a
* href="https://stripe.com/api/accounts/object#account_object-controller-requirement_collection">controller.requirement_collection</a>
* is {@code application}, which includes Custom accounts.
*/
@SerializedName("account")
@Getter(lombok.AccessLevel.NONE)
Expand Down Expand Up @@ -101,7 +104,9 @@ public class Card extends ApiResource
/**
* Three-letter <a href="https://stripe.com/docs/payouts">ISO code for currency</a>. 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 <a
* href="https://stripe.com/api/accounts/object#account_object-controller-requirement_collection">controller.requirement_collection</a>
* is {@code application}, which includes Custom accounts.
*/
@SerializedName("currency")
String currency;
Expand All @@ -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 <a
* href="https://stripe.com/api/accounts/object#account_object-controller-requirement_collection">controller.requirement_collection</a>
* is {@code application}, which includes Custom accounts.
*/
@SerializedName("default_for_currency")
Boolean defaultForCurrency;

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/stripe/model/ConfirmationToken.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
12 changes: 6 additions & 6 deletions src/main/java/com/stripe/model/Event.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@
* separate <a href="http://en.wikipedia.org/wiki/Webhook">webhooks</a> system for sending the
* {@code Event} objects directly to an endpoint on your server. You can manage webhooks in your <a
* href="https://dashboard.stripe.com/account/webhooks">account settings</a>. Learn how to <a
* href="https://stripe.com/docs/webhooks">listen for events</a> so that your integration can
* href="https://docs.stripe.com/webhooks">listen for events</a> so that your integration can
* automatically trigger reactions.
*
* <p>When using <a href="https://stripe.com/docs/connect">Connect</a>, you can also receive event
* <p>When using <a href="https://docs.stripe.com/connect">Connect</a>, 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.
*
Expand Down Expand Up @@ -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 <a
* href="https://stripe.com/docs/api/events/object">event object</a> {@code api_version} attribute
* href="https://docs.stripe.com/api/events/object">event object</a> {@code api_version} attribute
* (not according to your current Stripe API version or {@code Stripe-Version} header).
*/
public static EventCollection list(Map<String, Object> params) throws StripeException {
Expand All @@ -218,7 +218,7 @@ public static EventCollection list(Map<String, Object> 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 <a
* href="https://stripe.com/docs/api/events/object">event object</a> {@code api_version} attribute
* href="https://docs.stripe.com/api/events/object">event object</a> {@code api_version} attribute
* (not according to your current Stripe API version or {@code Stripe-Version} header).
*/
public static EventCollection list(Map<String, Object> params, RequestOptions options)
Expand All @@ -233,7 +233,7 @@ public static EventCollection list(Map<String, Object> 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 <a
* href="https://stripe.com/docs/api/events/object">event object</a> {@code api_version} attribute
* href="https://docs.stripe.com/api/events/object">event object</a> {@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 {
Expand All @@ -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 <a
* href="https://stripe.com/docs/api/events/object">event object</a> {@code api_version} attribute
* href="https://docs.stripe.com/api/events/object">event object</a> {@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)
Expand Down
40 changes: 20 additions & 20 deletions src/main/java/com/stripe/model/Invoice.java
Original file line number Diff line number Diff line change
Expand Up @@ -1618,10 +1618,10 @@ public Invoice sendInvoice(InvoiceSendInvoiceParams params, RequestOptions optio
*
* <p>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<String, Object>) null, (RequestOptions) null);
Expand All @@ -1640,10 +1640,10 @@ public static Invoice upcoming() throws StripeException {
*
* <p>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<String, Object> params) throws StripeException {
return upcoming(params, (RequestOptions) null);
Expand All @@ -1662,10 +1662,10 @@ public static Invoice upcoming(Map<String, Object> params) throws StripeExceptio
*
* <p>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<String, Object> params, RequestOptions options)
throws StripeException {
Expand All @@ -1689,10 +1689,10 @@ public static Invoice upcoming(Map<String, Object> params, RequestOptions option
*
* <p>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);
Expand All @@ -1711,10 +1711,10 @@ public static Invoice upcoming(InvoiceUpcomingParams params) throws StripeExcept
*
* <p>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 {
Expand Down
5 changes: 3 additions & 2 deletions src/main/java/com/stripe/model/InvoiceLineItem.java
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,9 @@ public class InvoiceLineItem extends ApiResource implements HasId, MetadataStore
/**
* Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> 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")
Expand Down