[@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:
Shmuel Lamm
2019-09-05 14:18:27 -04:00
committed by Andrew Casey
parent de1035d2d7
commit 5b347bb02c
2 changed files with 28 additions and 0 deletions

View File

@@ -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.
*/

View File

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