Features

All of the Sybrin Identity features can be accessed via the SybrinIdentity class.

To view all the available functions, view the SybrinIdentity class

Calling the functions

The SybrinIdentity class is a singleton instance, which can be accessed via the getInstance() method.

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.

Handling the response

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, rsaCode on 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:

Last updated