Class: Idnow::IdentificationDocument
- Inherits:
-
Object
- Object
- Idnow::IdentificationDocument
- Includes:
- Jsonable
- Defined in:
- lib/idnow/models/identification_document.rb
Instance Attribute Summary collapse
-
#country ⇒ Object
Returns the value of attribute country.
-
#date_issued ⇒ Object
Returns the value of attribute date_issued.
-
#issued_by ⇒ Object
Returns the value of attribute issued_by.
-
#number ⇒ Object
Returns the value of attribute number.
-
#type ⇒ Object
Returns the value of attribute type.
-
#valid_until ⇒ Object
Returns the value of attribute valid_until.
Instance Method Summary collapse
-
#initialize(data) ⇒ IdentificationDocument
constructor
A new instance of IdentificationDocument.
Methods included from Jsonable
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
#country ⇒ Object
Returns the value of attribute country.
5 6 7 |
# File 'lib/idnow/models/identification_document.rb', line 5 def country @country end |
#date_issued ⇒ Object
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_by ⇒ Object
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 |
#number ⇒ Object
Returns the value of attribute number.
5 6 7 |
# File 'lib/idnow/models/identification_document.rb', line 5 def number @number end |
#type ⇒ Object
Returns the value of attribute type.
5 6 7 |
# File 'lib/idnow/models/identification_document.rb', line 5 def type @type end |
#valid_until ⇒ Object
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 |