vnorder / com.venuenext.vnorder.orders.model / Order

Order

open class Order

Order VenueNext

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

Constructors

<init>

Order VenueNext

Order(uuid: String = "", id: String = "", userUUID: String? = null, createdAt: String? = null, canceledAt: String? = null, completedAt: String? = null, refundedAt: String? = null, userRefundable: String? = null, lastFour: String? = null, creditCardType: String? = null, lineItems: List<LineItem>? = null, lineItemErrors: List<LineItemError>? = null, itemCount: Int? = 0, productType: String? = null, promotions: List<Promotion>? = null, qrCodeData: String? = null, serviceType: String? = null, menuUUID: String? = null, standUUID: String? = null, standName: String? = null, state: String? = OrderState.DEFAULT, stateDescription: String? = null, stateDisplayName: String? = null, stateImage: List<String>? = null, stateInstructions: String? = null, subtotal: Double? = 0.0, taxRate: Double? = 0.0, tip: Double? = 0.0, total: Double? = 0.0, totalAmountInCents: Int? = 0, taxAmountInCents: Int? = 0, serviceChargeInCents: Int? = 0, totals: List<Total>? = null, userName: String? = null, userEmail: String? = null, usesQrCode: Boolean? = false, fulfillmentDate: String? = null, fulfillmentSlot: String? = null, userAttributes: UserAttribute? = null, discountAmountInCents: Int? = 0, itemNames: List<String>? = null, merchant: Merchant? = null, orderName: String? = null, quantity: Int? = 0, instructions: List<Instruction>? = null, orderNumber: String? = null, experienceItems: List<ExperienceItem>? = null, userItems: List<ExperienceUserItem>? = null, seat: Seat? = null, firstName: String? = null, lastName: String? = null, email: String? = null, tipSuggestions: List<TipSuggestion>? = null, usageType: String? = null)

Properties

canceledAt

var canceledAt: String?

completedAt

var completedAt: String?

createdAt

var createdAt: String?

creditCardType

var creditCardType: String?

discountAmountInCents

var discountAmountInCents: Int?

email

var email: String?

experienceItems

var experienceItems: List<ExperienceItem>?

firstName

var firstName: String?

fulfillmentDate

var fulfillmentDate: String?

fulfillmentSlot

var fulfillmentSlot: String?

id

var id: String

instructions

var instructions: List<Instruction>?

itemCount

var itemCount: Int?

itemNames

var itemNames: List<String>?

lastFour

var lastFour: String?

lastName

var lastName: String?

lineItemErrors

var lineItemErrors: List<LineItemError>?

lineItems

var lineItems: List<LineItem>?

menuUUID

var menuUUID: String?

merchant

var merchant: Merchant?

orderName

var orderName: String?

orderNumber

var orderNumber: String?

productType

var productType: String?

promotions

var promotions: List<Promotion>?

qrCodeData

var qrCodeData: String?

quantity

var quantity: Int?

refundedAt

var refundedAt: String?

seat

var seat: Seat?

serviceChargeInCents

var serviceChargeInCents: Int?

serviceType

var serviceType: String?

standName

var standName: String?

standUUID

var standUUID: String?

state

var state: String?

stateDescription

var stateDescription: String?

stateDisplayName

var stateDisplayName: String?

stateImage

var stateImage: List<String>?

stateInstructions

var stateInstructions: String?

subtotal

var subtotal: Double?

taxAmountInCents

var taxAmountInCents: Int?

taxRate

var taxRate: Double?

tip

var tip: Double?

tipSuggestions

var tipSuggestions: List<TipSuggestion>?

total

var total: Double?

totalAmountInCents

var totalAmountInCents: Int?

totals

var totals: List<Total>?

usageType

var usageType: String?

userAttributes

var userAttributes: UserAttribute?

userEmail

var userEmail: String?

userItems

var userItems: List<ExperienceUserItem>?

userName

var userName: String?

userRefundable

var userRefundable: String?

userUUID

var userUUID: String?

usesQrCode

var usesQrCode: Boolean?

uuid

var uuid: String

Extension Properties

isServiceChargeLineVisible

Determines if this order should have it's service charge line item displayed in the Order Summary when displaying totals to the user.

val Order.isServiceChargeLineVisible: Boolean

orderQuantityForDisplay

val Order.orderQuantityForDisplay: Int

serviceChargeAmountForDisplay

val Order.serviceChargeAmountForDisplay: Double

serviceChargeDisplayText

val Order.serviceChargeDisplayText: String?

subtotalAmountForDisplay

val Order.subtotalAmountForDisplay: Double

taxAmountForDisplay

val Order.taxAmountForDisplay: Double

unifiedEmailAddress

val Order.unifiedEmailAddress: String?

unifiedId

val Order.unifiedId: String

unifiedOrderNumber

val Order.unifiedOrderNumber: String?

Extension Functions

analyticsFormat

Formats the order details for analytics to allow for consistent analytics reporting.

fun Order.analyticsFormat(res: Resources, currency: String, checkoutProgress: Int): Bundle

getOrderStateDisplayText

Returns a user facing String that can be used to represent the order state.

fun Order.getOrderStateDisplayText(): String

isFirstItemExpired

Returns true if the first item in the order has an expiredAt date the is not null and is in the past.

fun Order.isFirstItemExpired(inboundPattern: String = "yyyy-MM-dd'T'HH:mm:ss.SSS"): Boolean