vnorder / com.venuenext.vnorder.orders.model / CartEntryDisplayItem

CartEntryDisplayItem

data class CartEntryDisplayItem

An object representing a cart entry with values that are ready to be displayed to the user.

Parameters

cartEntryID - The id of the CartEntry being displayed.

itemName - The name of the CartEntry item being displayed.

quantity - The number CartEntrys in the cart that are exact matches.

modifierNames - A string representing all the modifiers on this CartEntry.

totalPrice - The total price of the CartEntry, including all modifiers.

Constructors

<init>

An object representing a cart entry with values that are ready to be displayed to the user.

CartEntryDisplayItem(cartEntryID: String, itemName: String, quantity: Int, modifierNames: String, totalPrice: Double)

Properties

cartEntryID

The id of the CartEntry being displayed.

val cartEntryID: String

itemName

The name of the CartEntry item being displayed.

val itemName: String

modifierNames

A string representing all the modifiers on this CartEntry.

val modifierNames: String

quantity

The number CartEntrys in the cart that are exact matches.

val quantity: Int

totalPrice

The total price of the CartEntry, including all modifiers.

val totalPrice: Double

Functions

getDisplayPrice

A String formatted in US currency representing the total price of the item.

fun getDisplayPrice(): String

getItemNameWithQuantity

The name if the item prefixed with the quantity.

fun getItemNameWithQuantity(shouldUpperCase: Boolean): String