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 async Task <IMovementConfirmationState> GetAsync(string documentNumber)
        {
            IMovementConfirmationState state = null;
            var idObj         = documentNumber;
            var uriParameters = new MovementConfirmationUriParameters();

            uriParameters.Id = idObj;

            var req = new MovementConfirmationGetRequest(uriParameters);

            var resp = await _ramlClient.MovementConfirmation.Get(req);

            MovementConfirmationProxyUtils.ThrowOnHttpResponseError(resp);
            state = (resp.Content == null) ? null : resp.Content.ToMovementConfirmationState();
            return(state);
        }
        public async Task WhenAsync(DeleteMovementConfirmationDto c)
        {
            var idObj         = (c as IDeleteMovementConfirmation).DocumentNumber;
            var uriParameters = new MovementConfirmationUriParameters();

            uriParameters.Id = idObj;

            var q = new MovementConfirmationDeleteQuery();

            q.CommandId   = c.CommandId;
            q.RequesterId = c.RequesterId;
            q.Version     = Convert.ToString(c.Version);

            var req = new MovementConfirmationDeleteRequest(uriParameters);

            req.Query = q;

            var resp = await _ramlClient.MovementConfirmation.Delete(req);

            MovementConfirmationProxyUtils.ThrowOnHttpResponseError(resp);
        }