Class SuperuserReceiptService

java.lang.Object
dev.getelements.elements.service.receipt.SuperuserReceiptService
All Implemented Interfaces:
ReceiptService

public class SuperuserReceiptService extends Object implements ReceiptService
  • Constructor Details

    • SuperuserReceiptService

      public SuperuserReceiptService()
  • Method Details

    • getReceipts

      public Pagination<Receipt> getReceipts(String userId, int offset, int count, String search)
      Description copied from interface: ReceiptService
      Gets receipts for a given user specifying the offset and the count.
      Specified by:
      getReceipts in interface ReceiptService
      Parameters:
      userId - the id of the user to search for
      offset - the offset
      count - the count
      search - Used to filter by scheme if you support multiple IAP providers
      Returns:
      a Pagination of Receipt objects.
    • getReceiptById

      public Receipt getReceiptById(String id)
      Description copied from interface: ReceiptService
      Gets the receipt with the db id, or throws a NotFoundException if the receipt can't be found.
      Specified by:
      getReceiptById in interface ReceiptService
      Parameters:
      id - the db id
      Returns:
      the Receipt that was requested, never null
    • getReceiptBySchemaAndTransactionId

      public Receipt getReceiptBySchemaAndTransactionId(String schema, String originalTransactionId)
      Description copied from interface: ReceiptService
      Gets the receipt with the schema and transaction id, or throws a NotFoundException if the receipt can't be found.
      Specified by:
      getReceiptBySchemaAndTransactionId in interface ReceiptService
      Parameters:
      schema - the schema of the payment processor
      originalTransactionId - the original transaction id
      Returns:
      the Receipt that was requested, never null
    • createReceipt

      public Receipt createReceipt(CreateReceiptRequest createReceiptRequest)
      Description copied from interface: ReceiptService
      Creates a new receipt.
      Specified by:
      createReceipt in interface ReceiptService
      Returns:
      the Receipt as it was written into the database
    • deleteReceipt

      public void deleteReceipt(String receiptId)
      Description copied from interface: ReceiptService
      Deletes an existing receipt.
      Specified by:
      deleteReceipt in interface ReceiptService
      Parameters:
      receiptId - the db id of the receipt
    • getReceiptDao

      public ReceiptDao getReceiptDao()
    • setReceiptDao

      @Inject public void setReceiptDao(ReceiptDao receiptDao)
    • getUserDao

      public UserDao getUserDao()
    • setUserDao

      @Inject public void setUserDao(UserDao userDao)