Calling Shippo::Shipment.rates('<shipment_object_id>') would result in the following error:
Shippo::Exceptions::ConnectionError: Shippo::Exceptions::ConnectionError (Could not connect to the Shippo API, via URL
https://api.goshippo.com/shipments/rates/<shipment_object_id>/.
Please check your Internet connection, try again, if the problem
persists please contact Shippo Customer Support.
Error Description:
RestClient::NotFound ⇨ 404 Not Found)
This would just normally mean there are no rates for that shipment.
This PR adds a param for the shipment object ID and interpolates it into the url, resulting in the endpoint with correct params: [https://api.goshippo.com/shipments//rates]()
With these changes it can be called without error like so:
Shippo::Shipment.rates('<shipment_object_id>') or
Shippo::Shipment.rates('<shipment_object_id>', '<currency_code>')
Calling
Shippo::Shipment.rates('<shipment_object_id>')
would result in the following error:This would just normally mean there are no rates for that shipment.
However,
is not the correct endpoint.
This PR adds a param for the shipment object ID and interpolates it into the url, resulting in the endpoint with correct params: [https://api.goshippo.com/shipments//rates]()
With these changes it can be called without error like so:
Shippo::Shipment.rates('<shipment_object_id>')
orShippo::Shipment.rates('<shipment_object_id>', '<currency_code>')