开发者

Fedex & UPS implementation

I've been looking for a Ruby implementation of Fedex and UPS.

I've been through their documentation, and think it's really overcomplicated (I'm a bit of a ruby "newbie" myself), so was looking for something simpler. I would only like to use the tracking function.

开发者_如何转开发

Has anyone ever worked with something like that and could point me to the right direction on how to implement this?


Try Shopify's active_shipping plugin. It supports UPS, USPS, and FedEx. The developers are planning on adding tracking support (according to the readme), but support is already provided for FedEx tracking:

fdx = FedEx.new(:login => '999999999', :password => '7777777')
tracking_info = fdx.find_tracking_info('tracking number here', :carrier_code => 'fedex_ground') # Ground package

tracking_info.shipment_events.each do |event|
  puts "#{event.name} at #{event.location.city}, #{event.location.state} on #{event.time}. #{event.message}"
end
# => Package information transmitted to FedEx at NASHVILLE LOCAL, TN on Thu Oct 23 00:00:00 UTC 2008. 
# Picked up by FedEx at NASHVILLE LOCAL, TN on Thu Oct 23 17:30:00 UTC 2008. 
# Scanned at FedEx sort facility at NASHVILLE, TN on Thu Oct 23 18:50:00 UTC 2008. 
# Departed FedEx sort facility at NASHVILLE, TN on Thu Oct 23 22:33:00 UTC 2008. 
# Arrived at FedEx sort facility at KNOXVILLE, TN on Fri Oct 24 02:45:00 UTC 2008. 
# Scanned at FedEx sort facility at KNOXVILLE, TN on Fri Oct 24 05:56:00 UTC 2008. 
# Delivered at Knoxville, TN on Fri Oct 24 16:45:00 UTC 2008. Signed for by: T.BAKER


There are a few services that might be worth taking a look at:

http://rocketship.it/

and

http://www.auctioninc.com/info/page/shipping_api


Another one is the shiprush api. http://developer.shiprush.com

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