/// <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)); }
private static Request BuildUpdateRequest(UpdateSyncListItemOptions options, ITwilioRestClient client) { return(new Request( HttpMethod.Post, Rest.Domain.Sync, "/v1/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="pathServiceSid"> The SID of the Sync Service with the Sync List Item resource to update </param> /// <param name="pathListSid"> The SID of the Sync List with the Sync List Item resource to update </param> /// <param name="pathIndex"> The index of the Sync List Item resource to update </param> /// <param name="data"> A JSON string that represents an arbitrary, schema-less object that the List Item stores /// </param> /// <param name="ttl"> An alias for item_ttl </param> /// <param name="itemTtl"> How long, in seconds, before the List Item expires </param> /// <param name="collectionTtl"> How long, in seconds, before the List Item's parent Sync List expires </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 = null, int?ttl = null, int?itemTtl = null, int?collectionTtl = null, ITwilioRestClient client = null) { var options = new UpdateSyncListItemOptions(pathServiceSid, pathListSid, pathIndex) { Data = data, Ttl = ttl, ItemTtl = itemTtl, CollectionTtl = collectionTtl }; return(await UpdateAsync(options, client)); }
/// <summary> /// update /// </summary> /// <param name="pathServiceSid"> The SID of the Sync Service with the Sync List Item resource to update </param> /// <param name="pathListSid"> The SID of the Sync List with the Sync List Item resource to update </param> /// <param name="pathIndex"> The index of the Sync List Item resource to update </param> /// <param name="data"> A JSON string that represents an arbitrary, schema-less object that the List Item stores /// </param> /// <param name="ttl"> An alias for item_ttl </param> /// <param name="itemTtl"> How long, in seconds, before the List Item expires </param> /// <param name="collectionTtl"> How long, in seconds, before the List Item's parent Sync List expires </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 = null, int?ttl = null, int?itemTtl = null, int?collectionTtl = null, ITwilioRestClient client = null) { var options = new UpdateSyncListItemOptions(pathServiceSid, pathListSid, pathIndex) { Data = data, Ttl = ttl, ItemTtl = itemTtl, CollectionTtl = collectionTtl }; 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)); }