Interface ReceiptDao

All Known Implementing Classes:
MongoReceiptDao

public interface ReceiptDao
  • Field Details

  • Method Details

    • getReceipts

      Pagination<Receipt> getReceipts(User user, int offset, int count, String search)
      Gets receipts for a given user specifying the offset and the count.
      Parameters:
      user - the user
      offset - the offset
      count - the count
      search - Used to filter by scheme if you support multiple IAP providers
      Returns:
      a Pagination of Receipt objects.
    • getReceipts

      Pagination<Receipt> getReceipts(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 Receipt objects.
    • getReceipt

      Receipt getReceipt(String id)
      Gets the receipt with the matching database id, or throws a NotFoundException if the receipt can't be found.
      Parameters:
      id - the database id
      Returns:
      the Receipt that was requested, never null
    • getReceipt

      Receipt getReceipt(String schema, String originalTransactionId)
      Gets the receipt with the matching schema and transaction id, or throws a NotFoundException if the receipt can't be found.
      Parameters:
      originalTransactionId - the original transaction id
      Returns:
      the Receipt that was requested, never null
    • createReceipt

      Receipt createReceipt(Receipt receipt)
      Creates a new receipt.
      Returns:
      the Receipt as it was written into the database
      Throws:
      InvalidDataException - if the state of the passed in Receipt is invalid
      DuplicateException - if the passed in Receipt has a schema + id that already exists
    • deleteReceipt

      void deleteReceipt(String receiptId)
      Deletes an existing receipt.
      Parameters:
      receiptId - the db id of the receipt