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

            return(FromJson(response.Content));
        }
Exemplo n.º 2
0
        /// <summary>
        /// update
        /// </summary>
        ///
        /// <param name="pathWorkspaceSid"> The workspace_sid </param>
        /// <param name="pathSid"> The sid </param>
        /// <param name="friendlyName"> The friendly_name </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of Activity </returns>
        public static async System.Threading.Tasks.Task <ActivityResource> UpdateAsync(string pathWorkspaceSid, string pathSid, string friendlyName = null, ITwilioRestClient client = null)
        {
            var options = new UpdateActivityOptions(pathWorkspaceSid, pathSid)
            {
                FriendlyName = friendlyName
            };

            return(await UpdateAsync(options, client));
        }
Exemplo n.º 3
0
 private static Request BuildUpdateRequest(UpdateActivityOptions options, ITwilioRestClient client)
 {
     return(new Request(
                HttpMethod.Post,
                Rest.Domain.Taskrouter,
                "/v1/Workspaces/" + options.PathWorkspaceSid + "/Activities/" + options.PathSid + "",
                postParams: options.GetParams()
                ));
 }
Exemplo n.º 4
0
        /// <summary>
        /// update
        /// </summary>
        ///
        /// <param name="pathWorkspaceSid"> The workspace_sid </param>
        /// <param name="pathSid"> The sid </param>
        /// <param name="friendlyName"> The friendly_name </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of Activity </returns>
        public static ActivityResource Update(string pathWorkspaceSid, string pathSid, string friendlyName = null, ITwilioRestClient client = null)
        {
            var options = new UpdateActivityOptions(pathWorkspaceSid, pathSid)
            {
                FriendlyName = friendlyName
            };

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

            return(FromJson(response.Content));
        }