Exemple #1
0
        /// <summary>
        /// Update the properties of this participant
        /// </summary>
        ///
        /// <param name="options"> Update Participant parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of Participant </returns>
        public static ParticipantResource Update(UpdateParticipantOptions options, ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = client.Request(BuildUpdateRequest(options, client));

            return(FromJson(response.Content));
        }
Exemple #2
0
        /// <summary>
        /// Update the properties of this participant
        /// </summary>
        ///
        /// <param name="pathConferenceSid"> The string that uniquely identifies this conference </param>
        /// <param name="pathCallSid"> The call_sid </param>
        /// <param name="pathAccountSid"> The account_sid </param>
        /// <param name="muted"> Indicates if the participant should be muted </param>
        /// <param name="hold"> The hold </param>
        /// <param name="holdUrl"> The hold_url </param>
        /// <param name="holdMethod"> The hold_method </param>
        /// <param name="announceUrl"> The announce_url </param>
        /// <param name="announceMethod"> The announce_method </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of Participant </returns>
        public static async System.Threading.Tasks.Task <ParticipantResource> UpdateAsync(string pathConferenceSid, string pathCallSid, string pathAccountSid = null, bool?muted = null, bool?hold = null, Uri holdUrl = null, Twilio.Http.HttpMethod holdMethod = null, Uri announceUrl = null, Twilio.Http.HttpMethod announceMethod = null, ITwilioRestClient client = null)
        {
            var options = new UpdateParticipantOptions(pathConferenceSid, pathCallSid)
            {
                PathAccountSid = pathAccountSid, Muted = muted, Hold = hold, HoldUrl = holdUrl, HoldMethod = holdMethod, AnnounceUrl = announceUrl, AnnounceMethod = announceMethod
            };

            return(await UpdateAsync(options, client));
        }
        /// <summary>
        /// Update the properties of this participant
        /// </summary>
        ///
        /// <param name="pathConferenceSid"> The string that uniquely identifies this conference </param>
        /// <param name="pathCallSid"> The call_sid </param>
        /// <param name="pathAccountSid"> The account_sid </param>
        /// <param name="muted"> Indicates if the participant should be muted </param>
        /// <param name="hold"> The hold </param>
        /// <param name="holdUrl"> The hold_url </param>
        /// <param name="holdMethod"> The hold_method </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of Participant </returns>
        public static ParticipantResource Update(string pathConferenceSid, string pathCallSid, string pathAccountSid = null, bool?muted = null, bool?hold = null, Uri holdUrl = null, Twilio.Http.HttpMethod holdMethod = null, ITwilioRestClient client = null)
        {
            var options = new UpdateParticipantOptions(pathConferenceSid, pathCallSid)
            {
                PathAccountSid = pathAccountSid, Muted = muted, Hold = hold, HoldUrl = holdUrl, HoldMethod = holdMethod
            };

            return(Update(options, client));
        }
Exemple #4
0
 private static Request BuildUpdateRequest(UpdateParticipantOptions options, ITwilioRestClient client)
 {
     return(new Request(
                HttpMethod.Post,
                Rest.Domain.Api,
                "/2010-04-01/Accounts/" + (options.PathAccountSid ?? client.AccountSid) + "/Conferences/" + options.PathConferenceSid + "/Participants/" + options.PathCallSid + ".json",
                client.Region,
                postParams: options.GetParams()
                ));
 }
Exemple #5
0
        /// <summary>
        /// Update the properties of this participant
        /// </summary>
        ///
        /// <param name="options"> Update Participant parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of Participant </returns>
        public static async System.Threading.Tasks.Task <ParticipantResource> UpdateAsync(UpdateParticipantOptions options, ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = await client.RequestAsync(BuildUpdateRequest(options, client));

            return(FromJson(response.Content));
        }