Skip to content

Commit

Permalink
Codegen for openapi v172
Browse files Browse the repository at this point in the history
  • Loading branch information
dcr-stripe committed Jul 25, 2022
1 parent 4ac4361 commit a271142
Show file tree
Hide file tree
Showing 9 changed files with 375 additions and 18 deletions.
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v165
v172
51 changes: 50 additions & 1 deletion types/2020-08-27/Checkout/Sessions.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -652,6 +652,8 @@ declare module 'stripe' {
}

interface Card {
installments?: Card.Installments;

/**
* Indicates that you intend to make future payments with this PaymentIntent's payment method.
*
Expand All @@ -673,6 +675,13 @@ declare module 'stripe' {
}

namespace Card {
interface Installments {
/**
* Indicates if installments are enabled
*/
enabled?: boolean;
}

type SetupFutureUsage = 'none' | 'off_session' | 'on_session';
}

Expand Down Expand Up @@ -1345,7 +1354,7 @@ declare module 'stripe' {
expand?: Array<string>;

/**
* The Epoch time in seconds at which the Checkout Session will expire. It can be anywhere from 1 to 24 hours after Checkout Session creation. By default, this value is 24 hours from creation.
* The Epoch time in seconds at which the Checkout Session will expire. It can be anywhere from 30 minutes to 24 hours after Checkout Session creation. By default, this value is 24 hours from creation.
*/
expires_at?: number;

Expand Down Expand Up @@ -2151,6 +2160,11 @@ declare module 'stripe' {
}

interface Card {
/**
* Installment options for card payments
*/
installments?: Card.Installments;

/**
* Indicates that you intend to make future payments with this PaymentIntent's payment method.
*
Expand All @@ -2172,6 +2186,41 @@ declare module 'stripe' {
}

namespace Card {
interface Installments {
/**
* Setting to true enables installments for this PaymentIntent.
* This will cause the response to contain a list of available installment plans.
* Setting to false will prevent any selected plan from applying to a charge.
*/
enabled?: boolean;

/**
* The selected installment plan to use for this payment attempt.
* This parameter can only be provided during confirmation.
*/
plan?: Stripe.Emptyable<Installments.Plan>;
}

namespace Installments {
interface Plan {
/**
* For `fixed_count` installment plans, this is the number of installment payments your customer will make to their credit card.
*/
count: number;

/**
* For `fixed_count` installment plans, this is the interval between installment payments your customer will make to their credit card.
* One of `month`.
*/
interval: 'month';

/**
* Type of installment plan, one of `fixed_count`.
*/
type: 'fixed_count';
}
}

type SetupFutureUsage = 'off_session' | 'on_session';
}

