ReceiptManager

class ReceiptManager(delegate: ProductsFetcher?, billing: Billing, ioScope: IOScope = IOScope(), storage: Storage, customerInfoManager: () -> CustomerInfoManager, entitlementProcessor: EntitlementProcessor = EntitlementProcessor(), subscriptionStatusProvider: SubscriptionStatusProvider = PlayBillingSubscriptionStatusProvider(billing))(source)

Constructors

Link copied to clipboard
constructor(delegate: ProductsFetcher?, billing: Billing, ioScope: IOScope = IOScope(), storage: Storage, customerInfoManager: () -> CustomerInfoManager, entitlementProcessor: EntitlementProcessor = EntitlementProcessor(), subscriptionStatusProvider: SubscriptionStatusProvider = PlayBillingSubscriptionStatusProvider(billing))

Types

Link copied to clipboard
data class PurchaseSnapshot(val purchases: Set<InAppPurchase>, val entitlementsByProductId: Map<String, List<Entitlement>>, val nonSubscriptions: List<NonSubscriptionTransaction>, val subscriptions: List<SubscriptionTransaction>)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard

Returns experimental device variables for backwards compatibility. These are used in device variables for paywall templating.

Link copied to clipboard
Link copied to clipboard
suspend fun isEligibleForIntroOffer(storeProduct: StoreProduct): Boolean
Link copied to clipboard
Link copied to clipboard
suspend fun loadPurchasedProducts(serverEntitlementsByProductId: Map<String, Set<Entitlement>>)

Loads purchased products from device receipts and builds enriched entitlements.

Link copied to clipboard
suspend fun loadPurchases(serverEntitlementsByProductId: Map<String, Set<Entitlement>>): ReceiptManager.PurchaseSnapshot
Link copied to clipboard