Class: Twilio::REST::Video::V1::RoomContext::RecordingRulesList
- Inherits:
-
ListResource
- Object
- ListResource
- Twilio::REST::Video::V1::RoomContext::RecordingRulesList
- Defined in:
- lib/twilio-ruby/rest/video/v1/room/recording_rules.rb
Instance Method Summary collapse
-
#fetch ⇒ RecordingRulesInstance
Fetch the RecordingRulesInstance.
-
#initialize(version, room_sid: nil) ⇒ RecordingRulesList
constructor
Initialize the RecordingRulesList.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#update(rules: :unset) ⇒ RecordingRulesInstance
Update the RecordingRulesInstance.
Constructor Details
#initialize(version, room_sid: nil) ⇒ RecordingRulesList
Initialize the RecordingRulesList
28 29 30 31 32 33 34 |
# File 'lib/twilio-ruby/rest/video/v1/room/recording_rules.rb', line 28 def initialize(version, room_sid: nil) super(version) # Path Solution @solution = { room_sid: room_sid } @uri = "/Rooms/#{@solution[:room_sid]}/RecordingRules" end |
Instance Method Details
#fetch ⇒ RecordingRulesInstance
Fetch the RecordingRulesInstance
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/twilio-ruby/rest/video/v1/room/recording_rules.rb', line 38 def fetch headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) payload = @version.fetch('GET', @uri, headers: headers) RecordingRulesInstance.new( @version, payload, room_sid: @solution[:room_sid], ) end |
#to_s ⇒ Object
Provide a user friendly representation
84 85 86 |
# File 'lib/twilio-ruby/rest/video/v1/room/recording_rules.rb', line 84 def to_s '#<Twilio.Video.V1.RecordingRulesList>' end |
#update(rules: :unset) ⇒ RecordingRulesInstance
Update the RecordingRulesInstance
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
# File 'lib/twilio-ruby/rest/video/v1/room/recording_rules.rb', line 58 def update( rules: :unset ) data = Twilio::Values.of({ 'Rules' => Twilio.serialize_object(rules), }) headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) payload = @version.update('POST', @uri, data: data, headers: headers) RecordingRulesInstance.new( @version, payload, room_sid: @solution[:room_sid], ) end |