Product[] GetProductDetails(IProductCatalog client, IEnumerable<string> productIds)
        {
            if (productIds == null)
                throw new ArgumentNullException("productIds");

            if (!productIds.Any())
                return new Product[] { };

            var products = productIds
                .Chunk(10)
                .SelectMany
                (
                    chunk =>
                    {
                        var query = new ProductQuery
                        {
                            Page        = 1,
                            PageSize    = int.MaxValue,
                            SearchTerms = string.Join(" ", chunk.ToArray()),
                            SearchField = ProductQuery.SearchFields.ProductId
                        };

                        return client.Search(query).Products;
                    }
                )
                .ToArray();

            return products;
        }