Class PlayersInventoryItem
Represents a single player's inventory item. This is an inventory item unique to a specific player.
Namespace: Unity.Services.Economy.Model
Syntax
public class PlayersInventoryItem : object
Constructors
PlayersInventoryItem(String, String, Dictionary<String, Object>, String, EconomyDate, EconomyDate)
Declaration
public PlayersInventoryItem(string playersInventoryItemId = null, string inventoryItemId = null, Dictionary<string, object> instanceData = null, string writeLock = null, EconomyDate created = null, EconomyDate modified = null)
Parameters
| Type | Name | Description |
|---|---|---|
| String | playersInventoryItemId | |
| String | inventoryItemId | |
| Dictionary<String, Object> | instanceData | |
| String | writeLock | |
| EconomyDate | created | |
| EconomyDate | modified |
Fields
Created
The date this players inventory item was created as an EconomyDate object.
Declaration
public EconomyDate Created
Field Value
| Type | Description |
|---|---|
| EconomyDate |
InstanceData
Any instance data specific to this unique item in the player's inventory.
Declaration
public Dictionary<string, object> InstanceData
Field Value
| Type | Description |
|---|---|
| Dictionary<String, Object> |
InventoryItemId
The configuration ID of the inventory item.
Declaration
public string InventoryItemId
Field Value
| Type | Description |
|---|---|
| String |
Modified
The date this players inventory item was modified as an EconomyDate object.
Declaration
public EconomyDate Modified
Field Value
| Type | Description |
|---|---|
| EconomyDate |
PlayersInventoryItemId
The ID of the unique item specific to this player's inventory.
Declaration
public string PlayersInventoryItemId
Field Value
| Type | Description |
|---|---|
| String |
WriteLock
The current WriteLock string.
Declaration
public string WriteLock
Field Value
| Type | Description |
|---|---|
| String |
Methods
GetItemDefinitionAsync()
Gets the configuration definition associated with this player's inventory item.
Declaration
public Task<InventoryItemDefinition> GetItemDefinitionAsync()
Returns
| Type | Description |
|---|---|
| Task<InventoryItemDefinition> | The InventoryItemDefinition associated with this player's inventory item |
Exceptions
| Type | Condition |
|---|---|
| EconomyException | Thrown if request is unsuccessful |