vnticket / com.venuenext.vnticket.service / LoyaltyService

LoyaltyService

class LoyaltyService : HttpClient, BaseCoroutineScope

Exceptions

LoyaltyServiceException

class LoyaltyServiceException : Exception

TransferActionFailedException

Used when a transfer has already been accepted/canceled

class TransferActionFailedException : Exception

TransferNotFoundException

Used when accepting a non-existent transfer

class TransferNotFoundException : Exception

UnknownServerError

class UnknownServerError : Exception

Constructors

<init>

LoyaltyService(context: Context)

Functions

acceptBalanceTransfer

fun acceptBalanceTransfer(action: TransferActionRequest): LoyaltyBalanceTransferResponse

acceptBalanceTransferAsync

fun acceptBalanceTransferAsync(acceptTransfer: TransferActionRequest, success: (result: LoyaltyBalanceTransferResponse) -> Unit, failure: (e: Throwable) -> Unit): Job

cancelTransfer

fun cancelTransfer(action: TransferActionRequest): LoyaltyBalanceTransferResponse

cancelTransferAsync

fun cancelTransferAsync(action: TransferActionRequest, success: (result: LoyaltyBalanceTransferResponse) -> Unit, failure: (e: Throwable) -> Unit): Job

fetchAwardsRules

fun fetchAwardsRules(): List<AwardsRule>

fetchLoyaltyUserAsync

fun fetchLoyaltyUserAsync(): <ERROR CLASS>
fun fetchLoyaltyUserAsync(success: (result: LoyaltyUser?) -> Unit, failure: (Exception) -> Unit): Unit

getTransactions

fun getTransactions(): List<BalanceHistoryTransaction>

getTransactionsAsync

fun getTransactionsAsync(success: (result: List<BalanceHistoryTransaction>) -> Unit, error: (e: Throwable) -> Unit): Job

transferBalance

fun transferBalance(loyaltyBalanceTransfer: LoyaltyBalanceTransfer): LoyaltyBalanceTransferResponse

transferBalanceAsync

fun transferBalanceAsync(loyaltyBalanceTransfer: LoyaltyBalanceTransfer, success: (result: LoyaltyBalanceTransferResponse) -> Unit, failure: (e: Throwable) -> Unit): Deferred<Unit>