razorpay / razorpay-node

Razorpay node.js bindings
MIT License
182 stars 111 forks source link

`name` field is mandatory in create customer method #368

Closed OutdatedGuy closed 6 months ago

OutdatedGuy commented 1 year ago

Steps to reproduce the behavior

  1. Create a typescript nodejs project
  2. Add razorpay dependency
  3. Add the sample code in a file
  4. See error

Expected behavior

name field should be optional as mentioned in the official documentation during creation of customer.

Actual behavior

Property 'name' is missing in type '{ contact: string; fail_existing: 0; }' but required in type 'RazorpayCustomerCreateRequestBody'.

Code snippets

const razorpayInstance = new Razorpay({
  key_id: "KEY_ID",
  key_secret: "KEY_SECRET",
});

razorpayInstance.customers.create({
  contact: '9123456780',
  fail_existing: 0
});

Node version

v18.16.1

Library version

razorpay v2.9.0

Additional Information

No response

ankitdas13 commented 1 year ago

@OutdatedGuy We will update this type def and release as soon as possible, thank you for letting us know

OutdatedGuy commented 11 months ago

@ankitdas13 any updates regarding this issue?

OutdatedGuy commented 8 months ago

@ankitdas13 is this being worked on? Are there any updates regarding this issue?

OutdatedGuy commented 6 months ago

Closing as fixed in #405