Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set default API version to 2018-02-08 #109

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ktreis
Copy link

@ktreis ktreis commented Oct 21, 2022

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.

@sonarcloud
Copy link

sonarcloud bot commented Oct 21, 2022

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

@heliocola
Copy link

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
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants