-
Notifications
You must be signed in to change notification settings - Fork 72
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
Shippo::Address.get("object_id").validate returns nil #78
Comments
Okay, I still cannot tell what is going on here, however you appear to have at least 2 things that are suspect, and at least 1 of those things looks like a confirmed bug per your API docs on your website. The first thing that, and I'm not sure if this is a bug or you know about this, but you cannot possibly call a missing method on an instance of The second thing, and this again is a confirmed bug because of https://goshippo.com/docs/reference/bash?version=2017-08-01#addresses-validate, is that a) I can't call this, as stated in the issue title, and b) there's got to be something going wrong in this area: module Shippo
class Address < ::Shippo::API::Resource
operations :list, :create, :validate
end
end There's either a bug in |
Although I am by no means proficient with Ruby, I can say that doing If you're trying to validate an address, then you'd want to use The Shippo client uses Hashie to transform responses into these Hash-like objects, so its better to think of your returned response to behave more like a JavaScript object than a Ruby object, with missing keys returning As for the way described in the references docs, I will actually update that to better reflect the way to validate an address with Ruby (since the way shown there is no longer correct). |
Just to reiterate that the ruby example in the docs is still incorrect: https://goshippo.com/docs/reference/rb#addresses-validate |
I'm about to look into this more to see if I can possibly make a pull request for you guys, but 100% of the time that I issue this command in the console, I get
nil
returned.The text was updated successfully, but these errors were encountered: