Logo
Developer SDK
Version 1.9.632.913d652c-152450467.
Merchandise Class Reference
Inheritance diagram for Merchandise:
BasketItem ICpToJson CPBaseParcel ICpToJson BaseParcel

Public Member Functions

void setOperation (int operation)
 
int getOperation ()
 
void setUnitPrice (BigDecimal unitPrice)
 
BigDecimal getUnitPrice ()
 
void setQuantity (int quantity)
 
void setQuantity (BigDecimal quantity)
 
void setUnitOfMeasurement (String unitOfMeasurement)
 
BigDecimal getQuantity ()
 
String getUnitOfMeasurement ()
 
void setExtendedPrice (BigDecimal extendedPrice)
 
BigDecimal getExtendedPrice ()
 
void setDiscount (BigDecimal discount)
 
BigDecimal getDiscount ()
 
Modifier [] getModifiers ()
 
boolean attachModifier (Modifier modifier)
 
boolean removeModifier (Modifier modifier)
 
void update (Merchandise merchandise)
 
void merge (BasketItem item, boolean aggressively)
 
 Merchandise (Parcel in, int parcelVersion)
 
void setParcelVersion (int targetParcelVersion)
 
void writeToParcel (Parcel dest, int flags)
 
JSONObject buildToCpJson ()
 
- Public Member Functions inherited from BasketItem
void setBasketItemId (String basketItemId)
 
String getBasketItemId ()
 
void setSequence (int sequence)
 
int getSequence ()
 
void setDisplayOrder (int displayOrder)
 
int getDisplayOrder ()
 
void setDisplayLine (String displayLine)
 
String getDisplayLine ()
 
void setName (String name)
 
String getName ()
 
void setDescription (String description)
 
String getDescription ()
 
void setSku (String sku)
 
String getSku ()
 
void setUpc (String upc)
 
String getUpc ()
 
void setAmount (BigDecimal amount)
 
BigDecimal getAmount ()
 
void setTax (BigDecimal tax)
 
BigDecimal getTax ()
 
boolean getRemoved ()
 
void setAmountTotals (AmountTotals amountTotals)
 
AmountTotals getAmountTotals ()
 
void merge (BasketItem item, boolean aggressively)
 
int compareTo (BasketItem other)
 
String toString ()
 
 BasketItem (Parcel in, int parcelVersion)
 
void setParcelVersion (int targetParcelVersion)
 
void writeToParcel (Parcel dest, int flags)
 
JSONObject buildToCpJson ()
 
- Public Member Functions inherited from CPBaseParcel
 CPBaseParcel (Parcel in, int parcelVersion)
 
- Public Member Functions inherited from BaseParcel
 BaseParcel (Parcel in, int parcelVersion)
 
void setParcelVersion (int targetParcelVersion)
 
final int getParcelVersion ()
 
String getClassName ()
 
void writeToParcel (Parcel dest, int flags)
 
int describeContents ()
 

Static Public Attributes

static final int MERCHANDISE_ADD = 0
 
static final int MERCHANDISE_UPDATE = 1
 
static final int MERCHANDISE_DELETE = 2
 
static final Creator< MerchandiseCREATOR
 
- Static Public Attributes inherited from BasketItem
static final int UNSET_VALUE = -1
 
- Static Public Attributes inherited from BaseParcel
static final Parcelable.Creator< BaseParcelCREATOR
 

Additional Inherited Members

- Static Public Member Functions inherited from CPBaseParcel
static< CPEntityType extends CPBaseParcel > CPEntityType buildFromCpJson ( @NonNull JSONObject jsonObject, @NonNull Class< CPEntityType > clazz, @Nullable CPEntityType parentObject)
 
- Protected Member Functions inherited from BasketItem
void setRemoved (boolean wasRemoved)
 
- Protected Member Functions inherited from CPBaseParcel
abstract< CPEntityType extends CPBaseParcel > CPEntityType buildFromCpJson ( @NonNull JSONObject jsonObject, @Nullable CPEntityType parentObject)
 
