public async Task WhenAsync(MergePatchDamageReasonDto c) { var idObj = (c as IMergePatchDamageReason).DamageReasonId; var uriParameters = new DamageReasonUriParameters(); uriParameters.Id = idObj; var req = new DamageReasonPatchRequest(uriParameters, (MergePatchDamageReasonDto)c); var resp = await _ramlClient.DamageReason.Patch(req); DamageReasonProxyUtils.ThrowOnHttpResponseError(resp); }
public async Task <IDamageReasonState> GetAsync(string damageReasonId) { IDamageReasonState state = null; var idObj = damageReasonId; var uriParameters = new DamageReasonUriParameters(); uriParameters.Id = idObj; var req = new DamageReasonGetRequest(uriParameters); var resp = await _ramlClient.DamageReason.Get(req); DamageReasonProxyUtils.ThrowOnHttpResponseError(resp); state = (resp.Content == null) ? null : resp.Content.ToDamageReasonState(); return(state); }
public async Task WhenAsync(DeleteDamageReasonDto c) { var idObj = (c as IDeleteDamageReason).DamageReasonId; var uriParameters = new DamageReasonUriParameters(); uriParameters.Id = idObj; var q = new DamageReasonDeleteQuery(); q.CommandId = c.CommandId; q.RequesterId = c.RequesterId; q.Version = Convert.ToString(c.Version); var req = new DamageReasonDeleteRequest(uriParameters); req.Query = q; var resp = await _ramlClient.DamageReason.Delete(req); DamageReasonProxyUtils.ThrowOnHttpResponseError(resp); }