mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-07-04 17:20:09 +00:00
[@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:
committed by
Pranav Senthilnathan
parent
cf2baac7cb
commit
842e91e454
7
types/stripe/index.d.ts
vendored
7
types/stripe/index.d.ts
vendored
@@ -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';
|
||||
}
|
||||
|
||||
@@ -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
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user