vnorder / com.venuenext.vnorder.orders.data / CartRepository

CartRepository

class CartRepository

CartRepository VenueNext

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

Constructors

<init>

CartRepository VenueNext

CartRepository(context: Context)

Properties

cartDao

val cartDao: CartDao

context

var context: Context

itemRepository

val itemRepository: ItemRepository

menuRepository

val menuRepository: MenuRepository

modifierGroupRepository

val modifierGroupRepository: ModifierGroupRepository

modifierPropertyRepository

val modifierPropertyRepository: ModifierPropertyRepository

variantRepository

val variantRepository: VariantRepository

venueNextDB

val venueNextDB: VenueNextDatabase

Functions

count

fun count(): Int

createCartFromOrderAsync

fun createCartFromOrderAsync(order: Order, isForReorder: Boolean = false): Deferred<Cart?>

deleteAllCarts

fun deleteAllCarts(): Deferred<Unit>

deleteCart

fun deleteCart(cartUUID: String): Deferred<Unit>

getCart

fun getCart(orderUUID: String): Deferred<Cart>

insertCart

fun insertCart(cart: Cart): Deferred<Unit>

insertCarts

fun insertCarts(carts: List<Cart>): Deferred<Unit>