omise/omise-node

omise.charges.list do not take in account the pagination parameters

Closed this issue · 1 comments

I think I spot out a mistake in the nodejs lib.

At the moment it s not possible to use the paging parameter ( from https://www.omise.co/api-pagination )
because the https://github.com/omise/omise-node/blob/master/lib/apiResources.js
at line 56 :

list: function(callback) {
return api.get(_makeOptions(options, path()), callback);
},
is missing data, it should be

list: function(data,callback) {

To been able to use the pagination parameters as :

omisePromise = omise.charges.list({"limit": 5});

I know that I should have provided a PR, but I am a bit lazy to do it.

Beside, I believe that the unit testing should also integrate the paging parameters, and it sounds like a bit of work ;-)

Anyway, I have fixed it on my side, but I would really appreciate if you could add fix it in the official package :-)

zdk commented

Thanks for reporting, I'll patch the package.