Exemplo n.º 1
0
        /// <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));
        }
Exemplo n.º 2
0
        /// <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));
        }
Exemplo n.º 3
0
        /// <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));
        }
Exemplo n.º 4
0
 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()
                ));
 }
Exemplo n.º 5
0
        /// <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));
        }