Class: DHL::Ecommerce::TrackedEvent
- Includes:
- Operations::Find, Operations::List
- Defined in:
- lib/dhl/ecommerce/tracked_event.rb
Instance Attribute Summary collapse
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#event ⇒ Object
readonly
Returns the value of attribute event.
-
#location ⇒ Object
readonly
Returns the value of attribute location.
-
#postal_code ⇒ Object
readonly
Returns the value of attribute postal_code.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ TrackedEvent
constructor
A new instance of TrackedEvent.
Methods included from Operations::List
Methods included from Operations::Find
Constructor Details
#initialize(attributes = {}) ⇒ TrackedEvent
Returns a new instance of TrackedEvent.
9 10 11 12 13 14 15 |
# File 'lib/dhl/ecommerce/tracked_event.rb', line 9 def initialize(attributes = {}) super attributes unless attributes.empty? @created_at = Time.parse("#{attributes[:date]} #{attributes[:time]} #{attributes[:time_zone]}") if attributes[:date] && attributes[:time] && attributes[:time_zone] end end |
Instance Attribute Details
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
7 8 9 |
# File 'lib/dhl/ecommerce/tracked_event.rb', line 7 def created_at @created_at end |
#event ⇒ Object (readonly)
Returns the value of attribute event.
7 8 9 |
# File 'lib/dhl/ecommerce/tracked_event.rb', line 7 def event @event end |
#location ⇒ Object (readonly)
Returns the value of attribute location.
7 8 9 |
# File 'lib/dhl/ecommerce/tracked_event.rb', line 7 def location @location end |
#postal_code ⇒ Object (readonly)
Returns the value of attribute postal_code.
7 8 9 |
# File 'lib/dhl/ecommerce/tracked_event.rb', line 7 def postal_code @postal_code end |