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

Public Member Functions

String getOfferId ()
 
void setOfferId (String offerId)
 
int getOfferType ()
 
void setOfferType (int offerType)
 
String getOfferDescription ()
 
void setOfferDescription (String offerDescription)
 
boolean getOfferRefundable ()
 
void setOfferRefundable (boolean offerRefundable)
 
boolean getOfferCombinable ()
 
void setOfferCombinable (boolean offerCombinable)
 
BigDecimal getOfferPercentDiscount ()
 
void setOfferPercentDiscount (BigDecimal offerPercentDiscount)
 
BigDecimal getOfferDiscount ()
 
void setOfferDiscount (BigDecimal offerDiscount)
 
String getProgramId ()
 
void setProgramId (String programId)
 
String getMerchantOfferCode ()
 
void setMerchantOfferCode (String merchantOfferCode)
 
String getProductCode ()
 
void setProductCode (String productCode)
 
String getAssociatedProductCode ()
 
void setAssociatedProductCode (String associatedProductCode)
 
String getSpecialProductCode ()
 
void setSpecialProductCode (String specialProductCode)
 
String getQrCode ()
 
void setQrCode (String qrCode)
 
String getReferenceBasketLineItemId ()
 
void setReferenceBasketLineItemId (String basketLineId)
 
 Offer (Parcel in, int parcelVersion)
 
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 Creator< OfferCREATOR
 
- 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 32 of file Offer.java.

Member Function Documentation

◆ getAssociatedProductCode()

String getAssociatedProductCode ( )

Only applies to special product offers. This is optional.

Definition at line 268 of file Offer.java.

◆ getMerchantOfferCode()

String getMerchantOfferCode ( )

Field for merchant specific offers. This is optional.

Definition at line 240 of file Offer.java.

◆ getOfferCombinable()

boolean getOfferCombinable ( )

Indicates if the offer may combined with other combinable offers. This is optional.

Definition at line 181 of file Offer.java.

◆ getOfferDescription()

String getOfferDescription ( )

Use getDescription() instead. A human-readable description of the offer, e.g., 20% off one pair of shoes. This is required. Deprecated in November 2017.

Definition at line 150 of file Offer.java.

◆ getOfferDiscount()

BigDecimal getOfferDiscount ( )

Discount as a GAAP-standard BigDecimal in the transaction currency. This is represented as negative amount. Either this or offerPercentDiscount is required, setting one will override the other.

Definition at line 212 of file Offer.java.

◆ getOfferId()

String getOfferId ( )

Alphanumeric offer reference. May be multiple offers in the same transaction. Could be a back end loaded offer that the POS will redeem or a manufacturer coupon code. This is required.

Definition at line 118 of file Offer.java.

◆ getOfferPercentDiscount()

BigDecimal getOfferPercentDiscount ( )

Percentage discount associated with the offer as a BigInteger(13,2). Either this or offerDiscount is required, setting one will override the other.

Definition at line 196 of file Offer.java.

◆ getOfferRefundable()

boolean getOfferRefundable ( )

Indicates if the purchase is returnable. This is optional.

Definition at line 167 of file Offer.java.

◆ getOfferType()

int getOfferType ( )

The type of the offer. This is required.

Definition at line 132 of file Offer.java.

◆ getProductCode()

String getProductCode ( )

Represented as SKU or UPC. This is optional.

Definition at line 254 of file Offer.java.

◆ getProgramId()

String getProgramId ( )

Unique reference to identify the Loyalty Program. This is required.

Definition at line 226 of file Offer.java.

◆ getQrCode()

String getQrCode ( )

Reserved for future use. This is ignored.

Definition at line 298 of file Offer.java.

◆ getReferenceBasketLineItemId()

String getReferenceBasketLineItemId ( )

The ID of the basket line if this is applied to a specific item in the basket. This is optional.

Definition at line 313 of file Offer.java.

◆ getSpecialProductCode()

String getSpecialProductCode ( )

E.g., BOGO (Buy One Get One) using productCode and associatedProductCode. BOGOH (Buy One Get One Half Off) using productCode, percentageDiscount and associatedProductCode. This is optional.

Definition at line 284 of file Offer.java.

◆ setAssociatedProductCode()

void setAssociatedProductCode ( String  associatedProductCode)

Refer to getAssociatedProductCode().

Definition at line 275 of file Offer.java.

◆ setMerchantOfferCode()

void setMerchantOfferCode ( String  merchantOfferCode)

Refer to getMerchantOfferCode().

Definition at line 247 of file Offer.java.

◆ setOfferCombinable()

void setOfferCombinable ( boolean  offerCombinable)

Refer to getOfferCombinable().

Definition at line 188 of file Offer.java.

◆ setOfferDescription()

void setOfferDescription ( String  offerDescription)

Use setDescription(String) instead. Refer to getOfferDescription(). Deprecated in November 2017.

Definition at line 160 of file Offer.java.

◆ setOfferDiscount()

void setOfferDiscount ( BigDecimal  offerDiscount)

Refer to getOfferDiscount().

Definition at line 219 of file Offer.java.

◆ setOfferId()

void setOfferId ( String  offerId)

Refer to getOfferId().

Definition at line 125 of file Offer.java.

◆ setOfferPercentDiscount()

void setOfferPercentDiscount ( BigDecimal  offerPercentDiscount)

Refer to getOfferPercentDiscount().

Definition at line 203 of file Offer.java.

◆ setOfferRefundable()

void setOfferRefundable ( boolean  offerRefundable)

Refer to getOfferRefundable().

Definition at line 174 of file Offer.java.

◆ setOfferType()

void setOfferType ( int  offerType)

Refer to getOfferType().

Definition at line 139 of file Offer.java.

◆ setProductCode()

void setProductCode ( String  productCode)

Refer to getProductCode().

Definition at line 261 of file Offer.java.

◆ setProgramId()

void setProgramId ( String  programId)

Refer to getProgramId().

Definition at line 233 of file Offer.java.

◆ setQrCode()

void setQrCode ( String  qrCode)

Refer to getQrCode().

Definition at line 305 of file Offer.java.

◆ setReferenceBasketLineItemId()

void setReferenceBasketLineItemId ( String  basketLineId)

Refer to getReferenceBasketLineItemId().

Definition at line 320 of file Offer.java.

◆ setSpecialProductCode()

void setSpecialProductCode ( String  specialProductCode)

Refer to getSpecialProductCode().

Definition at line 291 of file Offer.java.

Member Data Documentation

◆ CREATOR

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

Definition at line 371 of file Offer.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.