Ejemplo n.º 1
0
        /// <summary>
        /// update
        /// </summary>
        /// <param name="options"> Update IntentActions parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of IntentActions </returns>
        public static IntentActionsResource Update(UpdateIntentActionsOptions options, ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = client.Request(BuildUpdateRequest(options, client));

            return(FromJson(response.Content));
        }
Ejemplo n.º 2
0
 private static Request BuildUpdateRequest(UpdateIntentActionsOptions options, ITwilioRestClient client)
 {
     return(new Request(
                HttpMethod.Post,
                Rest.Domain.Preview,
                "/understand/Assistants/" + options.PathAssistantSid + "/Intents/" + options.PathIntentSid + "/Actions",
                client.Region,
                postParams: options.GetParams()
                ));
 }
Ejemplo n.º 3
0
        /// <summary>
        /// update
        /// </summary>
        /// <param name="pathAssistantSid"> The assistant_sid </param>
        /// <param name="pathIntentSid"> The intent_sid </param>
        /// <param name="actions"> The actions </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of IntentActions </returns>
        public static async System.Threading.Tasks.Task <IntentActionsResource> UpdateAsync(string pathAssistantSid,
                                                                                            string pathIntentSid,
                                                                                            object actions           = null,
                                                                                            ITwilioRestClient client = null)
        {
            var options = new UpdateIntentActionsOptions(pathAssistantSid, pathIntentSid)
            {
                Actions = actions
            };

            return(await UpdateAsync(options, client));
        }
Ejemplo n.º 4
0
        /// <summary>
        /// update
        /// </summary>
        /// <param name="pathAssistantSid"> The assistant_sid </param>
        /// <param name="pathIntentSid"> The intent_sid </param>
        /// <param name="actions"> The actions </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of IntentActions </returns>
        public static IntentActionsResource Update(string pathAssistantSid,
                                                   string pathIntentSid,
                                                   object actions           = null,
                                                   ITwilioRestClient client = null)
        {
            var options = new UpdateIntentActionsOptions(pathAssistantSid, pathIntentSid)
            {
                Actions = actions
            };

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

            return(FromJson(response.Content));
        }