mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 23:07:06 +00:00
[@types/stripe] Fix IPaymentIntentListOptions (#41204)
* Fix IPaymentIntentListOptions Added `customer` field and removed `expired` and `files` fields, per [Stripe API](https://stripe.com/docs/api/payment_intents/list). * Updated stripe-tests.ts Added customer field to test creation, so we can test listing with customer field set. * Fix missing semicolon in index.d.ts
This commit is contained in:
Vendored
+3
-7
@@ -35,6 +35,7 @@
|
||||
// Aseel Al Dallal <https://github.com/Aseelaldallal>
|
||||
// Collin Pham <https://github.com/collin-pham>
|
||||
// Timon van Spronsen <https://github.com/TimonVS>
|
||||
// Sean Chen <https://github.com/kamiyo>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.8
|
||||
|
||||
@@ -7590,14 +7591,9 @@ declare namespace Stripe {
|
||||
|
||||
interface IPaymentIntentListOptions extends IListOptionsCreated {
|
||||
/**
|
||||
* Filter links by their expiration status. By default, all links are returned.
|
||||
* Only return PaymentIntents for the customer specified by this customer ID.
|
||||
*/
|
||||
expired?: boolean;
|
||||
|
||||
/**
|
||||
* Only return links for the given file.
|
||||
*/
|
||||
file?: boolean;
|
||||
customer?: string;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2091,6 +2091,7 @@ stripe.paymentIntents.create(
|
||||
amount: 2000,
|
||||
currency: 'eur',
|
||||
payment_method_types: ['card', 'ideal', 'sepa_debit'],
|
||||
customer: 'cus_5rfJKDJkuxzh5Q',
|
||||
},
|
||||
(err, intent) => {},
|
||||
);
|
||||
@@ -2100,6 +2101,7 @@ stripe.paymentIntents
|
||||
amount: 2000,
|
||||
currency: 'eur',
|
||||
payment_method_types: ['card', 'ideal', 'sepa_debit'],
|
||||
customer: 'cus_5rfJKDJkuxzh5Q',
|
||||
})
|
||||
.then(intent => {});
|
||||
|
||||
@@ -2107,8 +2109,8 @@ stripe.paymentIntents.list({}, (err, intent) => {});
|
||||
stripe.paymentIntents.list({}).then(intent => {});
|
||||
stripe.paymentIntents.list((err, intent) => {});
|
||||
stripe.paymentIntents.list().then(intent => {});
|
||||
stripe.paymentIntents.list({ expired: true }, (err, intent) => {});
|
||||
stripe.paymentIntents.list({ expired: true }).then(intent => {});
|
||||
stripe.paymentIntents.list({ customer: 'cus_5rfJKDJkuxzh5Q' }, (err, intent) => {});
|
||||
stripe.paymentIntents.list({ customer: 'cus_5rfJKDJkuxzh5Q' }).then(intent => {});
|
||||
|
||||
stripe.paymentIntents.update(
|
||||
'pi_Aabcxyz01aDfoo',
|
||||
|
||||
Reference in New Issue
Block a user