Comment on page
GreenBookModel
A class derived from DocumentModel containing details pertaining to all green book documents
@objc public class GreenBookModel : DocumentModel {
@objc public var identityNumber: String? { get }
@objc public var surname: String? { get }
@objc public var firstNames: String? { get }
@objc public var countryOfBirth: String? { get }
@objc public var dateOfBirth: Date? { get }
@objc public var dateIssued: Date? { get }
@objc public var bookType: GreenBookType { get }
override public func encode(to encoder: Encoder) throws
}
Only relevant details are shown, boilerplate or standard Swift generated code is omitted
Name | Type | Description | Data source |
String? | The identity number of the subject as found on the green book document. | OCR | |
String? | The surname of the subject as found on the green book document. | OCR | |
String? | The first names of the subject as found on the green book document. | OCR | |
String? | The country of birth of the subject as found on the green book document. | OCR | |
Date? | The date of birth of the subject as found on the green book document. | OCR | |
Date? | The date issued of the green book document. | OCR | |
The type of green book document. | OCR |
Signature | Return Type | Description |
Void | Encodes the model using the encoder provided. Used to convert the model to JSON. |
@objc public var identityNumber: String? { get }
Example:
"010203040506"
The identity number of the subject as found on the green book document.
@objc public var surname: String? { get }
Example:
"Doe"
The surname of the subject as found on the green book document.
@objc public var firstNames: String? { get }
Example:
"John"
The first names of the subject as found on the green book document.
@objc public var countryOfBirth: String? { get }
Example:
"SOUTH AFRICA"
The country of birth of the subject as found on the green book document.
@objc public var dateOfBirth: Date? { get }
Example:
1990/01/01
The date of birth of the subject as found on the green book document.
@objc public var dateIssued: Date? { get }
Example:
2005/01/01
The date issued of the green book document.
Example:
GreenBookType.English
The type of green book document.
override public func encode(to encoder: Encoder) throws
Encodes the model using the encoder provided. Used to convert the model to JSON.
Last modified 1yr ago