Skip to content

Commit

Permalink
Codegen for openapi v178
Browse files Browse the repository at this point in the history
  • Loading branch information
anniel-stripe committed Aug 11, 2022
1 parent 0dee834 commit a8b941d
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 1 deletion.
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v177
v178
19 changes: 19 additions & 0 deletions types/2022-08-01/Checkout/Sessions.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,11 @@ declare module 'stripe' {
*/
payment_link: string | Stripe.PaymentLink | null;

/**
* Configure whether a Checkout Session should collect a payment method.
*/
payment_method_collection: Session.PaymentMethodCollection | null;

/**
* Payment-method-specific configuration for the PaymentIntent or SetupIntent of this CheckoutSession.
*/
Expand Down Expand Up @@ -450,6 +455,8 @@ declare module 'stripe' {

type Mode = 'payment' | 'setup' | 'subscription';

type PaymentMethodCollection = 'always' | 'if_required';

interface PaymentMethodOptions {
acss_debit?: PaymentMethodOptions.AcssDebit;

Expand Down Expand Up @@ -1498,6 +1505,16 @@ declare module 'stripe' {
*/
payment_intent_data?: SessionCreateParams.PaymentIntentData;

/**
* Specify whether Checkout should collect a payment method. When set to `if_required`, Checkout will not collect a payment method when the total due for the session is 0.
* This may occur if the Checkout Session includes a free trial or a discount.
*
* Can only be set in `subscription` mode.
*
* If you'd like information on how to collect a payment method outside of Checkout, read the guide on configuring [subscriptions with a free trial](https://stripe.com/docs/payments/checkout/free-trials).
*/
payment_method_collection?: SessionCreateParams.PaymentMethodCollection;

/**
* Payment-method-specific configuration.
*/
Expand Down Expand Up @@ -1991,6 +2008,8 @@ declare module 'stripe' {
}
}

type PaymentMethodCollection = 'always' | 'if_required';

interface PaymentMethodOptions {
/**
* contains details about the ACSS Debit payment method options.
Expand Down
29 changes: 29 additions & 0 deletions types/2022-08-01/PaymentLinks.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,11 @@ declare module 'stripe' {
*/
payment_intent_data: PaymentLink.PaymentIntentData | null;

/**
* Configuration for collecting a payment method during checkout.
*/
payment_method_collection: PaymentLink.PaymentMethodCollection;

/**
* 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).
*/
Expand Down Expand Up @@ -190,6 +195,8 @@ declare module 'stripe' {
type SetupFutureUsage = 'off_session' | 'on_session';
}

type PaymentMethodCollection = 'always' | 'if_required';

type PaymentMethodType =
| 'affirm'
| 'afterpay_clearpay'
Expand Down Expand Up @@ -583,6 +590,15 @@ declare module 'stripe' {
*/
payment_intent_data?: PaymentLinkCreateParams.PaymentIntentData;

/**
* Specify whether Checkout should collect a payment method. When set to `if_required`, Checkout will not collect a payment method when the total due for the session is 0.This may occur if the Checkout Session includes a free trial or a discount.
*
* Can only be set in `subscription` mode.
*
* If you'd like information on how to collect a payment method outside of Checkout, read the guide on [configuring subscriptions with a free trial](https://stripe.com/docs/payments/checkout/free-trials).
*/
payment_method_collection?: PaymentLinkCreateParams.PaymentMethodCollection;

/**
* The list of payment method types that customers can use. 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)).
*/
Expand Down Expand Up @@ -750,6 +766,8 @@ declare module 'stripe' {
type SetupFutureUsage = 'off_session' | 'on_session';
}

type PaymentMethodCollection = 'always' | 'if_required';

type PaymentMethodType =
| 'affirm'
| 'afterpay_clearpay'
Expand Down Expand Up @@ -1124,6 +1142,15 @@ declare module 'stripe' {
*/
metadata?: Stripe.MetadataParam;

/**
* Specify whether Checkout should collect a payment method. When set to `if_required`, Checkout will not collect a payment method when the total due for the session is 0.This may occur if the Checkout Session includes a free trial or a discount.
*
* Can only be set in `subscription` mode.
*
* If you'd like information on how to collect a payment method outside of Checkout, read the guide on [configuring subscriptions with a free trial](https://stripe.com/docs/payments/checkout/free-trials).
*/
payment_method_collection?: PaymentLinkUpdateParams.PaymentMethodCollection;

/**
* The list of payment method types that customers can use. Pass an empty string to enable automatic payment methods that use your [payment method settings](https://dashboard.stripe.com/settings/payment_methods).
*/
Expand Down Expand Up @@ -1222,6 +1249,8 @@ declare module 'stripe' {
}
}

type PaymentMethodCollection = 'always' | 'if_required';

type PaymentMethodType =
| 'affirm'
| 'afterpay_clearpay'
Expand Down

0 comments on commit a8b941d

Please sign in to comment.