/// <summary>
        /// update
        /// </summary>
        /// <param name="options"> Update SyncList parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of SyncList </returns>
        public static SyncListResource Update(UpdateSyncListOptions options, ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = client.Request(BuildUpdateRequest(options, client));

            return(FromJson(response.Content));
        }
 private static Request BuildUpdateRequest(UpdateSyncListOptions options, ITwilioRestClient client)
 {
     return(new Request(
                HttpMethod.Post,
                Rest.Domain.Sync,
                "/v1/Services/" + options.PathServiceSid + "/Lists/" + options.PathSid + "",
                postParams: options.GetParams()
                ));
 }
        /// <summary>
        /// update
        /// </summary>
        /// <param name="pathServiceSid"> The service_sid </param>
        /// <param name="pathSid"> The sid </param>
        /// <param name="ttl"> The ttl </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of SyncList </returns>
        public static async System.Threading.Tasks.Task <SyncListResource> UpdateAsync(string pathServiceSid,
                                                                                       string pathSid,
                                                                                       int?ttl = null,
                                                                                       ITwilioRestClient client = null)
        {
            var options = new UpdateSyncListOptions(pathServiceSid, pathSid)
            {
                Ttl = ttl
            };

            return(await UpdateAsync(options, client));
        }
        /// <summary>
        /// update
        /// </summary>
        /// <param name="pathServiceSid"> The service_sid </param>
        /// <param name="pathSid"> The sid </param>
        /// <param name="ttl"> The ttl </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of SyncList </returns>
        public static SyncListResource Update(string pathServiceSid,
                                              string pathSid,
                                              int?ttl = null,
                                              ITwilioRestClient client = null)
        {
            var options = new UpdateSyncListOptions(pathServiceSid, pathSid)
            {
                Ttl = ttl
            };

            return(Update(options, client));
        }
        /// <summary>
        /// update
        /// </summary>
        /// <param name="options"> Update SyncList parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of SyncList </returns>
        public static async System.Threading.Tasks.Task <SyncListResource> UpdateAsync(UpdateSyncListOptions options,
                                                                                       ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = await client.RequestAsync(BuildUpdateRequest(options, client));

            return(FromJson(response.Content));
        }