/// <summary> /// update /// </summary> /// <param name="options"> Update Document parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of Document </returns> public static DocumentResource Update(UpdateDocumentOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = client.Request(BuildUpdateRequest(options, client)); return(FromJson(response.Content)); }
/// <summary> /// update /// </summary> /// <param name="pathServiceSid"> The service_sid </param> /// <param name="pathSid"> The sid </param> /// <param name="data"> The data </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of Document </returns> public static async System.Threading.Tasks.Task <DocumentResource> UpdateAsync(string pathServiceSid, string pathSid, object data, ITwilioRestClient client = null) { var options = new UpdateDocumentOptions(pathServiceSid, pathSid, data); return(await UpdateAsync(options, client)); }
/// <summary> /// update /// </summary> /// <param name="pathServiceSid"> The service_sid </param> /// <param name="pathSid"> The sid </param> /// <param name="data"> The data </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of Document </returns> public static DocumentResource Update(string pathServiceSid, string pathSid, object data, ITwilioRestClient client = null) { var options = new UpdateDocumentOptions(pathServiceSid, pathSid, data); return(Update(options, client)); }
private static Request BuildUpdateRequest(UpdateDocumentOptions options, ITwilioRestClient client) { return(new Request( HttpMethod.Post, Rest.Domain.Preview, "/Sync/Services/" + options.PathServiceSid + "/Documents/" + options.PathSid + "", postParams: options.GetParams() )); }
/// <summary> /// update /// </summary> /// <param name="options"> Update Document parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of Document </returns> public static async System.Threading.Tasks.Task <DocumentResource> UpdateAsync(UpdateDocumentOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = await client.RequestAsync(BuildUpdateRequest(options, client)); return(FromJson(response.Content)); }