コード例 #1
0
        /// <summary>
        /// update
        /// </summary>
        /// <param name="options"> Update SyncMap parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of SyncMap </returns>
        public static SyncMapResource Update(UpdateSyncMapOptions 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(UpdateSyncMapOptions options, ITwilioRestClient client)
 {
     return(new Request(
                HttpMethod.Post,
                Rest.Domain.Sync,
                "/v1/Services/" + options.PathServiceSid + "/Maps/" + options.PathSid + "",
                postParams: options.GetParams()
                ));
 }
コード例 #3
0
        /// <summary>
        /// update
        /// </summary>
        /// <param name="pathServiceSid"> The service_sid </param>
        /// <param name="pathSid"> The sid </param>
        /// <param name="ttl"> New time-to-live of this Map in seconds. </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of SyncMap </returns>
        public static async System.Threading.Tasks.Task <SyncMapResource> UpdateAsync(string pathServiceSid,
                                                                                      string pathSid,
                                                                                      int?ttl = null,
                                                                                      ITwilioRestClient client = null)
        {
            var options = new UpdateSyncMapOptions(pathServiceSid, pathSid)
            {
                Ttl = ttl
            };

            return(await UpdateAsync(options, client));
        }
コード例 #4
0
        /// <summary>
        /// update
        /// </summary>
        /// <param name="pathServiceSid"> The service_sid </param>
        /// <param name="pathSid"> The sid </param>
        /// <param name="ttl"> New time-to-live of this Map in seconds. </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of SyncMap </returns>
        public static SyncMapResource Update(string pathServiceSid,
                                             string pathSid,
                                             int?ttl = null,
                                             ITwilioRestClient client = null)
        {
            var options = new UpdateSyncMapOptions(pathServiceSid, pathSid)
            {
                Ttl = ttl
            };

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

            return(FromJson(response.Content));
        }