Interface AppleIapReceiptService
- All Known Implementing Classes:
UserAppleIapReceiptService
public interface AppleIapReceiptService
-
Method Summary
Modifier and TypeMethodDescriptionvoiddeleteAppleIapReceipt(String originalTransactionId) Deletes an existing receipt.getAppleIapReceipt(String originalTransactionId) Gets the receipt with the id, or throws aNotFoundExceptionif the receipt can't be found.getAppleIapReceipts(User user, int offset, int count) Gets receipts for a given user specifying the offset and the count.getOrCreateAppleIapReceipt(AppleIapReceipt appleIapReceipt) Finds a receipt in the db, or creates a new one if necessary.getOrCreateRewardIssuances(List<AppleIapReceipt> appleIapReceipts) Gets or creates aRewardIssuancein the db for each givenAppleIapReceipt.verifyAndCreateAppleIapReceiptsIfNeeded(AppleIapVerifyReceiptInvoker.AppleIapVerifyReceiptEnvironment appleIapVerifyReceiptEnvironment, String receiptData) Verifies the given base64-encoded receiptData string against the Apple servers in the given environment.
-
Method Details
-
getAppleIapReceipts
Gets receipts for a given user specifying the offset and the count.- Parameters:
user- the useroffset- the offsetcount- the count- Returns:
- a
PaginationofAppleIapReceiptobjects.
-
getAppleIapReceipt
Gets the receipt with the id, or throws aNotFoundExceptionif the receipt can't be found.- Parameters:
originalTransactionId- the original apple transaction id- Returns:
- the
AppleIapReceiptthat was requested, never null
-
getOrCreateAppleIapReceipt
Finds a receipt in the db, or creates a new one if necessary.- Returns:
- the
AppleIapReceiptas it was written into the database - Throws:
InvalidDataException- if the state of the passed in AppleIapReceipt is invalidDuplicateException- if the passed in AppleIapReceipt has a name that already exists
-
deleteAppleIapReceipt
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
AppleIapReceiptas it was written into the database, or the existing database record
-
getOrCreateRewardIssuances
Gets or creates aRewardIssuancein the db for each givenAppleIapReceipt.- Parameters:
appleIapReceipts-- Returns:
-