shippo-ruby-client icon indicating copy to clipboard operation
shippo-ruby-client copied to clipboard

Set default API version to 2018-02-08

Open ktreis opened this issue 2 years ago • 3 comments

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.

ktreis avatar Oct 21 '22 21:10 ktreis

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

sonarqubecloud[bot] avatar Oct 21 '22 21:10 sonarqubecloud[bot]

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.

heliocola avatar Oct 24 '22 14:10 heliocola

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.

heliocola avatar Oct 24 '22 14:10 heliocola