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 surname: 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: Double { get }
    @objc final public var height: Double { 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 barcode: 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 barcodeImagePath: 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

Public methods

Public variables

names

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

Example: "JOHN"

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

surname

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

Example: "DOE"

The surname 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: Double { 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: Double { 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.

barcode

@objc final public var barcode: 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.

barcodeImagePath

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

The path to barcodeImage, 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 populates its respective path variable.

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