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 croppedDocumentBackImage: UIImage? { get }
    @objc public var documentBackImagePath: String? { get }
    @objc public var croppedDocumentBackImagePath: 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

String?

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

UIImage?

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

UIImage?

The cropped version of documentBackImage, containing just the document.

String?

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

String?

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

Public methods

Signature

Return Type

Description

Void

Saves the documentBackImage 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

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.

croppedDocumentBackImage

@objc public var croppedDocumentBackImage: UIImage? { get }

The cropped version of documentBackImage, containing just the document.

documentBackImagePath

@objc public var documentBackImagePath: String? { get }

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

croppedDocumentBackImagePath

@objc public var croppedDocumentBackImagePath: String? { get }

The path to croppedDocumentBackImage, 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 croppedDocumentBackImage and populates their respective path variables.

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