public async Task WhenAsync(MergePatchUomDto c) { var idObj = (c as IMergePatchUom).UomId; var uriParameters = new UomUriParameters(); uriParameters.Id = idObj; var req = new UomPatchRequest(uriParameters, (MergePatchUomDto)c); var resp = await _ramlClient.Uom.Patch(req); UomProxyUtils.ThrowOnHttpResponseError(resp); }
public async Task <IUomState> GetAsync(string uomId) { IUomState state = null; var idObj = uomId; var uriParameters = new UomUriParameters(); uriParameters.Id = idObj; var req = new UomGetRequest(uriParameters); var resp = await _ramlClient.Uom.Get(req); UomProxyUtils.ThrowOnHttpResponseError(resp); state = (resp.Content == null) ? null : resp.Content.ToUomState(); return(state); }
public async Task WhenAsync(DeleteUomDto c) { var idObj = (c as IDeleteUom).UomId; var uriParameters = new UomUriParameters(); uriParameters.Id = idObj; var q = new UomDeleteQuery(); q.CommandId = c.CommandId; q.RequesterId = c.RequesterId; q.Version = Convert.ToString(c.Version); var req = new UomDeleteRequest(uriParameters); req.Query = q; var resp = await _ramlClient.Uom.Delete(req); UomProxyUtils.ThrowOnHttpResponseError(resp); }