/// <summary> /// Update the Subscribe Rules for the Participant /// </summary> /// <param name="options"> Update SubscribeRules parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of SubscribeRules </returns> public static SubscribeRulesResource Update(UpdateSubscribeRulesOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = client.Request(BuildUpdateRequest(options, client)); return(FromJson(response.Content)); }
private static Request BuildUpdateRequest(UpdateSubscribeRulesOptions options, ITwilioRestClient client) { return(new Request( HttpMethod.Post, Rest.Domain.Video, "/v1/Rooms/" + options.PathRoomSid + "/Participants/" + options.PathParticipantSid + "/SubscribeRules", postParams: options.GetParams() )); }
/// <summary> /// Update the Subscribe Rules for the Participant /// </summary> /// <param name="pathRoomSid"> The SID of the Room resource where the subscribe rules to update apply </param> /// <param name="pathParticipantSid"> The SID of the Participant resource to update the Subscribe Rules </param> /// <param name="rules"> A JSON-encoded array of subscribe rules </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of SubscribeRules </returns> public static async System.Threading.Tasks.Task <SubscribeRulesResource> UpdateAsync(string pathRoomSid, string pathParticipantSid, object rules = null, ITwilioRestClient client = null) { var options = new UpdateSubscribeRulesOptions(pathRoomSid, pathParticipantSid) { Rules = rules }; return(await UpdateAsync(options, client)); }
/// <summary> /// Update the Subscribe Rules for the Participant /// </summary> /// <param name="pathRoomSid"> The SID of the Room resource where the subscribe rules to update apply </param> /// <param name="pathParticipantSid"> The SID of the Participant resource to update the Subscribe Rules </param> /// <param name="rules"> A JSON-encoded array of subscribe rules </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of SubscribeRules </returns> public static SubscribeRulesResource Update(string pathRoomSid, string pathParticipantSid, object rules = null, ITwilioRestClient client = null) { var options = new UpdateSubscribeRulesOptions(pathRoomSid, pathParticipantSid) { Rules = rules }; return(Update(options, client)); }
/// <summary> /// Update the Subscribe Rules for the Participant /// </summary> /// <param name="options"> Update SubscribeRules parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of SubscribeRules </returns> public static async System.Threading.Tasks.Task <SubscribeRulesResource> UpdateAsync(UpdateSubscribeRulesOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = await client.RequestAsync(BuildUpdateRequest(options, client)); return(FromJson(response.Content)); }