/// <summary> /// Returns Style sheet JSON object for this Assistant /// </summary> /// <param name="pathAssistantSid"> The unique ID of the Assistant </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of StyleSheet </returns> public static async System.Threading.Tasks.Task <StyleSheetResource> FetchAsync(string pathAssistantSid, ITwilioRestClient client = null) { var options = new FetchStyleSheetOptions(pathAssistantSid); return(await FetchAsync(options, client)); }
/// <summary> /// Returns Style sheet JSON object for this Assistant /// </summary> /// <param name="options"> Fetch StyleSheet parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of StyleSheet </returns> public static StyleSheetResource Fetch(FetchStyleSheetOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = client.Request(BuildFetchRequest(options, client)); return(FromJson(response.Content)); }
private static Request BuildFetchRequest(FetchStyleSheetOptions options, ITwilioRestClient client) { return(new Request( HttpMethod.Get, Rest.Domain.Preview, "/understand/Assistants/" + options.PathAssistantSid + "/StyleSheet", queryParams: options.GetParams() )); }
/// <summary> /// Returns Style sheet JSON object for this Assistant /// </summary> /// <param name="pathAssistantSid"> The unique ID of the Assistant </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of StyleSheet </returns> public static StyleSheetResource Fetch(string pathAssistantSid, ITwilioRestClient client = null) { var options = new FetchStyleSheetOptions(pathAssistantSid); return(Fetch(options, client)); }
/// <summary> /// Returns Style sheet JSON object for this Assistant /// </summary> /// <param name="options"> Fetch StyleSheet parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of StyleSheet </returns> public static async System.Threading.Tasks.Task <StyleSheetResource> FetchAsync(FetchStyleSheetOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = await client.RequestAsync(BuildFetchRequest(options, client)); return(FromJson(response.Content)); }