Class: Ingenico::Connect::SDK::Domain::Payment::PersonalIdentification

Inherits:
Ingenico::Connect::SDK::DataObject show all
Defined in:
lib/ingenico/connect/sdk/domain/payment/personal_identification.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Ingenico::Connect::SDK::DataObject

new_from_hash

Instance Attribute Details

#id_issuing_country_codeString



15
16
17
# File 'lib/ingenico/connect/sdk/domain/payment/personal_identification.rb', line 15

def id_issuing_country_code
  @id_issuing_country_code
end

#id_typeString



15
16
17
# File 'lib/ingenico/connect/sdk/domain/payment/personal_identification.rb', line 15

def id_type
  @id_type
end

#id_valueString



15
16
17
# File 'lib/ingenico/connect/sdk/domain/payment/personal_identification.rb', line 15

def id_value
  @id_value
end

Instance Method Details

#from_hash(hash) ⇒ Object



32
33
34
35
36
37
38
39
40
41
42
43
# File 'lib/ingenico/connect/sdk/domain/payment/personal_identification.rb', line 32

def from_hash(hash)
  super
  if hash.has_key? 'idIssuingCountryCode'
    @id_issuing_country_code = hash['idIssuingCountryCode']
  end
  if hash.has_key? 'idType'
    @id_type = hash['idType']
  end
  if hash.has_key? 'idValue'
    @id_value = hash['idValue']
  end
end

#to_hHash



24
25
26
27
28
29
30
# File 'lib/ingenico/connect/sdk/domain/payment/personal_identification.rb', line 24

def to_h
  hash = super
  hash['idIssuingCountryCode'] = @id_issuing_country_code unless @id_issuing_country_code.nil?
  hash['idType'] = @id_type unless @id_type.nil?
  hash['idValue'] = @id_value unless @id_value.nil?
  hash
end