EthiopiaPassportModel

A class derived from PassportModel containing details specific to the Ethiopia passport document

Declaration

@objc final public class EthiopiaPassportModel : PassportModel {
    @objc final public var mrzLine1: String? { get }
    @objc final public var mrzLine2: String? { get }
    @objc final public var passportNumberCheckDigit: Int { get }
    @objc final public var dateOfBirthCheckDigit: Int { get }
    @objc final public var dateOfExpiryCheckDigit: Int { get }
    @objc final public var optionalData: String? { get }
    @objc final public var optionalDataCheckDigit: Int { get }
    @objc final public var compositeCheckDigit: Int { get }
    
    override final public func encode(to encoder: Encoder) throws
}

Only relevant details are shown, boilerplate or standard Swift generated code is omitted

Summary

Public variables

Name

Type

Description

Data source

String?

The top MRZ line of the passport document.

MRZ

String?

The bottom MRZ line of the passport document.

MRZ

Int

The check digit for passportNumber.

MRZ

Int

The check digit for dateOfBirth.

MRZ

Int

The check digit for dateOfExpiry.

MRZ

String?

Uncategorized data found on the passport document.

MRZ

Int

The check digit for optionalData.

MRZ

Int

The check digit for the entire MRZ.

MRZ

Public methods

Signature

Return Type

Description

Void

Encodes the model using the encoder provided. Used to convert the model to JSON.

Validation

The following validation and verification applies to this document:

Check digit validation

Value

Validation type

Date of birth

Date of expiry

Optional data

MRZ line 2 composite

Passport number

Public variables

mrzLine1

@objc final public var mrzLine1: String? { get }

Example: "P<UTOERIKSSON<<ANNA<MARIA<<<<<<<<<<<<<<<<<<<"

The top MRZ line of the passport document.

mrzLine2

@objc final public var mrzLine2: String? { get }

Example: "L898902C36UTO7408122F1204159ZE184226B<<<<<10"

The bottom MRZ line of the passport document.

passportNumberCheckDigit

@objc final public var passportNumberCheckDigit: Int { get }

Example: 6

The check digit for passportNumber.

dateOfBirthCheckDigit

@objc final public var dateOfBirthCheckDigit: Int { get }

Example: 2

The check digit for dateOfBirth.

dateOfExpiryCheckDigit

@objc final public var dateOfExpiryCheckDigit: Int { get }

Example: 9

The check digit for dateOfExpiry.

optionalData

@objc final public var optionalData: String? { get }

Example: "ZE184226B"

Uncategorized data found on the passport document.

optionalDataCheckDigit

@objc final public var optionalDataCheckDigit: Int { get }

Example: 1

The check digit for optionalData.

compositeCheckDigit

@objc final public var compositeCheckDigit: Int { get }

Example: 0

The check digit for the entire MRZ.

Public methods

encode(to encoder: Encoder)

override final 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

Last updated