Ruby Shipping Gem Help

H

Hunter Hillegas

Hi,

I am trying to use the Ruby shipping gem (http://shipping.rubyforge.org/) to
get prices from FedEx. Has anyone used this? I have some questions:

* Instead of using the shipping.yml file in a user's home directory, is
there somewhere else I can put it? This is a Rails app so I don't really
want to put stuff in the home directory of the user.

* I must be doing something wrong. I get the same price every time. My code
is as follows (the account details are constants):

ship = Shipping::Base.new :packaging_type => "FEDEXBOX", :zip => '93101',
:state => 'CA', :sender_zip => '89109', :weight => '2', :service_type =>
'PRIORITYOVERNIGHT'

ship.fedex_account = FEDEX_ACCOUNT
ship.fedex_meter = FEDEX_METER
ship.fedex_url = FEDEX_URL

logger.debug "PRICE: #{ship.fedex.price} WEIGHT: #{@total_weight} GRADE:
#{ship.service_type}"

If I change the service type to 2-day or ground, I always get the same
price, 3.75.

What am I doing wrong? How can I get the prices for different service
levels?

Thanks,
Hunter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,540
Members
45,025
Latest member
KetoRushACVFitness

Latest Threads

Top