From 8d70481f553e6b7edfd6a67b38daf13e9e16cccb Mon Sep 17 00:00:00 2001 From: Annie Li Date: Wed, 8 Mar 2023 16:14:16 -0800 Subject: [PATCH] Codegen for openapi v247 --- OPENAPI_VERSION | 2 +- types/Issuing/Cardholders.d.ts | 8 ++- types/Issuing/CardholdersResource.d.ts | 62 ++++++++++++++++++ types/Subscriptions.d.ts | 39 +++++++++++ types/SubscriptionsResource.d.ts | 91 ++++++++++++++++++++++++++ 5 files changed, 200 insertions(+), 2 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index eb6678972b..ff648113aa 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v237 \ No newline at end of file +v247 \ No newline at end of file diff --git a/types/Issuing/Cardholders.d.ts b/types/Issuing/Cardholders.d.ts index b76b7eb4f8..4935606a7f 100644 --- a/types/Issuing/Cardholders.d.ts +++ b/types/Issuing/Cardholders.d.ts @@ -197,10 +197,16 @@ declare module 'stripe' { } namespace Requirements { - type DisabledReason = 'listed' | 'rejected.listed' | 'under_review'; + type DisabledReason = + | 'listed' + | 'rejected.listed' + | 'requirements.past_due' + | 'under_review'; type PastDue = | 'company.tax_id' + | 'individual.card_issuing.user_terms_acceptance.date' + | 'individual.card_issuing.user_terms_acceptance.ip' | 'individual.dob.day' | 'individual.dob.month' | 'individual.dob.year' diff --git a/types/Issuing/CardholdersResource.d.ts b/types/Issuing/CardholdersResource.d.ts index 2c94ae9e72..379f18082f 100644 --- a/types/Issuing/CardholdersResource.d.ts +++ b/types/Issuing/CardholdersResource.d.ts @@ -110,6 +110,11 @@ declare module 'stripe' { } interface Individual { + /** + * Information related to the card_issuing program for this cardholder. + */ + card_issuing?: Individual.CardIssuing; + /** * The date of birth of this cardholder. */ @@ -132,6 +137,32 @@ declare module 'stripe' { } namespace Individual { + interface CardIssuing { + /** + * Information about cardholder acceptance of [Authorized User Terms](https://stripe.com/docs/issuing/cards). + */ + user_terms_acceptance?: CardIssuing.UserTermsAcceptance; + } + + namespace CardIssuing { + interface UserTermsAcceptance { + /** + * The Unix timestamp marking when the cardholder accepted the Authorized User Terms. Required for Celtic Spend Card users. + */ + date?: number; + + /** + * The IP address from which the cardholder accepted the Authorized User Terms. Required for Celtic Spend Card users. + */ + ip?: string; + + /** + * The user agent of the browser from which the cardholder accepted the Authorized User Terms. + */ + user_agent?: string; + } + } + interface Dob { /** * The day of birth, between 1 and 31. @@ -1222,6 +1253,11 @@ declare module 'stripe' { } interface Individual { + /** + * Information related to the card_issuing program for this cardholder. + */ + card_issuing?: Individual.CardIssuing; + /** * The date of birth of this cardholder. */ @@ -1244,6 +1280,32 @@ declare module 'stripe' { } namespace Individual { + interface CardIssuing { + /** + * Information about cardholder acceptance of [Authorized User Terms](https://stripe.com/docs/issuing/cards). + */ + user_terms_acceptance?: CardIssuing.UserTermsAcceptance; + } + + namespace CardIssuing { + interface UserTermsAcceptance { + /** + * The Unix timestamp marking when the cardholder accepted the Authorized User Terms. Required for Celtic Spend Card users. + */ + date?: number; + + /** + * The IP address from which the cardholder accepted the Authorized User Terms. Required for Celtic Spend Card users. + */ + ip?: string; + + /** + * The user agent of the browser from which the cardholder accepted the Authorized User Terms. + */ + user_agent?: string; + } + } + interface Dob { /** * The day of birth, between 1 and 31. diff --git a/types/Subscriptions.d.ts b/types/Subscriptions.d.ts index 1cbb621ec1..18968a3839 100644 --- a/types/Subscriptions.d.ts +++ b/types/Subscriptions.d.ts @@ -59,6 +59,11 @@ declare module 'stripe' { */ canceled_at: number | null; + /** + * Details about why this subscription was cancelled + */ + cancellation_details: Subscription.CancellationDetails | null; + /** * Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. */ @@ -248,6 +253,40 @@ declare module 'stripe' { reset_billing_cycle_anchor: boolean | null; } + interface CancellationDetails { + /** + * Additional comments about why the user canceled the subscription, if the subscription was cancelled explicitly by the user. + */ + comment: string | null; + + /** + * The customer submitted reason for why they cancelled, if the subscription was cancelled explicitly by the user. + */ + feedback: CancellationDetails.Feedback | null; + + /** + * Why this subscription was cancelled. + */ + reason: CancellationDetails.Reason | null; + } + + namespace CancellationDetails { + type Feedback = + | 'customer_service' + | 'low_quality' + | 'missing_features' + | 'other' + | 'switched_service' + | 'too_complex' + | 'too_expensive' + | 'unused'; + + type Reason = + | 'cancellation_requested' + | 'payment_disputed' + | 'payment_failed'; + } + type CollectionMethod = 'charge_automatically' | 'send_invoice'; interface PauseCollection { diff --git a/types/SubscriptionsResource.d.ts b/types/SubscriptionsResource.d.ts index 4a7095acd2..2d13384a2b 100644 --- a/types/SubscriptionsResource.d.ts +++ b/types/SubscriptionsResource.d.ts @@ -700,6 +700,11 @@ declare module 'stripe' { */ cancel_at_period_end?: boolean; + /** + * Details about why this subscription was cancelled + */ + cancellation_details?: SubscriptionUpdateParams.CancellationDetails; + /** * Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`. */ @@ -903,6 +908,30 @@ declare module 'stripe' { reset_billing_cycle_anchor?: boolean; } + interface CancellationDetails { + /** + * Additional comments about why the user canceled the subscription, if the subscription was cancelled explicitly by the user. + */ + comment?: string; + + /** + * The customer submitted reason for why they cancelled, if the subscription was cancelled explicitly by the user. + */ + feedback?: Stripe.Emptyable; + } + + namespace CancellationDetails { + type Feedback = + | 'customer_service' + | 'low_quality' + | 'missing_features' + | 'other' + | 'switched_service' + | 'too_complex' + | 'too_expensive' + | 'unused'; + } + type CollectionMethod = 'charge_automatically' | 'send_invoice'; interface Item { @@ -1396,6 +1425,11 @@ declare module 'stripe' { } interface SubscriptionCancelParams { + /** + * Details about why this subscription was cancelled + */ + cancellation_details?: SubscriptionCancelParams.CancellationDetails; + /** * Specifies which fields in the response should be expanded. */ @@ -1412,7 +1446,38 @@ declare module 'stripe' { prorate?: boolean; } + namespace SubscriptionCancelParams { + interface CancellationDetails { + /** + * Additional comments about why the user canceled the subscription, if the subscription was cancelled explicitly by the user. + */ + comment?: string; + + /** + * The customer submitted reason for why they cancelled, if the subscription was cancelled explicitly by the user. + */ + feedback?: Stripe.Emptyable; + } + + namespace CancellationDetails { + type Feedback = + | 'customer_service' + | 'low_quality' + | 'missing_features' + | 'other' + | 'switched_service' + | 'too_complex' + | 'too_expensive' + | 'unused'; + } + } + interface SubscriptionDeleteParams { + /** + * Details about why this subscription was cancelled + */ + cancellation_details?: SubscriptionDeleteParams.CancellationDetails; + /** * Specifies which fields in the response should be expanded. */ @@ -1429,6 +1494,32 @@ declare module 'stripe' { prorate?: boolean; } + namespace SubscriptionDeleteParams { + interface CancellationDetails { + /** + * Additional comments about why the user canceled the subscription, if the subscription was cancelled explicitly by the user. + */ + comment?: string; + + /** + * The customer submitted reason for why they cancelled, if the subscription was cancelled explicitly by the user. + */ + feedback?: Stripe.Emptyable; + } + + namespace CancellationDetails { + type Feedback = + | 'customer_service' + | 'low_quality' + | 'missing_features' + | 'other' + | 'switched_service' + | 'too_complex' + | 'too_expensive' + | 'unused'; + } + } + interface SubscriptionDeleteDiscountParams {} interface SubscriptionResumeParams {