Package im.getsocial.sdk.promocodes
Class PromoCode
- java.lang.Object
-
- im.getsocial.sdk.promocodes.PromoCode
-
public final class PromoCode extends java.lang.Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getClaimCount()
java.lang.String
getCode()
User
getCreator()
long
getEndDate()
int
getMaxClaimCount()
java.util.Map<java.lang.String,java.lang.String>
getProperties()
long
getStartDate()
boolean
isClaimable()
boolean
isEnabled()
java.lang.String
toString()
-
-
-
Constructor Detail
-
PromoCode
public PromoCode(java.lang.String code, java.util.Map<java.lang.String,java.lang.String> properties, int maxClaimCount, long startDate, User creator, long endDate, int claimCount, boolean isEnabled, boolean isClaimable)
-
-
Method Detail
-
getCode
public java.lang.String getCode()
- Returns:
- Promo code.
-
getProperties
public java.util.Map<java.lang.String,java.lang.String> getProperties()
- Returns:
- Map of properties attached to the promo code.
-
getMaxClaimCount
public int getMaxClaimCount()
- Returns:
- Maximum number of claims. If `0` then no limits.
-
getStartDate
public long getStartDate()
- Returns:
- Date when Promo Code becomes active.
-
getEndDate
public long getEndDate()
- Returns:
- Date when Promo Code is not active anymore. Zero if Promo Code is available forever until manually disabled on the Dashboard.
-
getClaimCount
public int getClaimCount()
- Returns:
- Current number of claims.
-
isEnabled
public boolean isEnabled()
- Returns:
- Is enabled on the Dashboard.
-
isClaimable
public boolean isClaimable()
- Returns:
- True only if Promo Code is enabled and active in the current time.
-
getCreator
public User getCreator()
- Returns:
- Information about creator of this promo code. Could be application.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-