Skip to content

Commit

Permalink
Merge pull request #1381 from stripe/latest-codegen
Browse files Browse the repository at this point in the history
API Updates
  • Loading branch information
yejia-stripe authored Mar 25, 2022
2 parents 08b34ec + c8848de commit 7715fb7
Show file tree
Hide file tree
Showing 11 changed files with 893 additions and 1 deletion.
64 changes: 63 additions & 1 deletion types/2020-08-27/Accounts.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ declare module 'stripe' {
country: string;

/**
* Time at which the object was created. Measured in seconds since the Unix epoch.
* Time at which the account was connected. Measured in seconds since the Unix epoch.
*/
created?: number;

Expand Down Expand Up @@ -256,6 +256,11 @@ declare module 'stripe' {
*/
p24_payments?: Capabilities.P24Payments;

/**
* The status of the paynow payments capability of the account, or whether the account can directly process paynow charges.
*/
paynow_payments?: Capabilities.PaynowPayments;

/**
* The status of the SEPA Direct Debits payments capability of the account, or whether the account can directly process SEPA Direct Debits charges.
*/
Expand All @@ -280,6 +285,11 @@ declare module 'stripe' {
* The status of the transfers capability of the account, or whether your platform can transfer funds to the account.
*/
transfers?: Capabilities.Transfers;

/**
* The status of the US bank account ACH payments capability of the account, or whether the account can directly process US bank account charges.
*/
us_bank_account_ach_payments?: Capabilities.UsBankAccountAchPayments;
}

namespace Capabilities {
Expand Down Expand Up @@ -323,6 +333,8 @@ declare module 'stripe' {

type P24Payments = 'active' | 'inactive' | 'pending';

type PaynowPayments = 'active' | 'inactive' | 'pending';

type SepaDebitPayments = 'active' | 'inactive' | 'pending';

type SofortPayments = 'active' | 'inactive' | 'pending';
Expand All @@ -332,6 +344,8 @@ declare module 'stripe' {
type TaxReportingUs1099Misc = 'active' | 'inactive' | 'pending';

type Transfers = 'active' | 'inactive' | 'pending';

type UsBankAccountAchPayments = 'active' | 'inactive' | 'pending';
}

interface Company {
Expand Down Expand Up @@ -1270,6 +1284,11 @@ declare module 'stripe' {
*/
p24_payments?: Capabilities.P24Payments;

/**
* The paynow_payments capability.
*/
paynow_payments?: Capabilities.PaynowPayments;

/**
* The sepa_debit_payments capability.
*/
Expand All @@ -1294,6 +1313,11 @@ declare module 'stripe' {
* The transfers capability.
*/
transfers?: Capabilities.Transfers;

/**
* The us_bank_account_ach_payments capability.
*/
us_bank_account_ach_payments?: Capabilities.UsBankAccountAchPayments;
}

namespace Capabilities {
Expand Down Expand Up @@ -1437,6 +1461,13 @@ declare module 'stripe' {
requested?: boolean;
}

interface PaynowPayments {
/**
* Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
*/
requested?: boolean;
}

interface SepaDebitPayments {
/**
* Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
Expand Down Expand Up @@ -1471,6 +1502,13 @@ declare module 'stripe' {
*/
requested?: boolean;
}

interface UsBankAccountAchPayments {
/**
* Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
*/
requested?: boolean;
}
}

interface Company {
Expand Down Expand Up @@ -2352,6 +2390,11 @@ declare module 'stripe' {
*/
p24_payments?: Capabilities.P24Payments;

/**
* The paynow_payments capability.
*/
paynow_payments?: Capabilities.PaynowPayments;

/**
* The sepa_debit_payments capability.
*/
Expand All @@ -2376,6 +2419,11 @@ declare module 'stripe' {
* The transfers capability.
*/
transfers?: Capabilities.Transfers;

/**
* The us_bank_account_ach_payments capability.
*/
us_bank_account_ach_payments?: Capabilities.UsBankAccountAchPayments;
}

namespace Capabilities {
Expand Down Expand Up @@ -2519,6 +2567,13 @@ declare module 'stripe' {
requested?: boolean;
}

interface PaynowPayments {
/**
* Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
*/
requested?: boolean;
}

interface SepaDebitPayments {
/**
* Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
Expand Down Expand Up @@ -2553,6 +2608,13 @@ declare module 'stripe' {
*/
requested?: boolean;
}

interface UsBankAccountAchPayments {
/**
* Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
*/
requested?: boolean;
}
}

interface Company {
Expand Down
54 changes: 54 additions & 0 deletions types/2020-08-27/Charges.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,11 @@ declare module 'stripe' {
*/
disputed: boolean;

/**
* ID of the balance transaction that describes the reversal of the balance on your account due to payment failure.
*/
failure_balance_transaction?: string | Stripe.BalanceTransaction | null;

/**
* Error code explaining reason for charge failure if available (see [the errors section](https://stripe.com/docs/api#errors) for a list of codes).
*/
Expand Down Expand Up @@ -426,6 +431,8 @@ declare module 'stripe' {

p24?: PaymentMethodDetails.P24;

paynow?: PaymentMethodDetails.Paynow;

sepa_credit_transfer?: PaymentMethodDetails.SepaCreditTransfer;

sepa_debit?: PaymentMethodDetails.SepaDebit;
Expand All @@ -441,6 +448,8 @@ declare module 'stripe' {
*/
type: string;

us_bank_account?: PaymentMethodDetails.UsBankAccount;

wechat?: PaymentMethodDetails.Wechat;

wechat_pay?: PaymentMethodDetails.WechatPay;
Expand Down Expand Up @@ -1518,6 +1527,13 @@ declare module 'stripe' {
| 'volkswagen_bank';
}

interface Paynow {
/**
* Reference number associated with this PayNow payment
*/
reference: string | null;
}

interface SepaCreditTransfer {
/**
* Name of the bank associated with the bank account.
Expand Down Expand Up @@ -1629,6 +1645,44 @@ declare module 'stripe' {

interface StripeAccount {}

interface UsBankAccount {
/**
* Account holder type: individual or company.
*/
account_holder_type: UsBankAccount.AccountHolderType | null;

/**
* Account type: checkings or savings. Defaults to checking if omitted.
*/
account_type: UsBankAccount.AccountType | null;

/**
* Name of the bank associated with the bank account.
*/
bank_name: string | null;

/**
* Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
*/
fingerprint: string | null;

/**
* Last four digits of the bank account number.
*/
last4: string | null;

/**
* Routing number of the bank account.
*/
routing_number: string | null;
}

namespace UsBankAccount {
type AccountHolderType = 'company' | 'individual';

type AccountType = 'checking' | 'savings';
}

interface Wechat {}

interface WechatPay {
Expand Down
31 changes: 31 additions & 0 deletions types/2020-08-27/Checkout/Sessions.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,8 @@ declare module 'stripe' {
konbini?: PaymentMethodOptions.Konbini;

oxxo?: PaymentMethodOptions.Oxxo;

us_bank_account?: PaymentMethodOptions.UsBankAccount;
}

namespace PaymentMethodOptions {
Expand Down Expand Up @@ -516,6 +518,17 @@ declare module 'stripe' {
*/
expires_after_days: number;
}

interface UsBankAccount {
/**
* Bank account verification method.
*/
verification_method?: UsBankAccount.VerificationMethod;
}

namespace UsBankAccount {
type VerificationMethod = 'automatic' | 'instant';
}
}

type PaymentStatus = 'no_payment_required' | 'paid' | 'unpaid';
Expand Down Expand Up @@ -1528,6 +1541,11 @@ declare module 'stripe' {
*/
oxxo?: PaymentMethodOptions.Oxxo;

/**
* contains details about the Us Bank Account payment method options.
*/
us_bank_account?: PaymentMethodOptions.UsBankAccount;

/**
* contains details about the WeChat Pay payment method options.
*/
Expand Down Expand Up @@ -1616,6 +1634,17 @@ declare module 'stripe' {
expires_after_days?: number;
}

interface UsBankAccount {
/**
* Verification method for the intent
*/
verification_method?: UsBankAccount.VerificationMethod;
}

namespace UsBankAccount {
type VerificationMethod = 'automatic' | 'instant';
}

interface WechatPay {
/**
* The app ID registered with WeChat Pay. Only required when client is ios or android.
Expand Down Expand Up @@ -1651,8 +1680,10 @@ declare module 'stripe' {
| 'konbini'
| 'oxxo'
| 'p24'
| 'paynow'
| 'sepa_debit'
| 'sofort'
| 'us_bank_account'
| 'wechat_pay';

interface PhoneNumberCollection {
Expand Down
2 changes: 2 additions & 0 deletions types/2020-08-27/Customers.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -717,8 +717,10 @@ declare module 'stripe' {
| 'konbini'
| 'oxxo'
| 'p24'
| 'paynow'
| 'sepa_debit'
| 'sofort'
| 'us_bank_account'
| 'wechat_pay';
}

Expand Down
Loading

0 comments on commit 7715fb7

Please sign in to comment.