/// <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)); }
private static Request BuildUpdateRequest(UpdateParticipantOptions options, ITwilioRestClient client) { return(new Request( HttpMethod.Post, Rest.Domain.Video, "/v1/Rooms/" + options.PathRoomSid + "/Participants/" + options.PathSid + "", postParams: options.GetParams() )); }
/// <summary> /// update /// </summary> /// <param name="pathRoomSid"> The SID of the room with the participant to update </param> /// <param name="pathSid"> The SID that identifies the resource to update </param> /// <param name="status"> The new status of the 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 pathRoomSid, string pathSid, ParticipantResource.StatusEnum status = null, ITwilioRestClient client = null) { var options = new UpdateParticipantOptions(pathRoomSid, pathSid) { Status = status }; return(await UpdateAsync(options, client)); }
/// <summary> /// update /// </summary> /// <param name="pathRoomSid"> The SID of the room with the participant to update </param> /// <param name="pathSid"> The SID that identifies the resource to update </param> /// <param name="status"> The new status of the resource </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of Participant </returns> public static ParticipantResource Update(string pathRoomSid, string pathSid, ParticipantResource.StatusEnum status = null, ITwilioRestClient client = null) { var options = new UpdateParticipantOptions(pathRoomSid, pathSid) { Status = status }; return(Update(options, client)); }
/// <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)); }