Class UserAppleIapReceiptService
java.lang.Object
dev.getelements.elements.service.appleiap.UserAppleIapReceiptService
- All Implemented Interfaces:
AppleIapReceiptService
-
Constructor Summary
Constructors -
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.jakarta.inject.Provider<AppleIapVerifyReceiptInvoker.Builder> 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.getUser()voidsetAppleIapReceiptDao(AppleIapReceiptDao appleIapReceiptDao) voidsetAppleIapVerifyReceiptInvokerBuilderProvider(jakarta.inject.Provider<AppleIapVerifyReceiptInvoker.Builder> appleIapVerifyReceiptInvokerBuilderProvider) voidsetApplicationConfigurationDao(ApplicationConfigurationDao applicationConfigurationDao) voidsetCurrentProfileSupplier(Supplier<Profile> currentProfileSupplier) voidsetDozerMapper(MapperRegistry dozerMapperRegistry) voidsetItemDao(ItemDao itemDao) voidsetRewardIssuanceDao(RewardIssuanceDao rewardIssuanceDao) voidverifyAndCreateAppleIapReceiptsIfNeeded(AppleIapVerifyReceiptInvoker.AppleIapVerifyReceiptEnvironment appleIapVerifyReceiptEnvironment, String receiptData) Verifies the given base64-encoded receiptData string against the Apple servers in the given environment.
-
Constructor Details
-
UserAppleIapReceiptService
public UserAppleIapReceiptService()
-
-
Method Details
-
getUser
-
setUser
-
getAppleIapReceiptDao
-
setAppleIapReceiptDao
-
getAppleIapVerifyReceiptInvokerBuilderProvider
public jakarta.inject.Provider<AppleIapVerifyReceiptInvoker.Builder> getAppleIapVerifyReceiptInvokerBuilderProvider() -
setAppleIapVerifyReceiptInvokerBuilderProvider
@Inject public void setAppleIapVerifyReceiptInvokerBuilderProvider(jakarta.inject.Provider<AppleIapVerifyReceiptInvoker.Builder> appleIapVerifyReceiptInvokerBuilderProvider) -
getDozerMapper
-
setDozerMapper
-
getRewardIssuanceDao
-
setRewardIssuanceDao
-
getItemDao
-
setItemDao
-
getApplicationConfigurationDao
-
setApplicationConfigurationDao
@Inject public void setApplicationConfigurationDao(ApplicationConfigurationDao applicationConfigurationDao) -
getCurrentProfileSupplier
-
setCurrentProfileSupplier
-
getAppleIapReceipts
Description copied from interface:AppleIapReceiptServiceGets receipts for a given user specifying the offset and the count.- Specified by:
getAppleIapReceiptsin interfaceAppleIapReceiptService- Parameters:
user- the useroffset- the offsetcount- the count- Returns:
- a
PaginationofAppleIapReceiptobjects.
-
getAppleIapReceipt
Description copied from interface:AppleIapReceiptServiceGets the receipt with the id, or throws aNotFoundExceptionif the receipt can't be found.- Specified by:
getAppleIapReceiptin interfaceAppleIapReceiptService- Parameters:
originalTransactionId- the original apple transaction id- Returns:
- the
AppleIapReceiptthat was requested, never null
-
getOrCreateAppleIapReceipt
Description copied from interface:AppleIapReceiptServiceFinds a receipt in the db, or creates a new one if necessary.- Specified by:
getOrCreateAppleIapReceiptin interfaceAppleIapReceiptService- Returns:
- the
AppleIapReceiptas it was written into the database
-
deleteAppleIapReceipt
Description copied from interface:AppleIapReceiptServiceDeletes an existing receipt.- Specified by:
deleteAppleIapReceiptin interfaceAppleIapReceiptService- Parameters:
originalTransactionId- the original apple transaction id
-
verifyAndCreateAppleIapReceiptsIfNeeded
public List<AppleIapReceipt> verifyAndCreateAppleIapReceiptsIfNeeded(AppleIapVerifyReceiptInvoker.AppleIapVerifyReceiptEnvironment appleIapVerifyReceiptEnvironment, String receiptData) Description copied from interface:AppleIapReceiptServiceVerifies the given base64-encoded receiptData string against the Apple servers in the given environment.- Specified by:
verifyAndCreateAppleIapReceiptsIfNeededin interfaceAppleIapReceiptService- Parameters:
appleIapVerifyReceiptEnvironment-receiptData-- Returns:
- the
AppleIapReceiptas it was written into the database, or the existing database record
-
getOrCreateRewardIssuances
Description copied from interface:AppleIapReceiptServiceGets or creates aRewardIssuancein the db for each givenAppleIapReceipt.- Specified by:
getOrCreateRewardIssuancesin interfaceAppleIapReceiptService- Parameters:
appleIapReceipts-- Returns:
-
generateAppleIapReceiptMetadata
-