Exemplo n.º 1
0
        /// <summary>
        /// fetch
        /// </summary>
        /// <param name="pathAssistantSid"> The assistant_sid </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> FetchAsync(string pathAssistantSid,
                                                                                                      ITwilioRestClient client = null)
        {
            var options = new FetchAssistantFallbackActionsOptions(pathAssistantSid);

            return(await FetchAsync(options, client));
        }
Exemplo n.º 2
0
        /// <summary>
        /// fetch
        /// </summary>
        /// <param name="options"> Fetch AssistantFallbackActions parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of AssistantFallbackActions </returns>
        public static AssistantFallbackActionsResource Fetch(FetchAssistantFallbackActionsOptions options,
                                                             ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = client.Request(BuildFetchRequest(options, client));

            return(FromJson(response.Content));
        }
Exemplo n.º 3
0
 private static Request BuildFetchRequest(FetchAssistantFallbackActionsOptions options, ITwilioRestClient client)
 {
     return(new Request(
                HttpMethod.Get,
                Rest.Domain.Preview,
                "/understand/Assistants/" + options.PathAssistantSid + "/FallbackActions",
                queryParams: options.GetParams()
                ));
 }
Exemplo n.º 4
0
        /// <summary>
        /// fetch
        /// </summary>
        /// <param name="pathAssistantSid"> The assistant_sid </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of AssistantFallbackActions </returns>
        public static AssistantFallbackActionsResource Fetch(string pathAssistantSid, ITwilioRestClient client = null)
        {
            var options = new FetchAssistantFallbackActionsOptions(pathAssistantSid);

            return(Fetch(options, client));
        }
Exemplo n.º 5
0
        /// <summary>
        /// fetch
        /// </summary>
        /// <param name="options"> Fetch 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> FetchAsync(FetchAssistantFallbackActionsOptions options,
                                                                                                      ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = await client.RequestAsync(BuildFetchRequest(options, client));

            return(FromJson(response.Content));
        }