Class: Shippinglogic::FedEx::Track

Inherits:
Service show all
Defined in:
lib/shippinglogic/fedex/track.rb

Overview

An interface to the track services provided by FedEx. Allows you to get an array of events for a specific tracking number.

Accessor methods / options

  • tracking_number - the tracking number

Simple Example

Here is a very simple example:

fedex = Shippinglogic::FedEx.new(key, password, , meter)
tracking_details = fedex.track(:tracking_number => "my number")

tracking.status
# => "Delivered"

tracking.signature_name
# => "KKING"

tracking.events.first
# => #<Shippinglogic::FedEx::Track::Event @postal_code="95817", @name="Delivered", @state="CA", @residential=false,
#     @city="Sacramento", @type="DL", @country="US", @occured_at=Mon Dec 08 10:43:37 -0500 2008>

tracking.events.first.name
# => "Delivered"

Note

FedEx does support locating packages through means other than a tracking number. These are not supported and probably won’t be until someone needs them. It should be fairly simple to add, but I could not think of a reason why anyone would want to track a package with anything other than a tracking number.

Defined Under Namespace

Classes: Details

Constant Summary collapse

VERSION =
{:major => 3, :intermediate => 0, :minor => 0}

Instance Attribute Summary

Attributes inherited from Service

#base

Method Summary

Methods inherited from Service

#initialize

Methods included from Validation

#errors, #valid?

Methods included from Attributes

included

Methods inherited from Proxy

#initialize

Constructor Details

This class inherits a constructor from Shippinglogic::Service

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Shippinglogic::Proxy