Interface OculusIapReceiptService

All Known Implementing Classes:
UserOculusIapReceiptService

public interface OculusIapReceiptService
  • Field Details

  • Method Details

    • getOculusIapReceipts

      Pagination<OculusIapReceipt> getOculusIapReceipts(int offset, int count)
      Gets receipts for a given user specifying the offset and the count.
      Parameters:
      offset - the offset
      count - the count
      Returns:
      a Pagination of OculusIapReceipt objects.
    • getOculusIapReceipt

      OculusIapReceipt getOculusIapReceipt(String originalTransactionId)
      Gets the receipt with the id, or throws a NotFoundException if the receipt can't be found.
      Parameters:
      originalTransactionId - the original oculus transaction id
      Returns:
      the Receipt that was requested, never null
    • getOrCreateOculusIapReceipt

      OculusIapReceipt getOrCreateOculusIapReceipt(OculusIapReceipt oculusIapReceipt)
      Finds a receipt in the db, or creates a new one if necessary.
      Returns:
      the Receipt as it was written into the database
      Throws:
      InvalidDataException - if the state of the passed in OculusIapReceipt is invalid
      DuplicateException - if the passed in OculusIapReceipt has a name that already exists
    • deleteOculusIapReceipt

      void deleteOculusIapReceipt(String originalTransactionId)
      Deletes an existing receipt.
      Parameters:
      originalTransactionId - the original oculus transaction id
    • verifyAndCreateOculusIapReceiptIfNeeded

      OculusIapVerifyReceiptResponse verifyAndCreateOculusIapReceiptIfNeeded(OculusIapReceipt receiptData)
      Verifies the given base64-encoded receiptData string against the Oculus servers in the given environment.
      Parameters:
      receiptData -
      Returns:
      the OculusIapReceipt as it was written into the database, or the existing database record
    • consumeAndRecordOculusIapReceipt

      OculusIapConsumeResponse consumeAndRecordOculusIapReceipt(OculusIapReceipt receiptData)
      Verifies the given receipt against the Oculus servers.
      Parameters:
      receiptData -
      Returns:
      the OculusIapReceipt as it was written into the database, or the existing database record
    • getOrCreateRewardIssuances

      List<RewardIssuance> getOrCreateRewardIssuances(OculusIapReceipt oculusIapReceipt)
      Gets or creates RewardIssuance in the db for the given OculusIapReceipt.
      Parameters:
      oculusIapReceipt -
      Returns:
      the reward issuances from the product bundle matching the receipt sku