flapjack / flapjack-diner

Consumer of the Flapjack API
http://flapjack.io/
MIT License
17 stars 10 forks source link

update_contacts(:id, :timezone) doesn't work #49

Closed rebyn closed 9 years ago

rebyn commented 9 years ago

I tried to update a contact's timezone; however it doesn't work:

irb(main):002:0> Flapjack::Diner.contacts("1398")
=> [{:id=>"1398", :first_name=>"J", :last_name=>"S (BP)", :email=>"j@bulletproof.net", :timezone=>"UTC", :links=>{...}}]

irb(main):003:0> Flapjack::Diner.update_contacts("1398", :timezone => "Asia/Bangkok")
=> true

irb(main):004:0> Flapjack::Diner.contacts("1398")
=> [{:id=>"1398", :first_name=>"J", :last_name=>"S (BP)", :email=>"j@bulletproof.net", :timezone=>"UTC", :links=>{...}}]

Tried this on both our integration and production instances. Also exit and signin to the console again in case it does caching.

rebyn commented 9 years ago

Seems like true is always returned:

irb(main):004:0> Flapjack::Diner.update_contacts("1398", :timezone => "Asia/Bangcokessss")
=> true

irb(main):005:0> Flapjack::Diner.last_error
=> nil
ghost commented 9 years ago

Bug in Flapjack, it's correctly allowed in -diner. The server's returning 204 but the timezone field is skipped as the server doesn't have it on the list of allowed fields.