/// <summary> /// update /// </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)); }
/// <summary> /// Update a specific Participant. /// </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 Participant Type of this Participant </param> /// <param name="identifier"> The phone number of this Participant. </param> /// <param name="friendlyName"> A human readable description of this resource. </param> /// <param name="proxyIdentifier"> The proxy phone number for this Participant. </param> /// <param name="proxyIdentifierSid"> Proxy Identifier Sid. </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, string proxyIdentifier = null, string proxyIdentifierSid = null, ITwilioRestClient client = null) { var options = new UpdateParticipantOptions(pathServiceSid, pathSessionSid, pathSid) { ParticipantType = participantType, Identifier = identifier, FriendlyName = friendlyName, ProxyIdentifier = proxyIdentifier, ProxyIdentifierSid = proxyIdentifierSid }; return(await UpdateAsync(options, client)); }
/// <summary> /// Update a specific Participant. /// </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 Participant Type of this Participant </param> /// <param name="identifier"> The phone number of this Participant. </param> /// <param name="friendlyName"> A human readable description of this resource. </param> /// <param name="proxyIdentifier"> The proxy phone number for this Participant. </param> /// <param name="proxyIdentifierSid"> Proxy Identifier Sid. </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, string proxyIdentifier = null, string proxyIdentifierSid = null, ITwilioRestClient client = null) { var options = new UpdateParticipantOptions(pathServiceSid, pathSessionSid, pathSid) { ParticipantType = participantType, Identifier = identifier, FriendlyName = friendlyName, ProxyIdentifier = proxyIdentifier, ProxyIdentifierSid = proxyIdentifierSid }; return(Update(options, client)); }
private static Request BuildUpdateRequest(UpdateParticipantOptions options, ITwilioRestClient client) { return(new Request( HttpMethod.Post, Rest.Domain.Proxy, "/v1/Services/" + options.PathServiceSid + "/Sessions/" + options.PathSessionSid + "/Participants/" + options.PathSid + "", client.Region, postParams: options.GetParams() )); }
/// <summary> /// update /// </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)); }