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

Expose response version #84

Open
krainboltgreene opened this issue Jul 17, 2018 · 4 comments
Open

Expose response version #84

krainboltgreene opened this issue Jul 17, 2018 · 4 comments

Comments

@krainboltgreene
Copy link

My company has a lot of old shippo responses from older versions. We have a normalization process that only works on the latest response. While it would be nice for us to just update our vcr cassettes it's not currently feasible.

If you expose the api response version we can then make a case statement based on that.

@bryanaka
Copy link
Contributor

Hi @krainboltgreene

I don't have much context around your app other than its using VCR and Ruby (Rails I am guessing), so just let me know if I miss the mark in anyway so I can help you more accurately.

Given that you are using VCR and need to match on the version number, can you use :match_requests_on => [:method, :uri, :headers] in that one VCR options call? By default it matches on the method and URI only.

https://relishapp.com/vcr/vcr/v/1-6-0/docs/cassettes/request-matching

@krainboltgreene
Copy link
Author

krainboltgreene commented Jul 21, 2018 via email

@krainboltgreene
Copy link
Author

krainboltgreene commented Jul 21, 2018 via email

@jfriedr
Copy link
Contributor

jfriedr commented Jul 7, 2020

@krainboltgreene seems like this issue has been around awhile.... I can pull out the version that's ultimately being used on our frontends however at this time I've only been able to figure out the specifics in the requests headers (https://goshippo.com/blog/introducing-api-versioning-and-test-mode/).

I.E -H "Shippo-API-Version: YYYY-MM-DD"

Let me know if you need anything related to this or have any other questions that have come up recently!

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

No branches or pull requests

3 participants