Exemplo n.º 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()
                ));
 }
Exemplo n.º 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));
        }
Exemplo n.º 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));
        }
Exemplo n.º 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));
        }