IDCardModel
A class derived from DocumentModel containing details pertaining to all ID card documents
Declaration
Only relevant details are shown, boilerplate or standard Swift generated code is omitted
Summary
Public variables
Public methods
Public variables
fullName
@objc public var fullName: String? { get }
Example: "John Doe"
The full name of the subject as found on the ID card document.
sex
@objc public var sex:
Sex
{ get }
Example: Sex.Male
The sex of the subject as found on the ID card document.
nationality
@objc public var nationality: String? { get }
Example: "RSA"
The nationality of the subject as found on the ID card document.
identityNumber
@objc public var identityNumber: String? { get }
Example: "010203040506"
The identity number of the subject as found on the ID card document.
dateOfBirth
@objc public var dateOfBirth: Date? { get }
Example: 1990/01/01
The date of birth of the subject as found on the ID card document.
portraitBackImage
@objc public var portraitBackImage: UIImage? { get }
The cropped version of documentBackImage, containing just the face.
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.
portraitBackImagePath
@objc public var portraitBackImagePath: String? { get }
The path to portraitBackImage, after it is saved. Otherwise nil.
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 portraitBackImage, 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