예제 #1
0
        /// <summary>
        /// Update the queue with the new parameters
        /// </summary>
        /// <param name="options"> Update Queue parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of Queue </returns>
        public static QueueResource Update(UpdateQueueOptions options, ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = client.Request(BuildUpdateRequest(options, client));

            return(FromJson(response.Content));
        }
예제 #2
0
        /// <summary>
        /// Update the queue with the new parameters
        /// </summary>
        ///
        /// <param name="options"> Update Queue parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of Queue </returns>
        public static async System.Threading.Tasks.Task <QueueResource> UpdateAsync(UpdateQueueOptions options, ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = await client.RequestAsync(BuildUpdateRequest(options, client));

            return(FromJson(response.Content));
        }
예제 #3
0
 private static Request BuildUpdateRequest(UpdateQueueOptions options, ITwilioRestClient client)
 {
     return(new Request(
                HttpMethod.Post,
                Rest.Domain.Api,
                "/2010-04-01/Accounts/" + (options.PathAccountSid ?? client.AccountSid) + "/Queues/" + options.PathSid + ".json",
                postParams: options.GetParams()
                ));
 }
예제 #4
0
        /// <summary>
        /// Update the queue with the new parameters
        /// </summary>
        ///
        /// <param name="pathSid"> The sid </param>
        /// <param name="pathAccountSid"> The account_sid </param>
        /// <param name="friendlyName"> A human readable description of the queue </param>
        /// <param name="maxSize"> The max number of members allowed in the queue </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of Queue </returns>
        public static async System.Threading.Tasks.Task <QueueResource> UpdateAsync(string pathSid, string pathAccountSid = null, string friendlyName = null, int?maxSize = null, ITwilioRestClient client = null)
        {
            var options = new UpdateQueueOptions(pathSid)
            {
                PathAccountSid = pathAccountSid, FriendlyName = friendlyName, MaxSize = maxSize
            };

            return(await UpdateAsync(options, client));
        }
예제 #5
0
        /// <summary>
        /// Update the queue with the new parameters
        /// </summary>
        ///
        /// <param name="pathSid"> The sid </param>
        /// <param name="pathAccountSid"> The account_sid </param>
        /// <param name="friendlyName"> A human readable description of the queue </param>
        /// <param name="maxSize"> The max number of members allowed in the queue </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of Queue </returns>
        public static QueueResource Update(string pathSid, string pathAccountSid = null, string friendlyName = null, int?maxSize = null, ITwilioRestClient client = null)
        {
            var options = new UpdateQueueOptions(pathSid)
            {
                PathAccountSid = pathAccountSid, FriendlyName = friendlyName, MaxSize = maxSize
            };

            return(Update(options, client));
        }