Skip to content

Commit

Permalink
fix: wrong types definition specified for class field
Browse files Browse the repository at this point in the history
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 razorpay#377, fixes razorpay#381
  • Loading branch information
OutdatedGuy authored May 18, 2024
1 parent d836994 commit b773e5e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/types/customers.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export declare namespace Customers {
*
* `1` (default): If a customer with the same details already exists, throws an error.
*/
fail_existing?: boolean | 0 | 1;
fail_existing?: "0" | "1";
/**
* Customer's GST number, if available
*/
Expand Down Expand Up @@ -245,4 +245,4 @@ declare function customers(api: any): {
fetchEligibility(eligibilityId: string): Promise<Partial<Customers.RazorpayCustomerEligibility>>
}

export default customers
export default customers

0 comments on commit b773e5e

Please sign in to comment.