Class: Idnow::IdentificationDocument

Inherits:
Object
  • Object
show all
Includes:
Jsonable
Defined in:
lib/idnow/models/identification_document.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Jsonable

#to_h, #to_json

Constructor Details

#initialize(data) ⇒ IdentificationDocument

Returns a new instance of IdentificationDocument.



6
7
8
9
10
11
12
13
# File 'lib/idnow/models/identification_document.rb', line 6

def initialize(data)
  @country             = dig_value('country', data)
  @number              = dig_value('number', data)
  @issued_by           = dig_value('issuedby', data)
  @date_issued         = dig_value('dateissued', data)
  @type                = dig_value('type', data)
  @valid_until         = dig_value('validuntil', data)
end

Instance Attribute Details

#countryObject

Returns the value of attribute country.



5
6
7
# File 'lib/idnow/models/identification_document.rb', line 5

def country
  @country
end

#date_issuedObject

Returns the value of attribute date_issued.



5
6
7
# File 'lib/idnow/models/identification_document.rb', line 5

def date_issued
  @date_issued
end

#issued_byObject

Returns the value of attribute issued_by.



5
6
7
# File 'lib/idnow/models/identification_document.rb', line 5

def issued_by
  @issued_by
end

#numberObject

Returns the value of attribute number.



5
6
7
# File 'lib/idnow/models/identification_document.rb', line 5

def number
  @number
end

#typeObject

Returns the value of attribute type.



5
6
7
# File 'lib/idnow/models/identification_document.rb', line 5

def type
  @type
end

#valid_untilObject

Returns the value of attribute valid_until.



5
6
7
# File 'lib/idnow/models/identification_document.rb', line 5

def valid_until
  @valid_until
end