public async Task WhenAsync(MergePatchOrganizationDto c) { var idObj = (c as IMergePatchOrganization).OrganizationId; var uriParameters = new OrganizationUriParameters(); uriParameters.Id = idObj; var req = new OrganizationPatchRequest(uriParameters, (MergePatchOrganizationDto)c); var resp = await _ramlClient.Organization.Patch(req); OrganizationProxyUtils.ThrowOnHttpResponseError(resp); }
public async Task <IOrganizationState> GetAsync(string organizationId) { IOrganizationState state = null; var idObj = organizationId; var uriParameters = new OrganizationUriParameters(); uriParameters.Id = idObj; var req = new OrganizationGetRequest(uriParameters); var resp = await _ramlClient.Organization.Get(req); OrganizationProxyUtils.ThrowOnHttpResponseError(resp); state = (resp.Content == null) ? null : resp.Content.ToOrganizationState(); return(state); }
public async Task WhenAsync(DeleteOrganizationDto c) { var idObj = (c as IDeleteOrganization).OrganizationId; var uriParameters = new OrganizationUriParameters(); uriParameters.Id = idObj; var q = new OrganizationDeleteQuery(); q.CommandId = c.CommandId; q.RequesterId = c.RequesterId; q.Version = Convert.ToString(c.Version); var req = new OrganizationDeleteRequest(uriParameters); req.Query = q; var resp = await _ramlClient.Organization.Delete(req); OrganizationProxyUtils.ThrowOnHttpResponseError(resp); }