Class: Ingenico::Connect::SDK::Domain::Definitions::PersonalNameBase
- Inherits:
-
Ingenico::Connect::SDK::DataObject
- Object
- Ingenico::Connect::SDK::DataObject
- Ingenico::Connect::SDK::Domain::Definitions::PersonalNameBase
- Defined in:
- lib/ingenico/connect/sdk/domain/definitions/personal_name_base.rb
Direct Known Subclasses
Payment::PersonalName, Riskassessments::PersonalNameRiskAssessment, Token::PersonalNameToken
Instance Attribute Summary collapse
-
#first_name ⇒ String
The current value of first_name.
-
#surname ⇒ String
The current value of surname.
-
#surname_prefix ⇒ String
The current value of surname_prefix.
Instance Method Summary collapse
Methods inherited from Ingenico::Connect::SDK::DataObject
Instance Attribute Details
#first_name ⇒ String
Returns the current value of first_name.
14 15 16 |
# File 'lib/ingenico/connect/sdk/domain/definitions/personal_name_base.rb', line 14 def first_name @first_name end |
#surname ⇒ String
Returns the current value of surname.
14 15 16 |
# File 'lib/ingenico/connect/sdk/domain/definitions/personal_name_base.rb', line 14 def surname @surname end |
#surname_prefix ⇒ String
Returns the current value of surname_prefix.
14 15 16 |
# File 'lib/ingenico/connect/sdk/domain/definitions/personal_name_base.rb', line 14 def surname_prefix @surname_prefix end |
Instance Method Details
#from_hash(hash) ⇒ Object
31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/ingenico/connect/sdk/domain/definitions/personal_name_base.rb', line 31 def from_hash(hash) super if hash.has_key? 'firstName' @first_name = hash['firstName'] end if hash.has_key? 'surname' @surname = hash['surname'] end if hash.has_key? 'surnamePrefix' @surname_prefix = hash['surnamePrefix'] end end |
#to_h ⇒ Hash
23 24 25 26 27 28 29 |
# File 'lib/ingenico/connect/sdk/domain/definitions/personal_name_base.rb', line 23 def to_h hash = super hash['firstName'] = @first_name unless @first_name.nil? hash['surname'] = @surname unless @surname.nil? hash['surnamePrefix'] = @surname_prefix unless @surname_prefix.nil? hash end |