Interface AppleIapReceiptService

All Known Implementing Classes:
UserAppleIapReceiptService

public interface AppleIapReceiptService
  • Method Details

    • getAppleIapReceipts

      Pagination<AppleIapReceipt> getAppleIapReceipts(User user, int offset, int count)
      Gets receipts for a given user specifying the offset and the count.
      Parameters:
      user - the user
      offset - the offset
      count - the count
      Returns:
      a Pagination of AppleIapReceipt objects.
    • getAppleIapReceipt

      AppleIapReceipt getAppleIapReceipt(String originalTransactionId)
      Gets the receipt with the id, or throws a NotFoundException if the receipt can't be found.
      Parameters:
      originalTransactionId - the original apple transaction id
      Returns:
      the AppleIapReceipt that was requested, never null
    • getOrCreateAppleIapReceipt

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

      void deleteAppleIapReceipt(String originalTransactionId)
      Deletes an existing receipt.
      Parameters:
      originalTransactionId - the original apple transaction id
    • verifyAndCreateAppleIapReceiptsIfNeeded

      List<AppleIapReceipt> verifyAndCreateAppleIapReceiptsIfNeeded(AppleIapVerifyReceiptInvoker.AppleIapVerifyReceiptEnvironment appleIapVerifyReceiptEnvironment, String receiptData)
      Verifies the given base64-encoded receiptData string against the Apple servers in the given environment.
      Parameters:
      appleIapVerifyReceiptEnvironment -
      receiptData -
      Returns:
      the AppleIapReceipt as it was written into the database, or the existing database record
    • getOrCreateRewardIssuances

      List<RewardIssuance> getOrCreateRewardIssuances(List<AppleIapReceipt> appleIapReceipts)
      Gets or creates a RewardIssuance in the db for each given AppleIapReceipt.
      Parameters:
      appleIapReceipts -
      Returns: