Class: Chilexpress::Shipment

Inherits:
Object
  • Object
show all
Defined in:
lib/chilexpress/shipment.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_numberObject (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_typeObject (readonly)

Returns the value of attribute product_type.



3
4
5
# File 'lib/chilexpress/shipment.rb', line 3

def product_type
  @product_type
end

#receiverObject (readonly)

Returns the value of attribute receiver.



3
4
5
# File 'lib/chilexpress/shipment.rb', line 3

def receiver
  @receiver
end

#service_typeObject (readonly)

Returns the value of attribute service_type.



3
4
5
# File 'lib/chilexpress/shipment.rb', line 3

def service_type
  @service_type
end

#statusObject (readonly)

Returns the value of attribute status.



3
4
5
# File 'lib/chilexpress/shipment.rb', line 3

def status
  @status
end

#tracking_entriesObject (readonly)

Returns the value of attribute tracking_entries.



3
4
5
# File 'lib/chilexpress/shipment.rb', line 3

def tracking_entries
  @tracking_entries
end