Class: Yoti::DocumentDetails
- Inherits:
-
Object
- Object
- Yoti::DocumentDetails
- Defined in:
- lib/yoti/data_type/document_details.rb
Constant Summary collapse
- VALIDATION_PATTERN =
Deprecated.
2.0.0 pattern is no longer used for validation.
'^([A-Za-z_]*) ([A-Za-z]{3}) ([A-Za-z0-9]{1}).*$'- TYPE_INDEX =
0- COUNTRY_INDEX =
1- NUMBER_INDEX =
2- EXPIRATION_INDEX =
3- AUTHORITY_INDEX =
4
Instance Attribute Summary collapse
-
#document_number ⇒ String
readonly
Document number (may include letters) from the document.
-
#expiration_date ⇒ DateTime
readonly
Expiration date of the document in DateTime format.
-
#issuing_authority ⇒ String
readonly
Can either be a country code (for a state), or the name of the issuing authority.
-
#issuing_country ⇒ String
readonly
ISO-3166-1 alpha-3 country code, e.g.
-
#type ⇒ String
readonly
Type of the document e.g.
Instance Method Summary collapse
-
#initialize(value) ⇒ DocumentDetails
constructor
A new instance of DocumentDetails.
Constructor Details
#initialize(value) ⇒ DocumentDetails
Returns a new instance of DocumentDetails.
53 54 55 |
# File 'lib/yoti/data_type/document_details.rb', line 53 def initialize(value) parse_value(value) end |
Instance Attribute Details
#document_number ⇒ String (readonly)
Document number (may include letters) from the document.
33 34 35 |
# File 'lib/yoti/data_type/document_details.rb', line 33 def document_number @document_number end |
#expiration_date ⇒ DateTime (readonly)
Expiration date of the document in DateTime format. If the document does not expire, this field will not be present. The time part of this DateTime will default to 00:00:00.
41 42 43 |
# File 'lib/yoti/data_type/document_details.rb', line 41 def expiration_date @expiration_date end |
#issuing_authority ⇒ String (readonly)
Can either be a country code (for a state), or the name of the issuing authority.
48 49 50 |
# File 'lib/yoti/data_type/document_details.rb', line 48 def @issuing_authority end |
#issuing_country ⇒ String (readonly)
ISO-3166-1 alpha-3 country code, e.g. “GBR”
26 27 28 |
# File 'lib/yoti/data_type/document_details.rb', line 26 def issuing_country @issuing_country end |
#type ⇒ String (readonly)
Type of the document e.g. PASSPORT | DRIVING_LICENCE | NATIONAL_ID | PASS_CARD
19 20 21 |
# File 'lib/yoti/data_type/document_details.rb', line 19 def type @type end |