public void Patch(string id, [FromBody] MergePatchPhysicalInventoryDto value) { try { PhysicalInventoriesControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value); _physicalInventoryApplicationService.When(value as IMergePatchPhysicalInventory); } catch (Exception ex) { var response = HttpServiceExceptionUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); } }
public async Task WhenAsync(MergePatchPhysicalInventoryDto c) { var idObj = (c as IMergePatchPhysicalInventory).DocumentNumber; var uriParameters = new PhysicalInventoryUriParameters(); uriParameters.Id = idObj; var req = new PhysicalInventoryPatchRequest(uriParameters, (MergePatchPhysicalInventoryDto)c); var resp = await _ramlClient.PhysicalInventory.Patch(req); PhysicalInventoryProxyUtils.ThrowOnHttpResponseError(resp); }
public void When(MergePatchPhysicalInventoryDto c) { WhenAsync(c).GetAwaiter().GetResult(); }