The SybrinIdentity class is a singleton instance, which can be accessed via the
Using any of the features is as simple as calling the function you need on the instance. Checkout the following sections where we discuss each feature in detail.
Each of the features will return a unique response object for that feature and country combination.
For example, using ID Card scanning for South Africa will return a SouthAfricaIDCardModel response object. Using Passport scanning for Zimbabwe will return a ZimbabwePassportModel response object.
In order for this to be possible, the object is returned as a sub type instance of that feature's opaque return type.
For example, Green Book scanning will always return a GreenBookModel, ID Card scanning will always return an IDCardModel, and Passport scanning will always return a PassportModel.
To access the country specific model properties (example,
rsaCodeon the SouthAfricaIDCardModel), you will first need to cast the response object, from the feature, to the corresponding feature's country-specific model; As explained above. This can easily be done by using the
castToModel()method found on all returned objects.
All of the features return types (GreenBookModel, IDCardModel, and PassportModel) derive from the base type DocumentModel
To illustrate the above, see the following UML diagram: