/// <summary> /// Adjusts the given <see cref="InventoryLevel"/>. /// </summary> /// <param name="updatedInventoryLevel">The updated <see cref="InventoryLevel"/></param> /// <returns>The updated <see cref="InventoryLevel"/></returns> public virtual async Task <InventoryLevel> AdjustAsync(InventoryLevelAdjust adjustInventoryLevel) { var req = PrepareRequest($"inventory_levels/adjust.json"); var body = adjustInventoryLevel.ToDictionary(); JsonContent content = new JsonContent(body); return(await ExecuteRequestAsync <InventoryLevel>(req, HttpMethod.Post, content, "inventory_level")); }
/// <summary> /// Adjusts the given <see cref="InventoryLevel"/>. /// </summary> /// <param name="updatedInventoryLevel">The updated <see cref="InventoryLevel"/></param> /// <param name="cancellationToken">Cancellation Token</param> /// <returns>The updated <see cref="InventoryLevel"/></returns> public virtual async Task <InventoryLevel> AdjustAsync(InventoryLevelAdjust adjustInventoryLevel, CancellationToken cancellationToken = default) { var req = PrepareRequest($"inventory_levels/adjust.json"); var body = adjustInventoryLevel.ToDictionary(); var content = new JsonContent(body); var response = await ExecuteRequestAsync <InventoryLevel>(req, HttpMethod.Post, cancellationToken, content, "inventory_level"); return(response.Result); }