public bool Update(Channel channel)
        {
            var channelXml = channel.ToXml().Replace("'", "'");

            var request = CreateRequest().ForOperation(Operations.Channels.UpdateChannel);
            request.AddPostData("channel", channelXml);
            request.AddPostData("override", "true");

            var response = request.Execute();
            return Boolean.Parse(response.Content);
        }
        public Channel GetChannel(string channelId)
        {
            if (Session.IsMirthVersion(MirthBaseVersion.V3x))
                return GetChannels(new[] {channelId}).FirstOrDefault();

            var channel = new Channel {Id = channelId}.ToXml();
            var request = CreateRequest().ForOperation(Operations.Channels.GetChannel);
            request.AddPostData("channel", channel);

            var response = request.Execute();
            var channelList = response.Content.ToObject<ChannelList>();

            return channelList.Channels.FirstOrDefault();
        }