Class: Cadooz::Immutable::VoucherInformation
- Inherits:
-
Object
- Object
- Cadooz::Immutable::VoucherInformation
- Includes:
- Mixins
- Defined in:
- lib/cadooz/models/immutable/voucher_information.rb
Instance Attribute Summary collapse
-
#response_state ⇒ Object
readonly
Returns the value of attribute response_state.
-
#voucher_list ⇒ Object
readonly
Returns the value of attribute voucher_list.
Instance Method Summary collapse
-
#initialize(open_struct) ⇒ VoucherInformation
constructor
A new instance of VoucherInformation.
Methods included from Mixins
#cadooz_class, #default_value_for_nil, #instance_variables_empty?, #serialize
Constructor Details
#initialize(open_struct) ⇒ VoucherInformation
Returns a new instance of VoucherInformation.
6 7 8 9 10 11 |
# File 'lib/cadooz/models/immutable/voucher_information.rb', line 6 def initialize(open_struct) @response_state = open_struct&.response_state @voucher_list = Array(open_struct&.voucher_list)&.each_with_object([]) { |v, arr| arr << Cadooz::Immutable::Voucher.new(v) } self.freeze end |
Instance Attribute Details
#response_state ⇒ Object (readonly)
Returns the value of attribute response_state.
4 5 6 |
# File 'lib/cadooz/models/immutable/voucher_information.rb', line 4 def response_state @response_state end |
#voucher_list ⇒ Object (readonly)
Returns the value of attribute voucher_list.
4 5 6 |
# File 'lib/cadooz/models/immutable/voucher_information.rb', line 4 def voucher_list @voucher_list end |