paymill / paymill-ruby

Ruby wrapper for the Paymill API
MIT License
23 stars 16 forks source link

filters not working? #22

Closed gingerlime closed 9 years ago

gingerlime commented 9 years ago

I'm trying to use the filters param with client.all, but get an error message. I tried the example from the readme verbatim, and it also fails

[15] pry(main)> clients = Paymill::Client.all( order: [:email, :created_at_desc], count: 30, offset: 10, filters: [email: 'john.rambo@qaiware.com', created_at: "#{4.days.ago.to_i}-#{2.days.ago.to_i}"] )
I, [2015-10-09T12:13:49.392081 #19639]  INFO -- : [Paymill] [09/Oct/2015 12:13:49 UTC] GET /v2/clients/ 400
Paymill::APIError: filters
from /usr/lib/ruby/gems/2.2.0/gems/paymill-0.5.1/lib/paymill/request/validator.rb:27:in `validate_response_data'
nikoloff commented 9 years ago

Hi @gingerlime there are 2 ruby gems.

The one is from paymill official supported (paymill_ryby) The other is from dkd (paymill).

Pls try this request with the paymill_ruby gem.

gingerlime commented 9 years ago

Oh, I didn't realize I used the wrong fork. Any chance of you removing the old one? Or is this still an active fork?

nikoloff commented 9 years ago

I can't remove it since it has other owner. Just change the gem in your Gemfile to

gem 'paymill_ruby', '~> 2.0', require: 'paymill'
gingerlime commented 9 years ago

will do, thanks!. Just wondered if you guys have any contact with the original author and ask him to "join forces" so others can avoid this confusion in future.

nikoloff commented 9 years ago

I agree :) Maybe in the future they will be merged, but this is the current state right now :(