vnticket / com.venuenext.vnticket.data / LoyaltyUserRepository

LoyaltyUserRepository

class LoyaltyUserRepository : BaseCoroutineScope

Constructors

<init>

LoyaltyUserRepository(context: Context)

Properties

context

val context: Context

Functions

cancelTransfer

fun cancelTransfer(transfer_uuid: String): LoyaltyBalanceTransferResponse

deleteAllUsersAsync

fun deleteAllUsersAsync(): Deferred<Any>

deleteUserAsync

fun deleteUserAsync(externalId: String): Deferred<Unit>

fetchLoyaltyAsync

fun fetchLoyaltyAsync(): <ERROR CLASS>

fetchLoyaltyUserLocalThenNetworkAsync

suspend fun fetchLoyaltyUserLocalThenNetworkAsync(): LoyaltyUser?

fetchLoyaltyUserWithRetry

Assumes the ticketing account has been created, but the loyalty association has not been made

suspend fun fetchLoyaltyUserWithRetry(): LoyaltyUser?

fetchTransactions

fun fetchTransactions(): List<BalanceHistoryTransaction>

getLoyaltyLocalUser

fun getLoyaltyLocalUser(): LoyaltyUser?

getLoyaltyUserLiveData

fun getLoyaltyUserLiveData(): LiveData<LoyaltyUser>?

insertUserAsync

fun insertUserAsync(loyaltyUser: LoyaltyUser): Deferred<Any>