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); }
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); }
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); }