/// <summary> /// Change the password of a Credential record /// </summary> /// /// <param name="options"> Update CredentialList parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of CredentialList </returns> public static CredentialListResource Update(UpdateCredentialListOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = client.Request(BuildUpdateRequest(options, client)); return(FromJson(response.Content)); }
/// <summary> /// Change the password of a Credential record /// </summary> /// /// <param name="pathSid"> The sid </param> /// <param name="friendlyName"> The friendly_name </param> /// <param name="pathAccountSid"> The account_sid </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of CredentialList </returns> public static async System.Threading.Tasks.Task <CredentialListResource> UpdateAsync(string pathSid, string friendlyName, string pathAccountSid = null, ITwilioRestClient client = null) { var options = new UpdateCredentialListOptions(pathSid, friendlyName) { PathAccountSid = pathAccountSid }; return(await UpdateAsync(options, client)); }
/// <summary> /// Change the password of a Credential record /// </summary> /// /// <param name="pathSid"> The sid </param> /// <param name="friendlyName"> The friendly_name </param> /// <param name="pathAccountSid"> The account_sid </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of CredentialList </returns> public static CredentialListResource Update(string pathSid, string friendlyName, string pathAccountSid = null, ITwilioRestClient client = null) { var options = new UpdateCredentialListOptions(pathSid, friendlyName) { PathAccountSid = pathAccountSid }; return(Update(options, client)); }
private static Request BuildUpdateRequest(UpdateCredentialListOptions options, ITwilioRestClient client) { return(new Request( HttpMethod.Post, Rest.Domain.Api, "/2010-04-01/Accounts/" + (options.PathAccountSid ?? client.AccountSid) + "/SIP/CredentialLists/" + options.PathSid + ".json", postParams: options.GetParams() )); }
/// <summary> /// Change the password of a Credential record /// </summary> /// /// <param name="options"> Update CredentialList parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of CredentialList </returns> public static async System.Threading.Tasks.Task <CredentialListResource> UpdateAsync(UpdateCredentialListOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = await client.RequestAsync(BuildUpdateRequest(options, client)); return(FromJson(response.Content)); }