/// <summary>
        /// update
        /// </summary>
        /// <param name="options"> Update SyncListItem parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of SyncListItem </returns>
        public static SyncListItemResource Update(UpdateSyncListItemOptions 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(UpdateSyncListItemOptions options, ITwilioRestClient client)
 {
     return(new Request(
                HttpMethod.Post,
                Rest.Domain.Preview,
                "/Sync/Services/" + options.PathServiceSid + "/Lists/" + options.PathListSid + "/Items/" + options.PathIndex + "",
                postParams: options.GetParams()
                ));
 }
        /// <summary>
        /// update
        /// </summary>
        /// <param name="pathServiceSid"> The service_sid </param>
        /// <param name="pathListSid"> The list_sid </param>
        /// <param name="pathIndex"> The index </param>
        /// <param name="data"> The data </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of SyncListItem </returns>
        public static async System.Threading.Tasks.Task <SyncListItemResource> UpdateAsync(string pathServiceSid,
                                                                                           string pathListSid,
                                                                                           int?pathIndex,
                                                                                           object data,
                                                                                           ITwilioRestClient client = null)
        {
            var options = new UpdateSyncListItemOptions(pathServiceSid, pathListSid, pathIndex, data);

            return(await UpdateAsync(options, client));
        }
        /// <summary>
        /// update
        /// </summary>
        /// <param name="pathServiceSid"> The service_sid </param>
        /// <param name="pathListSid"> The list_sid </param>
        /// <param name="pathIndex"> The index </param>
        /// <param name="data"> The data </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of SyncListItem </returns>
        public static SyncListItemResource Update(string pathServiceSid,
                                                  string pathListSid,
                                                  int?pathIndex,
                                                  object data,
                                                  ITwilioRestClient client = null)
        {
            var options = new UpdateSyncListItemOptions(pathServiceSid, pathListSid, pathIndex, data);

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

            return(FromJson(response.Content));
        }