Response

sealed interface Response<out T>

Response of the document verification. In case when document is successfully verified Success response with verification result is returned. In case of any error, Error with reason is returned.

Parameters

Success

Successful response with verification result. @property endpointResponse

Error

An error response with an error reason and exception if the error is due to an exception. @property errorReason A reason which indicates why the error happened. @property exception Exception which caused error or null if there were no exceptions.

Inheritors

Types

Link copied to clipboard
data class Error(val errorReason: ErrorReason, val exception: Exception? = null) : Response<Nothing>
Link copied to clipboard
data class Success<T>(val endpointResponse: T) : Response<T>