Beispiel #1
0
        /// <summary>
        /// Update the friendly name property of a specific Fleet in your account.
        /// </summary>
        ///
        /// <param name="options"> Update Fleet parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of Fleet </returns>
        public static FleetResource Update(UpdateFleetOptions options, ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = client.Request(BuildUpdateRequest(options, client));

            return(FromJson(response.Content));
        }
Beispiel #2
0
        /// <summary>
        /// Update the friendly name property of a specific Fleet in your account.
        /// </summary>
        ///
        /// <param name="options"> Update Fleet parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of Fleet </returns>
        public static async System.Threading.Tasks.Task <FleetResource> UpdateAsync(UpdateFleetOptions options, ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = await client.RequestAsync(BuildUpdateRequest(options, client));

            return(FromJson(response.Content));
        }
Beispiel #3
0
        /// <summary>
        /// Update the friendly name property of a specific Fleet in your account.
        /// </summary>
        ///
        /// <param name="pathSid"> A string that uniquely identifies the Fleet. </param>
        /// <param name="friendlyName"> A human readable description for this Fleet. </param>
        /// <param name="defaultDeploymentSid"> A default Deployment SID. </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of Fleet </returns>
        public static async System.Threading.Tasks.Task <FleetResource> UpdateAsync(string pathSid, string friendlyName = null, string defaultDeploymentSid = null, ITwilioRestClient client = null)
        {
            var options = new UpdateFleetOptions(pathSid)
            {
                FriendlyName = friendlyName, DefaultDeploymentSid = defaultDeploymentSid
            };

            return(await UpdateAsync(options, client));
        }
Beispiel #4
0
        /// <summary>
        /// Update the friendly name property of a specific Fleet in your account.
        /// </summary>
        ///
        /// <param name="pathSid"> A string that uniquely identifies the Fleet. </param>
        /// <param name="friendlyName"> A human readable description for this Fleet. </param>
        /// <param name="defaultDeploymentSid"> A default Deployment SID. </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of Fleet </returns>
        public static FleetResource Update(string pathSid, string friendlyName = null, string defaultDeploymentSid = null, ITwilioRestClient client = null)
        {
            var options = new UpdateFleetOptions(pathSid)
            {
                FriendlyName = friendlyName, DefaultDeploymentSid = defaultDeploymentSid
            };

            return(Update(options, client));
        }
 private static Request BuildUpdateRequest(UpdateFleetOptions options, ITwilioRestClient client)
 {
     return(new Request(
                HttpMethod.Post,
                Rest.Domain.Preview,
                "/DeployedDevices/Fleets/" + options.PathSid + "",
                postParams: options.GetParams()
                ));
 }