TyroEnv Classes
Required to create an instance of TyroTapToPaySdk
.
See ConnectionProvider for parameter info.
TyroEnvDev
This is used to test the development environment.
class TyroEnvDev(
connectionProvider: ConnectionProvider
) : TyroEnv()
Parameters
connectionProvider required | ConnectionProvider Your class that implements the Connection Provider interface which makes a call to your server to fetch the |
TyroEnvProd
This is used for production.
class TyroEnvProd(
connectionProvider: ConnectionProvider
) : TyroEnv()
Parameters
connectionProvider required | ConnectionProvider Your class that implements the Connection Provider interface which makes a call to your server to fetch the |
TyroEnvStub
This is used when you just want to test the app without hitting the real environment. Responses and delays can be set in the constructor.
class TyroEnvStub(
val initStatus: InitStatus = INIT_SUCCESS,
val transactionStatus: TransactionStatus = TXN_SUCCESS,
val initDelayMillis: Long = 3000,
val transactionDelayMillis: Long = 5000
) : TyroEnv()
Parameters
initStatus | InitStatus The stubbed status that will returned after initialisation |
transactionStatus | TransactionStatus The stubbed status that will be returned after transactions are executed. |
initDelayMillis | Long The amount of delay before initialisation completes. |
transactionDelayMillis | Long The amount of delay before a transaction completes. |