Merchandise

public class Merchandise

This represents the data that is shared between the terminal and the Android application. Setting the fields is only relevant when sending the data to the terminal, and conversely, * getting the fields is only relevant when receiving this object from the terminal.

Methods

attachModifier

public boolean attachModifier(Modifier modifier)

Attaches a modifier to this item, returning success/failure based on ArrayList add.

create

public static Merchandise create()

create Merchandise

getAmount

public Decimal getAmount()

The final total amount for this item as a GAAP-standard BigDecimal, including the extendedPrice, tax, and discount. This is required.

getAmounts

public AmountTotals getAmounts()

Returns the amounts for this item in the basket.

getBasketItemId

public String getBasketItemId()

The unique ID for this merchandise item as it exists in the basket. If multiple items with the same SKU/UPC are added individually to the basket, this basket item ID will be used to distinguish between them. This will be generated by the service if not provided.

getDescription

public String getDescription()

A human-readable description. This is optional.

getDiscount

public Decimal getDiscount()

Refer to the setDiscount(BigDecimal discount).

getDisplayLine

public String getDisplayLine()

The line to display to the customer. This may include standard tab and line break characters if desired for normal text, or this may use HTML formatting. This will be generated by the service if not provided.

getDisplayOrder

public int getDisplayOrder()

The display order for this item. This is generally auto-incremented as items are added to the basket, using a gap value to allow insertion between items at a later time.

getExtendedPrice

public Decimal getExtendedPrice()

Refer to setExtendedPrice(BigDecimal extendedPrice)

getModifiers

public ArrayList<Modifier> getModifiers()

Returns the modifiers attached to this merchandise. Returns an empty array if there are none.

getName

public String getName()

A human-readable name. This is optional.

getQuantity

public Decimal getQuantity()

Refer to setQuantity(int quantity).

getRemoved

public boolean getRemoved()

Set to true if this item was removed from the basket, useful for business analytics. Removed items do not contribute to the total transaction amount, and are not displayed nor on the receipt. This is set by the service.

getSequence

public int getSequence()

The sequence for this item. This is generally auto-incremented as items are added to the basket. This is generally set by the underlying service, but can be set manually if required.

getSku

public String getSku()

SKU of the item. This is optional.

getTax

public Decimal getTax()

The tax for this merchandise based on total quantity as a GAAP-standard BigDecimal. This is optional.

getUnitOfMeasurement

public String getUnitOfMeasurement()

getUnitPrice

public Decimal getUnitPrice()

Refer to the setUnitPrice(BigDecimal unitPrice).

getUpc

public String getUpc()

EAN / UPC of the item. This is optional.

removeModifier

public boolean removeModifier(Modifier modifier)

Removes a modifier from this item, returning success/failure based on ArrayList remove.

setAmount

public void setAmount(Decimal amount)

The final total amount for this item as a GAAP-standard BigDecimal, including the extendedPrice, tax, and discount. This is required.

setAmounts

public void setAmounts(AmountTotals amounts)

Set the amounts for this item.

setBasketItemId

public void setBasketItemId(String itemId)

The unique ID for this merchandise item as it exists in the basket. If multiple items with the same SKU/UPC are added individually to the basket, this basket item ID will be used to distinguish between them. This will be generated by the service if not provided.

setDescription

public void setDescription(String description)

A human-readable description. This is optional.

setDiscount

public void setDiscount(Decimal discount)

The discount amount for the total quantity as a GAAP-standard BigDecimal. This is optional.

setDisplayLine

public void setDisplayLine(String displayLine)

The line to display to the customer. This may include standard tab and line break characters if desired for normal text, or this may use HTML formatting. This will be generated by the service if not provided.

setDisplayOrder

public void setDisplayOrder(int displayOrder)

The display order for this item. This is generally auto-incremented as items are added to the basket, using a gap value to allow insertion between items at a later time.

setExtendedPrice

public void setExtendedPrice(Decimal price)

The product of unitPrice and quantity as a GAAP-standard BigDecimal. This is optional.

setName

public void setName(String name)

A human-readable name. This is optional.

setQuantity

public void setQuantity(Decimal quantity)

The number of units. Defaults to 1 if not set.

setRemoved

public void setRemoved(boolean removed)

Set to true if this item was removed from the basket, useful for business analytics. Removed items do not contribute to the total transaction amount, and are not displayed nor on the receipt. This is set by the service.

setSequence

public void setSequence(int sequence)

The sequence for this item. This is generally auto-incremented as items are added to the basket. This is generally set by the underlying service, but can be set manually if required.

setSku

public void setSku(String sku)

SKU of the item. This is optional.

setTax

public void setTax(Decimal tax)

The tax for this merchandise based on total quantity as a GAAP-standard BigDecimal. This is optional.

setUnitOfMeasurement

public void setUnitOfMeasurement(String unitOfMeasurement)

The unit of Measurement for Quantity value

setUnitPrice

public void setUnitPrice(Decimal price)

The price per unit as a GAAP-standard BigDecimal. This is required.

setUpc

public void setUpc(String upc)

EAN / UPC of the item. This is optional.

update

public void update(Merchandise merchandise)

update merchandise