Пример #1
0
        /// <summary>
        /// update
        /// </summary>
        /// <param name="options"> Update AssistantFallbackActions parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of AssistantFallbackActions </returns>
        public static AssistantFallbackActionsResource Update(UpdateAssistantFallbackActionsOptions 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(UpdateAssistantFallbackActionsOptions options, ITwilioRestClient client)
 {
     return(new Request(
                HttpMethod.Post,
                Rest.Domain.Preview,
                "/understand/Assistants/" + options.PathAssistantSid + "/FallbackActions",
                postParams: options.GetParams()
                ));
 }
Пример #3
0
        /// <summary>
        /// update
        /// </summary>
        /// <param name="pathAssistantSid"> The assistant_sid </param>
        /// <param name="fallbackActions"> The fallback_actions </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of AssistantFallbackActions </returns>
        public static async System.Threading.Tasks.Task <AssistantFallbackActionsResource> UpdateAsync(string pathAssistantSid,
                                                                                                       object fallbackActions   = null,
                                                                                                       ITwilioRestClient client = null)
        {
            var options = new UpdateAssistantFallbackActionsOptions(pathAssistantSid)
            {
                FallbackActions = fallbackActions
            };

            return(await UpdateAsync(options, client));
        }
Пример #4
0
        /// <summary>
        /// update
        /// </summary>
        /// <param name="pathAssistantSid"> The assistant_sid </param>
        /// <param name="fallbackActions"> The fallback_actions </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of AssistantFallbackActions </returns>
        public static AssistantFallbackActionsResource Update(string pathAssistantSid,
                                                              object fallbackActions   = null,
                                                              ITwilioRestClient client = null)
        {
            var options = new UpdateAssistantFallbackActionsOptions(pathAssistantSid)
            {
                FallbackActions = fallbackActions
            };

            return(Update(options, client));
        }
Пример #5
0
        /// <summary>
        /// update
        /// </summary>
        /// <param name="options"> Update AssistantFallbackActions parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of AssistantFallbackActions </returns>
        public static async System.Threading.Tasks.Task <AssistantFallbackActionsResource> UpdateAsync(UpdateAssistantFallbackActionsOptions options,
                                                                                                       ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = await client.RequestAsync(BuildUpdateRequest(options, client));

            return(FromJson(response.Content));
        }