/// <summary> /// Updates an existing <see cref="InventoryItem"/>. /// </summary> /// <param name="inventoryItemId">The id of the inventory item to retrieve.</param> /// <param name="cancellationToken">Cancellation Token</param> public virtual async Task <Entities.InventoryItem> UpdateAsync(long inventoryItemId, Entities.InventoryItem inventoryItem, CancellationToken cancellationToken = default) { var req = PrepareRequest($"inventory_items/{inventoryItemId}.json"); var content = new JsonContent(new { inventory_item = inventoryItem }); var response = await ExecuteRequestAsync <Entities.InventoryItem>(req, HttpMethod.Put, cancellationToken, content, "inventory_item"); return(response.Result); }
public void Setup(Entities.InventoryItem item) { this.item = item; name.text = Entities.Entity.Name(item.identify); num.text = $"x{item.num}"; }