shipper = { :name => "Developer",
:company => "Sunlight",
:phone_number => "555-555-5555",
:address => "450 Grim Ln",
:city => "York",
:state => "PA",
:postal_code => "17406",
:country_code => "US" }
recipient = { :name => "Ty Po",
:company => "Sunfarm",
:phone_number => "555-555-5555",
:address => "5913-C NE 127th Ave, Suite 800 Suite 800",
:city => "Vancouver",
:state => "WA",
:postal_code => "98682",
:country_code => "US",
:residential => "true" }
packages = []
packages << {
:weight => {:units => "LB", :value => 160},
:dimensions => {:length => 10, :width => 5, :height => 4, :units => "IN" }
}
rate = fedex.rate(:shipper=>shipper,
:recipient => recipient,
:packages => packages,
:service_type => "GROUND_HOME_DELIVERY"
)
Getting Package 1 - Weight is missing or invalid error. How to insert quantity here if I have 2 same package?
shipper = { :name => "Developer",
:company => "Sunlight",
:phone_number => "555-555-5555",
:address => "450 Grim Ln",
:city => "York",
:state => "PA",
:postal_code => "17406",
:country_code => "US" }
recipient = { :name => "Ty Po",
:company => "Sunfarm",
:phone_number => "555-555-5555",
:address => "5913-C NE 127th Ave, Suite 800 Suite 800",
:city => "Vancouver",
:state => "WA",
:postal_code => "98682",
:country_code => "US",
:residential => "true" }
packages = []
packages << {
:weight => {:units => "LB", :value => 160},
:dimensions => {:length => 10, :width => 5, :height => 4, :units => "IN" }
}
rate = fedex.rate(:shipper=>shipper,
:recipient => recipient,
:packages => packages,
:service_type => "GROUND_HOME_DELIVERY"
)
Getting Package 1 - Weight is missing or invalid error. How to insert quantity here if I have 2 same package?