goshippo/shippo-ruby-client

Not able to call update method.

superrordev opened this issue · 3 comments

I am working with shippo gem for rails project.
I am trying to update the carrier using api but it is failed.
Please check my issue and let me know the solution asap.
image

Could you list out your gem dependencies?

It looks like the error is being caught by the ConnectionError exception handler, which means that something could have failed with Rest Client, but would need a bit more information.

Also, looking at your URL there, that doesn't look like the carrier account object_id (which I know is a reserved word in Ruby, so you need to parse it out). In fact, that is most likely the issue that you're having.

GIT
remote: https://github.com/goshippo/shippo-ruby-client
revision: 2486419
specs:
shippo (3.0.0)
activesupport (>= 4)
awesome_print
hashie (>= 3.5.2)
json (> 1.8)
rest-client (
> 1.8)

So, I think that you're not using the correct value when trying to retrieve a carrier account. You can see what a carrier account object_id is at https://goshippo.com/docs/reference#carrier-accounts.

There are also examples for using the Ruby client at https://goshippo.com/docs/carrier-accounts.

But just remember that object_id is a special word in Ruby, so you'll want to use the wrapper's designated method of accessing the correct id (https://github.com/goshippo/shippo-ruby-client#resource-id-and-other-object-fields)