@Immutable @LevelUpApi(contract=PUBLIC) public final class Loyalty extends Object implements Parcelable
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
static Parcelable.Creator<Loyalty> |
CREATOR
Implements the
Parcelable interface. |
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Constructor and Description |
---|
Loyalty(boolean isLoyaltyEnabled,
Long merchantWebServiceId,
int ordersCount,
MonetaryValue potentialCredit,
int progressPercentage,
MonetaryValue savings,
MonetaryValue shouldSpend,
MonetaryValue spendRemaining,
MonetaryValue totalVolume,
MonetaryValue willEarn) |
Modifier and Type | Method and Description |
---|---|
int |
describeContents() |
boolean |
equals(Object o) |
Long |
getMerchantWebServiceId()
The web service ID of merchant for this loyalty.
|
int |
getOrdersCount()
The number of orders the user has at the merchant.
|
MonetaryValue |
getPotentialCredit()
The potential credit the user can spend at the merchant.
|
int |
getProgressPercentage()
The percentage of the user's progress to the next loyalty unlock.
|
MonetaryValue |
getSavings()
The total savings the user has had at the merchant.
|
MonetaryValue |
getShouldSpend()
The amount any user must spend to unlock loyalty at the merchant.
|
MonetaryValue |
getSpendRemaining()
The amount the user still has to spend before unlocking loyalty.
|
MonetaryValue |
getTotalVolume()
The total amount the user has spent at the merchant.
|
MonetaryValue |
getWillEarn()
The amount the user will earn once they unlock the loyalty reward.
|
int |
hashCode() |
boolean |
isLoyaltyEnabled()
If
Loyalty progression is enabled. |
String |
toString() |
void |
writeToParcel(Parcel dest,
int flags) |
public static final Parcelable.Creator<Loyalty> CREATOR
Parcelable
interface.public Loyalty(boolean isLoyaltyEnabled, Long merchantWebServiceId, int ordersCount, MonetaryValue potentialCredit, int progressPercentage, MonetaryValue savings, MonetaryValue shouldSpend, MonetaryValue spendRemaining, MonetaryValue totalVolume, MonetaryValue willEarn)
public int describeContents()
describeContents
in interface Parcelable
public void writeToParcel(Parcel dest, int flags)
writeToParcel
in interface Parcelable
public boolean isLoyaltyEnabled()
Loyalty
progression is enabled.public Long getMerchantWebServiceId()
public int getOrdersCount()
public MonetaryValue getPotentialCredit()
public int getProgressPercentage()
public MonetaryValue getSavings()
public MonetaryValue getShouldSpend()
public MonetaryValue getSpendRemaining()
public MonetaryValue getTotalVolume()
public MonetaryValue getWillEarn()