Class: Worldline::Connect::SDK::V1::Domain::TokenEWallet
- Inherits:
-
AbstractToken
- Object
- Domain::DataObject
- AbstractToken
- Worldline::Connect::SDK::V1::Domain::TokenEWallet
- Defined in:
- lib/worldline/connect/sdk/v1/domain/token_e_wallet.rb
Instance Attribute Summary collapse
-
#customer ⇒ Worldline::Connect::SDK::V1::Domain::CustomerToken
The current value of customer.
-
#data ⇒ Worldline::Connect::SDK::V1::Domain::TokenEWalletData
The current value of data.
Attributes inherited from AbstractToken
Instance Method Summary collapse
Methods inherited from Domain::DataObject
Instance Attribute Details
#customer ⇒ Worldline::Connect::SDK::V1::Domain::CustomerToken
Returns the current value of customer.
16 17 18 |
# File 'lib/worldline/connect/sdk/v1/domain/token_e_wallet.rb', line 16 def customer @customer end |
#data ⇒ Worldline::Connect::SDK::V1::Domain::TokenEWalletData
Returns the current value of data.
16 17 18 |
# File 'lib/worldline/connect/sdk/v1/domain/token_e_wallet.rb', line 16 def data @data end |
Instance Method Details
#from_hash(hash) ⇒ Object
30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/worldline/connect/sdk/v1/domain/token_e_wallet.rb', line 30 def from_hash(hash) super if hash.has_key? 'customer' raise TypeError, "value '%s' is not a Hash" % [hash['customer']] unless hash['customer'].is_a? Hash @customer = Worldline::Connect::SDK::V1::Domain::CustomerToken.new_from_hash(hash['customer']) end if hash.has_key? 'data' raise TypeError, "value '%s' is not a Hash" % [hash['data']] unless hash['data'].is_a? Hash @data = Worldline::Connect::SDK::V1::Domain::TokenEWalletData.new_from_hash(hash['data']) end end |
#to_h ⇒ Hash
23 24 25 26 27 28 |
# File 'lib/worldline/connect/sdk/v1/domain/token_e_wallet.rb', line 23 def to_h hash = super hash['customer'] = @customer.to_h unless @customer.nil? hash['data'] = @data.to_h unless @data.nil? hash end |