Skip to content

Commit

Permalink
expand PaymentMethod type to include au_becs_debit (#315)
Browse files Browse the repository at this point in the history
  • Loading branch information
arashn-stripe committed Apr 22, 2022
1 parent 59129a0 commit 70070e1
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
20 changes: 15 additions & 5 deletions tests/types/src/valid.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1639,11 +1639,21 @@ stripe.createPaymentMethod({
billing_details: {name: 'Jenny Rosen', email: 'jenny@example.com'},
});

stripe.createPaymentMethod({
type: 'au_becs_debit',
au_becs_debit: {bsb_number: '', account_number: ''},
billing_details: {name: 'Jenny Rosen', email: 'jenny@example.com'},
});
stripe
.createPaymentMethod({
type: 'au_becs_debit',
au_becs_debit: {bsb_number: '', account_number: ''},
billing_details: {name: 'Jenny Rosen', email: 'jenny@example.com'},
})
.then(({paymentMethod}) => {
if (
paymentMethod &&
paymentMethod.au_becs_debit &&
paymentMethod.au_becs_debit.fingerprint
) {
console.log(paymentMethod.au_becs_debit.fingerprint);
}
});

stripe
.createPaymentMethod({
Expand Down
2 changes: 2 additions & 0 deletions types/api/payment-methods.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ export interface PaymentMethod {

acss_debit?: PaymentMethod.AcssDebit;

au_becs_debit?: PaymentMethod.AuBecsDebit;

us_bank_account?: PaymentMethod.UsBankAccount;
}

Expand Down

0 comments on commit 70070e1

Please sign in to comment.