PassportModel

A class derived from DocumentModel containing details pertaining to all passport documents

Declaration

@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

Summary

Public variables

Public methods

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