Пример #1
0
        public async Task WhenAsync(MergePatchInOutDto c)
        {
            var idObj         = (c as IMergePatchInOut).DocumentNumber;
            var uriParameters = new InOutUriParameters();

            uriParameters.Id = idObj;

            var req  = new InOutPatchRequest(uriParameters, (MergePatchInOutDto)c);
            var resp = await _ramlClient.InOut.Patch(req);

            InOutProxyUtils.ThrowOnHttpResponseError(resp);
        }
Пример #2
0
        public async Task <IInOutState> GetAsync(string documentNumber)
        {
            IInOutState state         = null;
            var         idObj         = documentNumber;
            var         uriParameters = new InOutUriParameters();

            uriParameters.Id = idObj;

            var req = new InOutGetRequest(uriParameters);

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

            InOutProxyUtils.ThrowOnHttpResponseError(resp);
            state = (resp.Content == null) ? null : resp.Content.ToInOutState();
            return(state);
        }
Пример #3
0
        public async Task WhenAsync(DeleteInOutDto c)
        {
            var idObj         = (c as IDeleteInOut).DocumentNumber;
            var uriParameters = new InOutUriParameters();

            uriParameters.Id = idObj;

            var q = new InOutDeleteQuery();

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

            var req = new InOutDeleteRequest(uriParameters);

            req.Query = q;

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

            InOutProxyUtils.ThrowOnHttpResponseError(resp);
        }