abh/node-stripe — pull request #37 by slajax (2013-03-08 01:03:26+00:00)
Title: Pass an object as an argument to customer.list and coupons.list

This is somewhat of situational PR but I think it's worth considering for the sake of consistent alignment of method arguments.

I have some code that is looping through the charge, customer and invoice objects and making calls to list methods programmatically. It seems that the expected arguments for `charge` and `invoice` both accept an object however `customer` expects two separate arguments for `count` and `offset`. This patch just adds support for the short hand `.list({ count: x, offset: x}, fn)` arg style which makes for a slightly more consistent interface across these methods.

Side note, I ran the tests before writing this PR and they seem to fail for me, so I wasn't able to confirm this patch against the tests. This could be due to the fact I was testing with a stripe connect oauth key but I'll do some work on the tests and see what I can figure out.

I've also got some reasons to implement more support for connect so I'll see what help I can offer there in future PR's.

Feedback appreciated.