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

            return(FromJson(response.Content));
        }
Beispiel #2
0
 /// <summary>
 /// update
 /// </summary>
 /// <param name="options"> Update Task parameters </param>
 /// <param name="client"> Client to make requests to Twilio </param>
 /// <returns> Task that resolves to A single instance of Task </returns> 
 public static async System.Threading.Tasks.Task<TaskResource> UpdateAsync(UpdateTaskOptions options, 
                                                                           ITwilioRestClient client = null)
 {
     client = client ?? TwilioClient.GetRestClient();
     var response = await client.RequestAsync(BuildUpdateRequest(options, client));
     return FromJson(response.Content);
 }
Beispiel #3
0
 private static Request BuildUpdateRequest(UpdateTaskOptions options, ITwilioRestClient client)
 {
     return(new Request(
                HttpMethod.Post,
                Rest.Domain.Autopilot,
                "/v1/Assistants/" + options.PathAssistantSid + "/Tasks/" + options.PathSid + "",
                postParams: options.GetParams()
                ));
 }
Beispiel #4
0
 /// <summary>
 /// update
 /// </summary>
 /// <param name="pathAssistantSid"> The SID of the Assistant that is the parent of the resource to update </param>
 /// <param name="pathSid"> The unique string that identifies the resource </param>
 /// <param name="friendlyName"> A string to describe the resource </param>
 /// <param name="uniqueName"> An application-defined string that uniquely identifies the resource </param>
 /// <param name="actions"> The JSON string that specifies the actions that instruct the Assistant on how to perform the
 ///               task </param>
 /// <param name="actionsUrl"> The URL from which the Assistant can fetch actions </param>
 /// <param name="client"> Client to make requests to Twilio </param>
 /// <returns> Task that resolves to A single instance of Task </returns> 
 public static async System.Threading.Tasks.Task<TaskResource> UpdateAsync(string pathAssistantSid, 
                                                                           string pathSid, 
                                                                           string friendlyName = null, 
                                                                           string uniqueName = null, 
                                                                           object actions = null, 
                                                                           Uri actionsUrl = null, 
                                                                           ITwilioRestClient client = null)
 {
     var options = new UpdateTaskOptions(pathAssistantSid, pathSid){FriendlyName = friendlyName, UniqueName = uniqueName, Actions = actions, ActionsUrl = actionsUrl};
     return await UpdateAsync(options, client);
 }
Beispiel #5
0
 /// <summary>
 /// update
 /// </summary>
 /// <param name="pathAssistantSid"> The SID of the Assistant that is the parent of the resource to update </param>
 /// <param name="pathSid"> The unique string that identifies the resource </param>
 /// <param name="friendlyName"> A string to describe the resource </param>
 /// <param name="uniqueName"> An application-defined string that uniquely identifies the resource </param>
 /// <param name="actions"> The JSON string that specifies the actions that instruct the Assistant on how to perform the
 ///               task </param>
 /// <param name="actionsUrl"> The URL from which the Assistant can fetch actions </param>
 /// <param name="client"> Client to make requests to Twilio </param>
 /// <returns> A single instance of Task </returns> 
 public static TaskResource Update(string pathAssistantSid, 
                                   string pathSid, 
                                   string friendlyName = null, 
                                   string uniqueName = null, 
                                   object actions = null, 
                                   Uri actionsUrl = null, 
                                   ITwilioRestClient client = null)
 {
     var options = new UpdateTaskOptions(pathAssistantSid, pathSid){FriendlyName = friendlyName, UniqueName = uniqueName, Actions = actions, ActionsUrl = actionsUrl};
     return Update(options, client);
 }