public void Patch(string id, [FromBody] MergePatchInventoryPostingRuleDto value) { try { InventoryPostingRulesControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value); _inventoryPostingRuleApplicationService.When(value as IMergePatchInventoryPostingRule); } catch (Exception ex) { var response = InventoryPostingRulesControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); } }
public async Task WhenAsync(MergePatchInventoryPostingRuleDto c) { var idObj = (c as IMergePatchInventoryPostingRule).InventoryPostingRuleId; var uriParameters = new InventoryPostingRuleUriParameters(); uriParameters.Id = idObj; var req = new InventoryPostingRulePatchRequest(uriParameters, (MergePatchInventoryPostingRuleDto)c); var resp = await _ramlClient.InventoryPostingRule.Patch(req); InventoryPostingRuleProxyUtils.ThrowOnHttpResponseError(resp); }
public void When(MergePatchInventoryPostingRuleDto c) { WhenAsync(c).GetAwaiter().GetResult(); }