Skip to content

Commit

Permalink
Codegen for openapi 058df08
Browse files Browse the repository at this point in the history
  • Loading branch information
yejia-stripe committed Jan 25, 2022
1 parent 3172800 commit aa7fa7d
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 16 deletions.
2 changes: 1 addition & 1 deletion types/2020-08-27/Accounts.d.ts
Expand Up @@ -3210,7 +3210,7 @@ declare module 'stripe' {
/**
* With [Connect](https://stripe.com/docs/connect), you can delete accounts you manage.
*
* Accounts created using test-mode keys can be deleted at any time. Custom or Express accounts created using live-mode keys can only be deleted once all balances are zero.
* Accounts created using test-mode keys can be deleted at any time. Standard accounts created using live-mode keys cannot be deleted. Custom or Express accounts created using live-mode keys can only be deleted once all balances are zero.
*
* If you want to delete your own account, use the [account information tab in your account settings](https://dashboard.stripe.com/account) instead.
*/
Expand Down
2 changes: 1 addition & 1 deletion types/2020-08-27/Checkout/Sessions.d.ts
Expand Up @@ -138,7 +138,7 @@ declare module 'stripe' {
/**
* The ID of the Payment Link that created this Session.
*/
payment_link?: string | Stripe.PaymentLink | null;
payment_link: string | Stripe.PaymentLink | null;

/**
* Payment-method-specific configuration for the PaymentIntent or SetupIntent of this CheckoutSession.
Expand Down
51 changes: 37 additions & 14 deletions types/2020-08-27/PaymentLinks.d.ts
Expand Up @@ -17,7 +17,7 @@ declare module 'stripe' {
object: 'payment_link';

/**
* Whether the payment link's `url` is active. If `false`, customers visiting the url will be redirected.
* Whether the payment link's `url` is active. If `false`, customers visiting the URL will be shown a page saying that the link has been deactivated.
*/
active: boolean;

Expand Down Expand Up @@ -66,10 +66,12 @@ declare module 'stripe' {
on_behalf_of: string | Stripe.Account | null;

/**
* The list of payment method types that customers can use. When `null`, your [payment methods settings](https://dashboard.stripe.com/settings/payment_methods) will be used.
* The list of payment method types that customers can use. When `null`, Stripe will dynamically show relevant payment methods you've enabled in your [payment method settings](https://dashboard.stripe.com/settings/payment_methods).
*/
payment_method_types: Array<'card'> | null;

phone_number_collection: PaymentLink.PhoneNumberCollection;

/**
* Configuration for collecting the customer's shipping address.
*/
Expand All @@ -86,7 +88,7 @@ declare module 'stripe' {
transfer_data: PaymentLink.TransferData | null;

/**
* The public url that can be shared with customers.
* The public URL that can be shared with customers.
*/
url: string;
}
Expand All @@ -113,7 +115,7 @@ declare module 'stripe' {

interface Redirect {
/**
* The `url` the customer will be redirected to after the purchase is complete.
* The URL the customer will be redirected to after the purchase is complete.
*/
url: string;
}
Expand All @@ -130,6 +132,13 @@ declare module 'stripe' {

type BillingAddressCollection = 'auto' | 'required';

interface PhoneNumberCollection {
/**
* If `true`, a phone number will be collected during checkout.
*/
enabled: boolean;
}

interface ShippingAddressCollection {
/**
* An array of two-letter ISO country codes representing which countries Checkout should provide as options for shipping locations. Unsupported country codes: `AS, CX, CC, CU, HM, IR, KP, MH, FM, NF, MP, PW, SD, SY, UM, VI`.
Expand Down Expand Up @@ -380,7 +389,7 @@ declare module 'stripe' {

interface SubscriptionData {
/**
* When creating a subscription, the specified configuration data will be used. There must be at least one line item with a recurring price to use `subscription_data`.
* Integer representing the number of trial period days before the customer is charged for the first time.
*/
trial_period_days: number | null;
}
Expand Down Expand Up @@ -440,7 +449,7 @@ declare module 'stripe' {
line_items?: Array<PaymentLinkCreateParams.LineItem>;

/**
* Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. Metadata associated with this Payment Link will automatically be copied to Checkout Sessions created by this Payment Link.
* Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. Metadata associated with this Payment Link will automatically be copied to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link.
*/
metadata?: Stripe.MetadataParam;

Expand All @@ -450,10 +459,17 @@ declare module 'stripe' {
on_behalf_of?: string;

/**
* The list of payment method types (e.g., card) that customers can use. Only `card` is supported. If no value is passed, your [payment methods settings](https://dashboard.stripe.com/settings/payment_methods) will be used.
* The list of payment method types that customers can use. Only `card` is supported. If no value is passed, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods) (20+ payment methods [supported](https://stripe.com/docs/payments/payment-methods/integration-options#payment-method-product-support)).
*/
payment_method_types?: Array<'card'>;

/**
* Controls phone number collection settings during checkout.
*
* We recommend that you review your privacy policy and check with your legal contacts.
*/
phone_number_collection?: PaymentLinkCreateParams.PhoneNumberCollection;

/**
* Configuration for collecting the customer's shipping address.
*/
Expand Down Expand Up @@ -527,7 +543,7 @@ declare module 'stripe' {
price: string;

/**
* The quantity of the line item being purchased. Only `1` is supported.
* The quantity of the line item being purchased.
*/
quantity: number;
}
Expand All @@ -545,12 +561,19 @@ declare module 'stripe' {
maximum?: number;

/**
* The minimum quantity the customer can purchase. By default this value is 0. You can specify a value up to 98.
* The minimum quantity the customer can purchase. By default this value is 0. You can specify a value up to 98. If there is only one item in the cart then that item's quantity cannot go down to 0.
*/
minimum?: number;
}
}

interface PhoneNumberCollection {
/**
* Set to `true` to enable phone number collection.
*/
enabled: boolean;
}

interface ShippingAddressCollection {
/**
* An array of two-letter ISO country codes representing which countries Checkout should provide as options for
Expand Down Expand Up @@ -832,7 +855,7 @@ declare module 'stripe' {

interface PaymentLinkUpdateParams {
/**
* Whether the payment link's `url` is active. If `false`, customers visiting the url will be redirected.
* Whether the payment link's `url` is active. If `false`, customers visiting the URL will be shown a page saying that the link has been deactivated.
*/
active?: boolean;

Expand Down Expand Up @@ -867,12 +890,12 @@ declare module 'stripe' {
line_items?: Array<PaymentLinkUpdateParams.LineItem>;

/**
* Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. Metadata associated with this Payment Link will automatically be copied to Checkout Sessions created by this Payment Link.
* Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. Metadata associated with this Payment Link will automatically be copied to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link.
*/
metadata?: Stripe.MetadataParam;

/**
* The list of payment method types (e.g., card) that customers can use. Only `card` is supported. Pass an empty string to enable automatic payment methods that use your [payment methods settings](https://dashboard.stripe.com/settings/payment_methods).
* The list of payment method types that customers can use. Only `card` is supported. Pass an empty string to enable automatic payment methods that use your [payment method settings](https://dashboard.stripe.com/settings/payment_methods).
*/
payment_method_types?: Stripe.Emptyable<Array<'card'>>;

Expand Down Expand Up @@ -941,7 +964,7 @@ declare module 'stripe' {
id: string;

/**
* The quantity of the line item being purchased. Only `1` is supported.
* The quantity of the line item being purchased.
*/
quantity?: number;
}
Expand All @@ -959,7 +982,7 @@ declare module 'stripe' {
maximum?: number;

/**
* The minimum quantity the customer can purchase. By default this value is 0. You can specify a value up to 98.
* The minimum quantity the customer can purchase. By default this value is 0. You can specify a value up to 98. If there is only one item in the cart then that item's quantity cannot go down to 0.
*/
minimum?: number;
}
Expand Down
4 changes: 4 additions & 0 deletions types/2020-08-27/WebhookEndpoints.d.ts
Expand Up @@ -332,6 +332,8 @@ declare module 'stripe' {
| 'payment_intent.processing'
| 'payment_intent.requires_action'
| 'payment_intent.succeeded'
| 'payment_link.created'
| 'payment_link.updated'
| 'payment_method.attached'
| 'payment_method.automatically_updated'
| 'payment_method.detached'
Expand Down Expand Up @@ -553,6 +555,8 @@ declare module 'stripe' {
| 'payment_intent.processing'
| 'payment_intent.requires_action'
| 'payment_intent.succeeded'
| 'payment_link.created'
| 'payment_link.updated'
| 'payment_method.attached'
| 'payment_method.automatically_updated'
| 'payment_method.detached'
Expand Down

0 comments on commit aa7fa7d

Please sign in to comment.