Expand Down
12 changes: 12 additions & 0 deletions types/2020-08-27/Customers.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ declare module 'stripe' {
*/
currency: string | null;

/**
* The default three-letter [ISO code for the currency](https://stripe.com/docs/currencies) that the customer will be charged in for billing purposes.
*/
default_currency?: string | null;

/**
* ID of the default payment source for the customer.
*
Expand Down Expand Up @@ -72,6 +77,13 @@ declare module 'stripe' {
*/
email: string | null;

/**
* The current multi-currency balances, if any, being stored on the customer.If positive in a currency, the customer has a credit to apply to their next invoice denominated in that currency.If negative, the customer has an amount owed that will be added to their next invoice denominated in that currency. These balances do not refer to any unpaid invoices.They solely track amounts that have yet to be successfully applied to any invoice. A balance in a particular currency is only applied to any invoice as an invoice in that currency is finalized.
*/
invoice_credit_balance?: {
[key: string]: number;
};

/**
* The prefix for the customer used to generate unique invoice numbers.
*/
Expand Down
114 changes: 114 additions & 0 deletions types/2020-08-27/Invoices.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -609,6 +609,11 @@ declare module 'stripe' {
}

interface PaymentSettings {
/**
* ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the invoice's default_payment_method or default_source, if set.
*/
default_mandate: string | null;

/**
* Payment-method-specific configuration to provide to the invoice's PaymentIntent.
*/
Expand Down Expand Up @@ -690,13 +695,22 @@ declare module 'stripe' {
}

interface Card {
installments?: Card.Installments;

/**
* We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
*/
request_three_d_secure: Card.RequestThreeDSecure | null;
}

namespace Card {
interface Installments {
/**
* Whether Installments are enabled for this Invoice.
*/
enabled: boolean | null;
}

type RequestThreeDSecure = 'any' | 'automatic';
}

Expand Down Expand Up @@ -936,6 +950,11 @@ declare module 'stripe' {
*/
collection_method?: InvoiceCreateParams.CollectionMethod;

/**
* The currency to create this invoice in. Defaults to that of `customer` if not specified.
*/
currency?: string;

/**
* A list of up to 4 custom fields to be displayed on the invoice.
*/
Expand Down Expand Up @@ -1069,6 +1088,11 @@ declare module 'stripe' {
}

interface PaymentSettings {
/**
* ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the invoice's default_payment_method or default_source, if set.
*/
default_mandate?: string;

/**
* Payment-method-specific configuration to provide to the invoice's PaymentIntent.
*/
Expand Down Expand Up @@ -1159,13 +1183,53 @@ declare module 'stripe' {
}

interface Card {
/**
* Installment configuration for payments attempted on this invoice (Mexico Only).
*
* For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments).
*/
installments?: Card.Installments;

/**
* We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
*/
request_three_d_secure?: Card.RequestThreeDSecure;
}

namespace Card {
interface Installments {
/**
* Setting to true enables installments for this invoice.
* Setting to false will prevent any selected plan from applying to a payment.
*/
enabled?: boolean;

/**
* The selected installment plan to use for this invoice.
*/
plan?: Stripe.Emptyable<Installments.Plan>;
}

namespace Installments {
interface Plan {
/**
* For `fixed_count` installment plans, this is the number of installment payments your customer will make to their credit card.
*/
count: number;

/**
* For `fixed_count` installment plans, this is the interval between installment payments your customer will make to their credit card.
* One of `month`.
*/
interval: 'month';

/**
* Type of installment plan, one of `fixed_count`.
*/
type: 'fixed_count';
}
}

type RequestThreeDSecure = 'any' | 'automatic';
}

Expand Down Expand Up @@ -1445,6 +1509,11 @@ declare module 'stripe' {
}

interface PaymentSettings {
/**
* ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the invoice's default_payment_method or default_source, if set.
*/
default_mandate?: string;

/**
* Payment-method-specific configuration to provide to the invoice's PaymentIntent.
*/
Expand Down Expand Up @@ -1535,13 +1604,53 @@ declare module 'stripe' {
}

interface Card {
/**
* Installment configuration for payments attempted on this invoice (Mexico Only).
*
* For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments).
*/
installments?: Card.Installments;

/**
* We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
*/
request_three_d_secure?: Card.RequestThreeDSecure;
}

namespace Card {
interface Installments {
/**
* Setting to true enables installments for this invoice.
* Setting to false will prevent any selected plan from applying to a payment.
*/
enabled?: boolean;

/**
* The selected installment plan to use for this invoice.
*/
plan?: Stripe.Emptyable<Installments.Plan>;
}

namespace Installments {
interface Plan {
/**
* For `fixed_count` installment plans, this is the number of installment payments your customer will make to their credit card.
*/
count: number;

/**
* For `fixed_count` installment plans, this is the interval between installment payments your customer will make to their credit card.
* One of `month`.
*/
interval: 'month';

/**
* Type of installment plan, one of `fixed_count`.
*/
type: 'fixed_count';
}
}

type RequestThreeDSecure = 'any' | 'automatic';
}

Expand Down Expand Up @@ -1736,6 +1845,11 @@ declare module 'stripe' {
*/
forgive?: boolean;

/**
* ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the payment_method param or the invoice's default_payment_method or default_source, if set.
*/
mandate?: string;

/**
* Indicates if a customer is on or off-session while an invoice payment is attempted. Defaults to `true` (off-session).
*/
Expand Down
Loading

0 comments on commit a271142

Please sign in to comment.