Example #1
0
 public void Patch(string id, [FromBody] MergePatchSellableInventoryItemDto value)
 {
     try {
         SellableInventoryItemsControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value);
         _sellableInventoryItemApplicationService.When(value as IMergePatchSellableInventoryItem);
     } catch (Exception ex) { var response = SellableInventoryItemsControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); }
 }
        public async Task WhenAsync(MergePatchSellableInventoryItemDto c)
        {
            var idObj         = SellableInventoryItemProxyUtils.ToIdString((c as IMergePatchSellableInventoryItem).SellableInventoryItemId);
            var uriParameters = new SellableInventoryItemUriParameters();

            uriParameters.Id = idObj;

            var req  = new SellableInventoryItemPatchRequest(uriParameters, (MergePatchSellableInventoryItemDto)c);
            var resp = await _ramlClient.SellableInventoryItem.Patch(req);

            SellableInventoryItemProxyUtils.ThrowOnHttpResponseError(resp);
        }
 public void When(MergePatchSellableInventoryItemDto c)
 {
     WhenAsync(c).GetAwaiter().GetResult();
 }