Class: Worldline::Connect::SDK::V1::Domain::PersonalInformation
- Inherits:
-
Domain::DataObject
- Object
- Domain::DataObject
- Worldline::Connect::SDK::V1::Domain::PersonalInformation
- Defined in:
- lib/worldline/connect/sdk/v1/domain/personal_information.rb
Instance Attribute Summary collapse
-
#date_of_birth ⇒ String
The current value of date_of_birth.
-
#gender ⇒ String
The current value of gender.
-
#identification ⇒ Worldline::Connect::SDK::V1::Domain::PersonalIdentification
The current value of identification.
-
#name ⇒ Worldline::Connect::SDK::V1::Domain::PersonalName
The current value of name.
Instance Method Summary collapse
Methods inherited from Domain::DataObject
Instance Attribute Details
#date_of_birth ⇒ String
Returns the current value of date_of_birth.
18 19 20 |
# File 'lib/worldline/connect/sdk/v1/domain/personal_information.rb', line 18 def date_of_birth @date_of_birth end |
#gender ⇒ String
Returns the current value of gender.
18 19 20 |
# File 'lib/worldline/connect/sdk/v1/domain/personal_information.rb', line 18 def gender @gender end |
#identification ⇒ Worldline::Connect::SDK::V1::Domain::PersonalIdentification
Returns the current value of identification.
18 19 20 |
# File 'lib/worldline/connect/sdk/v1/domain/personal_information.rb', line 18 def identification @identification end |
#name ⇒ Worldline::Connect::SDK::V1::Domain::PersonalName
Returns the current value of name.
18 19 20 |
# File 'lib/worldline/connect/sdk/v1/domain/personal_information.rb', line 18 def name @name end |
Instance Method Details
#from_hash(hash) ⇒ Object
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/worldline/connect/sdk/v1/domain/personal_information.rb', line 38 def from_hash(hash) super if hash.has_key? 'dateOfBirth' @date_of_birth = hash['dateOfBirth'] end if hash.has_key? 'gender' @gender = hash['gender'] end if hash.has_key? 'identification' raise TypeError, "value '%s' is not a Hash" % [hash['identification']] unless hash['identification'].is_a? Hash @identification = Worldline::Connect::SDK::V1::Domain::PersonalIdentification.new_from_hash(hash['identification']) end if hash.has_key? 'name' raise TypeError, "value '%s' is not a Hash" % [hash['name']] unless hash['name'].is_a? Hash @name = Worldline::Connect::SDK::V1::Domain::PersonalName.new_from_hash(hash['name']) end end |
#to_h ⇒ Hash
29 30 31 32 33 34 35 36 |
# File 'lib/worldline/connect/sdk/v1/domain/personal_information.rb', line 29 def to_h hash = super hash['dateOfBirth'] = @date_of_birth unless @date_of_birth.nil? hash['gender'] = @gender unless @gender.nil? hash['identification'] = @identification.to_h unless @identification.nil? hash['name'] = @name.to_h unless @name.nil? hash end |