Skip to content

Commit

Permalink
Codegen for openapi adfc63f (#1196)
Browse files Browse the repository at this point in the history
  • Loading branch information
richardm-stripe authored Jul 21, 2021
1 parent 372c061 commit 6c6c8f1
Show file tree
Hide file tree
Showing 10 changed files with 51 additions and 31 deletions.
8 changes: 4 additions & 4 deletions types/2020-08-27/Accounts.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -905,7 +905,7 @@ declare module 'stripe' {
expand?: Array<string>;

/**
* A card or bank account to attach to the account for receiving [payouts](https://stripe.com/docs/connect/bank-debit-card-payouts) (you won't be able to use it for top-ups). You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/stripe.js), or a dictionary, as documented in the `external_account` parameter for [bank account](https://stripe.com/docs/api#account_create_bank_account) creation.
* A card or bank account to attach to the account for receiving [payouts](https://stripe.com/docs/connect/bank-debit-card-payouts) (you won't be able to use it for top-ups). You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/stripe-js), or a dictionary, as documented in the `external_account` parameter for [bank account](https://stripe.com/docs/api#account_create_bank_account) creation.
*
* By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the bank account or card creation API.
*/
Expand Down Expand Up @@ -1619,7 +1619,7 @@ declare module 'stripe' {
gender?: string;

/**
* The government-issued ID number of the individual, as appropriate for the representative's country. (Examples are a Social Security Number in the U.S., or a Social Insurance Number in Canada). Instead of the number itself, you can also provide a [PII token created with Stripe.js](https://stripe.com/docs/stripe.js#collecting-pii-data).
* The government-issued ID number of the individual, as appropriate for the representative's country. (Examples are a Social Security Number in the U.S., or a Social Insurance Number in Canada). Instead of the number itself, you can also provide a [PII token created with Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii).
*/
id_number?: string;

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

/**
* A card or bank account to attach to the account for receiving [payouts](https://stripe.com/docs/connect/bank-debit-card-payouts) (you won't be able to use it for top-ups). You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/stripe.js), or a dictionary, as documented in the `external_account` parameter for [bank account](https://stripe.com/docs/api#account_create_bank_account) creation.
* A card or bank account to attach to the account for receiving [payouts](https://stripe.com/docs/connect/bank-debit-card-payouts) (you won't be able to use it for top-ups). You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/stripe-js), or a dictionary, as documented in the `external_account` parameter for [bank account](https://stripe.com/docs/api#account_create_bank_account) creation.
*
* By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the bank account or card creation API.
*/
Expand Down Expand Up @@ -2692,7 +2692,7 @@ declare module 'stripe' {
gender?: string;

/**
* The government-issued ID number of the individual, as appropriate for the representative's country. (Examples are a Social Security Number in the U.S., or a Social Insurance Number in Canada). Instead of the number itself, you can also provide a [PII token created with Stripe.js](https://stripe.com/docs/stripe.js#collecting-pii-data).
* The government-issued ID number of the individual, as appropriate for the representative's country. (Examples are a Social Security Number in the U.S., or a Social Insurance Number in Canada). Instead of the number itself, you can also provide a [PII token created with Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii).
*/
id_number?: string;

Expand Down
2 changes: 1 addition & 1 deletion types/2020-08-27/CreditNoteLineItems.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ declare module 'stripe' {
namespace CreditNoteLineItemListPreviewParams {
interface Line {
/**
* The line item amount to credit. Only valid when `type` is `invoice_line_item` and the referenced invoice line item does not have a quantity, only an amount.
* The line item amount to credit. Only valid when `type` is `invoice_line_item`.
*/
amount?: number;

Expand Down
4 changes: 2 additions & 2 deletions types/2020-08-27/CreditNotes.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ declare module 'stripe' {
namespace CreditNoteCreateParams {
interface Line {
/**
* The line item amount to credit. Only valid when `type` is `invoice_line_item` and the referenced invoice line item does not have a quantity, only an amount.
* The line item amount to credit. Only valid when `type` is `invoice_line_item`.
*/
amount?: number;

Expand Down Expand Up @@ -388,7 +388,7 @@ declare module 'stripe' {
namespace CreditNotePreviewParams {
interface Line {
/**
* The line item amount to credit. Only valid when `type` is `invoice_line_item` and the referenced invoice line item does not have a quantity, only an amount.
* The line item amount to credit. Only valid when `type` is `invoice_line_item`.
*/
amount?: number;

Expand Down
7 changes: 2 additions & 5 deletions types/2020-08-27/Invoices.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -553,20 +553,17 @@ declare module 'stripe' {
source?: Stripe.CustomerSource;

/**
* The type of error returned. One of `api_connection_error`, `api_error`, `authentication_error`, `card_error`, `idempotency_error`, `invalid_request_error`, or `rate_limit_error`
* The type of error returned. One of `api_error`, `card_error`, `idempotency_error`, or `invalid_request_error`
*/
type: LastFinalizationError.Type;
}

namespace LastFinalizationError {
type Type =
| 'api_connection_error'
| 'api_error'
| 'authentication_error'
| 'card_error'
| 'idempotency_error'
| 'invalid_request_error'
| 'rate_limit_error';
| 'invalid_request_error';
}

interface PaymentSettings {
Expand Down
7 changes: 7 additions & 0 deletions types/2020-08-27/Issuing/Transactions.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,11 @@ declare module 'stripe' {
* The nature of the transaction.
*/
type: Transaction.Type;

/**
* The digital wallet used for this transaction. One of `apple_pay`, `google_pay`, or `samsung_pay`.
*/
wallet: Transaction.Wallet | null;
}

namespace Transaction {
Expand Down Expand Up @@ -287,6 +292,8 @@ declare module 'stripe' {
}

type Type = 'capture' | 'refund';

type Wallet = 'apple_pay' | 'google_pay' | 'samsung_pay';
}

interface TransactionRetrieveParams {
Expand Down
32 changes: 27 additions & 5 deletions types/2020-08-27/PaymentIntents.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -306,20 +306,17 @@ declare module 'stripe' {
source?: Stripe.CustomerSource;

/**
* The type of error returned. One of `api_connection_error`, `api_error`, `authentication_error`, `card_error`, `idempotency_error`, `invalid_request_error`, or `rate_limit_error`
* The type of error returned. One of `api_error`, `card_error`, `idempotency_error`, or `invalid_request_error`
*/
type: LastPaymentError.Type;
}

namespace LastPaymentError {
type Type =
| 'api_connection_error'
| 'api_error'
| 'authentication_error'
| 'card_error'
| 'idempotency_error'
| 'invalid_request_error'
| 'rate_limit_error';
| 'invalid_request_error';
}

interface NextAction {
Expand Down Expand Up @@ -510,6 +507,8 @@ declare module 'stripe' {

card_present?: PaymentMethodOptions.CardPresent;

ideal?: PaymentMethodOptions.Ideal;

oxxo?: PaymentMethodOptions.Oxxo;

p24?: PaymentMethodOptions.P24;
Expand Down Expand Up @@ -683,6 +682,8 @@ declare module 'stripe' {

interface CardPresent {}

interface Ideal {}

interface Oxxo {
/**
* The number of calendar days before an OXXO invoice expires. For example, if you create an OXXO invoice on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time.
Expand Down Expand Up @@ -1433,6 +1434,11 @@ declare module 'stripe' {
*/
card_present?: Stripe.Emptyable<PaymentMethodOptions.CardPresent>;

/**
* If this is a `ideal` PaymentMethod, this sub-hash contains details about the Ideal payment method options.
*/
ideal?: Stripe.Emptyable<PaymentMethodOptions.Ideal>;

/**
* If this is a `oxxo` PaymentMethod, this sub-hash contains details about the OXXO payment method options.
*/
Expand Down Expand Up @@ -1618,6 +1624,8 @@ declare module 'stripe' {

interface CardPresent {}

interface Ideal {}

interface Oxxo {
/**
* The number of calendar days before an OXXO voucher expires. For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time.
Expand Down Expand Up @@ -2288,6 +2296,11 @@ declare module 'stripe' {
*/
card_present?: Stripe.Emptyable<PaymentMethodOptions.CardPresent>;

/**
* If this is a `ideal` PaymentMethod, this sub-hash contains details about the Ideal payment method options.
*/
ideal?: Stripe.Emptyable<PaymentMethodOptions.Ideal>;

/**
* If this is a `oxxo` PaymentMethod, this sub-hash contains details about the OXXO payment method options.
*/
Expand Down Expand Up @@ -2473,6 +2486,8 @@ declare module 'stripe' {

interface CardPresent {}

interface Ideal {}

interface Oxxo {
/**
* The number of calendar days before an OXXO voucher expires. For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time.
Expand Down Expand Up @@ -3257,6 +3272,11 @@ declare module 'stripe' {
*/
card_present?: Stripe.Emptyable<PaymentMethodOptions.CardPresent>;

/**
* If this is a `ideal` PaymentMethod, this sub-hash contains details about the Ideal payment method options.
*/
ideal?: Stripe.Emptyable<PaymentMethodOptions.Ideal>;

/**
* If this is a `oxxo` PaymentMethod, this sub-hash contains details about the OXXO payment method options.
*/
Expand Down Expand Up @@ -3442,6 +3462,8 @@ declare module 'stripe' {

interface CardPresent {}

interface Ideal {}

interface Oxxo {
/**
* The number of calendar days before an OXXO voucher expires. For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time.
Expand Down
4 changes: 2 additions & 2 deletions types/2020-08-27/Persons.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ declare module 'stripe' {
gender?: string;

/**
* The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/stripe.js#collecting-pii-data).
* The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii).
*/
id_number?: string;

Expand Down Expand Up @@ -786,7 +786,7 @@ declare module 'stripe' {
gender?: string;

/**
* The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/stripe.js#collecting-pii-data).
* The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii).
*/
id_number?: string;

Expand Down
7 changes: 2 additions & 5 deletions types/2020-08-27/SetupAttempts.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -417,20 +417,17 @@ declare module 'stripe' {
source?: Stripe.CustomerSource;

/**
* The type of error returned. One of `api_connection_error`, `api_error`, `authentication_error`, `card_error`, `idempotency_error`, `invalid_request_error`, or `rate_limit_error`
* The type of error returned. One of `api_error`, `card_error`, `idempotency_error`, or `invalid_request_error`
*/
type: SetupError.Type;
}

namespace SetupError {
type Type =
| 'api_connection_error'
| 'api_error'
| 'authentication_error'
| 'card_error'
| 'idempotency_error'
| 'invalid_request_error'
| 'rate_limit_error';
| 'invalid_request_error';
}
}

Expand Down
7 changes: 2 additions & 5 deletions types/2020-08-27/SetupIntents.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -213,20 +213,17 @@ declare module 'stripe' {
source?: Stripe.CustomerSource;

/**
* The type of error returned. One of `api_connection_error`, `api_error`, `authentication_error`, `card_error`, `idempotency_error`, `invalid_request_error`, or `rate_limit_error`
* The type of error returned. One of `api_error`, `card_error`, `idempotency_error`, or `invalid_request_error`
*/
type: LastSetupError.Type;
}

namespace LastSetupError {
type Type =
| 'api_connection_error'
| 'api_error'
| 'authentication_error'
| 'card_error'
| 'idempotency_error'
| 'invalid_request_error'
| 'rate_limit_error';
| 'invalid_request_error';
}

interface NextAction {
Expand Down
4 changes: 2 additions & 2 deletions types/2020-08-27/Tokens.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ declare module 'stripe' {
gender?: string;

/**
* The government-issued ID number of the individual, as appropriate for the representative's country. (Examples are a Social Security Number in the U.S., or a Social Insurance Number in Canada). Instead of the number itself, you can also provide a [PII token created with Stripe.js](https://stripe.com/docs/stripe.js#collecting-pii-data).
* The government-issued ID number of the individual, as appropriate for the representative's country. (Examples are a Social Security Number in the U.S., or a Social Insurance Number in Canada). Instead of the number itself, you can also provide a [PII token created with Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii).
*/
id_number?: string;

Expand Down Expand Up @@ -600,7 +600,7 @@ declare module 'stripe' {
gender?: string;

/**
* The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/stripe.js#collecting-pii-data).
* The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii).
*/
id_number?: string;

Expand Down

0 comments on commit 6c6c8f1

Please sign in to comment.