DriversLicenseModel

A class derived from DocumentModel containing details pertaining to all drivers license documents

Declaration

@objc public class DriversLicenseModel : DocumentModel {
    @objc public var licenseNumber: String? { get }
    @objc public var documentBackImage: UIImage? { get }
    @objc public var documentBackImagePath: String? { get }
    
    @objc override public func saveImages()
    override 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 license number of the subject as found on the drivers license document.

OCR / Barcode

UIImage?

Contains an original image of the back side of the document.

Back of document

String?

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

Local storage

Public methods

Signature

Return Type

Description

Void

Saves the documentBackImage and populates its respective path variable.

Void

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

Public variables

licenseNumber

@objc public var licenseNumber: String? { get }

Example: "01020304"

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

documentBackImage

@objc public var documentBackImage: UIImage? { get }

Contains an original image of the back side of the document.

documentBackImagePath

@objc public var documentBackImagePath: String? { get }

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

Public methods

saveImages()

@objc override public func saveImages()

This function also calls its super function

Saves the documentBackImage and populates its respective path variable.

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