PaywallModel
class PaywallModel(val purchases: Purchases, localConfiguration: PaywallConfiguration? = null, paywallIdentifier: String? = null)
Coordinates local and remote paywall configuration with the purchase and restoration flow.
Parameters
localConfiguration
The local paywall configuration, or the fallback for a remote paywall.
paywallIdentifier
The remote paywall identifier created in Purpl.
Constructors
Link copied to clipboard
constructor(purchases: Purchases, localConfiguration: PaywallConfiguration? = null, paywallIdentifier: String? = null)
Properties
Functions
Link copied to clipboard
Applies remote paywall changes that arrive after a cached configuration is shown.
Link copied to clipboard
Applies the latest customer information after purchases, restoration, or returning to the app.
Link copied to clipboard
suspend fun purchase(activity: Activity, option: StorePurchaseOption, replacement: suspend (StorePurchaseOption) -> SubscriptionReplacement? = { null }): PurchaseResult?
Purchases an option, applying the subscription replacement policy chosen by the app.
Link copied to clipboard
Restores owned purchases and shows the latest entitlement result.