PassportModel
A class derived from DocumentModel containing details pertaining to all passport documents
Declaration
Only relevant details are shown, boilerplate or standard Swift generated code is omitted
Summary
Public variables
Name | Type | Description | Data source |
String? | The passport type of the passport document. | MRZ | |
String? | The issuing country code of the passport document. | MRZ | |
String? | The surname of the subject as found on the passport document. | MRZ | |
String? | The names of the subject as found on the passport document. | MRZ | |
String? | The passport number of the subject as found on the passport document. | MRZ | |
String? | The nationality of the subject as found on the passport document. | MRZ | |
Date? | The date of birth of the subject as found on the passport document. | MRZ | |
The sex of the subject as found on the passport document. | MRZ | ||
Date? | The date of expiry of the passport document. | MRZ |
Public methods
Signature | Return Type | Description |
Void | Encodes the model using the encoder provided. Used to convert the model to JSON. |
Public variables
passportType
@objc public var passportType: String? { get }
Example: "P"
The passport type of the passport document.
issuingCountryCode
@objc public var issuingCountryCode: String? { get }
Example: "ZAF"
The issuing country code of the passport document.
surname
@objc public var surname: String? { get }
Example: "Doe"
The surname of the subject as found on the passport document.
names
@objc public var names: String? { get }
Example: "John"
The names of the subject as found on the passport document.
passportNumber
@objc public var passportNumber: String? { get }
Example: "010203040506"
The passport number of the subject as found on the passport document.
nationality
@objc public var nationality: String? { get }
Example: "ZAF"
The nationality of the subject as found on the passport document.
dateOfBirth
@objc public var dateOfBirth: Date? { get }
Example: 1990/01/01
The date of birth of the subject as found on the passport document.
sex
@objc public var sex:
Sex
{ get }
Example: Sex.Male
The sex of the subject as found on the passport document.
dateOfExpiry
@objc public var dateOfExpiry: Date? { get }
Example: 2024/01/01
The date of expiry of the passport document.
Public methods
encode(to encoder: Encoder)
override public func encode(to encoder: Encoder) throws
This function also calls its super function
Encodes the model using the encoder provided. Used to convert the model to JSON.
See also
Where this is used
Last updated