Entitlements

class Entitlements(storage: Storage, scope: CoroutineScope = CoroutineScope(Dispatchers.Default))(source)

A class that handles the Set of Entitlement objects retrieved from the Superwall dashboard.

Constructors

Link copied to clipboard
constructor(storage: Storage, scope: CoroutineScope = CoroutineScope(Dispatchers.Default))

Properties

Link copied to clipboard

The active entitlements. Uses mergeEntitlementsPrioritized to deduplicate entitlements by ID, keeping the highest priority version of each and merging productIds.

Link copied to clipboard

All entitlements, regardless of whether they're active or not.

Link copied to clipboard

Returns a snapshot of all entitlements by product ID. Used when loading purchases to enrich entitlements with transaction data.

Link copied to clipboard

The inactive entitlements.

Link copied to clipboard
val status: StateFlow<SubscriptionStatus>

A StateFlow of the entitlement status of the user. Set this using Superwall.instance.setEntitlementStatus.

Link copied to clipboard

Functions

Link copied to clipboard

Returns a Set of Entitlements belonging to given product IDs.

Link copied to clipboard

Sets the entitlement status and updates the corresponding entitlement collections.