/// <summary> /// update /// </summary> /// <param name="options"> Update FieldType parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of FieldType </returns> public static FieldTypeResource Update(UpdateFieldTypeOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = client.Request(BuildUpdateRequest(options, client)); return(FromJson(response.Content)); }
private static Request BuildUpdateRequest(UpdateFieldTypeOptions options, ITwilioRestClient client) { return(new Request( HttpMethod.Post, Rest.Domain.Autopilot, "/v1/Assistants/" + options.PathAssistantSid + "/FieldTypes/" + options.PathSid + "", postParams: options.GetParams() )); }
/// <summary> /// update /// </summary> /// <param name="pathAssistantSid"> The SID of the Assistant with the FieldType resource to update </param> /// <param name="pathSid"> The unique string that identifies the resource </param> /// <param name="friendlyName"> A string to describe the resource </param> /// <param name="uniqueName"> An application-defined string that uniquely identifies the resource </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of FieldType </returns> public static async System.Threading.Tasks.Task <FieldTypeResource> UpdateAsync(string pathAssistantSid, string pathSid, string friendlyName = null, string uniqueName = null, ITwilioRestClient client = null) { var options = new UpdateFieldTypeOptions(pathAssistantSid, pathSid) { FriendlyName = friendlyName, UniqueName = uniqueName }; return(await UpdateAsync(options, client)); }
/// <summary> /// update /// </summary> /// <param name="pathAssistantSid"> The SID of the Assistant with the FieldType resource to update </param> /// <param name="pathSid"> The unique string that identifies the resource </param> /// <param name="friendlyName"> A string to describe the resource </param> /// <param name="uniqueName"> An application-defined string that uniquely identifies the resource </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of FieldType </returns> public static FieldTypeResource Update(string pathAssistantSid, string pathSid, string friendlyName = null, string uniqueName = null, ITwilioRestClient client = null) { var options = new UpdateFieldTypeOptions(pathAssistantSid, pathSid) { FriendlyName = friendlyName, UniqueName = uniqueName }; return(Update(options, client)); }
/// <summary> /// update /// </summary> /// <param name="options"> Update FieldType parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of FieldType </returns> public static async System.Threading.Tasks.Task <FieldTypeResource> UpdateAsync(UpdateFieldTypeOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = await client.RequestAsync(BuildUpdateRequest(options, client)); return(FromJson(response.Content)); }