public IHttpActionResult BatchCatalogProducts(string catalogId)
        {
            var products = _productProvider.GetCatalogProductsBatchRequest(catalogId);

            if (products.Entries == null || !products.Entries.Any())
            {
                return(StatusCode(HttpStatusCode.NoContent));
            }
            products.Entries.ForEach(item => item.MerchantId = _settingsManager.MerchantId);
            var res = _contentService.Products.Custombatch(products).Execute();

            return(Ok(res));
        }
Пример #2
0
        public IHttpActionResult BatchCatalogProducts(string catalogId)
        {
            var productsUpdateRequest = _productProvider.GetCatalogProductsBatchRequest(catalogId);

            if (!productsUpdateRequest.Entries.Any())
            {
                return(StatusCode(HttpStatusCode.NoContent));
            }

            var res = PerformBatchProductsUpdate(productsUpdateRequest);

            return(Ok(res));
        }