/// <summary> /// update /// </summary> /// /// <param name="options"> Update SigningKey parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of SigningKey </returns> public static SigningKeyResource Update(UpdateSigningKeyOptions 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 sid </param> /// <param name="pathAccountSid"> The account_sid </param> /// <param name="friendlyName"> The friendly_name </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of SigningKey </returns> public static async System.Threading.Tasks.Task <SigningKeyResource> UpdateAsync(string pathSid, string pathAccountSid = null, string friendlyName = null, ITwilioRestClient client = null) { var options = new UpdateSigningKeyOptions(pathSid) { PathAccountSid = pathAccountSid, FriendlyName = friendlyName }; return(await UpdateAsync(options, client)); }
/// <summary> /// update /// </summary> /// /// <param name="pathSid"> The sid </param> /// <param name="pathAccountSid"> The account_sid </param> /// <param name="friendlyName"> The friendly_name </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of SigningKey </returns> public static SigningKeyResource Update(string pathSid, string pathAccountSid = null, string friendlyName = null, ITwilioRestClient client = null) { var options = new UpdateSigningKeyOptions(pathSid) { PathAccountSid = pathAccountSid, FriendlyName = friendlyName }; return(Update(options, client)); }
private static Request BuildUpdateRequest(UpdateSigningKeyOptions options, ITwilioRestClient client) { return(new Request( HttpMethod.Post, Rest.Domain.Api, "/2010-04-01/Accounts/" + (options.PathAccountSid ?? client.AccountSid) + "/SigningKeys/" + options.PathSid + ".json", postParams: options.GetParams() )); }
/// <summary> /// update /// </summary> /// /// <param name="options"> Update SigningKey parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of SigningKey </returns> public static async System.Threading.Tasks.Task <SigningKeyResource> UpdateAsync(UpdateSigningKeyOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = await client.RequestAsync(BuildUpdateRequest(options, client)); return(FromJson(response.Content)); }