vnorderui / com.venuenext.vnorderui.orders / AddToCartViewModel

AddToCartViewModel

class AddToCartViewModel : AndroidViewModel

AddToCartViewModel VenueNext

Created on 3/8/19. Copyright © 2019 VenueNext Inc. All rights reserved.

Constructors

<init>

AddToCartViewModel VenueNext

AddToCartViewModel(application: Application)

Properties

alcoholCount

var alcoholCount: Int

alcoholWarning

var alcoholWarning: Boolean

experienceEvent

var experienceEvent: Event?

itemCount

var itemCount: MutableLiveData<Int>

menuViewModel

lateinit var menuViewModel: MenuViewModel

Functions

addToCart

fun addToCart(productType: String?): Deferred<Unit>

createCart

fun createCart(menu: Menu, productType: String?): Deferred<Cart>

createExperienceCartAsync

fun createExperienceCartAsync(item: Item, totalExperiences: Int, selectedEvent: Event, allCollectedData: ArrayList<CollectedData>?, isUserSTH: Boolean, isUserPCH: Boolean): Deferred<Unit>

decrementItemCount

fun decrementItemCount(): Unit

getItem

fun getItem(itemUUID: String): Deferred<Item?>

hasReachedMaxItemCount

fun hasReachedMaxItemCount(): Boolean

incrementItemCount

fun incrementItemCount(): Unit

isAlcoholLimitReached

fun isAlcoholLimitReached(quantity: Int?): Deferred<Boolean>

updateAlcoholCount

fun updateAlcoholCount(): Unit

validateModifiers

fun validateModifiers(): Deferred<Boolean>