PurchaseItem

Represents an item that can be purchased, including its ID, trial ID, type, and purchase category.

Constructors

Link copied to clipboard
constructor(itemId: String, type: Int)

Constructs a new PurchaseItem with the specified item ID and type. Default: non-consumable, LIFETIME_PREMIUM category.

constructor(itemId: String, trialId: String?, type: Int)

Constructs a new PurchaseItem with the specified item ID, trial ID, and type. Default: non-consumable, LIFETIME_PREMIUM category.

constructor(itemId: String, type: Int, isConsumable: Boolean)

Constructs a new PurchaseItem for INAPP with consumable configuration.

constructor(itemId: String, trialId: String?, type: Int, category: PurchaseItem.PurchaseCategory)

Constructs a new PurchaseItem with full configuration including category.

constructor(itemId: String, type: Int, category: PurchaseItem.PurchaseCategory)

Constructs a new PurchaseItem for INAPP with category.

Types

Link copied to clipboard

Purchase categories for INAPP products.

Properties

Link copied to clipboard

The category of this purchase for more specific classification. Use this to distinguish between different non-consumable types.

Link copied to clipboard

Whether this item is consumable and can be purchased multiple times. Consumable items: coins, gems, credits. Non-consumable items: remove ads, premium upgrade, lifetime access.

Link copied to clipboard

The unique identifier for the purchase item.

Link copied to clipboard

The trial ID associated with the purchase, if applicable (for subscriptions).

Link copied to clipboard

The type of the purchase item (TYPE_IAP.PURCHASE or TYPE_IAP.SUBSCRIPTION).

Functions

Link copied to clipboard

Checks if this is a lifetime/permanent purchase (not a subscription).

Link copied to clipboard

Checks if this purchase should disable ads. Returns true for LIFETIME_PREMIUM, REMOVE_ADS, and subscriptions.