mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-07-04 17:20:09 +00:00
[@types/stripe] Add external_accounts to IAccount (#36582)
* add external_accounts to IAccountShared * make external_accounts optional * use $ExpectType * remove optionality from $ExpectType
This commit is contained in:
committed by
Armando Aguirre
parent
60e431da4a
commit
cf7dfa2e4b
9
types/stripe/index.d.ts
vendored
9
types/stripe/index.d.ts
vendored
@@ -1,4 +1,4 @@
|
||||
// Type definitions for stripe 6.30
|
||||
// Type definitions for stripe 6.31
|
||||
// Project: https://github.com/stripe/stripe-node/
|
||||
// Definitions by: William Johnston <https://github.com/wjohnsto>
|
||||
// Peter Harris <https://github.com/codeanimal>
|
||||
@@ -25,6 +25,7 @@
|
||||
// Joshua Feltimo <https://github.com/opticalgenesis>
|
||||
// Josiah <https://github.com/spacetag>
|
||||
// Oleg Vaskevich <https://github.com/vaskevich>
|
||||
// Ethan Setnik <https://github.com/esetnik>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
|
||||
@@ -194,6 +195,12 @@ declare namespace Stripe {
|
||||
* This field is null unless business_type is set to individual.
|
||||
*/
|
||||
individual?: IIndividual;
|
||||
|
||||
/**
|
||||
* External accounts (bank accounts and debit cards) currently
|
||||
* attached to this account
|
||||
*/
|
||||
external_accounts?: IList<cards.ICard | bankAccounts.IBankAccount>;
|
||||
}
|
||||
|
||||
interface IAccountCreationOptions extends IAccountUpdateOptions {
|
||||
|
||||
@@ -763,8 +763,11 @@ stripe.accounts.retrieve(
|
||||
);
|
||||
stripe.accounts.retrieve(
|
||||
"acct_17wV8KBoqMA9o2xk").then(
|
||||
(account) => {
|
||||
account => {
|
||||
// asynchronously called
|
||||
|
||||
// account should have external_accounts property
|
||||
account.external_accounts; // $ExpectType IList<ICard | IBankAccount>
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user