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
ackaging_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
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
: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