From 48e11ddaaa67abec2630b1a3bd476a3c6b36eb79 Mon Sep 17 00:00:00 2001 From: Christopher Henn Date: Wed, 19 Apr 2023 10:50:07 -0400 Subject: [PATCH] Rename PMME option type --- tests/types/src/valid.ts | 2 +- types/stripe-js/elements/payment-method-messaging.d.ts | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/types/src/valid.ts b/tests/types/src/valid.ts index d90aa812..f394a6de 100644 --- a/tests/types/src/valid.ts +++ b/tests/types/src/valid.ts @@ -344,7 +344,7 @@ const paymentMethodMessagingElement = elements.create( 'paymentMethodMessaging', { amount: 2000, - paymentMethods: ['afterpay_clearpay', 'klarna'], + paymentMethodTypes: ['afterpay_clearpay', 'klarna'], countryCode: 'US', currency: 'USD', } diff --git a/types/stripe-js/elements/payment-method-messaging.d.ts b/types/stripe-js/elements/payment-method-messaging.d.ts index b61143ad..e68b2573 100644 --- a/types/stripe-js/elements/payment-method-messaging.d.ts +++ b/types/stripe-js/elements/payment-method-messaging.d.ts @@ -55,7 +55,12 @@ export interface StripePaymentMethodMessagingElementOptions { /** * Payment methods to show messaging for. */ - paymentMethods: Array<'afterpay_clearpay' | 'klarna' | 'affirm'>; + paymentMethodTypes: Array<'afterpay_clearpay' | 'klarna' | 'affirm'>; + + /** + * @deprecated Use `paymentMethodTypes` instead. + */ + paymentMethods?: Array<'afterpay_clearpay' | 'klarna' | 'affirm'>; /** * The country the end-buyer is in.