Skip to content

Commit

Permalink
Codegen for openapi 546b28b (#1122)
Browse files Browse the repository at this point in the history
  • Loading branch information
richardm-stripe authored Feb 17, 2021
1 parent 13dcbf9 commit 6d6e215
Show file tree
Hide file tree
Showing 7 changed files with 81 additions and 4 deletions.
2 changes: 1 addition & 1 deletion types/2020-08-27/AccountLinks.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ declare module 'stripe' {
expand?: Array<string>;

/**
* The URL that the user will be redirected to if the account link is no longer valid. Your `refresh_url` should trigger a method on your server to create a new account link using this API, with the same parameters, and redirect the user to the new account link.
* The URL the user will be redirected to if the account link is expired, has been previously-visited, or is otherwise invalid. The URL you specify should attempt to generate a new account link with the same parameters used to create the original account link, then redirect the user to the new account link's URL so they can continue with Connect Onboarding. If a new account link cannot be generated or the redirect fails you should display a useful error to the user.
*/
refresh_url?: string;

Expand Down
4 changes: 4 additions & 0 deletions types/2020-08-27/Charges.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,8 @@ declare module 'stripe' {

acss_debit?: PaymentMethodDetails.AcssDebit;

afterpay_clearpay?: PaymentMethodDetails.AfterpayClearpay;

alipay?: PaymentMethodDetails.Alipay;

au_becs_debit?: PaymentMethodDetails.AuBecsDebit;
Expand Down Expand Up @@ -529,6 +531,8 @@ declare module 'stripe' {
transit_number: string | null;
}

interface AfterpayClearpay {}

interface Alipay {
/**
* Uniquely identifies this particular Alipay account. You can use this attribute to check whether two Alipay accounts are the same.
Expand Down
23 changes: 23 additions & 0 deletions types/2020-08-27/Checkout/Sessions.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -754,6 +754,11 @@ declare module 'stripe' {
}

interface LineItem {
/**
* When set, provides configuration for this item's quantity to be adjusted by the customer during Checkout.
*/
adjustable_quantity?: LineItem.AdjustableQuantity;

/**
* The amount to be collected per unit of the line item. If specified, must also pass `currency` and `name`.
*/
Expand Down Expand Up @@ -808,6 +813,23 @@ declare module 'stripe' {
}

namespace LineItem {
interface AdjustableQuantity {
/**
* Set to true if the quantity can be adjusted to any non-negative integer. By default customers will be able to remove the line item by setting the quantity to 0.
*/
enabled: boolean;

/**
* The maximum quantity the customer can purchase for the Checkout Session. By default this value is 99.
*/
maximum?: number;

/**
* The minimum quantity the customer must purchase for the Checkout Session. By default this value is 0.
*/
minimum?: number;
}

interface PriceData {
/**
* Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
Expand Down Expand Up @@ -1058,6 +1080,7 @@ declare module 'stripe' {
}

type PaymentMethodType =
| 'afterpay_clearpay'
| 'alipay'
| 'bacs_debit'
| 'bancontact'
Expand Down
6 changes: 3 additions & 3 deletions types/2020-08-27/Issuing/Authorizations.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ declare module 'stripe' {
pending_request: Authorization.PendingRequest | null;

/**
* History of every time the authorization was approved/denied (whether approved/denied by you directly or by Stripe based on your `spending_controls`). If the merchant changes the authorization by performing an [incremental authorization or partial capture](https://stripe.com/docs/issuing/purchases/authorizations), you can look at this field to see the previous states of the authorization.
* History of every time `pending_request` was approved/denied, either by you directly or by Stripe (e.g. based on your `spending_controls`). If the merchant changes the authorization by performing an [incremental authorization](https://stripe.com/docs/issuing/purchases/authorizations), you can look at this field to see the previous requests for the authorization.
*/
request_history: Array<Authorization.RequestHistory>;

Expand Down Expand Up @@ -207,7 +207,7 @@ declare module 'stripe' {

interface RequestHistory {
/**
* The authorization amount in your card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). Stripe held this amount from your account to fund the authorization if the request was approved.
* The `pending_request.amount` at the time of the request, presented in your card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). Stripe held this amount from your account to fund the authorization if the request was approved.
*/
amount: number;

Expand All @@ -232,7 +232,7 @@ declare module 'stripe' {
currency: string;

/**
* The amount that was authorized at the time of this request. This amount is in the `merchant_currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
* The `pending_request.merchant_amount` at the time of the request, presented in the `merchant_currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
*/
merchant_amount: number;

Expand Down
24 changes: 24 additions & 0 deletions types/2020-08-27/PaymentIntents.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -810,6 +810,11 @@ declare module 'stripe' {
type OffSession = 'one_off' | 'recurring';

interface PaymentMethodData {
/**
* If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method.
*/
afterpay_clearpay?: PaymentMethodData.AfterpayClearpay;

/**
* If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method.
*/
Expand Down Expand Up @@ -897,6 +902,8 @@ declare module 'stripe' {
}

namespace PaymentMethodData {
interface AfterpayClearpay {}

interface Alipay {}

interface AuBecsDebit {
Expand Down Expand Up @@ -1143,6 +1150,7 @@ declare module 'stripe' {
}

type Type =
| 'afterpay_clearpay'
| 'alipay'
| 'au_becs_debit'
| 'bacs_debit'
Expand Down Expand Up @@ -1506,6 +1514,11 @@ declare module 'stripe' {

namespace PaymentIntentUpdateParams {
interface PaymentMethodData {
/**
* If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method.
*/
afterpay_clearpay?: PaymentMethodData.AfterpayClearpay;

/**
* If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method.
*/
Expand Down Expand Up @@ -1593,6 +1606,8 @@ declare module 'stripe' {
}

namespace PaymentMethodData {
interface AfterpayClearpay {}

interface Alipay {}

interface AuBecsDebit {
Expand Down Expand Up @@ -1839,6 +1854,7 @@ declare module 'stripe' {
}

type Type =
| 'afterpay_clearpay'
| 'alipay'
| 'au_becs_debit'
| 'bacs_debit'
Expand Down Expand Up @@ -2316,6 +2332,11 @@ declare module 'stripe' {
type OffSession = 'one_off' | 'recurring';

interface PaymentMethodData {
/**
* If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method.
*/
afterpay_clearpay?: PaymentMethodData.AfterpayClearpay;

/**
* If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method.
*/
Expand Down Expand Up @@ -2403,6 +2424,8 @@ declare module 'stripe' {
}

namespace PaymentMethodData {
interface AfterpayClearpay {}

interface Alipay {}

interface AuBecsDebit {
Expand Down Expand Up @@ -2649,6 +2672,7 @@ declare module 'stripe' {
}

type Type =
| 'afterpay_clearpay'
| 'alipay'
| 'au_becs_debit'
| 'bacs_debit'
Expand Down
14 changes: 14 additions & 0 deletions types/2020-08-27/PaymentMethods.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ declare module 'stripe' {
*/
object: 'payment_method';

afterpay_clearpay?: PaymentMethod.AfterpayClearpay;

alipay?: PaymentMethod.Alipay;

au_becs_debit?: PaymentMethod.AuBecsDebit;
Expand Down Expand Up @@ -77,6 +79,8 @@ declare module 'stripe' {
}

namespace PaymentMethod {
interface AfterpayClearpay {}

interface Alipay {}

interface AuBecsDebit {
Expand Down Expand Up @@ -551,6 +555,7 @@ declare module 'stripe' {
}

type Type =
| 'afterpay_clearpay'
| 'alipay'
| 'au_becs_debit'
| 'bacs_debit'
Expand All @@ -570,6 +575,11 @@ declare module 'stripe' {
}

interface PaymentMethodCreateParams {
/**
* If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method.
*/
afterpay_clearpay?: PaymentMethodCreateParams.AfterpayClearpay;

/**
* If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method.
*/
Expand Down Expand Up @@ -677,6 +687,8 @@ declare module 'stripe' {
}

namespace PaymentMethodCreateParams {
interface AfterpayClearpay {}

interface Alipay {}

interface AuBecsDebit {
Expand Down Expand Up @@ -949,6 +961,7 @@ declare module 'stripe' {
}

type Type =
| 'afterpay_clearpay'
| 'alipay'
| 'au_becs_debit'
| 'bacs_debit'
Expand Down Expand Up @@ -1104,6 +1117,7 @@ declare module 'stripe' {

namespace PaymentMethodListParams {
type Type =
| 'afterpay_clearpay'
| 'alipay'
| 'au_becs_debit'
| 'bacs_debit'
Expand Down
12 changes: 12 additions & 0 deletions types/2020-08-27/SetupAttempts.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ declare module 'stripe' {

namespace SetupAttempt {
interface PaymentMethodDetails {
au_becs_debit?: PaymentMethodDetails.AuBecsDebit;

bacs_debit?: PaymentMethodDetails.BacsDebit;

bancontact?: PaymentMethodDetails.Bancontact;

card?: PaymentMethodDetails.Card;
Expand All @@ -79,6 +83,8 @@ declare module 'stripe' {

ideal?: PaymentMethodDetails.Ideal;

sepa_debit?: PaymentMethodDetails.SepaDebit;

sofort?: PaymentMethodDetails.Sofort;

/**
Expand All @@ -88,6 +94,10 @@ declare module 'stripe' {
}

namespace PaymentMethodDetails {
interface AuBecsDebit {}

interface BacsDebit {}

interface Bancontact {
/**
* Bank code of bank associated with the bank account.
Expand Down Expand Up @@ -261,6 +271,8 @@ declare module 'stripe' {
| 'TRIONL2U';
}

interface SepaDebit {}

interface Sofort {
/**
* Bank code of bank associated with the bank account.
Expand Down

0 comments on commit 6d6e215

Please sign in to comment.