Skip to content

Commit

Permalink
Update generated code (#1852)
Browse files Browse the repository at this point in the history
* Update generated code for v974

* Update generated code for v976

* Update generated code for v977

* Update generated code for v979

* Update generated code for v982

* Update generated code for v983

* Update generated code for v985

* Update generated code for v987

* Update generated code for v988

* Update generated code for v989

* Update generated code for v990

* Update generated code for v991

* Update generated code for v992

---------

Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>
  • Loading branch information
stripe-openapi[bot] authored Apr 25, 2024
1 parent 7252def commit a2de353
Show file tree
Hide file tree
Showing 25 changed files with 254 additions and 91 deletions.
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v972
v992
80 changes: 50 additions & 30 deletions account.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion balance.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ type Balance struct {
APIResource
// Available funds that you can transfer or pay out automatically by Stripe or explicitly through the [Transfers API](https://stripe.com/docs/api#transfers) or [Payouts API](https://stripe.com/docs/api#payouts). You can find the available balance for each currency and payment type in the `source_types` property.
Available []*Amount `json:"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 `source_types` property.
// Funds held due to negative balances on connected accounts where [account.controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. You can find the connect reserve balance for each currency and payment type in the `source_types` property.
ConnectReserved []*Amount `json:"connect_reserved"`
// Funds that you can pay out using Instant Payouts.
InstantAvailable []*Amount `json:"instant_available"`
Expand Down
7 changes: 4 additions & 3 deletions bankaccount.go
Original file line number Diff line number Diff line change
Expand Up @@ -440,11 +440,12 @@ type BankAccountRequirements struct {

// These bank accounts are payment methods on `Customer` objects.
//
// On the other hand [External Accounts](https://stripe.com/docs/api#external_accounts) are transfer
// destinations on `Account` objects for [Custom accounts](https://stripe.com/docs/connect/custom-accounts).
// On the other hand [External Accounts](https://stripe.com/api#external_accounts) are transfer
// destinations on `Account` objects for accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection)
// is `application`, which includes [Custom accounts](https://stripe.com/connect/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](https://stripe.com/docs/payments/bank-debits-transfers)
// Related guide: [Bank debits and transfers](https://stripe.com/payments/bank-debits-transfers)
type BankAccount struct {
APIResource
// The ID of the account that the bank account is associated with.
Expand Down
16 changes: 8 additions & 8 deletions capability.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@

package stripe

// If the capability is disabled, this string describes why. Can be `requirements.past_due`, `requirements.pending_verification`, `listed`, `platform_paused`, `rejected.fraud`, `rejected.listed`, `rejected.terms_of_service`, `rejected.other`, `under_review`, or `other`.
// If the capability is disabled, this string describes why. Can be `requirements.fields_needed`, `pending.onboarding`, `pending.review`, `rejected.fraud`, `rejected.other`, `platform_paused`, `action_required.requested_capabilities`, `rejected.inactivty`, or `rejected.unsupported_business`.
//
// `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:
// `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, such as in [Afterpay Clearpay's terms of service](https://stripe.com/afterpay-clearpay/legal#restricted-businesses).
//
// - [Afterpay Clearpay's terms of service](https://stripe.com/afterpay-clearpay/legal#restricted-businesses)
// `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](https://support.stripe.com/questions/issuing-managing-inactive-connect-accounts) for more details.
//
// If you believe that the rejection is in error, please contact support at https://support.stripe.com/contact/ for assistance.
// If you believe that a rejection is in error, please contact support at https://support.stripe.com/contact/ for assistance.
type CapabilityDisabledReason string

// List of values that CapabilityDisabledReason can take
Expand Down Expand Up @@ -117,13 +117,13 @@ type CapabilityRequirements struct {
CurrentDeadline int64 `json:"current_deadline"`
// Fields that need to be collected to keep the capability enabled. If not collected by `current_deadline`, these fields appear in `past_due` as well, and the capability is disabled.
CurrentlyDue []string `json:"currently_due"`
// If the capability is disabled, this string describes why. Can be `requirements.past_due`, `requirements.pending_verification`, `listed`, `platform_paused`, `rejected.fraud`, `rejected.listed`, `rejected.terms_of_service`, `rejected.other`, `under_review`, or `other`.
// If the capability is disabled, this string describes why. Can be `requirements.fields_needed`, `pending.onboarding`, `pending.review`, `rejected.fraud`, `rejected.other`, `platform_paused`, `action_required.requested_capabilities`, `rejected.inactivty`, or `rejected.unsupported_business`.
//
// `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:
// `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, such as in [Afterpay Clearpay's terms of service](https://stripe.com/afterpay-clearpay/legal#restricted-businesses).
//
// - [Afterpay Clearpay's terms of service](https://stripe.com/afterpay-clearpay/legal#restricted-businesses)
// `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](https://support.stripe.com/questions/issuing-managing-inactive-connect-accounts) for more details.
//
// If you believe that the rejection is in error, please contact support at https://support.stripe.com/contact/ for assistance.
// If you believe that a rejection is in error, please contact support at https://support.stripe.com/contact/ for assistance.
DisabledReason CapabilityDisabledReason `json:"disabled_reason"`
// Fields that are `currently_due` and need to be collected again because validation or verification failed.
Errors []*AccountRequirementsError `json:"errors"`
Expand Down
6 changes: 3 additions & 3 deletions card.go
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ type CardNetworks struct {
// Related guide: [Card payments with Sources](https://stripe.com/docs/sources/cards)
type Card struct {
APIResource
// 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.
// 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. This property is only available for accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts.
Account *Account `json:"account"`
// City/District/Suburb/Town/Village.
AddressCity string `json:"address_city"`
Expand All @@ -318,13 +318,13 @@ type Card struct {
Brand CardBrand `json:"brand"`
// Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected.
Country string `json:"country"`
// Three-letter [ISO code for currency](https://stripe.com/docs/payouts). Only applicable on accounts (not customers or recipients). The card can be used as a transfer destination for funds in this currency.
// Three-letter [ISO code for currency](https://stripe.com/docs/payouts). Only applicable on accounts (not customers or recipients). The card can be used as a transfer destination for funds in this currency. This property is only available for accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts.
Currency Currency `json:"currency"`
// The customer that this card belongs to. This attribute will not be in the card object if the card belongs to an account or recipient instead.
Customer *Customer `json:"customer"`
// If a CVC was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`. A result of unchecked indicates that CVC was provided but hasn't been checked yet. Checks are typically performed when attaching a card to a Customer object, or when creating a charge. For more details, see [Check if a card is valid without a charge](https://support.stripe.com/questions/check-if-a-card-is-valid-without-a-charge).
CVCCheck CardCVCCheck `json:"cvc_check"`
// 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](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts.
DefaultForCurrency bool `json:"default_for_currency"`
Deleted bool `json:"deleted"`
// Description is a succinct summary of the card's information.
Expand Down
44 changes: 42 additions & 2 deletions checkout_session.go
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,19 @@ const (
CheckoutSessionPaymentMethodOptionsAlipaySetupFutureUsageNone CheckoutSessionPaymentMethodOptionsAlipaySetupFutureUsage = "none"
)

// Indicates that you intend to make future payments with this PaymentIntent's payment method.
//
// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) 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](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
//
// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
type CheckoutSessionPaymentMethodOptionsAmazonPaySetupFutureUsage string

// List of values that CheckoutSessionPaymentMethodOptionsAmazonPaySetupFutureUsage can take
const (
CheckoutSessionPaymentMethodOptionsAmazonPaySetupFutureUsageNone CheckoutSessionPaymentMethodOptionsAmazonPaySetupFutureUsage = "none"
CheckoutSessionPaymentMethodOptionsAmazonPaySetupFutureUsageOffSession CheckoutSessionPaymentMethodOptionsAmazonPaySetupFutureUsage = "off_session"
)

// Indicates that you intend to make future payments with this PaymentIntent's payment method.
//
// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) 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](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
Expand Down Expand Up @@ -619,6 +632,19 @@ const (
CheckoutSessionPaymentMethodOptionsPaypalSetupFutureUsageOffSession CheckoutSessionPaymentMethodOptionsPaypalSetupFutureUsage = "off_session"
)

// Indicates that you intend to make future payments with this PaymentIntent's payment method.
//
// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) 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](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
//
// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
type CheckoutSessionPaymentMethodOptionsRevolutPaySetupFutureUsage string

// List of values that CheckoutSessionPaymentMethodOptionsRevolutPaySetupFutureUsage can take
const (
CheckoutSessionPaymentMethodOptionsRevolutPaySetupFutureUsageNone CheckoutSessionPaymentMethodOptionsRevolutPaySetupFutureUsage = "none"
CheckoutSessionPaymentMethodOptionsRevolutPaySetupFutureUsageOffSession CheckoutSessionPaymentMethodOptionsRevolutPaySetupFutureUsage = "off_session"
)

// Indicates that you intend to make future payments with this PaymentIntent's payment method.
//
// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) 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](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
Expand Down Expand Up @@ -2362,7 +2388,14 @@ type CheckoutSessionPaymentMethodOptionsAlipay struct {
// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
SetupFutureUsage CheckoutSessionPaymentMethodOptionsAlipaySetupFutureUsage `json:"setup_future_usage"`
}
type CheckoutSessionPaymentMethodOptionsAmazonPay struct{}
type CheckoutSessionPaymentMethodOptionsAmazonPay struct {
// Indicates that you intend to make future payments with this PaymentIntent's payment method.
//
// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) 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](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
//
// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
SetupFutureUsage CheckoutSessionPaymentMethodOptionsAmazonPaySetupFutureUsage `json:"setup_future_usage"`
}
type CheckoutSessionPaymentMethodOptionsAUBECSDebit struct {
// Indicates that you intend to make future payments with this PaymentIntent's payment method.
//
Expand Down Expand Up @@ -2566,7 +2599,14 @@ type CheckoutSessionPaymentMethodOptionsPix struct {
// The number of seconds after which Pix payment will expire.
ExpiresAfterSeconds int64 `json:"expires_after_seconds"`
}
type CheckoutSessionPaymentMethodOptionsRevolutPay struct{}
type CheckoutSessionPaymentMethodOptionsRevolutPay struct {
// Indicates that you intend to make future payments with this PaymentIntent's payment method.
//
// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) 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](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
//
// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
SetupFutureUsage CheckoutSessionPaymentMethodOptionsRevolutPaySetupFutureUsage `json:"setup_future_usage"`
}
type CheckoutSessionPaymentMethodOptionsSEPADebit struct {
// Indicates that you intend to make future payments with this PaymentIntent's payment method.
//
Expand Down
2 changes: 1 addition & 1 deletion confirmationtoken.go
Original file line number Diff line number Diff line change
Expand Up @@ -764,7 +764,7 @@ type ConfirmationToken struct {
APIResource
// Time at which the object was created. Measured in seconds since the Unix epoch.
Created int64 `json:"created"`
// 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.
// Time at which this ConfirmationToken expires and can no longer be used to confirm a PaymentIntent or SetupIntent.
ExpiresAt int64 `json:"expires_at"`
// Unique identifier for the object.
ID string `json:"id"`
Expand Down
4 changes: 2 additions & 2 deletions entitlements_activeentitlement.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ func (p *EntitlementsActiveEntitlementParams) AddExpand(f string) {
// An active entitlement describes access to a feature for a customer.
type EntitlementsActiveEntitlement struct {
APIResource
// The feature that the customer is entitled to.
Feature string `json:"feature"`
// The [Feature](https://stripe.com/docs/api/entitlements/feature) that the customer is entitled to.
Feature *EntitlementsFeature `json:"feature"`
// Unique identifier for the object.
ID string `json:"id"`
// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
Expand Down
21 changes: 21 additions & 0 deletions entitlements_feature.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

package stripe

import "encoding/json"

// Retrieve a list of features
type EntitlementsFeatureListParams struct {
ListParams `form:"*"`
Expand Down Expand Up @@ -73,3 +75,22 @@ type EntitlementsFeatureList struct {
ListMeta
Data []*EntitlementsFeature `json:"data"`
}

// UnmarshalJSON handles deserialization of an EntitlementsFeature.
// This custom unmarshaling is needed because the resulting
// property may be an id or the full struct if it was expanded.
func (e *EntitlementsFeature) UnmarshalJSON(data []byte) error {
if id, ok := ParseID(data); ok {
e.ID = id
return nil
}

type entitlementsFeature EntitlementsFeature
var v entitlementsFeature
if err := json.Unmarshal(data, &v); err != nil {
return err
}

*e = EntitlementsFeature(v)
return nil
}
6 changes: 3 additions & 3 deletions event.go
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ const (
EventTypeTreasuryReceivedDebitCreated EventType = "treasury.received_debit.created"
)

// 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](https://stripe.com/docs/api/events/object) api_version attribute (not according to your current Stripe API version or Stripe-Version header).
// 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](https://docs.stripe.com/api/events/object) api_version attribute (not according to your current Stripe API version or Stripe-Version header).
type EventListParams struct {
ListParams `form:"*"`
// Only return events that were created during the given date interval.
Expand Down Expand Up @@ -326,10 +326,10 @@ type EventRequest struct {
// `Event` objects directly to an endpoint on your server. You can manage
// webhooks in your
// [account settings](https://dashboard.stripe.com/account/webhooks). Learn how
// to [listen for events](https://stripe.com/docs/webhooks)
// to [listen for events](https://docs.stripe.com/webhooks)
// so that your integration can automatically trigger reactions.
//
// When using [Connect](https://stripe.com/docs/connect), you can also receive event notifications
// When using [Connect](https://docs.stripe.com/connect), you can also receive event notifications
// that occur in connected accounts. For these events, there's an
// additional `account` attribute in the received `Event` object.
//
Expand Down
Loading

0 comments on commit a2de353

Please sign in to comment.