mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
Added customers.ICustomerListOptions to accurately implement stripe-node (#27517)
This commit is contained in:
parent
211986a530
commit
171ff2c377
14
types/stripe/index.d.ts
vendored
14
types/stripe/index.d.ts
vendored
@ -1,4 +1,4 @@
|
||||
// Type definitions for stripe 5.0
|
||||
// Type definitions for stripe 5.0.19
|
||||
// Project: https://github.com/stripe/stripe-node/
|
||||
// Definitions by: William Johnston <https://github.com/wjohnsto>
|
||||
// Peter Harris <https://github.com/codeanimal>
|
||||
@ -11,6 +11,7 @@
|
||||
// Gal Talmor <https://github.com/galtalmor>
|
||||
// Hunter Tunnicliff <https://github.com/htunnicliff>
|
||||
// Tyler Jones <https://github.com/squirly>
|
||||
// Troy Zarger <https://github.com/tzarger>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.2
|
||||
|
||||
@ -1469,6 +1470,13 @@ declare namespace Stripe {
|
||||
source?: sources.ISourceCreationOptionsExtended;
|
||||
}
|
||||
|
||||
interface ICustomerListOptions extends IListOptionsCreated {
|
||||
/**
|
||||
* A filter on the list based on the customer’s email field. The value must be a string.
|
||||
*/
|
||||
email?: string;
|
||||
}
|
||||
|
||||
interface ICustomerSourceCreationOptions extends IDataOptionsWithMetadata {
|
||||
/**
|
||||
* When adding a card to a customer, the parameter name is source. When
|
||||
@ -5855,8 +5863,8 @@ declare namespace Stripe {
|
||||
*
|
||||
* @param data Allows you to filter the customers you want.
|
||||
*/
|
||||
list(data: IListOptionsCreated, options: HeaderOptions, response?: IResponseFn<IList<customers.ICustomer>>): Promise<IList<customers.ICustomer>>;
|
||||
list(data: IListOptionsCreated, response?: IResponseFn<IList<customers.ICustomer>>): Promise<IList<customers.ICustomer>>;
|
||||
list(data: customers.ICustomerListOptions, options: HeaderOptions, response?: IResponseFn<IList<customers.ICustomer>>): Promise<IList<customers.ICustomer>>;
|
||||
list(data: customers.ICustomerListOptions, response?: IResponseFn<IList<customers.ICustomer>>): Promise<IList<customers.ICustomer>>;
|
||||
list(options: HeaderOptions, response?: IResponseFn<IList<customers.ICustomer>>): Promise<IList<customers.ICustomer>>;
|
||||
list(response?: IResponseFn<IList<customers.ICustomer>>): Promise<IList<customers.ICustomer>>;
|
||||
|
||||
|
||||
@ -364,6 +364,10 @@ stripe.customers.list({ limit: 3 }).then(function (customers) {
|
||||
// asynchronously called
|
||||
});
|
||||
|
||||
stripe.customers.list({ email: "test@example.com" }).then(function (customers) {
|
||||
// asynchronously called
|
||||
});
|
||||
|
||||
stripe.customers.createCard(
|
||||
"cus_5rfJKDJkuxzh5Q",
|
||||
{ card: "tok_15V2YhEe31JkLCeQy9iUgsJX" },
|
||||
|
||||
Loading…
Reference in New Issue
Block a user