Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 943
Cannon Moyer Avatar asked Oct 03 '17 20:10

Cannon Moyer


1 Answers

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

like image 166
Zzz Avatar answered Oct 29 '22 06:10

Zzz