Comment on page
PassportModel
A class derived from DocumentModel containing details pertaining to all passport documents
@objc public class PassportModel : DocumentModel {
@objc public var passportType: String? { get }
@objc public var issuingCountryCode: String? { get }
@objc public var surname: String? { get }
@objc public var names: String? { get }
@objc public var passportNumber: String? { get }
@objc public var nationality: String? { get }
@objc public var dateOfBirth: Date? { get }
@objc public var sex: Sex { get }
@objc public var dateOfExpiry: Date? { get }
override public func encode(to encoder: Encoder) throws
}
Only relevant details are shown, boilerplate or standard Swift generated code is omitted
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 |
Signature | Return Type | Description |
Void | Encodes the model using the encoder provided. Used to convert the model to JSON. |
@objc public var passportType: String? { get }
Example:
"P"
The passport type of the passport document.
@objc public var issuingCountryCode: String? { get }
Example:
"ZAF"
The issuing country code of the passport document.
@objc public var surname: String? { get }
Example:
"Doe"
The surname of the subject as found on the passport document.
@objc public var names: String? { get }
Example:
"John"
The names of the subject as found on the passport document.
@objc public var passportNumber: String? { get }
Example:
"010203040506"
The passport number of the subject as found on the passport document.
@objc public var nationality: String? { get }
Example:
"ZAF"
The nationality of the subject as found on the passport document.
@objc public var dateOfBirth: Date? { get }
Example:
1990/01/01
The date of birth of the subject as found on the passport document.
Example:
Sex.Male
The sex of the subject as found on the passport document.
@objc public var dateOfExpiry: Date? { get }
Example:
2024/01/01
The date of expiry of the passport document.
override public func encode(to encoder: Encoder) throws
Encodes the model using the encoder provided. Used to convert the model to JSON.
Last modified 1yr ago