Ejemplo n.º 1
0
 /// <summary>
 /// Update a specific fax.
 /// </summary>
 /// <param name="pathSid"> The unique string that identifies the resource </param>
 /// <param name="status"> The new status of the resource </param>
 /// <param name="client"> Client to make requests to Twilio </param>
 /// <returns> Task that resolves to A single instance of Fax </returns>
 public static async System.Threading.Tasks.Task<FaxResource> UpdateAsync(string pathSid,
                                                                          FaxResource.UpdateStatusEnum status = null,
                                                                          ITwilioRestClient client = null)
 {
     var options = new UpdateFaxOptions(pathSid){Status = status};
     return await UpdateAsync(options, client);
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Update a specific fax.
 /// </summary>
 /// <param name="pathSid"> The unique string that identifies the resource </param>
 /// <param name="status"> The new status of the resource </param>
 /// <param name="client"> Client to make requests to Twilio </param>
 /// <returns> A single instance of Fax </returns>
 public static FaxResource Update(string pathSid,
                                  FaxResource.UpdateStatusEnum status = null,
                                  ITwilioRestClient client = null)
 {
     var options = new UpdateFaxOptions(pathSid){Status = status};
     return Update(options, client);
 }
Ejemplo n.º 3
0
        /// <summary>
        /// Update a specific fax.
        /// </summary>
        /// <param name="options"> Update Fax parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of Fax </returns>
        public static FaxResource Update(UpdateFaxOptions options, ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = client.Request(BuildUpdateRequest(options, client));

            return(FromJson(response.Content));
        }
Ejemplo n.º 4
0
 /// <summary>
 /// Update a specific fax.
 /// </summary>
 /// <param name="options"> Update Fax parameters </param>
 /// <param name="client"> Client to make requests to Twilio </param>
 /// <returns> Task that resolves to A single instance of Fax </returns>
 public static async System.Threading.Tasks.Task<FaxResource> UpdateAsync(UpdateFaxOptions options,
                                                                          ITwilioRestClient client = null)
 {
     client = client ?? TwilioClient.GetRestClient();
     var response = await client.RequestAsync(BuildUpdateRequest(options, client));
     return FromJson(response.Content);
 }
Ejemplo n.º 5
0
 private static Request BuildUpdateRequest(UpdateFaxOptions options, ITwilioRestClient client)
 {
     return(new Request(
                HttpMethod.Post,
                Rest.Domain.Fax,
                "/v1/Faxes/" + options.PathSid + "",
                postParams: options.GetParams()
                ));
 }