Skip to content

Commit

Permalink
Codegen for openapi v247
Browse files Browse the repository at this point in the history
  • Loading branch information
anniel-stripe committed Mar 9, 2023
1 parent 52bf7e5 commit 8d70481
Show file tree
Hide file tree
Showing 5 changed files with 200 additions and 2 deletions.
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v237
v247
8 changes: 7 additions & 1 deletion types/Issuing/Cardholders.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
62 changes: 62 additions & 0 deletions types/Issuing/CardholdersResource.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand All @@ -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.
Expand Down Expand Up @@ -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.
*/
Expand All @@ -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.
Expand Down
39 changes: 39 additions & 0 deletions types/Subscriptions.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
*/
Expand Down Expand Up @@ -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 {
Expand Down
91 changes: 91 additions & 0 deletions types/SubscriptionsResource.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
*/
Expand Down Expand Up @@ -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<CancellationDetails.Feedback>;
}

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 {
Expand Down Expand Up @@ -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.
*/
Expand All @@ -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<CancellationDetails.Feedback>;
}

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.
*/
Expand All @@ -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<CancellationDetails.Feedback>;
}

namespace CancellationDetails {
type Feedback =
| 'customer_service'
| 'low_quality'
| 'missing_features'
| 'other'
| 'switched_service'
| 'too_complex'
| 'too_expensive'
| 'unused';
}
}

interface SubscriptionDeleteDiscountParams {}

interface SubscriptionResumeParams {
Expand Down

0 comments on commit 8d70481

Please sign in to comment.