/// <summary>
        /// update
        /// </summary>
        /// <param name="options"> Update ModelBuild parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of ModelBuild </returns>
        public static ModelBuildResource Update(UpdateModelBuildOptions options, ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = client.Request(BuildUpdateRequest(options, client));

            return(FromJson(response.Content));
        }
Ejemplo n.º 2
0
 private static Request BuildUpdateRequest(UpdateModelBuildOptions options, ITwilioRestClient client)
 {
     return(new Request(
                HttpMethod.Post,
                Rest.Domain.Autopilot,
                "/v1/Assistants/" + options.PathAssistantSid + "/ModelBuilds/" + options.PathSid + "",
                postParams: options.GetParams()
                ));
 }
        /// <summary>
        /// update
        /// </summary>
        /// <param name="pathAssistantSid"> The SID of the Assistant that is the parent of the resource to update </param>
        /// <param name="pathSid"> The unique string that identifies the resource to update </param>
        /// <param name="uniqueName"> An application-defined string that uniquely identifies the resource </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of ModelBuild </returns>
        public static async System.Threading.Tasks.Task <ModelBuildResource> UpdateAsync(string pathAssistantSid,
                                                                                         string pathSid,
                                                                                         string uniqueName        = null,
                                                                                         ITwilioRestClient client = null)
        {
            var options = new UpdateModelBuildOptions(pathAssistantSid, pathSid)
            {
                UniqueName = uniqueName
            };

            return(await UpdateAsync(options, client));
        }
        /// <summary>
        /// update
        /// </summary>
        /// <param name="pathAssistantSid"> The SID of the Assistant that is the parent of the resource to update </param>
        /// <param name="pathSid"> The unique string that identifies the resource to update </param>
        /// <param name="uniqueName"> An application-defined string that uniquely identifies the resource </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of ModelBuild </returns>
        public static ModelBuildResource Update(string pathAssistantSid,
                                                string pathSid,
                                                string uniqueName        = null,
                                                ITwilioRestClient client = null)
        {
            var options = new UpdateModelBuildOptions(pathAssistantSid, pathSid)
            {
                UniqueName = uniqueName
            };

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

            return(FromJson(response.Content));
        }