public void UpdateProducts(List <BigCommerceProduct> products) { var marker = this.GetMarker(); foreach (var product in products) { var endpoint = string.Format("/{0}", product.Id); var jsonContent = new { inventory_level = product.Quantity }.ToJson(); var limit = ActionPolicies.Submit(marker, endpoint).Get(() => this._webRequestServices.PutData(BigCommerceCommand.UpdateProductsV3, endpoint, jsonContent, marker)); this.CreateApiDelay(limit).Wait(); //API requirement } }
public void UpdateProductOptions(List <BigCommerceProductOption> productOptions) { var marker = this.GetMarker(); foreach (var option in productOptions) { var endpoint = ParamsBuilder.CreateProductOptionUpdateEndpoint(option.ProductId, option.Id); var jsonContent = new { inventory_level = option.Quantity }.ToJson(); var limit = ActionPolicies.Submit(marker, endpoint).Get(() => this._webRequestServices.PutData(BigCommerceCommand.UpdateProductV2_OAuth, endpoint, jsonContent, marker)); this.CreateApiDelay(limit).Wait(); //API requirement } }