customer-android-kotlin

//core/com.kustomer.core.models/KusResult

KusResult

[androidJvm]
sealed class KusResult<out R>

A generic wrapper class which contains the status of a response Object type returned by a successful response

Handle KusResult object as follows:

Samples

[androidJvm]
ExampleKusResult

Types

Name Summary
Error [androidJvm]
data class Error(val exception: Exception) : KusResult<Nothing>
Loading [androidJvm]
object Loading : KusResult<Nothing>
Currently not used in Core SDK
Success [androidJvm]
data class Success<out T>(val data: T) : KusResult<T>

Functions

Name Summary
successOr [androidJvm]
fun <R> successOr(fallback: R): R
toString [androidJvm]
open override fun toString(): String

Properties

Name Summary
dataOrNull [androidJvm]
val dataOrNull: R?

Inheritors

Name
Success
Error
Loading