/// <summary> /// update /// </summary> /// <param name="options"> Update RoomParticipant parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of RoomParticipant </returns> public static RoomParticipantResource Update(UpdateRoomParticipantOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = client.Request(BuildUpdateRequest(options, client)); return(FromJson(response.Content)); }
private static Request BuildUpdateRequest(UpdateRoomParticipantOptions options, ITwilioRestClient client) { return(new Request( HttpMethod.Post, Rest.Domain.Video, "/v1/Rooms/" + options.PathRoomSid + "/Participants/" + options.PathSid + "", client.Region, postParams: options.GetParams() )); }
/// <summary> /// update /// </summary> /// <param name="pathRoomSid"> The room_sid </param> /// <param name="pathSid"> The sid </param> /// <param name="status"> The status </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of RoomParticipant </returns> public static async System.Threading.Tasks.Task <RoomParticipantResource> UpdateAsync(string pathRoomSid, string pathSid, RoomParticipantResource.StatusEnum status = null, ITwilioRestClient client = null) { var options = new UpdateRoomParticipantOptions(pathRoomSid, pathSid) { Status = status }; return(await UpdateAsync(options, client)); }
/// <summary> /// update /// </summary> /// <param name="pathRoomSid"> The room_sid </param> /// <param name="pathSid"> The sid </param> /// <param name="status"> The status </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of RoomParticipant </returns> public static RoomParticipantResource Update(string pathRoomSid, string pathSid, RoomParticipantResource.StatusEnum status = null, ITwilioRestClient client = null) { var options = new UpdateRoomParticipantOptions(pathRoomSid, pathSid) { Status = status }; return(Update(options, client)); }
/// <summary> /// update /// </summary> /// <param name="options"> Update RoomParticipant parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of RoomParticipant </returns> public static async System.Threading.Tasks.Task <RoomParticipantResource> UpdateAsync(UpdateRoomParticipantOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = await client.RequestAsync(BuildUpdateRequest(options, client)); return(FromJson(response.Content)); }