Class: Ingenico::Direct::SDK::Domain::TokenCardSpecificInput
- Inherits:
-
Ingenico::Direct::SDK::DataObject
- Object
- Ingenico::Direct::SDK::DataObject
- Ingenico::Direct::SDK::Domain::TokenCardSpecificInput
- Defined in:
- lib/ingenico/direct/sdk/domain/token_card_specific_input.rb
Instance Attribute Summary collapse
-
#data ⇒ Ingenico::Direct::SDK::Domain::TokenData
The current value of data.
Instance Method Summary collapse
Methods inherited from Ingenico::Direct::SDK::DataObject
Instance Attribute Details
#data ⇒ Ingenico::Direct::SDK::Domain::TokenData
Returns the current value of data.
12 13 14 |
# File 'lib/ingenico/direct/sdk/domain/token_card_specific_input.rb', line 12 def data @data end |
Instance Method Details
#from_hash(hash) ⇒ Object
22 23 24 25 26 27 28 |
# File 'lib/ingenico/direct/sdk/domain/token_card_specific_input.rb', line 22 def from_hash(hash) super if hash.key? 'data' raise TypeError, "value '%s' is not a Hash" % [hash['data']] unless hash['data'].is_a? Hash @data = Ingenico::Direct::SDK::Domain::TokenData.new_from_hash(hash['data']) end end |
#to_h ⇒ Hash
16 17 18 19 20 |
# File 'lib/ingenico/direct/sdk/domain/token_card_specific_input.rb', line 16 def to_h hash = super hash['data'] = @data.to_h if @data hash end |