diff --git a/channels/jaicp/src/main/kotlin/com/justai/jaicf/channel/jaicp/dto/JaicpNativeBotRequest.kt b/channels/jaicp/src/main/kotlin/com/justai/jaicf/channel/jaicp/dto/JaicpNativeBotRequest.kt index 0cd233ee..31cf6ace 100644 --- a/channels/jaicp/src/main/kotlin/com/justai/jaicf/channel/jaicp/dto/JaicpNativeBotRequest.kt +++ b/channels/jaicp/src/main/kotlin/com/justai/jaicf/channel/jaicp/dto/JaicpNativeBotRequest.kt @@ -122,7 +122,7 @@ interface TelephonyBotRequest : JaicpNativeBotRequest { /** * Contains the status of the transfer of a customer to an operator. * - * @property status agent transfer status. It returns a string: `SUCCESS` or `FAIL`. + * @property status agent transfer status. It returns an enum value of [Status.SUCCESS] or [Status.FAIL]. * * @property hangup true means the customer has ended the conversation. * false means the customer is still online and was re-directed to the bot (if continueCall: true in [TelephonySwitchReply]). @@ -132,11 +132,16 @@ interface TelephonyBotRequest : JaicpNativeBotRequest { @Serializable data class TransferStatus( - val status: String, + val status: Status, val hangup: Boolean, val number: String ) { - val isSuccess = status == "SUCCESS" + + enum class Status { + SUCCESS, FAIL + } + + val isSuccess = status == Status.SUCCESS } @Serializable