# TyroEnv Classes

Required to create an instance of `TyroTapToPaySdk`.

### See [ConnectionProvider](/pos/embedded-payments/android/sdk/connection-provider) for parameter info.

## TyroEnvDev

This is used to test the development environment.


```kotlin
class TyroEnvDev(
    connectionProvider: ConnectionProvider
) : TyroEnv()
```

### Parameters


```json
{
  "type": "object",
  "properties": {
    "connectionProvider": {
      "type": "ConnectionProvider",
      "description": "Your class that implements the Connection Provider interface which makes a call to your server to fetch the `connectionSecret`."
    }
  },
  "required": [
    "connectionProvider"
  ]
}
```

## TyroEnvProd

This is used for production.


```kotlin
class TyroEnvProd(
    connectionProvider: ConnectionProvider
) : TyroEnv()
```

### Parameters


```json
{
  "type": "object",
  "properties": {
    "connectionProvider": {
      "type": "ConnectionProvider",
      "description": "Your class that implements the Connection Provider interface which makes a call to your server to fetch the `connectionSecret`."
    }
  },
  "required": [
    "connectionProvider"
  ]
}
```

## 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.


```kotlin
class TyroEnvStub(
    val initStatus: InitStatus = INIT_SUCCESS,
    val transactionStatus: TransactionStatus = TXN_SUCCESS,
    val initDelayMillis: Long = 3000,
    val transactionDelayMillis: Long = 5000
) : TyroEnv()
```

### Parameters


```json
{
  "type": "object",
  "properties": {
    "initStatus": {
      "type": "InitStatus",
      "description": "The stubbed status that will returned after initialisation",
      "enum": [
        "INIT_SUCCESS",
        "INIT_CONNECTION_ERROR",
        "INIT_AUTH_ERROR",
        "INIT_NFC_UNAVAILABLE_ERROR",
        "INIT_REQUEST_PERMISSIONS_ERROR",
        "INIT_ATTESTATION_FAILED_ERROR",
        "INIT_ATTESTATION_ERROR",
        "INIT_SDK_ERROR",
        "INIT_ERROR"
      ]
    },
    "transactionStatus": {
      "type": "TransactionStatus",
      "description": "The stubbed status that will be returned after transactions are executed.",
      "enum": [
        "TXN_SUCCESS",
        "TXN_DECLINED",
        "TXN_FAILED",
        "TXN_NO_APP_ERROR",
        "TXN_FAILED_ALLOW_FALLBACK",
        "TXN_CARD_EXPIRED",
        "TXN_ONLINE_ERROR",
        "TXN_CANCELLED",
        "TXN_TIMEOUT",
        "TXN_CARD_ERROR",
        "TXN_REQUIRE_CDCVM",
        "TXN_PERMISSIONS_ERROR",
        "TXN_VERIFY_CONNECTION_SERVER_ERROR",
        "TXN_VERIFY_CONNECTION_TYRO_ERROR",
        "TXN_VERIFY_CONNECTION_REJECTED",
        "TXN_UNKNOWN_ERROR"
      ]
    },
    "initDelayMillis": {
      "type": "Long",
      "description": "The amount of delay before initialisation completes."
    },
    "transactionDelayMillis": {
      "type": "Long",
      "description": "The amount of delay before a transaction completes."
    }
  },
  "required": [
    "tyroEnv"
  ]
}
```