Properties
addListener
addListener: (<K>(eventName: K, callback: Events[K]) => void)
Type declaration
-
- <K>(eventName: K, callback: Events[K]): void
-
Parameters
-
eventName: K
-
callback: Events[K]
Returns void
applySubscription
clearCustomer
clearCustomer: (() => void)
clearResource
clearResource: (() => void)
fetchUsageHistory
getActiveSubscriptions
getBooleanEntitlement
getCheckoutState
getCustomer
getEntitlements
get
Entitlements
: ((resourceId
?: string) => Promise<Entitlement[]>)
Type declaration
-
- (resourceId?: string): Promise<Entitlement[]>
-
Parameters
-
Optional
resourceId: string
getMeteredEntitlement
getNumericEntitlement
getPaywall
get
Paywall
: ((params
?: GetPaywall) => Promise<Paywall>)
Type declaration
-
- (params?: GetPaywall): Promise<Paywall>
-
Returns Promise<Paywall>
isCustomerLoaded
isCustomerLoaded: boolean
isResourceLoaded
isResourceLoaded: boolean
isWidgetWatermarkEnabled
isWidgetWatermarkEnabled: boolean
refresh
refresh: (() => Promise<void>)
Type declaration
-
- (): Promise<void>
-
Returns Promise<void>
removeListener
removeListener: (<K>(eventName: K, callback: Events[K]) => void)
Type declaration
-
- <K>(eventName: K, callback: Events[K]): void
-
Parameters
-
eventName: K
-
callback: Events[K]
Returns void
setCustomerId
setCustomerId: ((customerId: string, customerToken?: null | string, resourceId?: null | string) => Promise<void>)
Type declaration
-
- (customerId: string, customerToken?: null | string, resourceId?: null | string): Promise<void>
-
Parameters
-
customerId: string
-
Optional
customerToken: null | string
-
Optional
resourceId: null | string
Returns Promise<void>
setResource
setResource: ((resourceId: string) => Promise<void>)
Type declaration
-
- (resourceId: string): Promise<void>
-
Returns Promise<void>