/// <summary>
        /// Update an s access to a specific Sync List.
        /// </summary>
        /// <param name="options"> Update Service parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of Service </returns>
        public static ServiceResource Update(UpdateServiceOptions options, ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = client.Request(BuildUpdateRequest(options, client));

            return(FromJson(response.Content));
        }
示例#2
0
        /// <summary>
        /// Update an s access to a specific Sync List.
        /// </summary>
        ///
        /// <param name="pathSid"> A string that uniquely identifies this Service. </param>
        /// <param name="friendlyName"> A human readable description of this resource </param>
        /// <param name="autoCreate"> Boolean flag specifying whether to auto-create threads. </param>
        /// <param name="callbackUrl"> URL Twilio will request for callbacks. </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of Service </returns>
        public static async System.Threading.Tasks.Task <ServiceResource> UpdateAsync(string pathSid, string friendlyName = null, bool?autoCreate = null, Uri callbackUrl = null, ITwilioRestClient client = null)
        {
            var options = new UpdateServiceOptions(pathSid)
            {
                FriendlyName = friendlyName, AutoCreate = autoCreate, CallbackUrl = callbackUrl
            };

            return(await UpdateAsync(options, client));
        }
示例#3
0
        /// <summary>
        /// Update an s access to a specific Sync List.
        /// </summary>
        ///
        /// <param name="pathSid"> A string that uniquely identifies this Service. </param>
        /// <param name="friendlyName"> A human readable description of this resource </param>
        /// <param name="autoCreate"> Boolean flag specifying whether to auto-create threads. </param>
        /// <param name="callbackUrl"> URL Twilio will request for callbacks. </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of Service </returns>
        public static ServiceResource Update(string pathSid, string friendlyName = null, bool?autoCreate = null, Uri callbackUrl = null, ITwilioRestClient client = null)
        {
            var options = new UpdateServiceOptions(pathSid)
            {
                FriendlyName = friendlyName, AutoCreate = autoCreate, CallbackUrl = callbackUrl
            };

            return(Update(options, client));
        }
 private static Request BuildUpdateRequest(UpdateServiceOptions options, ITwilioRestClient client)
 {
     return(new Request(
                HttpMethod.Post,
                Rest.Domain.Preview,
                "/Proxy/Services/" + options.PathSid + "",
                client.Region,
                postParams: options.GetParams()
                ));
 }
        /// <summary>
        /// Update an s access to a specific Sync List.
        /// </summary>
        /// <param name="options"> Update Service parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of Service </returns>
        public static async System.Threading.Tasks.Task <ServiceResource> UpdateAsync(UpdateServiceOptions options,
                                                                                      ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = await client.RequestAsync(BuildUpdateRequest(options, client));

            return(FromJson(response.Content));
        }