-
Notifications
You must be signed in to change notification settings - Fork 159
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add auBankAccount and BECS debit support (#8)
* Add auBankAccount element support * fixes Co-authored-by: wshallum-stripe <51170180+wshallum-stripe@users.noreply.github.com>
- Loading branch information
1 parent
3c60c1c
commit 4512967
Showing
7 changed files
with
305 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
///<reference path='./base.d.ts' /> | ||
|
||
declare module '@stripe/stripe-js' { | ||
type StripeAuBankAccountElement = StripeElementBase & { | ||
/** | ||
* The change event is triggered when the `Element`'s value changes. | ||
*/ | ||
on( | ||
eventType: 'change', | ||
handler: (event: StripeAuBankAccountElementChangeEvent) => any | ||
): StripeAuBankAccountElement; | ||
|
||
/** | ||
* Triggered when the element is fully rendered and can accept `element.focus` calls. | ||
*/ | ||
on(eventType: 'ready', handler: () => any): StripeAuBankAccountElement; | ||
|
||
/** | ||
* Triggered when the element gains focus. | ||
*/ | ||
on(eventType: 'focus', handler: () => any): StripeAuBankAccountElement; | ||
|
||
/** | ||
* Triggered when the element loses focus. | ||
*/ | ||
on(eventType: 'blur', handler: () => any): StripeAuBankAccountElement; | ||
|
||
/** | ||
* Updates the options the `AuBankAccountElement` was initialized with. | ||
* Updates are merged into the existing configuration. | ||
* | ||
* The styles of an `AuBankAccountElement` can be dynamically changed using `element.update`. | ||
* This method can be used to simulate CSS media queries that automatically adjust the size of elements when viewed on different devices. | ||
*/ | ||
update(options: Partial<StripeAuBankAccountElementOptions>): void; | ||
}; | ||
|
||
interface StripeAuBankAccountElementOptions { | ||
classes?: StripeElementClasses; | ||
|
||
style?: StripeElementStyle; | ||
|
||
/** | ||
* Appearance of the icon in the Element. | ||
*/ | ||
iconStyle?: 'default' | 'solid'; | ||
|
||
/** | ||
* Hides the icon in the Element. | ||
* Default is `false`. | ||
*/ | ||
hideIcon?: boolean; | ||
|
||
/** | ||
* Applies a disabled state to the Element such that user input is not accepted. | ||
* Default is false. | ||
*/ | ||
disabled?: boolean; | ||
} | ||
|
||
interface StripeAuBankAccountElementChangeEvent | ||
extends StripeElementChangeEvent { | ||
/** | ||
* The type of element that emitted this event. | ||
*/ | ||
elementType: 'auBankAccount'; | ||
|
||
/** | ||
* The bank name corresponding to the entered BSB. | ||
*/ | ||
bankName?: string; | ||
|
||
/** | ||
* The branch name corresponding to the entered BSB. | ||
*/ | ||
branchName?: string; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.