public async Task WhenAsync(MergePatchUomTypeDto c) { var idObj = (c as IMergePatchUomType).UomTypeId; var uriParameters = new UomTypeUriParameters(); uriParameters.Id = idObj; var req = new UomTypePatchRequest(uriParameters, (MergePatchUomTypeDto)c); var resp = await _ramlClient.UomType.Patch(req); UomTypeProxyUtils.ThrowOnHttpResponseError(resp); }
public async Task <IUomTypeState> GetAsync(string uomTypeId) { IUomTypeState state = null; var idObj = uomTypeId; var uriParameters = new UomTypeUriParameters(); uriParameters.Id = idObj; var req = new UomTypeGetRequest(uriParameters); var resp = await _ramlClient.UomType.Get(req); UomTypeProxyUtils.ThrowOnHttpResponseError(resp); state = (resp.Content == null) ? null : resp.Content.ToUomTypeState(); return(state); }
public async Task WhenAsync(DeleteUomTypeDto c) { var idObj = (c as IDeleteUomType).UomTypeId; var uriParameters = new UomTypeUriParameters(); uriParameters.Id = idObj; var q = new UomTypeDeleteQuery(); q.CommandId = c.CommandId; q.RequesterId = c.RequesterId; q.Version = Convert.ToString(c.Version); var req = new UomTypeDeleteRequest(uriParameters); req.Query = q; var resp = await _ramlClient.UomType.Delete(req); UomTypeProxyUtils.ThrowOnHttpResponseError(resp); }