goshippo/shippo-ruby-client

API versioning fail?

key88sf opened this issue · 6 comments

Are we sure setting the API version works? I have my Shippo account set to the latest API version 2016-10-25, and I'm getting this error with the latest gem when trying to create a shipment:

2.3.1 :001 > Shippo::API.version
 => "2016-10-25" 
2.3.1 :002 > Shippo::API.token
 => "shippo_test_e1102ab565<rest of this left off for security reasons>"
2.3.1 :003 > Shippo::Shipment.create( shipment_params )
Shippo::Exceptions::APIServerError: Shippo::Exceptions::APIServerError (Backend responded with an error) 
http_response_message: '400 Bad Request', 
           server_url: 'https://api.goshippo.com//shipments/', 
             response: '{"error": "The requested version is not available for this resource"}',

If I set Shippo::API.version = nil then it works.

Hi @key88sf, I wonder if it works if you set the API version to older version. Also, can you send me the param you use. Please mask your token though. Thanks.

@wenwei1030 Hi - I used literally a copy of the example params from the README.md here. It works if I don't specify a version.

I can try with an older API version -- do you have one that should work?

@key88sf we are working on the bug right now. Should be fixed soon.

@key88sf Hi, the bug has been fixed. Please update your gem. I am going to close the issue now. Thanks.

@wenwei1030 Thanks will give it try!

Works now, thanks :)