Class RewardIssuance

java.lang.Object
dev.getelements.elements.sdk.model.reward.RewardIssuance
All Implemented Interfaces:
Taggable, Serializable

public class RewardIssuance extends Object implements Serializable, Taggable
See Also:
  • Field Details

  • Constructor Details

    • RewardIssuance

      public RewardIssuance()
  • Method Details

    • getId

      public String getId()
    • setId

      public void setId(String id)
    • getUser

      public User getUser()
    • setUser

      public void setUser(User user)
    • getItem

      public Item getItem()
    • setItem

      public void setItem(Item item)
    • getItemQuantity

      public Integer getItemQuantity()
    • setItemQuantity

      public void setItemQuantity(Integer itemQuantity)
    • getState

      public RewardIssuance.State getState()
    • setState

      public void setState(RewardIssuance.State state)
    • getContext

      public String getContext()
    • setContext

      public void setContext(String context)
    • getSource

      public String getSource()
    • setSource

      public void setSource(String source)
    • getType

      public RewardIssuance.Type getType()
    • setType

      public void setType(RewardIssuance.Type type)
    • getMetadata

      public Map<String,Object> getMetadata()
    • setMetadata

      public void setMetadata(Map<String,Object> metadata)
    • addMetadata

      public void addMetadata(String name, Object value)
    • getExpirationTimestamp

      public Long getExpirationTimestamp()
    • setExpirationTimestamp

      public void setExpirationTimestamp(Long expirationTimestamp)
    • getUuid

      public String getUuid()
    • setUuid

      public void setUuid(String uuid)
    • getTags

      public List<String> getTags()
      Specified by:
      getTags in interface Taggable
    • setTags

      public void setTags(List<String> tags)
      Specified by:
      setTags in interface Taggable
    • addTag

      public void addTag(String tag)
      Description copied from interface: Taggable
      Adds a tag without performing validation of the tag string or the list of strings.
      Specified by:
      addTag in interface Taggable
      Parameters:
      tag -
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • buildContextString

      public static String buildContextString(Object... contextComponents)
    • buildMissionProgressContextString

      public static String buildMissionProgressContextString(String progressId, int sequence, int rewardIndex)
      Builds the context string for a Mission Progression-sourced reward issuance. The last elements in the context string are, respectively, the , the that caused the issuance, and the of the current reward in the Step's list of Rewards.
      Parameters:
      progressId -
      sequence -
      rewardIndex -
      Returns:
      the resultant context string
    • buildMissionProgressContextString

      public static String buildMissionProgressContextString(String progressId, String sequence, String rewardIndex)
      Builds the context string for a Mission Progression-sourced reward issuance. The last elements in the context string are, respectively, the , the that caused the issuance, and the of the current reward in the Step's list of Rewards.
      Parameters:
      progressId -
      sequence -
      rewardIndex -
      Returns:
      the resultant context string
    • buildAppleIapContextString

      public static String buildAppleIapContextString(String originalTransactionId, String itemId, Integer skuOrdinal)
      Builds the context string for an Apple IAP-sourced reward issuance. The last element in the context string is a hash of the , the , as well as the , i.e. the index of the product as enumerated in SKPayment.quantity (i.e. the "first" SKU to be redeemed, the "second" to be redeemed, etc.).
      Parameters:
      originalTransactionId -
      itemId -
      skuOrdinal -
      Returns:
      the resultant context string
    • buildGooglePlayIapContextString

      public static String buildGooglePlayIapContextString(String orderId, String itemId)
      Builds the context string for a Google Play-sourced reward issuance. The last element in the context string is the hash of the orderId issued by the Google Play services, presumed to be universally unique, as well as the itemId.
      Parameters:
      orderId -
      itemId -
      Returns:
      the resultant context string