From dc4c32d9e2677a39ef7040103f110d1d3a7f29f2 Mon Sep 17 00:00:00 2001 From: Marty Alcala Date: Tue, 8 Oct 2019 17:24:21 -0400 Subject: [PATCH] add source_type param to stripe.transfers.create (#38896) --- types/stripe/index.d.ts | 6 ++++++ types/stripe/stripe-tests.ts | 13 +++++++++++++ 2 files changed, 19 insertions(+) diff --git a/types/stripe/index.d.ts b/types/stripe/index.d.ts index fc686ca67a..59bd40be3c 100644 --- a/types/stripe/index.d.ts +++ b/types/stripe/index.d.ts @@ -7424,6 +7424,12 @@ declare namespace Stripe { */ source_transaction?: string; + /** + * The source balance to use for this transfer. One of bank_account + * or card. For most users, this will default to card. + */ + source_type?: SourceTypes; + /** * A string that identifies this transaction as part of a group. * See the Connect documentation for details. diff --git a/types/stripe/stripe-tests.ts b/types/stripe/stripe-tests.ts index b7e9a9fce6..7d8fca1502 100644 --- a/types/stripe/stripe-tests.ts +++ b/types/stripe/stripe-tests.ts @@ -995,6 +995,19 @@ stripe.customers.listTaxIds('cus_FhdWgak8aeNfht', (err, taxIds) => { //#region Transfers tests // ################################################################################## +stripe.transfers.create( + { amount: 100, currency: 'USD', destination: 'acct_17wV8KBoqMA9o2xk', source_type: 'bank_account' }, + (err, reversal) => { + // asynchronously called + }, +); + +stripe.transfers + .create({ amount: 100, currency: 'USD', destination: 'acct_17wV8KBoqMA9o2xk', source_type: 'bank_account' }) + .then(reversal => { + // asynchronously called + }); + //#endregion //#region Transfers Reversals tests