Class: USPS::Response::TrackingLookup
- Defined in:
- lib/usps/response/tracking_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) ⇒ TrackingLookup
constructor
A new instance of TrackingLookup.
Methods inherited from Base
Constructor Details
#initialize(xml) ⇒ TrackingLookup
Returns a new instance of TrackingLookup.
9 10 11 12 13 14 15 16 |
# File 'lib/usps/response/tracking_lookup.rb', line 9 def initialize(xml) @summary = xml.search("TrackSummary").text @details = [] xml.search("TrackDetail").each do |detail| @details << detail.text end end |
Instance Attribute Details
#details ⇒ Object
Returns the value of attribute details.
7 8 9 |
# File 'lib/usps/response/tracking_lookup.rb', line 7 def details @details end |
#summary ⇒ Object
Returns the value of attribute summary.
7 8 9 |
# File 'lib/usps/response/tracking_lookup.rb', line 7 def summary @summary end |