chargify / chargify_api_ares

A Chargify API wrapper for Ruby using ActiveResource
http://chargify.com
MIT License
161 stars 95 forks source link

misunderstood the calls? #77

Closed alexisraca closed 10 years ago

alexisraca commented 10 years ago

I contributed with the Invoice model a few days ago, my problem now is that maybe i missunderstood the way the model's REST work with the chargify API

in the API it says for example:

then i make:

and it returns the Invoice with the correct id problem comes when i have to make the filtering when not knowing the id of the invoice while working with the webhooks like this:

Chargify::Invoice(:first, params: {subscription_id: subscription_id})

it seems to filter the array of invoice like making the first restfull call:

but returns the last created invoice at chargify

no matter what params or if :first, :last, :all, unless i send the ID it dont do any filtering, even while sending the id, it only filters by id and ignores other params.

this is happening with all models

maybe I missunderstood the way chargify and the gem link but i would be realy gratefull to have some light on this concern.

alexisraca commented 10 years ago

Just managed to fully understand the open requests at chargify, will correct the Invoice models calls with a little more time