razorpay / razorpay-node

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

order.fetchTransfers|fetch all transfers for a given order #244

Closed negati-ve closed 2 years ago

negati-ve commented 2 years ago

As per documentation @ https://github.com/razorpay/razorpay-node/blob/master/documents/transfer.md,

instance.orders.transfers({
  "expand[]": "transfers"
})

results in "orders.transfers is not a function" error

This PR adds a function fetchTransfers to orders, allowing to fetch transfers for a given order id as follows,

instance.orders.fetchTransfers(
        "order_xxxxxxxxxxx"
    );

Thats all folks!