Class AddInventoryRequest
AddInventoryRequest
Inherited Members
Namespace: Unity.Services.Apis.Economy
Assembly: Unity.Services.Apis.dll
Syntax
[DataContract(Name = "add-inventory-request")]
[Preserve]
public class AddInventoryRequest
Constructors
AddInventoryRequest(string, string, object)
Initializes a new instance of the Add
Declaration
[Preserve]
public AddInventoryRequest(string inventoryItemId = null, string playersInventoryItemId = null, object instanceData = null)
Parameters
Type | Name | Description |
---|---|---|
string | inventoryItemId | Resource ID of the inventory item. (required). |
string | playersInventoryItemId | A |
object | instanceData | Instance data to be saved against the new inventory item. Max size when serialized 5 KB.. |
Properties
InstanceData
Instance data to be saved against the new inventory item. Max size when serialized 5 KB.
Declaration
[DataMember(Name = "instanceData", EmitDefaultValue = true)]
[Preserve]
public object InstanceData { get; set; }
Property Value
Type | Description |
---|---|
object | Instance data to be saved against the new inventory item. Max size when serialized 5 KB. |
InventoryItemId
Resource ID of the inventory item.
Declaration
[DataMember(Name = "inventoryItemId", IsRequired = true, EmitDefaultValue = true)]
[Preserve]
public string InventoryItemId { get; set; }
Property Value
Type | Description |
---|---|
string | Resource ID of the inventory item. |
PlayersInventoryItemId
A playersInventoryItemId
for the item being created. If not given, Economy automatically generates the ID. An ID must be unique for a player.
Declaration
[DataMember(Name = "playersInventoryItemId", EmitDefaultValue = false)]
[Preserve]
public string PlayersInventoryItemId { get; set; }
Property Value
Type | Description |
---|---|
string | A |