Class RewardIssuance
java.lang.Object
dev.getelements.elements.sdk.model.reward.RewardIssuance
- All Implemented Interfaces:
Taggable
,Serializable
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
static enum
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addMetadata
(String name, Object value) void
Adds a tag without performing validation of the tag string or the list of strings.static String
buildAppleIapContextString
(String originalTransactionId, String itemId, Integer skuOrdinal) Builds the context string for an Apple IAP-sourced reward issuance.static String
buildContextString
(Object... contextComponents) static String
buildGooglePlayIapContextString
(String orderId, String itemId) Builds the context string for a Google Play-sourced reward issuance.static String
buildMissionProgressContextString
(String progressId, int sequence, int rewardIndex) Builds the context string for a Mission Progression-sourced reward issuance.static String
buildMissionProgressContextString
(String progressId, String sequence, String rewardIndex) Builds the context string for a Mission Progression-sourced reward issuance.boolean
getId()
getItem()
getState()
getTags()
getType()
getUser()
getUuid()
int
hashCode()
void
setContext
(String context) void
setExpirationTimestamp
(Long expirationTimestamp) void
void
void
setItemQuantity
(Integer itemQuantity) void
setMetadata
(Map<String, Object> metadata) void
void
setState
(RewardIssuance.State state) void
void
setType
(RewardIssuance.Type type) void
void
toString()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface dev.getelements.elements.sdk.model.Taggable
validateAndAddTag, validateAndSetTags, validateTags
-
Field Details
-
SERVER_CONTEXT_PREFIX
- See Also:
-
CONTEXT_SEPARATOR
- See Also:
-
MISSION_PROGRESS_SOURCE
- See Also:
-
APPLE_IAP_SOURCE
- See Also:
-
GOOGLE_PLAY_IAP_SOURCE
- See Also:
-
MISSION_PROGRESS_PROGRESS_KEY
- See Also:
-
MISSION_PROGRESS_STEP_KEY
- See Also:
-
-
Constructor Details
-
RewardIssuance
public RewardIssuance()
-
-
Method Details
-
getId
-
setId
-
getUser
-
setUser
-
getItem
-
setItem
-
getItemQuantity
-
setItemQuantity
-
getState
-
setState
-
getContext
-
setContext
-
getSource
-
setSource
-
getType
-
setType
-
getMetadata
-
setMetadata
-
addMetadata
-
getExpirationTimestamp
-
setExpirationTimestamp
-
getUuid
-
setUuid
-
getTags
-
setTags
-
addTag
Description copied from interface:Taggable
Adds a tag without performing validation of the tag string or the list of strings. -
equals
-
hashCode
public int hashCode() -
toString
-
buildContextString
-
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 theStep
's list ofReward
s.- 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 theStep
's list ofReward
s.- 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
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
-