public async Task WhenAsync(MergePatchContactMechDto c) { var idObj = (c as IMergePatchContactMech).ContactMechId; var uriParameters = new ContactMechUriParameters(); uriParameters.Id = idObj; var req = new ContactMechPatchRequest(uriParameters, (MergePatchContactMechDto)c); var resp = await _ramlClient.ContactMech.Patch(req); ContactMechProxyUtils.ThrowOnHttpResponseError(resp); }
public async Task <IContactMechState> GetAsync(string contactMechId) { IContactMechState state = null; var idObj = contactMechId; var uriParameters = new ContactMechUriParameters(); uriParameters.Id = idObj; var req = new ContactMechGetRequest(uriParameters); var resp = await _ramlClient.ContactMech.Get(req); ContactMechProxyUtils.ThrowOnHttpResponseError(resp); state = (resp.Content == null) ? null : resp.Content.ToContactMechState(); return(state); }
public async Task WhenAsync(DeleteContactMechDto c) { var idObj = (c as IDeleteContactMech).ContactMechId; var uriParameters = new ContactMechUriParameters(); uriParameters.Id = idObj; var q = new ContactMechDeleteQuery(); q.CommandId = c.CommandId; q.RequesterId = c.RequesterId; q.Version = Convert.ToString(c.Version); var req = new ContactMechDeleteRequest(uriParameters); req.Query = q; var resp = await _ramlClient.ContactMech.Delete(req); ContactMechProxyUtils.ThrowOnHttpResponseError(resp); }