コード例 #1
0
        /// <summary>
        /// update
        /// </summary>
        /// <param name="options"> Update WebChannel parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of WebChannel </returns>
        public static WebChannelResource Update(UpdateWebChannelOptions options, ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = client.Request(BuildUpdateRequest(options, client));

            return(FromJson(response.Content));
        }
コード例 #2
0
 private static Request BuildUpdateRequest(UpdateWebChannelOptions options, ITwilioRestClient client)
 {
     return(new Request(
                HttpMethod.Post,
                Rest.Domain.FlexApi,
                "/v1/WebChannels/" + options.PathSid + "",
                postParams: options.GetParams()
                ));
 }
コード例 #3
0
        /// <summary>
        /// update
        /// </summary>
        /// <param name="pathSid"> The SID that identifies the resource to update </param>
        /// <param name="chatStatus"> The chat status </param>
        /// <param name="postEngagementData"> The post-engagement data </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of WebChannel </returns>
        public static async System.Threading.Tasks.Task <WebChannelResource> UpdateAsync(string pathSid,
                                                                                         WebChannelResource.ChatStatusEnum chatStatus = null,
                                                                                         string postEngagementData = null,
                                                                                         ITwilioRestClient client  = null)
        {
            var options = new UpdateWebChannelOptions(pathSid)
            {
                ChatStatus = chatStatus, PostEngagementData = postEngagementData
            };

            return(await UpdateAsync(options, client));
        }
コード例 #4
0
        /// <summary>
        /// update
        /// </summary>
        /// <param name="pathSid"> The SID that identifies the resource to update </param>
        /// <param name="chatStatus"> The chat status </param>
        /// <param name="postEngagementData"> The post-engagement data </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of WebChannel </returns>
        public static WebChannelResource Update(string pathSid,
                                                WebChannelResource.ChatStatusEnum chatStatus = null,
                                                string postEngagementData = null,
                                                ITwilioRestClient client  = null)
        {
            var options = new UpdateWebChannelOptions(pathSid)
            {
                ChatStatus = chatStatus, PostEngagementData = postEngagementData
            };

            return(Update(options, client));
        }
コード例 #5
0
        /// <summary>
        /// update
        /// </summary>
        /// <param name="options"> Update WebChannel parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of WebChannel </returns>
        public static async System.Threading.Tasks.Task <WebChannelResource> UpdateAsync(UpdateWebChannelOptions options,
                                                                                         ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = await client.RequestAsync(BuildUpdateRequest(options, client));

            return(FromJson(response.Content));
        }