Skip to content

Commit

Permalink
Merge pull request #1850 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] authored Apr 25, 2024
2 parents 1cf3425 + 11e28e8 commit e9f64b1
Show file tree
Hide file tree
Showing 30 changed files with 314 additions and 95 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,15 @@
* Add support for `ExternalAccountCollection` on `AccountSessionComponentsFinancialAccountFeaturesParams`
* Add support for `SubscriptionTrialFromPlan` on `InvoiceUpcomingLinesParams` and `InvoiceUpcomingParams`

## 78.3.0 - 2024-04-18
* [#1849](https://github.com/stripe/stripe-go/pull/1849) Update generated code
* Add support for `CreatePreview` method on resource `Invoice`
* Add support for `PaymentMethodData` on `CheckoutSessionParams`
* Add support for `SavedPaymentMethodOptions` on `CheckoutSessionParams` and `CheckoutSession`
* Add support for `Mobilepay` on `CheckoutSessionPaymentMethodOptionsParams` and `CheckoutSessionPaymentMethodOptions`
* Add support for `AllowRedisplay` on `ConfirmationTokenPaymentMethodDataParams`, `CustomerListPaymentMethodsParams`, `PaymentIntentConfirmPaymentMethodDataParams`, `PaymentIntentPaymentMethodDataParams`, `PaymentMethodParams`, `SetupIntentConfirmPaymentMethodDataParams`, and `SetupIntentPaymentMethodDataParams`
* Add support for `ScheduleDetails` and `SubscriptionDetails` on `InvoiceUpcomingLinesParams` and `InvoiceUpcomingParams`

## 78.2.0 - 2024-04-16
* [#1847](https://github.com/stripe/stripe-go/pull/1847) Update generated code
* Add support for new resource `Entitlements.ActiveEntitlementSummary`
Expand Down
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.

13 changes: 13 additions & 0 deletions accountsession.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,17 @@ type AccountSessionComponentsPaymentDetailsParams struct {
Features *AccountSessionComponentsPaymentDetailsFeaturesParams `form:"features"`
}

// The list of features enabled in the embedded component.
type AccountSessionComponentsPaymentMethodSettingsFeaturesParams struct{}

// Configuration for the payment method settings embedded component.
type AccountSessionComponentsPaymentMethodSettingsParams struct {
// Whether the embedded component is enabled.
Enabled *bool `form:"enabled"`
// The list of features enabled in the embedded component.
Features *AccountSessionComponentsPaymentMethodSettingsFeaturesParams `form:"features"`
}

// The list of features enabled in the embedded component.
type AccountSessionComponentsPaymentsFeaturesParams struct {
// Whether to allow capturing and cancelling payment intents. This is `true` by default.
Expand Down Expand Up @@ -264,6 +275,8 @@ type AccountSessionComponentsParams struct {
NotificationBanner *AccountSessionComponentsNotificationBannerParams `form:"notification_banner"`
// Configuration for the payment details embedded component.
PaymentDetails *AccountSessionComponentsPaymentDetailsParams `form:"payment_details"`
// Configuration for the payment method settings embedded component.
PaymentMethodSettings *AccountSessionComponentsPaymentMethodSettingsParams `form:"payment_method_settings"`
// Configuration for the payments embedded component.
Payments *AccountSessionComponentsPaymentsParams `form:"payments"`
// Configuration for the payouts embedded component.
Expand Down
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 @@ -2376,7 +2402,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 @@ -2582,7 +2615,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 @@ -799,7 +799,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
Loading

0 comments on commit e9f64b1

Please sign in to comment.