Class Promo
Class that provides a static interface to IAP Promo purchases.
Namespace: UnityEngine.Purchasing
Syntax
public class Promo
Constructors
Promo()
No longer used because this class is static. Creates a Promo object, but there is no reason to do this.
Declaration
public Promo()
Methods
InitiatePromoPurchase(String)
Initiates a purchasing command for a promo product. Legacy for original promo Ads SDK.
Declaration
[Preserve]
public static bool InitiatePromoPurchase(string itemRequest)
Parameters
Type | Name | Description |
---|---|---|
String | itemRequest | The JSON item request command for purchase. |
Returns
Type | Description |
---|---|
Boolean | If the command was successful or not. |
InitiatePurchasingCommand(String)
Initiates a purchasing command for a promo product.
Declaration
[Preserve]
public static bool InitiatePurchasingCommand(string command)
Parameters
Type | Name | Description |
---|---|---|
String | command | The JSON item request command for purchase. |
Returns
Type | Description |
---|---|
Boolean | If the command was successful or not. |
IsReady()
Check if the IAP Promo setup is ready.
Declaration
[Preserve]
public static bool IsReady()
Returns
Type | Description |
---|---|
Boolean | Whether or not promo products have been proviced to Ads. |
QueryPromoProducts()
Queries the list of available promo products.
Declaration
[Preserve]
public static string QueryPromoProducts()
Returns
Type | Description |
---|---|
String | The list of promo products as raw JSON. |
Version()
Check the version of IAP Promo.
Declaration
[Preserve]
public static string Version()
Returns
Type | Description |
---|---|
String | The package version used, if known. |