Skip to content

Commit ea69302

Browse files
committed
fix: wrong types definition specified for class field
According to [official docs for customer creation](https://razorpay.com/docs/api/customers/create/) using razorpay API, `fail_existing` should be a string. But the types defined where `boolean`, numeric `1` & `0`. fixes #377, fixes #381
1 parent eee1df7 commit ea69302

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/types/customers.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export declare namespace Customers {
2525
*
2626
* `1` (default): If a customer with the same details already exists, throws an error.
2727
*/
28-
fail_existing?: boolean | 0 | 1;
28+
fail_existing?: "0" | "1";
2929
/**
3030
* Customer's GST number, if available
3131
*/
@@ -245,4 +245,4 @@ declare function customers(api: any): {
245245
fetchEligibility(eligibilityId: string): Promise<Partial<Customers.RazorpayCustomerEligibility>>
246246
}
247247

248-
export default customers
248+
export default customers

0 commit comments

Comments
 (0)