Identity iOS
1.12
Search
K
Comment on page

SouthAfricaGreenBookModel

A class derived from GreenBookModel containing details specific to the South Africa green book document

Declaration

@objc final public class SouthAfricaGreenBookModel : GreenBookModel {
@objc final public var identityNumberDateOfBirth: Date? { get }
@objc final public var identityNumberSex: Sex { get }
@objc final public var identityNumberCitizenship: CitizenshipType { get }
@objc final public var identityNumberADigit: Int { get }
@objc final public var identityNumberCheckDigit: Int { get }
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

Name
Type
Description
Data source
Date?
The date of birth for the South African identity number.
OCR
Sex
The sex for the South African identity number.
OCR
The citizenship type for the South African identity number.
OCR
Int
The A digit for the South African identity number.
OCR
Int
The check digit for the South African identity number.
OCR

Public methods

Signature
Return Type
Description
Void
Encodes the model using the encoder provided. Used to convert the model to JSON.

Validation

The following validation and verification applies to this document:

Check digit validation

Value
Validation type
Identity number
Check digit using Luhn algorithm.

Public variables

identityNumberDateOfBirth

@objc final public var identityNumberDateOfBirth: Date? { get }
Example: 1988/01/23
The date of birth for the South African identity number.

identityNumberSex

@objc final public var identityNumberSex: Sex { get }
Example: Sex.Male
The sex for the South African identity number.

identityNumberCitizenship

@objc final public var identityNumberCitizenship: CitizenshipType { get }
Example: CitizenshipType.Citizen
The citizenship type for the South African identity number.

identityNumberADigit

@objc final public var identityNumberADigit: Int { get }
Example: 8
The A digit for the South African identity number.

identityNumberCheckDigit

@objc final public var identityNumberCheckDigit: Int { get }
Example: 8
The check digit for the South African identity number.

Public methods

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