PhilippinesDriversLicenseModel

A class derived from DriversLicenseModel containing details specific to the Philippines drivers license document

Declaration

@objc final public class PhilippinesDriversLicenseModel : DriversLicenseModel {
    @objc final public var names: String? { get }
    @objc final public var lastName: String? { get }
    @objc final public var nationality: String? { get }
    @objc final public var sex: Sex { get }
    @objc final public var dateOfBirth: Date? { get }
    @objc final public var address: String? { get }
    @objc final public var expirationDate: Date? { get }
    @objc final public var agencyCode: String? { get }
    
    @objc override final public func saveImages()
    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 names of the subject as found on the drivers license document.

OCR

String?

The last name of the subject as found on the drivers license document.

OCR

String?

The nationality of the subject as found on the drivers license document.

OCR

The sex of the subject as found on the drivers license document.

OCR

Date?

The date of birth of the subject as found on the drivers license document.

OCR

String?

The address of the subject as found on the drivers license document.

OCR

Date?

The expiration date of the drivers license document.

OCR

String?

The agency code of the subject as found on the drivers license document.

OCR

Public methods

Signature

Return Type

Description

Void

Saves the barcodeImage and croppedDocumentBackImage and populates their respective path variables.

Void

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

Public variables

names

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

Example: "JOHN"

The names of the subject as found on the drivers license document.

lastName

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

Example: "DOE"

The last name of the subject as found on the drivers license document.

nationality

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

Example: "PHL"

The nationality of the subject as found on the drivers license document.

sex

@objc final public var sex: Sex { get }

Example: Sex.Male

The sex of the subject as found on the drivers license document.

dateOfBirth

@objc final public var dateOfBirth: Date? { get }

Example: 1990/01/01

The date of birth of the subject as found on the drivers license document.

address

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

Example: "UNIT/HOUSE NO. BUILDING, STREET NAME, BARANGAY, CITY/MUNICIPALITY"

The address of the subject as found on the drivers license document.

expirationDate

@objc final public var expirationDate: Date? { get }

Example: 2025/01/01

The expiration date of the drivers license document.

agencyCode

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

Example: "N32"

The agency code of the subject as found on the drivers license document.

Public methods

saveImages()

@objc override final public func saveImages()

This function also calls its super function

Saves the barcodeImage and croppedDocumentBackImage and populates their respective path variables.

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