/// <summary> /// Dequeue a member from a queue and have the member's call begin executing the TwiML document at that URL /// </summary> /// <param name="options"> Update Member parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of Member </returns> public static MemberResource Update(UpdateMemberOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = client.Request(BuildUpdateRequest(options, client)); return(FromJson(response.Content)); }
/// <summary> /// Dequeue a member from a queue and have the member's call begin executing the TwiML document at that URL /// </summary> /// /// <param name="options"> Update Member parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of Member </returns> public static async System.Threading.Tasks.Task <MemberResource> UpdateAsync(UpdateMemberOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = await client.RequestAsync(BuildUpdateRequest(options, client)); return(FromJson(response.Content)); }
/// <summary> /// Dequeue a member from a queue and have the member's call begin executing the TwiML document at that URL /// </summary> /// /// <param name="pathQueueSid"> The Queue in which to find the members </param> /// <param name="pathCallSid"> The call_sid </param> /// <param name="url"> The url </param> /// <param name="method"> The method </param> /// <param name="pathAccountSid"> The account_sid </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of Member </returns> public static async System.Threading.Tasks.Task <MemberResource> UpdateAsync(string pathQueueSid, string pathCallSid, Uri url, Twilio.Http.HttpMethod method, string pathAccountSid = null, ITwilioRestClient client = null) { var options = new UpdateMemberOptions(pathQueueSid, pathCallSid, url, method) { PathAccountSid = pathAccountSid }; return(await UpdateAsync(options, client)); }
/// <summary> /// Dequeue a member from a queue and have the member's call begin executing the TwiML document at that URL /// </summary> /// /// <param name="pathQueueSid"> The Queue in which to find the members </param> /// <param name="pathCallSid"> The call_sid </param> /// <param name="url"> The url </param> /// <param name="method"> The method </param> /// <param name="pathAccountSid"> The account_sid </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of Member </returns> public static MemberResource Update(string pathQueueSid, string pathCallSid, Uri url, Twilio.Http.HttpMethod method, string pathAccountSid = null, ITwilioRestClient client = null) { var options = new UpdateMemberOptions(pathQueueSid, pathCallSid, url, method) { PathAccountSid = pathAccountSid }; return(Update(options, client)); }
private static Request BuildUpdateRequest(UpdateMemberOptions options, ITwilioRestClient client) { return new Request( HttpMethod.Post, Rest.Domain.Api, "/2010-04-01/Accounts/" + (options.PathAccountSid ?? client.AccountSid) + "/Queues/" + options.PathQueueSid + "/Members/" + options.PathCallSid + ".json", postParams: options.GetParams() ); }