Class: Cadooz::Immutable::OrderStatus

Inherits:
Object
  • Object
show all
Includes:
Mixins
Defined in:
lib/cadooz/models/immutable/order_status.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Mixins

#cadooz_class, #default_value_for_nil, #instance_variables_empty?, #serialize

Constructor Details

#initialize(open_struct) ⇒ OrderStatus

Returns a new instance of OrderStatus.



7
8
9
10
11
12
13
14
15
16
17
# File 'lib/cadooz/models/immutable/order_status.rb', line 7

def initialize(open_struct)
  @delivery_state = open_struct&.delivery_state
  @message = open_struct&.message
  @order_number = open_struct&.order_number
  @order_state = open_struct&.order_state
  @packet_number = open_struct&.packet_number
  @return_reason = open_struct&.return_reason
  @shipping_provider = open_struct&.shipping_provider

  self.freeze
end

Instance Attribute Details

#delivery_stateObject (readonly)

Returns the value of attribute delivery_state.



4
5
6
# File 'lib/cadooz/models/immutable/order_status.rb', line 4

def delivery_state
  @delivery_state
end

#messageObject (readonly)

Returns the value of attribute message.



4
5
6
# File 'lib/cadooz/models/immutable/order_status.rb', line 4

def message
  @message
end

#order_numberObject (readonly)

Returns the value of attribute order_number.



4
5
6
# File 'lib/cadooz/models/immutable/order_status.rb', line 4

def order_number
  @order_number
end

#order_stateObject (readonly)

Returns the value of attribute order_state.



4
5
6
# File 'lib/cadooz/models/immutable/order_status.rb', line 4

def order_state
  @order_state
end

#packet_numberObject (readonly)

Returns the value of attribute packet_number.



4
5
6
# File 'lib/cadooz/models/immutable/order_status.rb', line 4

def packet_number
  @packet_number
end

#return_reasonObject (readonly)

Returns the value of attribute return_reason.



4
5
6
# File 'lib/cadooz/models/immutable/order_status.rb', line 4

def return_reason
  @return_reason
end

#shipping_providerObject (readonly)

Returns the value of attribute shipping_provider.



4
5
6
# File 'lib/cadooz/models/immutable/order_status.rb', line 4

def shipping_provider
  @shipping_provider
end