Class: Twilio::REST::Video::V1::RoomContext::ParticipantContext::SubscribeRulesInstance

Inherits:
InstanceResource
  • Object
show all
Defined in:
lib/twilio-ruby/rest/video/v1/room/participant/subscribe_rules.rb

Instance Method Summary collapse

Constructor Details

#initialize(version, payload, room_sid: nil, participant_sid: nil) ⇒ SubscribeRulesInstance

Initialize the SubscribeRulesInstance

Parameters:

  • version (Version)

    Version that contains the resource

  • payload (Hash)

    payload that contains response from Twilio

  • account_sid (String)

    The SID of the Account that created this SubscribeRules resource.

  • sid (String)

    The SID of the Call resource to fetch.



130
131
132
133
134
135
136
137
138
139
140
141
# File 'lib/twilio-ruby/rest/video/v1/room/participant/subscribe_rules.rb', line 130

def initialize(version, payload , room_sid: nil, participant_sid: nil)
    super(version)
    
    # Marshaled Properties
    @properties = { 
        'participant_sid' => payload['participant_sid'],
        'room_sid' => payload['room_sid'],
        'rules' => payload['rules'],
        'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
        'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
    }
end

Instance Method Details

#date_createdTime

Returns The date and time in GMT when the resource was created specified in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.

Returns:



164
165
166
# File 'lib/twilio-ruby/rest/video/v1/room/participant/subscribe_rules.rb', line 164

def date_created
    @properties['date_created']
end

#date_updatedTime

Returns The date and time in GMT when the resource was last updated specified in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.

Returns:



170
171
172
# File 'lib/twilio-ruby/rest/video/v1/room/participant/subscribe_rules.rb', line 170

def date_updated
    @properties['date_updated']
end

#inspectObject

Provide a detailed, user friendly representation



182
183
184
# File 'lib/twilio-ruby/rest/video/v1/room/participant/subscribe_rules.rb', line 182

def inspect
    "<Twilio.Video.V1.SubscribeRulesInstance>"
end

#participant_sidString

Returns The SID of the Participant resource for the Subscribe Rules.

Returns:

  • (String)

    The SID of the Participant resource for the Subscribe Rules.



146
147
148
# File 'lib/twilio-ruby/rest/video/v1/room/participant/subscribe_rules.rb', line 146

def participant_sid
    @properties['participant_sid']
end

#room_sidString

Returns The SID of the Room resource for the Subscribe Rules.

Returns:

  • (String)

    The SID of the Room resource for the Subscribe Rules



152
153
154
# File 'lib/twilio-ruby/rest/video/v1/room/participant/subscribe_rules.rb', line 152

def room_sid
    @properties['room_sid']
end

#rulesArray<VideoV1RoomRoomParticipantRoomParticipantSubscribeRuleRules>

Returns A collection of Subscribe Rules that describe how to include or exclude matching tracks. See the [Specifying Subscribe Rules](www.twilio.com/docs/video/api/track-subscriptions#specifying-sr) section for further information.

Returns:



158
159
160
# File 'lib/twilio-ruby/rest/video/v1/room/participant/subscribe_rules.rb', line 158

def rules
    @properties['rules']
end

#to_sObject

Provide a user friendly representation



176
177
178
# File 'lib/twilio-ruby/rest/video/v1/room/participant/subscribe_rules.rb', line 176

def to_s
    "<Twilio.Video.V1.SubscribeRulesInstance>"
end