Class: Chilexpress::Shipment
- Inherits:
-
Object
- Object
- Chilexpress::Shipment
- Defined in:
- lib/chilexpress/shipment.rb
Instance Attribute Summary collapse
-
#order_number ⇒ Object
readonly
Returns the value of attribute order_number.
-
#product_type ⇒ Object
readonly
Returns the value of attribute product_type.
-
#receiver ⇒ Object
readonly
Returns the value of attribute receiver.
-
#service_type ⇒ Object
readonly
Returns the value of attribute service_type.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#tracking_entries ⇒ Object
readonly
Returns the value of attribute tracking_entries.
Instance Method Summary collapse
-
#initialize(attributes) ⇒ Shipment
constructor
A new instance of Shipment.
Constructor Details
#initialize(attributes) ⇒ Shipment
Returns a new instance of Shipment.
5 6 7 8 9 10 11 12 |
# File 'lib/chilexpress/shipment.rb', line 5 def initialize(attributes) @order_number = attributes[:order_number] @product_type = attributes[:product_type] @service_type = attributes[:service_type] @status = attributes[:status] @receiver = attributes[:receiver] @tracking_entries = attributes[:tracking_entries] || [] end |
Instance Attribute Details
#order_number ⇒ Object (readonly)
Returns the value of attribute order_number.
3 4 5 |
# File 'lib/chilexpress/shipment.rb', line 3 def order_number @order_number end |
#product_type ⇒ Object (readonly)
Returns the value of attribute product_type.
3 4 5 |
# File 'lib/chilexpress/shipment.rb', line 3 def product_type @product_type end |
#receiver ⇒ Object (readonly)
Returns the value of attribute receiver.
3 4 5 |
# File 'lib/chilexpress/shipment.rb', line 3 def receiver @receiver end |
#service_type ⇒ Object (readonly)
Returns the value of attribute service_type.
3 4 5 |
# File 'lib/chilexpress/shipment.rb', line 3 def service_type @service_type end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
3 4 5 |
# File 'lib/chilexpress/shipment.rb', line 3 def status @status end |
#tracking_entries ⇒ Object (readonly)
Returns the value of attribute tracking_entries.
3 4 5 |
# File 'lib/chilexpress/shipment.rb', line 3 def tracking_entries @tracking_entries end |