Package-level declarations

Types

Link copied to clipboard
class AutomaticPurchaseController(var context: Context, val scope: IOScope, val entitlementsInfo: () -> Entitlements = { Superwall.instance.dependencyContainer.entitlements }, val getBilling: (Context, PurchasesUpdatedListener) -> BillingClient = { ctx, listener -> try { BillingClient .newBuilder(ctx) .setListener(listener) .enablePendingPurchases( PendingPurchasesParams.newBuilder().enableOneTimeProducts().build(), ).build() } catch (e: Throwable) { Logger.debug( logLevel = LogLevel.error, scope = LogScope.nativePurchaseController, message = BILLING_INSANTIATION_ERROR, info = mapOf("error_message" to (e.message ?: "Unknown message")), error = e, ) throw e } }) : PurchaseController, PurchasesUpdatedListener
Link copied to clipboard
class Entitlements(val storage: Storage, actorScope: CoroutineScope = CoroutineScope(Dispatchers.Default), val actor: StateActor<EntitlementsContext, EntitlementsState> = StateActor(createInitialEntitlementsState(storage), actorScope), val tracker: suspend (TrackableSuperwallEvent) -> Unit = {}) : EntitlementsContext

Facade over the entitlements state held in a StateActor.

Link copied to clipboard

All dependencies available to entitlements EntitlementsState.Actions.

Link copied to clipboard
data class EntitlementsState(val status: SubscriptionStatus = SubscriptionStatus.Unknown, val entitlementsByProduct: Map<String, Set<Entitlement>> = emptyMap(), val activeDeviceEntitlements: Set<Entitlement> = emptySet(), val backingActive: Set<Entitlement> = emptySet(), val webEntitlements: Set<Entitlement> = emptySet(), val allTracked: Set<Entitlement> = emptySet())
Link copied to clipboard
data class GetProductsResponse(val productsByFullId: Map<String, StoreProduct>, val productItems: List<ProductItem>, val paywall: Paywall? = null)
Link copied to clipboard
class InternalPurchaseController(kotlinPurchaseController: PurchaseController?, javaPurchaseController: PurchaseControllerJava?, val context: Context) : PurchaseController
Link copied to clipboard
sealed class ProductState
Link copied to clipboard
Link copied to clipboard
interface StoreKit
Link copied to clipboard
Link copied to clipboard
class StoreManager(val purchaseController: InternalPurchaseController, val billing: Billing, receiptManagerFactory: () -> ReceiptManager, track: suspend (InternalSuperwallEvent) -> Unit = { Superwall.instance.track(it) }, getSuperwallProducts: suspend () -> Either<SuperwallProductsResponse, NetworkError> = { Either.Success(SuperwallProductsResponse(emptyList())) }, var testMode: TestMode? = null) : ProductsFetcher, StoreKit