Beispiel #1
0
 public void Patch(string id, [FromBody] MergePatchMovementConfirmationDto value)
 {
     try {
         MovementConfirmationsControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value);
         _movementConfirmationApplicationService.When(value as IMergePatchMovementConfirmation);
     } catch (Exception ex) { var response = MovementConfirmationsControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); }
 }
        public async Task WhenAsync(MergePatchMovementConfirmationDto c)
        {
            var idObj         = (c as IMergePatchMovementConfirmation).DocumentNumber;
            var uriParameters = new MovementConfirmationUriParameters();

            uriParameters.Id = idObj;

            var req  = new MovementConfirmationPatchRequest(uriParameters, (MergePatchMovementConfirmationDto)c);
            var resp = await _ramlClient.MovementConfirmation.Patch(req);

            MovementConfirmationProxyUtils.ThrowOnHttpResponseError(resp);
        }
 public void When(MergePatchMovementConfirmationDto c)
 {
     WhenAsync(c).GetAwaiter().GetResult();
 }