GetProductType

Description

Returns the type of the given product.

Declaration

public static ProductType GetProductType(ShopProductNames product)

Parameters

Return

ProductType - enum containing Consumable, NonConsumable, Subscription

Example

Test.cs
using Gley.EasyIAP;
public class Test : MonoBehaviour
{
    void GetType()
    {
        ProductType productType = Gley.EasyIAP.API.GetProductType(ShopProductNames.YourPorduct);
        switch (productType)
        {
            case ProductType.Consumable:
                //do something for consumable
                break;

            case ProductType.NonConsumable:
                //do something for non-consumable
                break;

            case ProductType.Subscription:
                //do something for subscription
                break;
        }
    }
}

Last updated