public async Task WhenAsync(MergePatchAudienceDto c)
        {
            var idObj         = (c as IMergePatchAudience).ClientId;
            var uriParameters = new AudienceUriParameters();

            uriParameters.Id = idObj;

            var req  = new AudiencePatchRequest(uriParameters, (MergePatchAudienceDto)c);
            var resp = await _ramlClient.Audience.Patch(req);

            AudienceProxyUtils.ThrowOnHttpResponseError(resp);
        }
        public async Task <IAudienceState> GetAsync(string clientId)
        {
            IAudienceState state         = null;
            var            idObj         = clientId;
            var            uriParameters = new AudienceUriParameters();

            uriParameters.Id = idObj;

            var req = new AudienceGetRequest(uriParameters);

            var resp = await _ramlClient.Audience.Get(req);

            AudienceProxyUtils.ThrowOnHttpResponseError(resp);
            state = resp.Content;
            return(state);
        }
        public async Task WhenAsync(DeleteAudienceDto c)
        {
            var idObj         = (c as IDeleteAudience).ClientId;
            var uriParameters = new AudienceUriParameters();

            uriParameters.Id = idObj;

            var q = new AudienceDeleteQuery();

            q.CommandId   = c.CommandId;
            q.RequesterId = c.RequesterId;
            q.Version     = Convert.ToString(c.Version);

            var req = new AudienceDeleteRequest(uriParameters);

            req.Query = q;

            var resp = await _ramlClient.Audience.Delete(req);

            AudienceProxyUtils.ThrowOnHttpResponseError(resp);
        }