public async Task WhenAsync(MergePatchPartyRoleDto c) { var idObj = PartyRoleProxyUtils.ToIdString((c as IMergePatchPartyRole).PartyRoleId); var uriParameters = new PartyRoleUriParameters(); uriParameters.Id = idObj; var req = new PartyRolePatchRequest(uriParameters, (MergePatchPartyRoleDto)c); var resp = await _ramlClient.PartyRole.Patch(req); PartyRoleProxyUtils.ThrowOnHttpResponseError(resp); }
public async Task <IPartyRoleEvent> GetStateEventAsync(PartyRoleId partyRoleId, long version) { var idObj = PartyRoleProxyUtils.ToIdString(partyRoleId); var uriParameters = new PartyRoleStateEventUriParameters(); uriParameters.Id = idObj; uriParameters.Version = version.ToString(); var req = new PartyRoleStateEventGetRequest(uriParameters); var resp = await _ramlClient.PartyRoleStateEvent.Get(req); PartyRoleProxyUtils.ThrowOnHttpResponseError(resp); return(resp.Content); }
public async Task <IPartyRoleState> GetHistoryStateAsync(PartyRoleId partyRoleId, long version) { var idObj = PartyRoleProxyUtils.ToIdString(partyRoleId); var uriParameters = new PartyRoleHistoryStateUriParameters(); uriParameters.Id = idObj; uriParameters.Version = version.ToString(); var req = new PartyRoleHistoryStateGetRequest(uriParameters); var resp = await _ramlClient.PartyRoleHistoryState.Get(req); PartyRoleProxyUtils.ThrowOnHttpResponseError(resp); return((resp.Content == null) ? null : resp.Content.ToPartyRoleState()); }
public async Task <IPartyRoleState> GetAsync(PartyRoleId partyRoleId) { IPartyRoleState state = null; var idObj = PartyRoleProxyUtils.ToIdString(partyRoleId); var uriParameters = new PartyRoleUriParameters(); uriParameters.Id = idObj; var req = new PartyRoleGetRequest(uriParameters); var resp = await _ramlClient.PartyRole.Get(req); PartyRoleProxyUtils.ThrowOnHttpResponseError(resp); state = (resp.Content == null) ? null : resp.Content.ToPartyRoleState(); return(state); }
public async Task WhenAsync(DeletePartyRoleDto c) { var idObj = PartyRoleProxyUtils.ToIdString((c as IDeletePartyRole).PartyRoleId); var uriParameters = new PartyRoleUriParameters(); uriParameters.Id = idObj; var q = new PartyRoleDeleteQuery(); q.CommandId = c.CommandId; q.RequesterId = c.RequesterId; q.Version = Convert.ToString(c.Version); var req = new PartyRoleDeleteRequest(uriParameters); req.Query = q; var resp = await _ramlClient.PartyRole.Delete(req); PartyRoleProxyUtils.ThrowOnHttpResponseError(resp); }