shippo-ruby-client
shippo-ruby-client copied to clipboard
Set default API version to 2018-02-08
The Shippo API server apparently now requires an API version to be provided, but the Ruby gem doesn't include a default version. Users can get around this by setting it themselves, e.g.:
Shippo::API.version = '2018-02-08'
The gem is obviously built to interact using a particular version of the API, and this PR makes that version explicit.
Kudos, SonarCloud Quality Gate passed!
0 Bugs
0 Vulnerabilities
0 Security Hotspots
0 Code Smells
No Coverage information
0.0% Duplication
Just FYI: our API integration was broken since Friday and today got escalated to interrupt my vacation! :-D By making this change our API integration now is working.
Just for the record and users searching for a solution... Without the api_version above, I get the following error:
Shippo::Exceptions::APIServerError (Shippo::Exceptions::APIServerError (Backend responded with an error) )
http_response_message: '400 Bad Request',
server_url: 'https://api.goshippo.com/addresses/',
response: '{"error":"The requested version is not available for this resource"}',
server_url
varies based on what you are trying to do.
I also got an email from GoShippo Support suggesting this solution.