Transaction Manager
class TransactionManager(storeManager: StoreManager, purchaseController: PurchaseController, eventsQueue: EventsQueue, storage: Storage, activityProvider: ActivityProvider, factory: TransactionManager.Factory, ioScope: IOScope, track: suspend (TrackableSuperwallEvent) -> Unit = {
Superwall.instance.track(it)
}, dismiss: suspend (paywallId: String, result: PaywallResult) -> Unit, showAlert: (AlertControllerFactory.AlertProps) -> Unit, subscriptionStatus: () -> SubscriptionStatus = {
Superwall.instance.entitlements.status.value
}, entitlementsById: (String) -> Set<Entitlement>, allEntitlementsByProductId: () -> Map<String, Set<Entitlement>>, showRestoreDialogForWeb: suspend () -> Unit, refreshReceipt: () -> Unit, updateState: (cacheKey: String, update: PaywallViewState.Updates) -> Unit, notifyOfTransactionComplete: suspend (paywallCacheKey: String, trialEndDate: Long?, productId: String) -> Unit)(source)
Constructors
Link copied to clipboard
constructor(storeManager: StoreManager, purchaseController: PurchaseController, eventsQueue: EventsQueue, storage: Storage, activityProvider: ActivityProvider, factory: TransactionManager.Factory, ioScope: IOScope, track: suspend (TrackableSuperwallEvent) -> Unit = {
Superwall.instance.track(it)
}, dismiss: suspend (paywallId: String, result: PaywallResult) -> Unit, showAlert: (AlertControllerFactory.AlertProps) -> Unit, subscriptionStatus: () -> SubscriptionStatus = {
Superwall.instance.entitlements.status.value
}, entitlementsById: (String) -> Set<Entitlement>, allEntitlementsByProductId: () -> Map<String, Set<Entitlement>>, showRestoreDialogForWeb: suspend () -> Unit, refreshReceipt: () -> Unit, updateState: (cacheKey: String, update: PaywallViewState.Updates) -> Unit, notifyOfTransactionComplete: suspend (paywallCacheKey: String, trialEndDate: Long?, productId: String) -> Unit)
Functions
Link copied to clipboard
suspend fun purchase(purchaseSource: TransactionManager.PurchaseSource, shouldDismiss: Boolean = true): PurchaseResult
Link copied to clipboard
Attempt to restore purchases.
Link copied to clipboard