/// <summary>
        /// Update an s access to a specific Sync List.
        /// </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));
        }
示例#2
0
        /// <summary>
        /// Update an s access to a specific Sync List.
        /// </summary>
        ///
        /// <param name="pathServiceSid"> Service Sid. </param>
        /// <param name="pathSessionSid"> Session Sid. </param>
        /// <param name="pathSid"> A string that uniquely identifies this Participant. </param>
        /// <param name="participantType"> The Type of this Participant </param>
        /// <param name="identifier"> The Participant's contact identifier, normally a phone number. </param>
        /// <param name="friendlyName"> A human readable description of this resource </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 pathServiceSid, string pathSessionSid, string pathSid, ParticipantResource.ParticipantTypeEnum participantType = null, string identifier = null, string friendlyName = null, ITwilioRestClient client = null)
        {
            var options = new UpdateParticipantOptions(pathServiceSid, pathSessionSid, pathSid)
            {
                ParticipantType = participantType, Identifier = identifier, FriendlyName = friendlyName
            };

            return(await UpdateAsync(options, client));
        }
示例#3
0
        /// <summary>
        /// Update an s access to a specific Sync List.
        /// </summary>
        ///
        /// <param name="pathServiceSid"> Service Sid. </param>
        /// <param name="pathSessionSid"> Session Sid. </param>
        /// <param name="pathSid"> A string that uniquely identifies this Participant. </param>
        /// <param name="participantType"> The Type of this Participant </param>
        /// <param name="identifier"> The Participant's contact identifier, normally a phone number. </param>
        /// <param name="friendlyName"> A human readable description of this resource </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of Participant </returns>
        public static ParticipantResource Update(string pathServiceSid, string pathSessionSid, string pathSid, ParticipantResource.ParticipantTypeEnum participantType = null, string identifier = null, string friendlyName = null, ITwilioRestClient client = null)
        {
            var options = new UpdateParticipantOptions(pathServiceSid, pathSessionSid, pathSid)
            {
                ParticipantType = participantType, Identifier = identifier, FriendlyName = friendlyName
            };

            return(Update(options, client));
        }
 private static Request BuildUpdateRequest(UpdateParticipantOptions options, ITwilioRestClient client)
 {
     return(new Request(
                HttpMethod.Post,
                Rest.Domain.Preview,
                "/Proxy/Services/" + options.PathServiceSid + "/Sessions/" + options.PathSessionSid + "/Participants/" + options.PathSid + "",
                client.Region,
                postParams: options.GetParams()
                ));
 }
        /// <summary>
        /// Update an s access to a specific Sync List.
        /// </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));
        }