mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-03 22:37:03 +00:00
Merge pull request #31511 from slangeder/master
[stripe-v3] Added support for iban elements
This commit is contained in:
Vendored
+7
-1
@@ -6,6 +6,7 @@
|
||||
// Adam Cmiel <https://github.com/adamcmiel>
|
||||
// Justin Leider <https://github.com/jleider>
|
||||
// Kamil Gałuszka <https://github.com/galuszkak>
|
||||
// Stefan Langeder <https://github.com/slangeder>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
declare var Stripe: stripe.StripeStatic;
|
||||
@@ -313,6 +314,8 @@ declare namespace stripe {
|
||||
complete: boolean;
|
||||
empty: boolean;
|
||||
value?: { postalCode: string | number };
|
||||
country?: string;
|
||||
bankName?: string;
|
||||
error?: Error;
|
||||
}
|
||||
|
||||
@@ -321,7 +324,7 @@ declare namespace stripe {
|
||||
locale?: string;
|
||||
}
|
||||
|
||||
type elementsType = 'card' | 'cardNumber' | 'cardExpiry' | 'cardCvc' | 'postalCode' | 'paymentRequestButton';
|
||||
type elementsType = 'card' | 'cardNumber' | 'cardExpiry' | 'cardCvc' | 'postalCode' | 'paymentRequestButton' | 'iban';
|
||||
interface Elements {
|
||||
create(type: elementsType, options?: ElementsOptions): Element;
|
||||
}
|
||||
@@ -339,6 +342,7 @@ declare namespace stripe {
|
||||
hideIcon?: boolean;
|
||||
iconStyle?: 'solid' | 'default';
|
||||
placeholder?: string;
|
||||
placeholderCountry?: string;
|
||||
style?: {
|
||||
base?: Style;
|
||||
complete?: Style;
|
||||
@@ -348,6 +352,8 @@ declare namespace stripe {
|
||||
};
|
||||
value?: string | { [objectKey: string]: string; };
|
||||
paymentRequest?: paymentRequest.StripePaymentRequest;
|
||||
supportedCountries?: string[];
|
||||
disabled?: boolean;
|
||||
}
|
||||
|
||||
interface Style extends StyleOptions {
|
||||
|
||||
@@ -211,5 +211,10 @@ describe("Stripe v2 & v3", () => {
|
||||
(error: stripe.Error) => {
|
||||
console.error(error);
|
||||
});
|
||||
|
||||
elements.create('iban', {
|
||||
supportedCountries: ['SEPA'],
|
||||
placeholderCountry: 'AT'
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user