Class UserReceiptService
java.lang.Object
dev.getelements.elements.service.receipt.UserReceiptService
- All Implemented Interfaces:
ReceiptService
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateReceipt(CreateReceiptRequest receipt) Creates a new receipt.voiddeleteReceipt(String receiptId) Deletes an existing receipt.getReceiptById(String id) Gets the receipt with the db id, or throws aNotFoundExceptionif the receipt can't be found.getReceiptBySchemaAndTransactionId(String schema, String originalTransactionId) Gets the receipt with the schema and transaction id, or throws aNotFoundExceptionif the receipt can't be found.getReceipts(String ignored, int offset, int count, String search) Gets receipts for a given user specifying the offset and the count.getUser()voidsetReceiptDao(ReceiptDao receiptDao) void
-
Constructor Details
-
UserReceiptService
public UserReceiptService()
-
-
Method Details
-
getReceipts
Description copied from interface:ReceiptServiceGets receipts for a given user specifying the offset and the count.- Specified by:
getReceiptsin interfaceReceiptService- Parameters:
ignored- the id of the user to search foroffset- the offsetcount- the countsearch- Used to filter by scheme if you support multiple IAP providers- Returns:
- a
PaginationofReceiptobjects.
-
getReceiptById
Description copied from interface:ReceiptServiceGets the receipt with the db id, or throws aNotFoundExceptionif the receipt can't be found.- Specified by:
getReceiptByIdin interfaceReceiptService- Parameters:
id- the db id- Returns:
- the
Receiptthat was requested, never null
-
getReceiptBySchemaAndTransactionId
Description copied from interface:ReceiptServiceGets the receipt with the schema and transaction id, or throws aNotFoundExceptionif the receipt can't be found.- Specified by:
getReceiptBySchemaAndTransactionIdin interfaceReceiptService- Parameters:
schema- the schema of the payment processororiginalTransactionId- the original transaction id- Returns:
- the
Receiptthat was requested, never null
-
createReceipt
Description copied from interface:ReceiptServiceCreates a new receipt.- Specified by:
createReceiptin interfaceReceiptService- Returns:
- the
Receiptas it was written into the database
-
deleteReceipt
Description copied from interface:ReceiptServiceDeletes an existing receipt.- Specified by:
deleteReceiptin interfaceReceiptService- Parameters:
receiptId- the db id of the receipt
-
getReceiptDao
-
setReceiptDao
-
getUser
-
setUser
-