Class UserAppleIapReceiptService
java.lang.Object
dev.getelements.elements.service.appleiap.UserAppleIapReceiptService
- All Implemented Interfaces:
AppleIapReceiptService
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
deleteAppleIapReceipt
(String originalTransactionId) Deletes an existing receipt.getAppleIapReceipt
(String originalTransactionId) Gets the receipt with the id, or throws aNotFoundException
if 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 aRewardIssuance
in the db for each givenAppleIapReceipt
.getUser()
void
setAppleIapReceiptDao
(AppleIapReceiptDao appleIapReceiptDao) void
setAppleIapVerifyReceiptInvokerBuilderProvider
(jakarta.inject.Provider<AppleIapVerifyReceiptInvoker.Builder> appleIapVerifyReceiptInvokerBuilderProvider) void
setApplicationConfigurationDao
(ApplicationConfigurationDao applicationConfigurationDao) void
setCurrentProfileSupplier
(Supplier<Profile> currentProfileSupplier) void
setDozerMapper
(MapperRegistry dozerMapperRegistry) void
setItemDao
(ItemDao itemDao) void
setRewardIssuanceDao
(RewardIssuanceDao rewardIssuanceDao) void
verifyAndCreateAppleIapReceiptsIfNeeded
(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:AppleIapReceiptService
Gets receipts for a given user specifying the offset and the count.- Specified by:
getAppleIapReceipts
in interfaceAppleIapReceiptService
- Parameters:
user
- the useroffset
- the offsetcount
- the count- Returns:
- a
Pagination
ofAppleIapReceipt
objects.
-
getAppleIapReceipt
Description copied from interface:AppleIapReceiptService
Gets the receipt with the id, or throws aNotFoundException
if the receipt can't be found.- Specified by:
getAppleIapReceipt
in interfaceAppleIapReceiptService
- Parameters:
originalTransactionId
- the original apple transaction id- Returns:
- the
AppleIapReceipt
that was requested, never null
-
getOrCreateAppleIapReceipt
Description copied from interface:AppleIapReceiptService
Finds a receipt in the db, or creates a new one if necessary.- Specified by:
getOrCreateAppleIapReceipt
in interfaceAppleIapReceiptService
- Returns:
- the
AppleIapReceipt
as it was written into the database
-
deleteAppleIapReceipt
Description copied from interface:AppleIapReceiptService
Deletes an existing receipt.- Specified by:
deleteAppleIapReceipt
in interfaceAppleIapReceiptService
- Parameters:
originalTransactionId
- the original apple transaction id
-
verifyAndCreateAppleIapReceiptsIfNeeded
public List<AppleIapReceipt> verifyAndCreateAppleIapReceiptsIfNeeded(AppleIapVerifyReceiptInvoker.AppleIapVerifyReceiptEnvironment appleIapVerifyReceiptEnvironment, String receiptData) Description copied from interface:AppleIapReceiptService
Verifies the given base64-encoded receiptData string against the Apple servers in the given environment.- Specified by:
verifyAndCreateAppleIapReceiptsIfNeeded
in interfaceAppleIapReceiptService
- Parameters:
appleIapVerifyReceiptEnvironment
-receiptData
-- Returns:
- the
AppleIapReceipt
as it was written into the database, or the existing database record
-
getOrCreateRewardIssuances
Description copied from interface:AppleIapReceiptService
Gets or creates aRewardIssuance
in the db for each givenAppleIapReceipt
.- Specified by:
getOrCreateRewardIssuances
in interfaceAppleIapReceiptService
- Parameters:
appleIapReceipts
-- Returns:
-
generateAppleIapReceiptMetadata
-