Class UserGooglePlayIapReceiptService
java.lang.Object
dev.getelements.elements.service.googleplayiap.UserGooglePlayIapReceiptService
- All Implemented Interfaces:
GooglePlayIapReceiptService
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddeleteGooglePlayIapReceipt(String orderId) Deletes an existing receipt.getGooglePlayIapReceipt(String orderId) Gets the receipt with the id, or throws aNotFoundExceptionif the receipt can't be found.getGooglePlayIapReceipts(User user, int offset, int count) Gets receipts for a given user specifying the offset and the count.com.fasterxml.jackson.databind.ObjectMappergetOrCreateGooglePlayIapReceipt(GooglePlayIapReceipt googlePlayIapReceipt) Finds a receipt in the db, or creates a new one if necessary.getOrCreateRewardIssuances(GooglePlayIapReceipt googlePlayIapReceipt) Gets or creates a list ofRewardIssuances in the db for the givenGooglePlayIapReceipt.getUser()voidsetApplicationConfigurationDao(ApplicationConfigurationDao applicationConfigurationDao) voidsetCurrentProfileSupplier(Supplier<Profile> currentProfileSupplier) voidsetDozerMapper(MapperRegistry dozerMapperRegistry) voidsetGooglePlayIapReceiptDao(GooglePlayIapReceiptDao googlePlayIapReceiptDao) voidsetItemDao(ItemDao itemDao) voidsetRewardIssuanceDao(RewardIssuanceDao rewardIssuanceDao) voidverifyAndCreateGooglePlayIapReceiptIfNeeded(String packageName, String productId, String purchaseToken) Verifies the given purchase data against the Google Play purchase validation services.
-
Constructor Details
-
UserGooglePlayIapReceiptService
public UserGooglePlayIapReceiptService()
-
-
Method Details
-
getUser
-
setUser
-
getGooglePlayIapReceiptDao
-
setGooglePlayIapReceiptDao
-
getDozerMapper
-
setDozerMapper
-
getObjectMapper
public com.fasterxml.jackson.databind.ObjectMapper getObjectMapper() -
getRewardIssuanceDao
-
setRewardIssuanceDao
-
getItemDao
-
setItemDao
-
getApplicationConfigurationDao
-
setApplicationConfigurationDao
@Inject public void setApplicationConfigurationDao(ApplicationConfigurationDao applicationConfigurationDao) -
getCurrentProfileSupplier
-
setCurrentProfileSupplier
-
getGooglePlayIapReceipts
Description copied from interface:GooglePlayIapReceiptServiceGets receipts for a given user specifying the offset and the count.- Specified by:
getGooglePlayIapReceiptsin interfaceGooglePlayIapReceiptService- Parameters:
user- the useroffset- the offsetcount- the count- Returns:
- a
PaginationofGooglePlayIapReceiptobjects.
-
getGooglePlayIapReceipt
Description copied from interface:GooglePlayIapReceiptServiceGets the receipt with the id, or throws aNotFoundExceptionif the receipt can't be found.- Specified by:
getGooglePlayIapReceiptin interfaceGooglePlayIapReceiptService- Parameters:
orderId- the original apple transaction id- Returns:
- the
GooglePlayIapReceiptthat was requested, never null
-
getOrCreateGooglePlayIapReceipt
public GooglePlayIapReceipt getOrCreateGooglePlayIapReceipt(GooglePlayIapReceipt googlePlayIapReceipt) Description copied from interface:GooglePlayIapReceiptServiceFinds a receipt in the db, or creates a new one if necessary.- Specified by:
getOrCreateGooglePlayIapReceiptin interfaceGooglePlayIapReceiptService- Returns:
- the
GooglePlayIapReceiptas it was written into the database
-
deleteGooglePlayIapReceipt
Description copied from interface:GooglePlayIapReceiptServiceDeletes an existing receipt.- Specified by:
deleteGooglePlayIapReceiptin interfaceGooglePlayIapReceiptService- Parameters:
orderId- the original order id from Google Play
-
verifyAndCreateGooglePlayIapReceiptIfNeeded
public GooglePlayIapReceipt verifyAndCreateGooglePlayIapReceiptIfNeeded(String packageName, String productId, String purchaseToken) Description copied from interface:GooglePlayIapReceiptServiceVerifies the given purchase data against the Google Play purchase validation services.- Specified by:
verifyAndCreateGooglePlayIapReceiptIfNeededin interfaceGooglePlayIapReceiptService- Parameters:
packageName- the package name of the application, e.g. `com.namazustudios.example_app`.productId- the product id purchased by the user, e.g. `com.namazustudios.example_app.pack_10_coins`.purchaseToken- the token issued to the user upon successful Google Play purchase transaction.- Returns:
- the
GooglePlayIapReceiptas it was written into the database, or the existing database record.
-
getOrCreateRewardIssuances
Description copied from interface:GooglePlayIapReceiptServiceGets or creates a list ofRewardIssuances in the db for the givenGooglePlayIapReceipt.- Specified by:
getOrCreateRewardIssuancesin interfaceGooglePlayIapReceiptService- Parameters:
googlePlayIapReceipt-- Returns:
-
generateGooglePlayIapReceiptMetadata
-