mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-07-01 15:50:13 +00:00
[@types/stripe] Add 'invoice' as an invoice item list option (#37994)
* add invoice and pending as invoice list options * add tests * fix merge conflicts * rename var
This commit is contained in:
committed by
Andrew Casey
parent
de1035d2d7
commit
5b347bb02c
5
types/stripe/index.d.ts
vendored
5
types/stripe/index.d.ts
vendored
@@ -4279,6 +4279,11 @@ declare namespace Stripe {
|
||||
*/
|
||||
customer?: string;
|
||||
|
||||
/**
|
||||
* Only return invoice items belonging to this invoice. If none is provided, all invoice items will be returned. If specifying an invoice, no customer identifier is needed.
|
||||
*/
|
||||
invoice?: string;
|
||||
|
||||
/**
|
||||
* A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
|
||||
*/
|
||||
|
||||
@@ -1489,6 +1489,29 @@ stripe.invoices.sendInvoice('in_15fvyXEe31JkLCeQH7QbgZZb').then(invoice => {
|
||||
//#region Invoice Items tests
|
||||
// ##################################################################################
|
||||
|
||||
stripe.invoiceItems.list(
|
||||
{
|
||||
customer: 'cus_5rfJKDJkuxzh5Q',
|
||||
invoice: 'in_15fvyXEe31JkLCeQH7QbgZZb',
|
||||
pending: true,
|
||||
limit: 3,
|
||||
},
|
||||
(err, invoiceItems) => {
|
||||
// asynchronously called
|
||||
}
|
||||
);
|
||||
|
||||
stripe.invoiceItems
|
||||
.list({
|
||||
customer: 'cus_5rfJKDJkuxzh5Q',
|
||||
invoice: 'in_15fvyXEe31JkLCeQH7QbgZZb',
|
||||
pending: true,
|
||||
limit: 3,
|
||||
})
|
||||
.then(invoiceItems => {
|
||||
// asynchronously called
|
||||
});
|
||||
|
||||
//#endregion
|
||||
|
||||
//#region Payment Intents test
|
||||
|
||||
Reference in New Issue
Block a user