Class: Ingenico::Direct::SDK::Domain::PersonalNameToken
- Inherits:
-
Ingenico::Direct::SDK::DataObject
- Object
- Ingenico::Direct::SDK::DataObject
- Ingenico::Direct::SDK::Domain::PersonalNameToken
- Defined in:
- lib/ingenico/direct/sdk/domain/personal_name_token.rb
Instance Attribute Summary collapse
-
#first_name ⇒ String
The current value of first_name.
-
#surname ⇒ String
The current value of surname.
Instance Method Summary collapse
Methods inherited from Ingenico::Direct::SDK::DataObject
Instance Attribute Details
#first_name ⇒ String
Returns the current value of first_name.
12 13 14 |
# File 'lib/ingenico/direct/sdk/domain/personal_name_token.rb', line 12 def first_name @first_name end |
#surname ⇒ String
Returns the current value of surname.
12 13 14 |
# File 'lib/ingenico/direct/sdk/domain/personal_name_token.rb', line 12 def surname @surname end |
Instance Method Details
#from_hash(hash) ⇒ Object
24 25 26 27 28 |
# File 'lib/ingenico/direct/sdk/domain/personal_name_token.rb', line 24 def from_hash(hash) super @first_name = hash['firstName'] if hash.key? 'firstName' @surname = hash['surname'] if hash.key? 'surname' end |
#to_h ⇒ Hash
17 18 19 20 21 22 |
# File 'lib/ingenico/direct/sdk/domain/personal_name_token.rb', line 17 def to_h hash = super hash['firstName'] = @first_name unless @first_name.nil? hash['surname'] = @surname unless @surname.nil? hash end |