Class: USPS::Response::TrackingFieldLookup
- Defined in:
- lib/usps/response/tracking_field_lookup.rb
Overview
Response object from a USPS::Request::TrackingLookup request. Includes a summary of the current status of the shipment, along with an array of details of the shipmentâs progress
Instance Attribute Summary collapse
-
#details ⇒ Object
Returns the value of attribute details.
-
#summary ⇒ Object
Returns the value of attribute summary.
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(xml) ⇒ TrackingFieldLookup
constructor
A new instance of TrackingFieldLookup.
Methods inherited from Base
Constructor Details
#initialize(xml) ⇒ TrackingFieldLookup
Returns a new instance of TrackingFieldLookup.
10 11 12 13 14 15 16 |
# File 'lib/usps/response/tracking_field_lookup.rb', line 10 def initialize(xml) @summary = parse(xml.search("TrackSummary")) @details = [] xml.search("TrackDetail").each do |detail| @details << parse(detail) end end |
Instance Attribute Details
#details ⇒ Object
Returns the value of attribute details.
7 8 9 |
# File 'lib/usps/response/tracking_field_lookup.rb', line 7 def details @details end |
#summary ⇒ Object
Returns the value of attribute summary.
7 8 9 |
# File 'lib/usps/response/tracking_field_lookup.rb', line 7 def summary @summary end |