/// <summary> /// Retrieve the detail about the status of Inventory Items represented by the specified InventoryLocationId and a list of skus for the specified date /// </summary> /// <param name="param"></param> /// <returns></returns> public virtual async Task <List <InventoryItemAvailability> > FindInventoryItemStatus(FindInventoryItemStatusParam param) { if (param == null) { throw new ArgumentNullException("param"); } if (string.IsNullOrWhiteSpace(param.Scope)) { throw new ArgumentException(ArgumentNullMessageFormatter.FormatErrorMessage("Scope"), "param"); } if (param.Skus == null) { throw new ArgumentException(ArgumentNullMessageFormatter.FormatErrorMessage("Skus"), "param"); } if (param.Skus.Count == 0) { throw new ArgumentException("Skus is empty", "param"); } if (string.IsNullOrWhiteSpace(param.InventoryLocationId)) { throw new ArgumentException(ArgumentNullMessageFormatter.FormatErrorMessage("InventoryLocationId"), "param"); } var request = new FindInventoryItemStatusByLocationAndSkusRequest { Date = param.Date, InventoryLocationId = param.InventoryLocationId, ScopeId = param.Scope, Skus = param.Skus }; var result = await OvertureClient.SendAsync(request).ConfigureAwait(false); return(result); }
/// <summary> /// Retrieve the detail about the status of Inventory Items represented by the specified InventoryLocationId and a list of skus for the specified date /// </summary> /// <param name="param"></param> /// <returns></returns> public virtual async Task <List <InventoryItemAvailability> > FindInventoryItemStatus(FindInventoryItemStatusParam param) { if (param == null) { throw new ArgumentNullException(nameof(param)); } if (string.IsNullOrWhiteSpace(param.Scope)) { throw new ArgumentException(GetMessageOfNullWhiteSpace(nameof(param.Scope)), nameof(param)); } if (param.Skus == null) { throw new ArgumentException(GetMessageOfNull(nameof(param.Skus)), nameof(param)); } if (param.Skus.Count == 0) { throw new ArgumentException(GetMessageOfEmpty(nameof(param.Skus)), nameof(param)); } if (string.IsNullOrWhiteSpace(param.InventoryLocationId)) { throw new ArgumentException(GetMessageOfNullWhiteSpace(nameof(param.InventoryLocationId)), nameof(param)); } var request = new FindInventoryItemStatusByLocationAndSkusRequest { Date = param.Date, InventoryLocationId = param.InventoryLocationId, ScopeId = param.Scope, Skus = param.Skus }; var result = await OvertureClient.SendAsync(request).ConfigureAwait(false); return(result); }