Пример #1
0
        /// <summary>
        /// Updates the given properties of a Network Access Profile in your account.
        /// </summary>
        /// <param name="options"> Update NetworkAccessProfile parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of NetworkAccessProfile </returns>
        public static NetworkAccessProfileResource Update(UpdateNetworkAccessProfileOptions options,
                                                          ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = client.Request(BuildUpdateRequest(options, client));

            return(FromJson(response.Content));
        }
Пример #2
0
 private static Request BuildUpdateRequest(UpdateNetworkAccessProfileOptions options, ITwilioRestClient client)
 {
     return(new Request(
                HttpMethod.Post,
                Rest.Domain.Supersim,
                "/v1/NetworkAccessProfiles/" + options.PathSid + "",
                postParams: options.GetParams()
                ));
 }
Пример #3
0
        /// <summary>
        /// Updates the given properties of a Network Access Profile in your account.
        /// </summary>
        /// <param name="pathSid"> The SID of the resource to update </param>
        /// <param name="uniqueName"> The new unique name of the resource </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of NetworkAccessProfile </returns>
        public static async System.Threading.Tasks.Task <NetworkAccessProfileResource> UpdateAsync(string pathSid,
                                                                                                   string uniqueName        = null,
                                                                                                   ITwilioRestClient client = null)
        {
            var options = new UpdateNetworkAccessProfileOptions(pathSid)
            {
                UniqueName = uniqueName
            };

            return(await UpdateAsync(options, client));
        }
Пример #4
0
        /// <summary>
        /// Updates the given properties of a Network Access Profile in your account.
        /// </summary>
        /// <param name="pathSid"> The SID of the resource to update </param>
        /// <param name="uniqueName"> The new unique name of the resource </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of NetworkAccessProfile </returns>
        public static NetworkAccessProfileResource Update(string pathSid,
                                                          string uniqueName        = null,
                                                          ITwilioRestClient client = null)
        {
            var options = new UpdateNetworkAccessProfileOptions(pathSid)
            {
                UniqueName = uniqueName
            };

            return(Update(options, client));
        }
Пример #5
0
        /// <summary>
        /// Updates the given properties of a Network Access Profile in your account.
        /// </summary>
        /// <param name="options"> Update NetworkAccessProfile parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of NetworkAccessProfile </returns>
        public static async System.Threading.Tasks.Task <NetworkAccessProfileResource> UpdateAsync(UpdateNetworkAccessProfileOptions options,
                                                                                                   ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = await client.RequestAsync(BuildUpdateRequest(options, client));

            return(FromJson(response.Content));
        }