Logo
Developer SDK
Version 1.9.632.913d652c-152450467.
BasketItem Class Referenceabstract
Inheritance diagram for BasketItem:
CPBaseParcel ICpToJson BaseParcel Donation Merchandise Modifier Offer

Public Member Functions

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 UNSET_VALUE = -1
 
- Static Public Attributes inherited from BaseParcel
static final Parcelable.Creator< BaseParcelCREATOR
 

Protected Member Functions

void setRemoved (boolean wasRemoved)
 
- Protected Member Functions inherited from CPBaseParcel
abstract< CPEntityType extends CPBaseParcel > CPEntityType buildFromCpJson ( @NonNull JSONObject jsonObject, @Nullable CPEntityType parentObject)
 

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)
 
- 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

The common elements for those items that can be placed in a basket.

Definition at line 32 of file BasketItem.java.

Member Function Documentation

◆ compareTo()

int compareTo ( BasketItem  other)

Sorts basket items by getBasketItemId(), allowing faster comparison and other operations when managing multiple items. Currently returns equal if getBasketItemId() returns null for both items.

Definition at line 275 of file BasketItem.java.

◆ getAmount()

BigDecimal getAmount ( )

Refer to setAmount(BigDecimal amount).

Definition at line 176 of file BasketItem.java.

◆ getAmountTotals()

AmountTotals getAmountTotals ( )

The current total value of the basket, if set.

Definition at line 221 of file BasketItem.java.

◆ getBasketItemId()

String getBasketItemId ( )

Refer to setBasketItemId(String basketItemId).

Definition at line 59 of file BasketItem.java.

◆ getDescription()

String getDescription ( )

Refer to setDescription(String description).

Definition at line 133 of file BasketItem.java.

◆ getDisplayLine()

String getDisplayLine ( )

Refer to setDisplayLine(String displayLine).

Definition at line 105 of file BasketItem.java.

◆ getDisplayOrder()

int getDisplayOrder ( )

Refer to setSequence(int sequence).

Definition at line 89 of file BasketItem.java.

◆ getName()

String getName ( )

Refer to setName(String name).

Definition at line 119 of file BasketItem.java.

◆ getRemoved()

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.

Definition at line 200 of file BasketItem.java.

◆ getSequence()

int getSequence ( )

Refer to setSequence(int sequence).

Definition at line 74 of file BasketItem.java.

◆ getSku()

String getSku ( )

Refer to the setSku(String sku) for more information.

Definition at line 147 of file BasketItem.java.

◆ getTax()

BigDecimal getTax ( )

Refer to setTax(BigDecimal tax).

Definition at line 191 of file BasketItem.java.

◆ getUpc()

String getUpc ( )

Refer to setUpc(String upc).

Definition at line 161 of file BasketItem.java.

◆ merge()

void merge ( BasketItem  item,
boolean  aggressively 
)

Merge in the values from the other item, useful when re-synchronizing copied data. Use aggressively if current valid values should be overridden by the other item.

Definition at line 230 of file BasketItem.java.

◆ setAmount()

void setAmount ( BigDecimal  amount)

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

Definition at line 169 of file BasketItem.java.

◆ setAmountTotals()

void setAmountTotals ( AmountTotals  amountTotals)

Enables this item to carry the current total value of the basket. This is only used internally for the purposes of displaying the current running total when performing operations with a basket item, and should not be set normally.

Definition at line 213 of file BasketItem.java.

◆ setBasketItemId()

void setBasketItemId ( String  basketItemId)

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.

Definition at line 52 of file BasketItem.java.

◆ setDescription()

void setDescription ( String  description)

A human-readable description. This is optional.

Definition at line 126 of file BasketItem.java.

◆ setDisplayLine()

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.

Definition at line 98 of file BasketItem.java.

◆ setDisplayOrder()

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.

Definition at line 82 of file BasketItem.java.

◆ setName()

void setName ( String  name)

A human-readable name. This is optional.

Definition at line 112 of file BasketItem.java.

◆ setSequence()

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.

Definition at line 67 of file BasketItem.java.

◆ setSku()

void setSku ( String  sku)

SKU of the item. This is optional.

Definition at line 140 of file BasketItem.java.

◆ setTax()

void setTax ( BigDecimal  tax)

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

Definition at line 184 of file BasketItem.java.

◆ setUpc()

void setUpc ( String  upc)

EAN / UPC of the item. This is optional.

Definition at line 154 of file BasketItem.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.