Skip to content

Commit

Permalink
Merge upstream and update generated code for v1320
Browse files Browse the repository at this point in the history
  • Loading branch information
stripe-openapi[bot] committed Oct 30, 2024
2 parents f0f0b76 + e0b5d5d commit e964194
Show file tree
Hide file tree
Showing 18 changed files with 417 additions and 42 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@


## 81.0.0 - 2024-10-29

Historically, when upgrading webhooks to a new API version, you also had to upgrade your SDK version. Your webhook's API version needed to match the API version pinned by the SDK you were using to ensure successful deserialization of events. With the `2024-09-30.acacia` release, Stripe follows a [new API release process](https://stripe.com/blog/introducing-stripes-new-api-release-process). As a result, you can safely upgrade your webhook endpoints to any API version within a biannual release (like `acacia`) without upgrading the SDK.

However, [a bug](https://github.com/stripe/stripe-go/pull/1940) in the `80.x.y` SDK releases meant that webhook version upgrades from the SDK's pinned `2024-09-30.acacia` version to the new `2024-10-28.acacia` version would fail. Therefore, we are shipping SDK support for `2024-10-28.acacia` as a major version to enforce the idea that an SDK upgrade is also required. Future API versions in the `acacia` line will be released as minor versions.

* [#1931](https://github.com/stripe/stripe-go/pull/1931) This release changes the pinned API version to `2024-10-28.acacia`.
* Add support for new resource `V2.EventDestinations`
* Add support for `New`, `Retrieve`, `Update`, `List`, `Delete`, `Disable`, `Enable` and `Ping` methods on resource `V2.EventDestinations`
Expand Down
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1319
v1320
53 changes: 41 additions & 12 deletions account.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,19 +150,48 @@ const (
AccountExternalAccountTypeCard AccountExternalAccountType = "card"
)

// If the account is disabled, this string describes why. [Learn more about handling verification issues](https://stripe.com/docs/connect/handling-api-verification). Can be `action_required.requested_capabilities`, `requirements.past_due`, `requirements.pending_verification`, `listed`, `platform_paused`, `rejected.fraud`, `rejected.incomplete_verification`, `rejected.listed`, `rejected.other`, `rejected.terms_of_service`, `under_review`, or `other`.
// This is typed as an enum for consistency with `requirements.disabled_reason`.
type AccountFutureRequirementsDisabledReason string

// List of values that AccountFutureRequirementsDisabledReason can take
const (
AccountFutureRequirementsDisabledReasonActionRequiredRequestedCapabilities AccountFutureRequirementsDisabledReason = "action_required.requested_capabilities"
AccountFutureRequirementsDisabledReasonListed AccountFutureRequirementsDisabledReason = "listed"
AccountFutureRequirementsDisabledReasonOther AccountFutureRequirementsDisabledReason = "other"
AccountFutureRequirementsDisabledReasonPlatformPaused AccountFutureRequirementsDisabledReason = "platform_paused"
AccountFutureRequirementsDisabledReasonRejectedFraud AccountFutureRequirementsDisabledReason = "rejected.fraud"
AccountFutureRequirementsDisabledReasonRejectedIncompleteVerification AccountFutureRequirementsDisabledReason = "rejected.incomplete_verification"
AccountFutureRequirementsDisabledReasonRejectedListed AccountFutureRequirementsDisabledReason = "rejected.listed"
AccountFutureRequirementsDisabledReasonRejectedOther AccountFutureRequirementsDisabledReason = "rejected.other"
AccountFutureRequirementsDisabledReasonRejectedPlatformFraud AccountFutureRequirementsDisabledReason = "rejected.platform_fraud"
AccountFutureRequirementsDisabledReasonRejectedPlatformOther AccountFutureRequirementsDisabledReason = "rejected.platform_other"
AccountFutureRequirementsDisabledReasonRejectedPlatformTermsOfService AccountFutureRequirementsDisabledReason = "rejected.platform_terms_of_service"
AccountFutureRequirementsDisabledReasonRejectedTermsOfService AccountFutureRequirementsDisabledReason = "rejected.terms_of_service"
AccountFutureRequirementsDisabledReasonRequirementsPastDue AccountFutureRequirementsDisabledReason = "requirements.past_due"
AccountFutureRequirementsDisabledReasonRequirementsPendingVerification AccountFutureRequirementsDisabledReason = "requirements.pending_verification"
AccountFutureRequirementsDisabledReasonUnderReview AccountFutureRequirementsDisabledReason = "under_review"
)

// If the account is disabled, this enum describes why. [Learn more about handling verification issues](https://stripe.com/docs/connect/handling-api-verification).
type AccountRequirementsDisabledReason string

// List of values that AccountRequirementsDisabledReason can take
const (
AccountRequirementsDisabledReasonFieldsNeeded AccountRequirementsDisabledReason = "fields_needed"
AccountRequirementsDisabledReasonListed AccountRequirementsDisabledReason = "listed"
AccountRequirementsDisabledReasonOther AccountRequirementsDisabledReason = "other"
AccountRequirementsDisabledReasonRejectedFraud AccountRequirementsDisabledReason = "rejected.fraud"
AccountRequirementsDisabledReasonRejectedListed AccountRequirementsDisabledReason = "rejected.listed"
AccountRequirementsDisabledReasonRejectedOther AccountRequirementsDisabledReason = "rejected.other"
AccountRequirementsDisabledReasonRejectedTermsOfService AccountRequirementsDisabledReason = "rejected.terms_of_service"
AccountRequirementsDisabledReasonUnderReview AccountRequirementsDisabledReason = "under_review"
AccountRequirementsDisabledReasonActionRequiredRequestedCapabilities AccountRequirementsDisabledReason = "action_required.requested_capabilities"
AccountRequirementsDisabledReasonListed AccountRequirementsDisabledReason = "listed"
AccountRequirementsDisabledReasonOther AccountRequirementsDisabledReason = "other"
AccountRequirementsDisabledReasonPlatformPaused AccountRequirementsDisabledReason = "platform_paused"
AccountRequirementsDisabledReasonRejectedFraud AccountRequirementsDisabledReason = "rejected.fraud"
AccountRequirementsDisabledReasonRejectedIncompleteVerification AccountRequirementsDisabledReason = "rejected.incomplete_verification"
AccountRequirementsDisabledReasonRejectedListed AccountRequirementsDisabledReason = "rejected.listed"
AccountRequirementsDisabledReasonRejectedOther AccountRequirementsDisabledReason = "rejected.other"
AccountRequirementsDisabledReasonRejectedPlatformFraud AccountRequirementsDisabledReason = "rejected.platform_fraud"
AccountRequirementsDisabledReasonRejectedPlatformOther AccountRequirementsDisabledReason = "rejected.platform_other"
AccountRequirementsDisabledReasonRejectedPlatformTermsOfService AccountRequirementsDisabledReason = "rejected.platform_terms_of_service"
AccountRequirementsDisabledReasonRejectedTermsOfService AccountRequirementsDisabledReason = "rejected.terms_of_service"
AccountRequirementsDisabledReasonRequirementsPastDue AccountRequirementsDisabledReason = "requirements.past_due"
AccountRequirementsDisabledReasonRequirementsPendingVerification AccountRequirementsDisabledReason = "requirements.pending_verification"
AccountRequirementsDisabledReasonUnderReview AccountRequirementsDisabledReason = "under_review"
)

// How frequently funds will be paid out. One of `manual` (payouts only created via API call), `daily`, `weekly`, or `monthly`.
Expand Down Expand Up @@ -1659,8 +1688,8 @@ type AccountFutureRequirements struct {
CurrentDeadline int64 `json:"current_deadline"`
// Fields that need to be collected to keep the account enabled. If not collected by `future_requirements[current_deadline]`, these fields will transition to the main `requirements` hash.
CurrentlyDue []string `json:"currently_due"`
// This is typed as a string for consistency with `requirements.disabled_reason`.
DisabledReason string `json:"disabled_reason"`
// This is typed as an enum for consistency with `requirements.disabled_reason`.
DisabledReason AccountFutureRequirementsDisabledReason `json:"disabled_reason"`
// Fields that are `currently_due` and need to be collected again because validation or verification failed.
Errors []*AccountFutureRequirementsError `json:"errors"`
// Fields that need to be collected assuming all volume thresholds are reached. As they become required, they appear in `currently_due` as well.
Expand Down Expand Up @@ -1701,7 +1730,7 @@ type AccountRequirements struct {
CurrentDeadline int64 `json:"current_deadline"`
// Fields that need to be collected to keep the account enabled. If not collected by `current_deadline`, these fields appear in `past_due` as well, and the account is disabled.
CurrentlyDue []string `json:"currently_due"`
// If the account is disabled, this string describes why. [Learn more about handling verification issues](https://stripe.com/docs/connect/handling-api-verification). Can be `action_required.requested_capabilities`, `requirements.past_due`, `requirements.pending_verification`, `listed`, `platform_paused`, `rejected.fraud`, `rejected.incomplete_verification`, `rejected.listed`, `rejected.other`, `rejected.terms_of_service`, `under_review`, or `other`.
// If the account is disabled, this enum describes why. [Learn more about handling verification issues](https://stripe.com/docs/connect/handling-api-verification).
DisabledReason AccountRequirementsDisabledReason `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
2 changes: 2 additions & 0 deletions accountsession.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,8 @@ type AccountSessionComponentsIssuingCardsListFeaturesParams struct {
CardManagement *bool `form:"card_management"`
// Whether to allow card spend dispute management features.
CardSpendDisputeManagement *bool `form:"card_spend_dispute_management"`
// Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts.
DisableStripeUserAuthentication *bool `form:"disable_stripe_user_authentication"`
// Whether to allow spend control management features.
SpendControlManagement *bool `form:"spend_control_management"`
}
Expand Down
2 changes: 1 addition & 1 deletion billing_meterevent.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ type BillingMeterEventParams struct {
EventName *string `form:"event_name"`
// Specifies which fields in the response should be expanded.
Expand []*string `form:"expand"`
// A unique identifier for the event. If not provided, one will be generated. We recommend using a globally unique identifier for this. We'll enforce uniqueness within a rolling 24 hour period.
// A unique identifier for the event. If not provided, one will be generated. We strongly advise using UUID-like identifiers. We will enforce uniqueness within a rolling period of at least 24 hours. The enforcement of uniqueness primarily addresses issues arising from accidental retries or other problems occurring within extremely brief time intervals. This approach helps prevent duplicate entries and ensures data integrity in high-frequency operations.
Identifier *string `form:"identifier"`
// The payload of the event. This must contain the fields corresponding to a meter's `customer_mapping.event_payload_key` (default is `stripe_customer_id`) and `value_settings.event_payload_key` (default is `value`). Read more about the [payload](https://docs.stripe.com/billing/subscriptions/usage-based/recording-usage#payload-key-overrides).
Payload map[string]string `form:"payload"`
Expand Down
27 changes: 23 additions & 4 deletions checkout_session.go
Original file line number Diff line number Diff line change
Expand Up @@ -1691,8 +1691,13 @@ type CheckoutSessionPaymentMethodOptionsAUBECSDebitParams struct {
SetupFutureUsage *string `form:"setup_future_usage"`
}

// Additional fields for Mandate creation
type CheckoutSessionPaymentMethodOptionsBACSDebitMandateOptionsParams struct{}

// contains details about the Bacs Debit payment method options.
type CheckoutSessionPaymentMethodOptionsBACSDebitParams struct {
// Additional fields for Mandate creation
MandateOptions *CheckoutSessionPaymentMethodOptionsBACSDebitMandateOptionsParams `form:"mandate_options"`
// Indicates that you intend to make future payments with this PaymentIntent's payment method.
//
// If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
Expand Down Expand Up @@ -1864,6 +1869,8 @@ type CheckoutSessionPaymentMethodOptionsIDEALParams struct {

// contains details about the Kakao Pay payment method options.
type CheckoutSessionPaymentMethodOptionsKakaoPayParams struct {
// Controls when the funds will be captured from the customer's account.
CaptureMethod *string `form:"capture_method"`
// Indicates that you intend to make future payments with this PaymentIntent's payment method.
//
// If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
Expand Down Expand Up @@ -1902,6 +1909,8 @@ type CheckoutSessionPaymentMethodOptionsKonbiniParams struct {

// contains details about the Korean card payment method options.
type CheckoutSessionPaymentMethodOptionsKrCardParams struct {
// Controls when the funds will be captured from the customer's account.
CaptureMethod *string `form:"capture_method"`
// Indicates that you intend to make future payments with this PaymentIntent's payment method.
//
// If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
Expand Down Expand Up @@ -1948,8 +1957,10 @@ type CheckoutSessionPaymentMethodOptionsMultibancoParams struct {
SetupFutureUsage *string `form:"setup_future_usage"`
}

// contains details about the Kakao Pay payment method options.
// contains details about the Naver Pay payment method options.
type CheckoutSessionPaymentMethodOptionsNaverPayParams struct {
// Controls when the funds will be captured from the customer's account.
CaptureMethod *string `form:"capture_method"`
// Indicates that you intend to make future payments with this PaymentIntent's payment method.
//
// If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
Expand Down Expand Up @@ -1989,7 +2000,10 @@ type CheckoutSessionPaymentMethodOptionsP24Params struct {
}

// contains details about the PAYCO payment method options.
type CheckoutSessionPaymentMethodOptionsPaycoParams struct{}
type CheckoutSessionPaymentMethodOptionsPaycoParams struct {
// Controls when the funds will be captured from the customer's account.
CaptureMethod *string `form:"capture_method"`
}

// contains details about the PayNow payment method options.
type CheckoutSessionPaymentMethodOptionsPayNowParams struct {
Expand Down Expand Up @@ -2080,7 +2094,10 @@ type CheckoutSessionPaymentMethodOptionsRevolutPayParams struct {
}

// contains details about the Samsung Pay payment method options.
type CheckoutSessionPaymentMethodOptionsSamsungPayParams struct{}
type CheckoutSessionPaymentMethodOptionsSamsungPayParams struct {
// Controls when the funds will be captured from the customer's account.
CaptureMethod *string `form:"capture_method"`
}

// contains details about the Sepa Debit payment method options.
type CheckoutSessionPaymentMethodOptionsSEPADebitParams struct {
Expand Down Expand Up @@ -2202,7 +2219,7 @@ type CheckoutSessionPaymentMethodOptionsParams struct {
Mobilepay *CheckoutSessionPaymentMethodOptionsMobilepayParams `form:"mobilepay"`
// contains details about the Multibanco payment method options.
Multibanco *CheckoutSessionPaymentMethodOptionsMultibancoParams `form:"multibanco"`
// contains details about the Kakao Pay payment method options.
// contains details about the Naver Pay payment method options.
NaverPay *CheckoutSessionPaymentMethodOptionsNaverPayParams `form:"naver_pay"`
// contains details about the OXXO payment method options.
OXXO *CheckoutSessionPaymentMethodOptionsOXXOParams `form:"oxxo"`
Expand Down Expand Up @@ -3000,7 +3017,9 @@ type CheckoutSessionPaymentMethodOptionsAUBECSDebit struct {
// When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication).
SetupFutureUsage CheckoutSessionPaymentMethodOptionsAUBECSDebitSetupFutureUsage `json:"setup_future_usage"`
}
type CheckoutSessionPaymentMethodOptionsBACSDebitMandateOptions struct{}
type CheckoutSessionPaymentMethodOptionsBACSDebit struct {
MandateOptions *CheckoutSessionPaymentMethodOptionsBACSDebitMandateOptions `json:"mandate_options"`
// Indicates that you intend to make future payments with this PaymentIntent's payment method.
//
// If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
Expand Down
Loading

0 comments on commit e964194

Please sign in to comment.