java.lang.Object
dev.getelements.elements.sdk.model.meta.oculusiapreceipt.OculusIapReceipt
All Implemented Interfaces:
Serializable

public class OculusIapReceipt extends Object implements Serializable
Represents an IAP receipt from the Oculus platform.
See Also:
  • Field Details

    • ID_TAG_PREFIX

      public static final String ID_TAG_PREFIX
      The prefix used for identifying reward issuance tags.
      See Also:
    • TAG_SEPARATOR

      public static final String TAG_SEPARATOR
      The separator used in reward issuance tag construction.
      See Also:
  • Constructor Details

    • OculusIapReceipt

      public OculusIapReceipt()
      Creates a new instance.
  • Method Details

    • getUserId

      public String getUserId()
      Returns the Oculus user ID.
      Returns:
      the user ID
    • setUserId

      public void setUserId(String fbUserId)
      Sets the Oculus user ID.
      Parameters:
      fbUserId - the user ID
    • getPurchaseId

      public String getPurchaseId()
      Returns the original transaction identifier (purchase ID).
      Returns:
      the purchase ID
    • setPurchaseId

      public void setPurchaseId(String purchaseId)
      Sets the original transaction identifier (purchase ID).
      Parameters:
      purchaseId - the purchase ID
    • getReportingId

      public String getReportingId()
      Returns the reporting ID for troubleshooting and auditing.
      Returns:
      the reporting ID
    • setReportingId

      public void setReportingId(String reportingId)
      Sets the reporting ID for troubleshooting and auditing.
      Parameters:
      reportingId - the reporting ID
    • getSku

      public String getSku()
      Returns the SKU of the IAP item.
      Returns:
      the SKU
    • setSku

      public void setSku(String sku)
      Sets the SKU of the IAP item.
      Parameters:
      sku - the SKU
    • getGrantTime

      public long getGrantTime()
      Returns the time when the user gained entitlement (Unix timestamp).
      Returns:
      the grant time
    • setGrantTime

      public void setGrantTime(long grantTime)
      Sets the time when the user gained entitlement (Unix timestamp).
      Parameters:
      grantTime - the grant time
    • getExpirationTime

      public long getExpirationTime()
      Returns the time when the user will lose entitlement (Unix timestamp).
      Returns:
      the expiration time
    • setExpirationTime

      public void setExpirationTime(long expirationTime)
      Sets the time when the user will lose entitlement (Unix timestamp).
      Parameters:
      expirationTime - the expiration time
    • getDeveloperPayload

      public String getDeveloperPayload()
      Returns the developer payload.
      Returns:
      the developer payload
    • setDeveloperPayload

      public void setDeveloperPayload(String developerPayload)
      Sets the developer payload.
      Parameters:
      developerPayload - the developer payload
    • buildRewardIssuanceTags

      public static List<String> buildRewardIssuanceTags(String originalTransactionId)
      Builds the reward issuance tags for the given original transaction ID.
      Parameters:
      originalTransactionId - the original transaction ID
      Returns:
      the list of reward issuance tags
    • buildIdentifyingRewardIssuanceTag

      public static String buildIdentifyingRewardIssuanceTag(String originalTransactionId)
      Builds the identifying reward issuance tag for the given original transaction ID.
      Parameters:
      originalTransactionId - the original transaction ID
      Returns:
      the identifying reward issuance 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