[@types/stripe] Update payment intent payment methods (#40769)

* Update payment intent payment methods

* Add myself to "Definitions by" list

* Update tests
This commit is contained in:
Timon van Spronsen 2019-12-10 20:13:44 +01:00 committed by Orta
parent efa018865a
commit 55f6ec8097
2 changed files with 5 additions and 4 deletions

View File

@ -34,6 +34,7 @@
// Richard Ward <https://github.com/richardwardza>
// Aseel Al Dallal <https://github.com/Aseelaldallal>
// Collin Pham <https://github.com/collin-pham>
// Timon van Spronsen <https://github.com/TimonVS>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.8
@ -7245,7 +7246,7 @@ declare namespace Stripe {
}
/** Payment methods supported by Payment Intents. This is a subsetset of all Payment Method types. See https://stripe.com/docs/api/payment_methods/create#create_payment_method-type */
type PaymentIntentPaymentMethodType = 'card' | 'card_present';
type PaymentIntentPaymentMethodType = 'card' | 'ideal' | 'sepa_debit';
interface IPaymentMethodCardOptions {
/**
@ -7612,7 +7613,7 @@ declare namespace Stripe {
}
/** Payment methods supported by Payment Intents. This is a subsetset of all Payment Method types. See https://stripe.com/docs/api/payment_methods/create#create_payment_method-type */
type SetupIntentPaymentMethodType = 'card' | 'card_present' | 'sepa_debit';
type SetupIntentPaymentMethodType = paymentIntents.PaymentIntentPaymentMethodType;
interface ISetupIntent extends IResourceObject {
/**

View File

@ -2077,7 +2077,7 @@ stripe.paymentIntents.create(
{
amount: 2000,
currency: 'eur',
payment_method_types: ['card'],
payment_method_types: ['card', 'ideal', 'sepa_debit'],
},
(err, intent) => {},
);
@ -2086,7 +2086,7 @@ stripe.paymentIntents
.create({
amount: 2000,
currency: 'eur',
payment_method_types: ['card'],
payment_method_types: ['card', 'ideal', 'sepa_debit'],
})
.then(intent => {});