mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-06-01 03:20:46 +08:00
Merge pull request #25910 from jonbretman/stripe-list-sources
fix(stripe): listSource should be listSources
This commit is contained in:
14
types/stripe/index.d.ts
vendored
14
types/stripe/index.d.ts
vendored
@@ -4460,7 +4460,7 @@ declare namespace Stripe {
|
||||
billing?: SubscriptionBilling;
|
||||
|
||||
/**
|
||||
* Number of days a customer has to pay invoices generated by this subscription.
|
||||
* Number of days a customer has to pay invoices generated by this subscription.
|
||||
* Only valid for subscriptions where billing=send_invoice.
|
||||
*/
|
||||
days_until_due?: number;
|
||||
@@ -5753,8 +5753,8 @@ declare namespace Stripe {
|
||||
* @param customerId The ID of the customer whose cards will be retrieved
|
||||
* @param data Filtering options
|
||||
*/
|
||||
listSource(customerId: string, data: customers.ICardSourceListOptions, options: HeaderOptions, response?: IResponseFn<IList<cards.ICard>>): Promise<IList<cards.ICard>>;
|
||||
listSource(customerId: string, data: customers.ICardSourceListOptions, response?: IResponseFn<IList<cards.ICard>>): Promise<IList<cards.ICard>>;
|
||||
listSources(customerId: string, data: customers.ICardSourceListOptions, options: HeaderOptions, response?: IResponseFn<IList<cards.ICard>>): Promise<IList<cards.ICard>>;
|
||||
listSources(customerId: string, data: customers.ICardSourceListOptions, response?: IResponseFn<IList<cards.ICard>>): Promise<IList<cards.ICard>>;
|
||||
/**
|
||||
* You can see a list of the bank accounts belonging to a customer or recipient. Note that the 10 most recent
|
||||
* bank accounts are always available by default on the customer or recipient object. If you need more than
|
||||
@@ -5768,8 +5768,8 @@ declare namespace Stripe {
|
||||
* @param customerId The ID of the customer whose cards will be retrieved
|
||||
* @param data Filtering options
|
||||
*/
|
||||
listSource(customerId: string, data: customers.IBankAccountSourceListOptions, options: HeaderOptions, response?: IResponseFn<IList<bankAccounts.IBankAccount>>): Promise<IList<bankAccounts.IBankAccount>>;
|
||||
listSource(customerId: string, data: customers.IBankAccountSourceListOptions, response?: IResponseFn<IList<bankAccounts.IBankAccount>>): Promise<IList<bankAccounts.IBankAccount>>;
|
||||
listSources(customerId: string, data: customers.IBankAccountSourceListOptions, options: HeaderOptions, response?: IResponseFn<IList<bankAccounts.IBankAccount>>): Promise<IList<bankAccounts.IBankAccount>>;
|
||||
listSources(customerId: string, data: customers.IBankAccountSourceListOptions, response?: IResponseFn<IList<bankAccounts.IBankAccount>>): Promise<IList<bankAccounts.IBankAccount>>;
|
||||
|
||||
/**
|
||||
* By default, you can see the 10 most recent cards/bank accounts stored on a customer or recipient directly on the customer or recipient object, but
|
||||
@@ -7104,10 +7104,10 @@ declare namespace Stripe {
|
||||
* Many objects contain the ID of a related object in their response properties. For example, a Charge may have an associated Customer ID.
|
||||
* Those objects can be expanded inline with the expand request parameter. Objects that can be expanded are noted in this documentation.
|
||||
* This parameter is available on all API requests, and applies to the response of that request only.
|
||||
*
|
||||
*
|
||||
* You can nest expand requests with the dot property. For example, requesting invoice.customer on a charge will expand the invoice property
|
||||
* into a full Invoice object, and will then expand the customer property on that invoice into a full Customer object.
|
||||
*
|
||||
*
|
||||
* You can expand multiple objects at once by identifying multiple items in the expand array.
|
||||
*/
|
||||
expand?: string[];
|
||||
|
||||
@@ -495,6 +495,25 @@ stripe.customers.listCards('cu_15fvyVEe31JkLCeQvr155iqc').then(function (cards)
|
||||
// asynchronously called
|
||||
});
|
||||
|
||||
stripe.customers.listSources('cu_15fvyVEe31JkLCeQvr155iqc', null, function (err, cards) {
|
||||
// asynchronously called
|
||||
});
|
||||
stripe.customers.listSources('cu_15fvyVEe31JkLCeQvr155iqc', null).then(function (cards) {
|
||||
// asynchronously called
|
||||
});
|
||||
stripe.customers.listSources('cu_15fvyVEe31JkLCeQvr155iqc', {
|
||||
object: "card",
|
||||
limit: 100
|
||||
}).then(function (cards) {
|
||||
// asynchronously called
|
||||
});
|
||||
stripe.customers.listSources('cu_15fvyVEe31JkLCeQvr155iqc', {
|
||||
object: "bank_account",
|
||||
limit: 100
|
||||
}).then(function (cards) {
|
||||
// asynchronously called
|
||||
});
|
||||
|
||||
stripe.customers.retrieveSubscription(
|
||||
"cus_5rfJKDJkuxzh5Q",
|
||||
"sub_5rfJxnBLGSwsYp",
|
||||
|
||||
Reference in New Issue
Block a user