Class ReferralReward
java.lang.Object
com.codename1.payment.ReferralReward
A reward the service granted this customer for a referral: either an
entitlement or an amount of a virtual currency. Rewards are configured in
the console and listed by
CustomerInfo.getReferralRewards(). Immutable.-
Method Summary
Modifier and TypeMethodDescriptionlongThe amount of currency granted; 0 for an entitlement reward.The code of the virtual currency this reward adds to, or null when it is an entitlement reward.The entitlement this reward grants, or null when it is a currency reward.longWhen the reward expires, in milliseconds since the epoch, or 0 when it does not expire.Why the reward was granted, as the service names it -- for example that a user this customer invited made a purchase -- or null.booleanWhether this reward is an amount of a virtual currency rather than an entitlement.toString()Returns a string representation of the object.
-
Method Details
-
getEntitlementId
The entitlement this reward grants, or null when it is a currency reward.
Returns
the entitlement id or null
-
getCurrencyCode
The code of the virtual currency this reward adds to, or null when it is an entitlement reward.
Returns
the currency code or null
-
isCurrency
public boolean isCurrency()Whether this reward is an amount of a virtual currency rather than an entitlement.
Returns
true for a currency reward
-
getAmount
public long getAmount()The amount of currency granted; 0 for an entitlement reward.
Returns
the amount
-
getExpiresDate
public long getExpiresDate()When the reward expires, in milliseconds since the epoch, or 0 when it does not expire.
Returns
the expiry time or 0
-
getReason
Why the reward was granted, as the service names it -- for example that a user this customer invited made a purchase -- or null.
Returns
the reason or null
-
toString
Description copied from class:ObjectReturns a string representation of the object. In general, the toString method returns a string that "textually represents" this object. The result should be a concise but informative representation that is easy for a person to read. It is recommended that all subclasses override this method. The toString method for class Object returns a string consisting of the name of the class of which the object is an instance, the at-sign character `@', and the unsigned hexadecimal representation of the hash code of the object. In other words, this method returns a string equal to the value of: getClass().getName() + '@' + Integer.toHexString(hashCode())
-