MonetizationAPI

export declare class MonetizationAPI
export declare class MonetizationAPI

No summary provided.

constructor(rest)
Constructs a new instance of the MonetizationAPI class
NameTypeOptionalDescription
restRESTNoNone
consumeEntitlement(applicationId, entitlementId, options?):Promise<void>
Marks a given entitlement for the user as consumed. Only available for One-Time Purchase consumable SKUs.
NameTypeOptionalDescription
applicationIdSnowflakeNo
The application id to consume the entitlement for
entitlementIdSnowflakeNo
The entitlement id to consume
optionsPick<RequestData, 'auth' | 'signal'>Yes
The options for consuming the entitlement
createTestEntitlement(applicationId, body, options?):Promise<Partial<Omit<APIEntitlement, "ends_at" | "starts_at">>>
Creates a test entitlement for an application's SKU.
NameTypeOptionalDescription
applicationIdSnowflakeNo
The application id to create the entitlement for
bodyRESTPostAPIEntitlementJSONBodyNo
The data for creating the entitlement
optionsPick<RequestData, 'auth' | 'signal'>Yes
The options for creating the entitlement
deleteTestEntitlement(applicationId, entitlementId, options?):Promise<void>
Deletes a test entitlement for an application's SKU.
NameTypeOptionalDescription
applicationIdSnowflakeNo
The application id to delete the entitlement for
entitlementIdSnowflakeNo
The entitlement id to delete
optionsPick<RequestData, 'auth' | 'signal'>Yes
The options for deleting the entitlement
getEntitlement(applicationId, entitlementId, options?):Promise<APIEntitlement>
Fetches an entitlement for an application.
NameTypeOptionalDescription
applicationIdSnowflakeNo
The application id to fetch the entitlement for
entitlementIdSnowflakeNo
The entitlement id to fetch
optionsPick<RequestData, 'auth' | 'signal'>Yes
The options for fetching the entitlement
getEntitlements(applicationId, query?, options?):Promise<RESTGetAPIEntitlementsResult>
Fetches the entitlements for an application.
NameTypeOptionalDescription
applicationIdSnowflakeNo
The application id to fetch entitlements for
queryRESTGetAPIEntitlementsQueryYes
The query options for fetching entitlements
optionsPick<RequestData, 'auth' | 'signal'>Yes
The options for fetching entitlements
getSKUs(applicationId, options?):Promise<RESTGetAPISKUsResult>
Fetches the SKUs for an application.
NameTypeOptionalDescription
applicationIdSnowflakeNo
The application id to fetch SKUs for
optionsPick<RequestData, 'auth' | 'signal'>Yes
The options for fetching the SKUs.
getSKUSubscription(skuId, subscriptionId, options?):Promise<APISubscription>
NameTypeOptionalDescription
skuIdSnowflakeNo
The SKU id to fetch subscription for
subscriptionIdSnowflakeNo
The subscription id to fetch
optionsPick<RequestData, 'auth' | 'signal'>Yes
The options for fetching the subscription
getSKUSubscriptions(skuId, query?, options?):Promise<RESTGetAPISKUSubscriptionsResult>
NameTypeOptionalDescription
skuIdSnowflakeNo
The SKU id to fetch subscriptions for
queryRESTGetAPISKUSubscriptionsQueryYes
The query options for fetching subscriptions
optionsPick<RequestData, 'auth' | 'signal'>Yes
The options for fetching subscriptions