/// <summary> /// update /// </summary> /// <param name="options"> Update IpRecord parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of IpRecord </returns> public static IpRecordResource Update(UpdateIpRecordOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = client.Request(BuildUpdateRequest(options, client)); return(FromJson(response.Content)); }
/// <summary> /// update /// </summary> /// <param name="pathSid"> The unique string that identifies the resource </param> /// <param name="friendlyName"> A string to describe the resource </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of IpRecord </returns> public static IpRecordResource Update(string pathSid, string friendlyName = null, ITwilioRestClient client = null) { var options = new UpdateIpRecordOptions(pathSid) { FriendlyName = friendlyName }; return(Update(options, client)); }
private static Request BuildUpdateRequest(UpdateIpRecordOptions options, ITwilioRestClient client) { return(new Request( HttpMethod.Post, Rest.Domain.Voice, "/v1/IpRecords/" + options.PathSid + "", postParams: options.GetParams() )); }
/// <summary> /// update /// </summary> /// <param name="pathSid"> The unique string that identifies the resource </param> /// <param name="friendlyName"> A string to describe the resource </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of IpRecord </returns> public static async System.Threading.Tasks.Task <IpRecordResource> UpdateAsync(string pathSid, string friendlyName = null, ITwilioRestClient client = null) { var options = new UpdateIpRecordOptions(pathSid) { FriendlyName = friendlyName }; return(await UpdateAsync(options, client)); }
/// <summary> /// update /// </summary> /// <param name="options"> Update IpRecord parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of IpRecord </returns> public static async System.Threading.Tasks.Task <IpRecordResource> UpdateAsync(UpdateIpRecordOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = await client.RequestAsync(BuildUpdateRequest(options, client)); return(FromJson(response.Content)); }