示例#1
0
        /// <summary>
        /// update
        /// </summary>
        /// <param name="options"> Update Defaults parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of Defaults </returns>
        public static DefaultsResource Update(UpdateDefaultsOptions options, ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = client.Request(BuildUpdateRequest(options, client));

            return(FromJson(response.Content));
        }
 private static Request BuildUpdateRequest(UpdateDefaultsOptions options, ITwilioRestClient client)
 {
     return(new Request(
                HttpMethod.Post,
                Rest.Domain.Autopilot,
                "/v1/Assistants/" + options.PathAssistantSid + "/Defaults",
                postParams: options.GetParams()
                ));
 }
示例#3
0
        /// <summary>
        /// update
        /// </summary>
        /// <param name="pathAssistantSid"> The assistant_sid </param>
        /// <param name="defaults"> The defaults </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of Defaults </returns>
        public static async System.Threading.Tasks.Task <DefaultsResource> UpdateAsync(string pathAssistantSid,
                                                                                       object defaults          = null,
                                                                                       ITwilioRestClient client = null)
        {
            var options = new UpdateDefaultsOptions(pathAssistantSid)
            {
                Defaults = defaults
            };

            return(await UpdateAsync(options, client));
        }
示例#4
0
        /// <summary>
        /// update
        /// </summary>
        /// <param name="pathAssistantSid"> The assistant_sid </param>
        /// <param name="defaults"> The defaults </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of Defaults </returns>
        public static DefaultsResource Update(string pathAssistantSid,
                                              object defaults          = null,
                                              ITwilioRestClient client = null)
        {
            var options = new UpdateDefaultsOptions(pathAssistantSid)
            {
                Defaults = defaults
            };

            return(Update(options, client));
        }
示例#5
0
        /// <summary>
        /// update
        /// </summary>
        /// <param name="options"> Update Defaults parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of Defaults </returns>
        public static async System.Threading.Tasks.Task <DefaultsResource> UpdateAsync(UpdateDefaultsOptions options,
                                                                                       ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = await client.RequestAsync(BuildUpdateRequest(options, client));

            return(FromJson(response.Content));
        }