/// <summary> /// Updates the caller-id /// </summary> /// <param name="options"> Update OutgoingCallerId parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of OutgoingCallerId </returns> public static OutgoingCallerIdResource Update(UpdateOutgoingCallerIdOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = client.Request(BuildUpdateRequest(options, client)); return(FromJson(response.Content)); }
/// <summary> /// Updates the caller-id /// </summary> /// /// <param name="pathSid"> Update by unique outgoing-caller-id Sid </param> /// <param name="pathAccountSid"> The account_sid </param> /// <param name="friendlyName"> A human readable description of the caller ID </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of OutgoingCallerId </returns> public static OutgoingCallerIdResource Update(string pathSid, string pathAccountSid = null, string friendlyName = null, ITwilioRestClient client = null) { var options = new UpdateOutgoingCallerIdOptions(pathSid) { PathAccountSid = pathAccountSid, FriendlyName = friendlyName }; return(Update(options, client)); }
/// <summary> /// Updates the caller-id /// </summary> /// /// <param name="pathSid"> Update by unique outgoing-caller-id Sid </param> /// <param name="pathAccountSid"> The account_sid </param> /// <param name="friendlyName"> A human readable description of the caller ID </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of OutgoingCallerId </returns> public static async System.Threading.Tasks.Task <OutgoingCallerIdResource> UpdateAsync(string pathSid, string pathAccountSid = null, string friendlyName = null, ITwilioRestClient client = null) { var options = new UpdateOutgoingCallerIdOptions(pathSid) { PathAccountSid = pathAccountSid, FriendlyName = friendlyName }; return(await UpdateAsync(options, client)); }
private static Request BuildUpdateRequest(UpdateOutgoingCallerIdOptions options, ITwilioRestClient client) { return(new Request( HttpMethod.Post, Rest.Domain.Api, "/2010-04-01/Accounts/" + (options.PathAccountSid ?? client.AccountSid) + "/OutgoingCallerIds/" + options.PathSid + ".json", postParams: options.GetParams() )); }
/// <summary> /// Updates the caller-id /// </summary> /// <param name="options"> Update OutgoingCallerId parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of OutgoingCallerId </returns> public static async System.Threading.Tasks.Task <OutgoingCallerIdResource> UpdateAsync(UpdateOutgoingCallerIdOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = await client.RequestAsync(BuildUpdateRequest(options, client)); return(FromJson(response.Content)); }