- Static Protected Member Functions inherited from CPBaseParcel
static< CPEntityType extends CPBaseParcel > ArrayList< CPEntityType > buildListFromCpJson ( @NonNull JSONObject jsonObject, @NonNull Class< CPEntityType > clazz, @NonNull String targetJsonAlias)
 
- Static Protected Member Functions inherited from BaseParcel
static void safelySetParcelVersion (final int targetParcelVersion, @Nullable BaseParcel item)
 
static void safelySetParcelVersion (final int targetParcelVersion, @Nullable List<? extends BaseParcel > items)
 
static< T extends BaseParcel > void safelySetParcelVersion (final int targetParcelVersion, @Nullable T[] items)
 

Detailed Description

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.

Definition at line 34 of file Merchandise.java.

Member Function Documentation

◆ attachModifier()

boolean attachModifier ( Modifier  modifier)

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

Definition at line 150 of file Merchandise.java.

◆ getDiscount()

BigDecimal getDiscount ( )

Refer to the setDiscount(BigDecimal discount).

Definition at line 135 of file Merchandise.java.

◆ getExtendedPrice()

BigDecimal getExtendedPrice ( )

Refer to setExtendedPrice(BigDecimal extendedPrice)

Definition at line 121 of file Merchandise.java.

◆ getModifiers()

Modifier [] getModifiers ( )

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

Definition at line 143 of file Merchandise.java.

◆ getQuantity()

BigDecimal getQuantity ( )

Refer to setQuantity(int quantity).

Definition at line 101 of file Merchandise.java.

◆ getUnitPrice()

BigDecimal getUnitPrice ( )

Refer to the setUnitPrice(BigDecimal unitPrice).

Definition at line 73 of file Merchandise.java.

◆ removeModifier()

boolean removeModifier ( Modifier  modifier)

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

Definition at line 162 of file Merchandise.java.

◆ setDiscount()

void setDiscount ( BigDecimal  discount)

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

Definition at line 128 of file Merchandise.java.

◆ setExtendedPrice()

void setExtendedPrice ( BigDecimal  extendedPrice)

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

Definition at line 112 of file Merchandise.java.

◆ setQuantity() [1/2]

void setQuantity ( int  quantity)

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

Definition at line 80 of file Merchandise.java.

◆ setQuantity() [2/2]

void setQuantity ( BigDecimal  quantity)

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

Definition at line 87 of file Merchandise.java.

◆ setUnitOfMeasurement()

void setUnitOfMeasurement ( String  unitOfMeasurement)

The unit of Measurement for Quantity value

Definition at line 94 of file Merchandise.java.

◆ setUnitPrice()

void setUnitPrice ( BigDecimal  unitPrice)

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

Definition at line 66 of file Merchandise.java.

Member Data Documentation

◆ CREATOR

final Creator<Merchandise> CREATOR
static
Initial value:
= new Merchandise.ParcelCreator<Merchandise>() {
@Override
public Merchandise createFromParcel(Parcel source) {
BaseParcel createdObject = super.createFromParcel(source);
if (createdObject == null || !Merchandise.class.isInstance(createdObject))
return new Merchandise(source, getRecommendedParcelVersion());
else
return (Merchandise) createdObject;
}
@Override
public Merchandise[] newArray(int size) {
return new Merchandise[size];
}
}

Definition at line 299 of file Merchandise.java.


The documentation for this class was generated from the following file:

This document is the confidential property of Verifone, Inc. Any reproduction or distribution of this document, in whole or in part, or the disclosure of any of the information contained herein, without the prior written consent of Verifone, Inc. is prohibited. This document and any supplemental material supplied as part of any review must be returned to Verifone, Inc. upon request. Notice: This document may go through material revisions over time. While the Company will make every effort to keep readers updated as changes occur, care must be taken by the reader to make sure they are reading the latest version. Version numbers appear in the title page and revision history page of this document. All rights reserved. Verifone, the Verifone logo are either trademarks or registered trademarks of Verifone in the United States and/or other countries. All other trademarks or brand names are properties of their respective holders.