Class: RRD::Response::Tracking
- Inherits:
-
Object
- Object
- RRD::Response::Tracking
- Defined in:
- lib/rrd-track/response/tracking.rb
Instance Attribute Summary collapse
-
#shipment_detail ⇒ Object
Returns the value of attribute shipment_detail.
-
#tracking_events ⇒ Object
Returns the value of attribute tracking_events.
Instance Method Summary collapse
-
#initialize(xml) ⇒ Tracking
constructor
A new instance of Tracking.
Constructor Details
#initialize(xml) ⇒ Tracking
Returns a new instance of Tracking.
8 9 10 11 12 13 14 |
# File 'lib/rrd-track/response/tracking.rb', line 8 def initialize(xml) @shipment_detail = parse_shipment_detail(xml.search("ParcelTrackingViewModel")) @tracking_events = [] xml.search("StopDetailViewModel").each do |event| @tracking_events << parse_tracking_detail(event) end end |
Instance Attribute Details
#shipment_detail ⇒ Object
Returns the value of attribute shipment_detail.
6 7 8 |
# File 'lib/rrd-track/response/tracking.rb', line 6 def shipment_detail @shipment_detail end |
#tracking_events ⇒ Object
Returns the value of attribute tracking_events.
6 7 8 |
# File 'lib/rrd-track/response/tracking.rb', line 6 def tracking_events @tracking_events end |