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 weight: Float { get }
    @objc final public var height: Float { get }
    @objc final public var address: String? { get }
    @objc final public var expirationDate: Date? { get }
    @objc final public var agencyCode: String? { get }
    @objc final public var bloodType: String? { get }
    @objc final public var eyeColor: String? { get }
    @objc final public var restrictions: String? { get }
    @objc final public var conditions: String? { get }
    @objc final public var barcodeData: String? { get }
    @objc final public var serialNumber: String? { get }
    @objc final public var fullName: String? { get }
    @objc final public var barcodeImage: UIImage? { get }
    @objc final public var croppedDocumentBackImage: UIImage? { get }
    @objc final public var barcodeImagePath: String? { get }
    @objc final public var croppedDocumentBackImagePath: 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

Float

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

OCR

Float

The height 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

String?

The blood type of the subject as found on the drivers license document.

OCR

String?

The eye color of the subject as found on the drivers license document.

OCR

String?

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

OCR

String?

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

OCR

String?

The barcode of the drivers license document.

Barcode

String?

The serial number of the subject as found on the drivers license document.

OCR

String?

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

OCR

UIImage?

The cropped version of documentBackImage, containing just the barcode.

Back of document

UIImage?

The cropped version of documentBackImage, containing just the document.

Back of document

String?

The path to barcodeImage, after it is saved. Otherwise nil.

Local storage

String?

The path to croppedDocumentBackImage, after it is saved. Otherwise nil.

Local storage

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.

Validation

The following validation and verification applies to this document:

Component verification

As explained in Validation & Verification the following fields are verified across the front and back components of the document.

Value

Source

Serial number

Front: OCR

Back: OCR

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.

weight

@objc final public var weight: Float { get }

Weight is in kilograms

Example: 80

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

height

@objc final public var height: Float { get }

Height is in meters

Example: 1.7

The height 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.

bloodType

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

Value can be nil

Example: "0+"

The blood type of the subject as found on the drivers license document.

eyeColor

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

Example: "BROWN"

The eye color of the subject as found on the drivers license document.

restrictions

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

Example: "1,2"

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

conditions

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

Example: "NONE"

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

barcodeData

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

Value can be nil

The barcode of the drivers license document.

serialNumber

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

Example: "012345678"

The serial number of the subject as found on the drivers license document.

fullName

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

Example: "JOHN DOE"

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

barcodeImage

@objc final public var barcodeImage: UIImage? { get }

The cropped version of documentBackImage, containing just the barcode.

croppedDocumentBackImage

@objc final public var croppedDocumentBackImage: UIImage? { get }

The cropped version of documentBackImage, containing just the document.

barcodeImagePath

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

The path to barcodeImage, after it is saved. Otherwise nil.

croppedDocumentBackImagePath

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

The path to croppedDocumentBackImage, after it is saved. Otherwise nil.

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