/// <summary> /// Update the given properties of a specific Deployment credential in the Fleet, giving it a friendly name or linking /// to a specific Twilio Sync service instance. /// </summary> /// <param name="options"> Update Deployment parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of Deployment </returns> public static DeploymentResource Update(UpdateDeploymentOptions 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 Deployment credential in the Fleet, giving it a friendly name or linking /// to a specific Twilio Sync service instance. /// </summary> /// /// <param name="pathFleetSid"> The fleet_sid </param> /// <param name="pathSid"> A string that uniquely identifies the Deployment. </param> /// <param name="friendlyName"> A human readable description for this Deployment. </param> /// <param name="syncServiceSid"> The unique identifier of the Sync service instance. </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of Deployment </returns> public static async System.Threading.Tasks.Task <DeploymentResource> UpdateAsync(string pathFleetSid, string pathSid, string friendlyName = null, string syncServiceSid = null, ITwilioRestClient client = null) { var options = new UpdateDeploymentOptions(pathFleetSid, pathSid) { FriendlyName = friendlyName, SyncServiceSid = syncServiceSid }; return(await UpdateAsync(options, client)); }
private static Request BuildUpdateRequest(UpdateDeploymentOptions options, ITwilioRestClient client) { return(new Request( HttpMethod.Post, Rest.Domain.Preview, "/DeployedDevices/Fleets/" + options.PathFleetSid + "/Deployments/" + options.PathSid + "", postParams: options.GetParams() )); }
/// <summary> /// Update the given properties of a specific Deployment credential in the Fleet, giving it a friendly name or linking /// to a specific Twilio Sync service instance. /// </summary> /// /// <param name="pathFleetSid"> The fleet_sid </param> /// <param name="pathSid"> A string that uniquely identifies the Deployment. </param> /// <param name="friendlyName"> A human readable description for this Deployment. </param> /// <param name="syncServiceSid"> The unique identifier of the Sync service instance. </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of Deployment </returns> public static DeploymentResource Update(string pathFleetSid, string pathSid, string friendlyName = null, string syncServiceSid = null, ITwilioRestClient client = null) { var options = new UpdateDeploymentOptions(pathFleetSid, pathSid) { FriendlyName = friendlyName, SyncServiceSid = syncServiceSid }; return(Update(options, client)); }
/// <summary> /// Update the given properties of a specific Deployment credential in the Fleet, giving it a friendly name or linking /// to a specific Twilio Sync service instance. /// </summary> /// <param name="options"> Update Deployment parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of Deployment </returns> public static async System.Threading.Tasks.Task <DeploymentResource> UpdateAsync(UpdateDeploymentOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = await client.RequestAsync(BuildUpdateRequest(options, client)); return(FromJson(response.Content)); }