Class VirtualPurchaseDefinition
Represents a virtual purchase configuration.
Inherited Members
Namespace: Unity.Services.Economy.Model
Assembly: solution.dll
Syntax
[Preserve]
public class VirtualPurchaseDefinition : ConfigurationItemDefinition
Constructors
Name | Description |
---|---|
VirtualPurchaseDefinition() |
Fields
Name | Description |
---|---|
Costs | A list of costs associated with this purchase. |
Rewards | A list of rewards associated with this purchase. |
Methods
Name | Description |
---|---|
CanPlayerAffordPurchaseAsync() | Check if this purchase is affordable for the currently signed in user. Note: This call is very costly, as it will make multiple API calls to check the player's current balances against the costs specified in this purchase. |
MakePurchaseAsync(List<PlayersInventoryItem>) | Make this purchase using the PlayersInventoryItems provided to pay the inventory item cost. |
MakePurchaseAsync(MakeVirtualPurchaseOptions) | Make this purchase. Optionally takes instance IDs of items to use in the purchase. |