/// <summary> /// Updates the style sheet for an Assistant identified by `assistant_sid`. /// </summary> /// <param name="options"> Update StyleSheet parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of StyleSheet </returns> public static StyleSheetResource Update(UpdateStyleSheetOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = client.Request(BuildUpdateRequest(options, client)); return(FromJson(response.Content)); }
private static Request BuildUpdateRequest(UpdateStyleSheetOptions options, ITwilioRestClient client) { return(new Request( HttpMethod.Post, Rest.Domain.Autopilot, "/v1/Assistants/" + options.PathAssistantSid + "/StyleSheet", postParams: options.GetParams() )); }
/// <summary> /// Updates the style sheet for an Assistant identified by `assistant_sid`. /// </summary> /// <param name="pathAssistantSid"> The SID of the Assistant with the StyleSheet resource to update </param> /// <param name="styleSheet"> The JSON string that describes the style sheet object </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> UpdateAsync(string pathAssistantSid, object styleSheet = null, ITwilioRestClient client = null) { var options = new UpdateStyleSheetOptions(pathAssistantSid) { StyleSheet = styleSheet }; return(await UpdateAsync(options, client)); }
/// <summary> /// Updates the style sheet for an Assistant identified by `assistant_sid`. /// </summary> /// <param name="pathAssistantSid"> The SID of the Assistant with the StyleSheet resource to update </param> /// <param name="styleSheet"> The JSON string that describes the style sheet object </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of StyleSheet </returns> public static StyleSheetResource Update(string pathAssistantSid, object styleSheet = null, ITwilioRestClient client = null) { var options = new UpdateStyleSheetOptions(pathAssistantSid) { StyleSheet = styleSheet }; return(Update(options, client)); }
/// <summary> /// Updates the style sheet for an Assistant identified by `assistant_sid`. /// </summary> /// <param name="options"> Update 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> UpdateAsync(UpdateStyleSheetOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = await client.RequestAsync(BuildUpdateRequest(options, client)); return(FromJson(response.Content)); }