Merge pull request #25910 from jonbretman/stripe-list-sources

fix(stripe): listSource should be listSources
This commit is contained in:
Daniel Rosenwasser
2018-05-22 08:19:08 -07:00
committed by GitHub
2 changed files with 26 additions and 7 deletions

View File

@@ -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[];

View File

@@ -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",