/// <summary> /// Update an existing Supporting Document. /// </summary> /// <param name="options"> Update SupportingDocument parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of SupportingDocument </returns> public static SupportingDocumentResource Update(UpdateSupportingDocumentOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = client.Request(BuildUpdateRequest(options, client)); return(FromJson(response.Content)); }
private static Request BuildUpdateRequest(UpdateSupportingDocumentOptions options, ITwilioRestClient client) { return(new Request( HttpMethod.Post, Rest.Domain.Trusthub, "/v1/SupportingDocuments/" + options.PathSid + "", postParams: options.GetParams(), headerParams: null )); }
/// <summary> /// Update an existing Supporting Document. /// </summary> /// <param name="pathSid"> The unique string that identifies the resource </param> /// <param name="friendlyName"> The string that you assigned to describe the resource </param> /// <param name="attributes"> The set of parameters that compose the Supporting Document resource </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of SupportingDocument </returns> public static async System.Threading.Tasks.Task <SupportingDocumentResource> UpdateAsync(string pathSid, string friendlyName = null, object attributes = null, ITwilioRestClient client = null) { var options = new UpdateSupportingDocumentOptions(pathSid) { FriendlyName = friendlyName, Attributes = attributes }; return(await UpdateAsync(options, client)); }
/// <summary> /// Update an existing Supporting Document. /// </summary> /// <param name="pathSid"> The unique string that identifies the resource </param> /// <param name="friendlyName"> The string that you assigned to describe the resource </param> /// <param name="attributes"> The set of parameters that compose the Supporting Document resource </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of SupportingDocument </returns> public static SupportingDocumentResource Update(string pathSid, string friendlyName = null, object attributes = null, ITwilioRestClient client = null) { var options = new UpdateSupportingDocumentOptions(pathSid) { FriendlyName = friendlyName, Attributes = attributes }; return(Update(options, client)); }
/// <summary> /// Update an existing Supporting Document. /// </summary> /// <param name="options"> Update SupportingDocument parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of SupportingDocument </returns> public static async System.Threading.Tasks.Task <SupportingDocumentResource> UpdateAsync(UpdateSupportingDocumentOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = await client.RequestAsync(BuildUpdateRequest(options, client)); return(FromJson(response.Content)); }