Ejemplo n.º 1
0
        /// <summary>
        /// Modify the properties of a given Account
        /// </summary>
        /// <param name="options"> Update Aws parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of Aws </returns>
        public static AwsResource Update(UpdateAwsOptions options, ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = client.Request(BuildUpdateRequest(options, client));

            return(FromJson(response.Content));
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Modify the properties of a given Account
        /// </summary>
        /// <param name="options"> Update Aws parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of Aws </returns>
        public static async System.Threading.Tasks.Task <AwsResource> UpdateAsync(UpdateAwsOptions options,
                                                                                  ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = await client.RequestAsync(BuildUpdateRequest(options, client));

            return(FromJson(response.Content));
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Modify the properties of a given Account
        /// </summary>
        /// <param name="pathSid"> The unique string that identifies the resource </param>
        /// <param name="friendlyName"> A string to describe the resource </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of Aws </returns>
        public static AwsResource Update(string pathSid, string friendlyName = null, ITwilioRestClient client = null)
        {
            var options = new UpdateAwsOptions(pathSid)
            {
                FriendlyName = friendlyName
            };

            return(Update(options, client));
        }
Ejemplo n.º 4
0
 private static Request BuildUpdateRequest(UpdateAwsOptions options, ITwilioRestClient client)
 {
     return(new Request(
                HttpMethod.Post,
                Rest.Domain.Accounts,
                "/v1/Credentials/AWS/" + options.PathSid + "",
                postParams: options.GetParams()
                ));
 }
Ejemplo n.º 5
0
        /// <summary>
        /// Modify the properties of a given Account
        /// </summary>
        /// <param name="pathSid"> The unique string that identifies the resource </param>
        /// <param name="friendlyName"> A string to describe the resource </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of Aws </returns>
        public static async System.Threading.Tasks.Task <AwsResource> UpdateAsync(string pathSid,
                                                                                  string friendlyName      = null,
                                                                                  ITwilioRestClient client = null)
        {
            var options = new UpdateAwsOptions(pathSid)
            {
                FriendlyName = friendlyName
            };

            return(await UpdateAsync(options, client));
        }