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 () |
![]() | |
CPBaseParcel (Parcel in, int parcelVersion) | |
![]() | |
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 final Parcelable.Creator< BaseParcel > | CREATOR |
Protected Member Functions | |
void | setRemoved (boolean wasRemoved) |
![]() | |
abstract< CPEntityType extends CPBaseParcel > CPEntityType | buildFromCpJson ( @NonNull JSONObject jsonObject, @Nullable CPEntityType parentObject) |
Additional Inherited Members | |
![]() | |
static< CPEntityType extends CPBaseParcel > CPEntityType | buildFromCpJson ( @NonNull JSONObject jsonObject, @NonNull Class< CPEntityType > clazz, @Nullable CPEntityType parentObject) |
![]() | |
static< CPEntityType extends CPBaseParcel > ArrayList< CPEntityType > | buildListFromCpJson ( @NonNull JSONObject jsonObject, @NonNull Class< CPEntityType > clazz, @NonNull String targetJsonAlias) |
![]() | |
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) |
The common elements for those items that can be placed in a basket.
Definition at line 32 of file BasketItem.java.
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.
BigDecimal getAmount | ( | ) |
Refer to setAmount(BigDecimal amount).
Definition at line 176 of file BasketItem.java.
AmountTotals getAmountTotals | ( | ) |
The current total value of the basket, if set.
Definition at line 221 of file BasketItem.java.
String getBasketItemId | ( | ) |
Refer to setBasketItemId(String basketItemId).
Definition at line 59 of file BasketItem.java.
String getDescription | ( | ) |
Refer to setDescription(String description).
Definition at line 133 of file BasketItem.java.
String getDisplayLine | ( | ) |
Refer to setDisplayLine(String displayLine).
Definition at line 105 of file BasketItem.java.
int getDisplayOrder | ( | ) |
Refer to setSequence(int sequence).
Definition at line 89 of file BasketItem.java.
String getName | ( | ) |
Refer to setName(String name).
Definition at line 119 of file BasketItem.java.
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.
int getSequence | ( | ) |
Refer to setSequence(int sequence).
Definition at line 74 of file BasketItem.java.
String getSku | ( | ) |
Refer to the setSku(String sku) for more information.
Definition at line 147 of file BasketItem.java.
BigDecimal getTax | ( | ) |
Refer to setTax(BigDecimal tax).
Definition at line 191 of file BasketItem.java.
String getUpc | ( | ) |
Refer to setUpc(String upc).
Definition at line 161 of file BasketItem.java.
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.
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.
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.
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.
void setDescription | ( | String | description | ) |
A human-readable description. This is optional.
Definition at line 126 of file BasketItem.java.
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.
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.
void setName | ( | String | name | ) |
A human-readable name. This is optional.
Definition at line 112 of file BasketItem.java.
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.
void setSku | ( | String | sku | ) |
SKU of the item. This is optional.
Definition at line 140 of file BasketItem.java.
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.
void setUpc | ( | String | upc | ) |
EAN / UPC of the item. This is optional.
Definition at line 154 of file BasketItem.java.
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.