Entitlement Processor
Processes transactions into enriched entitlements.
This class transforms raw transaction data into enriched Entitlement objects with computed properties like isActive, isLifetime, willRenew, etc.
Types
Link copied to clipboard
data class ProcessedTransactions(val nonSubscriptions: List<NonSubscriptionTransaction>, val subscriptions: List<SubscriptionTransaction>)
Result of processing transactions into subscription and non-subscription objects.
Functions
Link copied to clipboard
fun buildEntitlementsFromTransactions(transactionsByEntitlement: Map<String, List<EntitlementTransaction>>, rawEntitlementsByProductId: Map<String, Set<Entitlement>>, productIdsByEntitlementId: Map<String, Set<String>>): Map<String, List<Entitlement>>
Builds enriched entitlements from transactions grouped by entitlement ID.
Link copied to clipboard
fun processTransactions(transactions: List<EntitlementTransaction>): EntitlementProcessor.ProcessedTransactions
Processes a list of transactions into typed subscription and non-subscription objects.