From b773e5e94b2884312d954071b0fff96003cbab18 Mon Sep 17 00:00:00 2001 From: OutdatedGuy Date: Sat, 18 May 2024 08:19:44 +0530 Subject: [PATCH] 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 https://github.com/razorpay/razorpay-node/issues/377, fixes https://github.com/razorpay/razorpay-node/issues/381 --- lib/types/customers.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/types/customers.d.ts b/lib/types/customers.d.ts index c18d5c6..d42df75 100644 --- a/lib/types/customers.d.ts +++ b/lib/types/customers.d.ts @@ -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 */ @@ -245,4 +245,4 @@ declare function customers(api: any): { fetchEligibility(eligibilityId: string): Promise> } -export default customers \ No newline at end of file +export default customers