[@types/stripe] Added "transfer_group" as property on stripe.ITransfer (#40278)

* Add transfer_group to type definitions for Stripe update charge. Documentation: https://stripe.com/docs/api/charges/update

* Added "transfer_group" as property on stripe.ITransfer

* 'transfer_group' on ITransfer can be 'null'
This commit is contained in:
axelfran
2019-11-13 01:54:38 +01:00
committed by Pranav Senthilnathan
parent cf2baac7cb
commit 842e91e454
2 changed files with 8 additions and 3 deletions

View File

@@ -7677,7 +7677,12 @@ declare namespace Stripe {
status: Statuses;
/**
* Can be card, bank_account, or stripe_account.
* A string that identifies this transaction as part of a group.
*/
transfer_group: string | null;
/**
* Can be card, bank_account, or stripe_account.
*/
type: 'card' | 'bank_account' | 'stripe_account';
}

View File

@@ -1050,14 +1050,14 @@ stripe.customers.listTaxIds('cus_FhdWgak8aeNfht', (err, taxIds) => {
// ##################################################################################
stripe.transfers.create(
{ amount: 100, currency: 'USD', destination: 'acct_17wV8KBoqMA9o2xk', source_type: 'bank_account' },
{ amount: 100, currency: 'USD', destination: 'acct_17wV8KBoqMA9o2xk', source_type: 'bank_account', transfer_group: 'Order_X' },
(err, reversal) => {
// asynchronously called
},
);
stripe.transfers
.create({ amount: 100, currency: 'USD', destination: 'acct_17wV8KBoqMA9o2xk', source_type: 'bank_account' })
.create({ amount: 100, currency: 'USD', destination: 'acct_17wV8KBoqMA9o2xk', source_type: 'bank_account', transfer_group: 'Order_X' })
.then(reversal => {
// asynchronously called
});