/// <summary> /// Update the given properties of a specific Certificate credential in the Fleet, giving it a friendly name or /// assigning to a Device. /// </summary> /// <param name="options"> Update Certificate parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of Certificate </returns> public static CertificateResource Update(UpdateCertificateOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = client.Request(BuildUpdateRequest(options, client)); return(FromJson(response.Content)); }
/// <summary> /// Update the given properties of a specific Certificate credential in the Fleet, giving it a friendly name or /// assigning to a Device. /// </summary> /// /// <param name="pathFleetSid"> The fleet_sid </param> /// <param name="pathSid"> A string that uniquely identifies the Certificate. </param> /// <param name="friendlyName"> The human readable description for this Certificate. </param> /// <param name="deviceSid"> The unique identifier of a Device to be authenticated. </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of Certificate </returns> public static async System.Threading.Tasks.Task <CertificateResource> UpdateAsync(string pathFleetSid, string pathSid, string friendlyName = null, string deviceSid = null, ITwilioRestClient client = null) { var options = new UpdateCertificateOptions(pathFleetSid, pathSid) { FriendlyName = friendlyName, DeviceSid = deviceSid }; return(await UpdateAsync(options, client)); }
private static Request BuildUpdateRequest(UpdateCertificateOptions options, ITwilioRestClient client) { return(new Request( HttpMethod.Post, Rest.Domain.Preview, "/DeployedDevices/Fleets/" + options.PathFleetSid + "/Certificates/" + options.PathSid + "", postParams: options.GetParams() )); }
/// <summary> /// Update the given properties of a specific Certificate credential in the Fleet, giving it a friendly name or /// assigning to a Device. /// </summary> /// /// <param name="pathFleetSid"> The fleet_sid </param> /// <param name="pathSid"> A string that uniquely identifies the Certificate. </param> /// <param name="friendlyName"> The human readable description for this Certificate. </param> /// <param name="deviceSid"> The unique identifier of a Device to be authenticated. </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of Certificate </returns> public static CertificateResource Update(string pathFleetSid, string pathSid, string friendlyName = null, string deviceSid = null, ITwilioRestClient client = null) { var options = new UpdateCertificateOptions(pathFleetSid, pathSid) { FriendlyName = friendlyName, DeviceSid = deviceSid }; return(Update(options, client)); }
/// <summary> /// Update the given properties of a specific Certificate credential in the Fleet, giving it a friendly name or /// assigning to a Device. /// </summary> /// <param name="options"> Update Certificate parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of Certificate </returns> public static async System.Threading.Tasks.Task <CertificateResource> UpdateAsync(UpdateCertificateOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = await client.RequestAsync(BuildUpdateRequest(options, client)); return(FromJson(response.Content)); }