/// <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 AssistantInitiationActions </returns>
        public static async System.Threading.Tasks.Task <AssistantInitiationActionsResource> FetchAsync(string pathAssistantSid,
                                                                                                        ITwilioRestClient client = null)
        {
            var options = new FetchAssistantInitiationActionsOptions(pathAssistantSid);

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

            return(FromJson(response.Content));
        }
Exemple #3
0
 private static Request BuildFetchRequest(FetchAssistantInitiationActionsOptions options, ITwilioRestClient client)
 {
     return(new Request(
                HttpMethod.Get,
                Rest.Domain.Preview,
                "/understand/Assistants/" + options.PathAssistantSid + "/InitiationActions",
                queryParams: options.GetParams()
                ));
 }
        /// <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 AssistantInitiationActions </returns>
        public static AssistantInitiationActionsResource Fetch(string pathAssistantSid, ITwilioRestClient client = null)
        {
            var options = new FetchAssistantInitiationActionsOptions(pathAssistantSid);

            return(Fetch(options, client));
        }
        /// <summary>
        /// fetch
        /// </summary>
        /// <param name="options"> Fetch AssistantInitiationActions parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of AssistantInitiationActions </returns>
        public static async System.Threading.Tasks.Task <AssistantInitiationActionsResource> FetchAsync(FetchAssistantInitiationActionsOptions options,
                                                                                                        ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = await client.RequestAsync(BuildFetchRequest(options, client));

            return(FromJson(response.Content));
        }