예제 #1
0
        /// <summary>
        /// Initiates a call redirect or terminates a call
        /// </summary>
        /// <param name="pathSid"> Call Sid that uniquely identifies the Call to update </param>
        /// <param name="pathAccountSid"> The account_sid </param>
        /// <param name="url"> URL that returns TwiML </param>
        /// <param name="method"> HTTP method to use to fetch TwiML </param>
        /// <param name="status"> Status to update the Call with </param>
        /// <param name="fallbackUrl"> Fallback URL in case of error </param>
        /// <param name="fallbackMethod"> HTTP Method to use with FallbackUrl </param>
        /// <param name="statusCallback"> Status Callback URL </param>
        /// <param name="statusCallbackMethod"> HTTP Method to use with StatusCallback </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of Call </returns>
        public static async System.Threading.Tasks.Task <CallResource> UpdateAsync(string pathSid,
                                                                                   string pathAccountSid = null,
                                                                                   Uri url = null,
                                                                                   Twilio.Http.HttpMethod method        = null,
                                                                                   CallResource.UpdateStatusEnum status = null,
                                                                                   Uri fallbackUrl = null,
                                                                                   Twilio.Http.HttpMethod fallbackMethod = null,
                                                                                   Uri statusCallback = null,
                                                                                   Twilio.Http.HttpMethod statusCallbackMethod = null,
                                                                                   ITwilioRestClient client = null)
        {
            var options = new UpdateCallOptions(pathSid)
            {
                PathAccountSid = pathAccountSid, Url = url, Method = method, Status = status, FallbackUrl = fallbackUrl, FallbackMethod = fallbackMethod, StatusCallback = statusCallback, StatusCallbackMethod = statusCallbackMethod
            };

            return(await UpdateAsync(options, client));
        }
예제 #2
0
        /// <summary>
        /// Initiates a call redirect or terminates a call
        /// </summary>
        /// <param name="pathSid"> Call Sid that uniquely identifies the Call to update </param>
        /// <param name="pathAccountSid"> The account_sid </param>
        /// <param name="url"> URL that returns TwiML </param>
        /// <param name="method"> HTTP method to use to fetch TwiML </param>
        /// <param name="status"> Status to update the Call with </param>
        /// <param name="fallbackUrl"> Fallback URL in case of error </param>
        /// <param name="fallbackMethod"> HTTP Method to use with FallbackUrl </param>
        /// <param name="statusCallback"> Status Callback URL </param>
        /// <param name="statusCallbackMethod"> HTTP Method to use with StatusCallback </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of Call </returns>
        public static CallResource Update(string pathSid,
                                          string pathAccountSid = null,
                                          Uri url = null,
                                          Twilio.Http.HttpMethod method        = null,
                                          CallResource.UpdateStatusEnum status = null,
                                          Uri fallbackUrl = null,
                                          Twilio.Http.HttpMethod fallbackMethod = null,
                                          Uri statusCallback = null,
                                          Twilio.Http.HttpMethod statusCallbackMethod = null,
                                          ITwilioRestClient client = null)
        {
            var options = new UpdateCallOptions(pathSid)
            {
                PathAccountSid = pathAccountSid, Url = url, Method = method, Status = status, FallbackUrl = fallbackUrl, FallbackMethod = fallbackMethod, StatusCallback = statusCallback, StatusCallbackMethod = statusCallbackMethod
            };

            return(Update(options, client));
        }