internal async Task <GetWarehouseShipmentsResponse> GetWarehouseShipments(GetWarehouseShipmentsRequest request)
        {
            if (request == null || request.Limit == 0)
            {
                throw new Exception("No data provided to request");
            }
            if (request.Limit > 100)
            {
                throw new Exception("Maximum number of items per page is 100");
            }

            var filterQueryString = string.IsNullOrWhiteSpace(request.FilterStatus)
                ? string.Empty
                : $"&status={request.FilterStatus}";

            var apiResponse =
                await _client.GetAsync <GetWarehouseShipmentsResponse>(
                    $"warehouse/shipments?offset={request.Offset}&limit={request.Limit}{filterQueryString}");

            return(apiResponse);
        }
Ejemplo n.º 2
0
        public async Task <GetWarehouseShipmentsResponse> GetWarehouseShipments(GetWarehouseShipmentsRequest request)
        {
            var result = await _warehouseShipmentsService.GetWarehouseShipments(request);

            return(result);
        }