Skip to content

How To: Track a FedEx Package

Zack Shapiro edited this page Dec 14, 2013 · 5 revisions

How To: Track a FedEx Package

begin
  fedex = Trackerific::Services::FedEx.new account: "123456789", meter: "123456789"
  tracking_details = fedex.track "183689015000001"
  puts "#{tracking_details.package_id} - #{tracking_details.summary}"
  puts tracking_details.events.map { |event| "  * #{event}" }
rescue Trackerific::Error => e
  puts e.message
end