Cannon Moyer
Cannon Moyer

Reputation: 3174

Active_Shipping Negotiated Rates for UPS - Ruby on Rails

I've integrated the Shopify active_shipping gem into my site and I am trying to get negotiated rates from my UPS account (I can get regular rates). I can't find any documentation on the negotiated rates. Can anyone help me out here? I think this line of code should work but it doesn't produce any errors or any different shipping rates.

response = carrier.find_rates(origin, destination, packages, {negotiated_rates: true})

I ran across this link here but still no luck:

https://github.com/Shopify/active_shipping/blob/master/lib/active_shipping/carriers/ups.rb

Upvotes: 12

Views: 486

Answers (1)

Zzz
Zzz

Reputation: 1703

Try assign your UPS account number as origin_account in the options.

response = carrier.find_rates(origin, destination, packages, {negotiated_rates: true, origin_account: 11111111})

https://github.com/Shopify/active_shipping/blob/master/lib/active_shipping/carriers/ups.rb#L358

Upvotes: 5

Related Questions