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.



192
193
194
195
196
197
198
199
200
201
202
203
204
# File 'lib/twilio-ruby/rest/video/v1/room/participant/subscribe_rules.rb', line 192

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_created ⇒ Time

Returns The date and time in GMT when the resource was created specified in ISO 8601 format.

Returns:

  • (Time) —

    The date and time in GMT when the resource was created specified in ISO 8601 format.



227
228
229
# File 'lib/twilio-ruby/rest/video/v1/room/participant/subscribe_rules.rb', line 227

def date_created
    @properties['date_created']
end

#date_updated ⇒ Time

Returns The date and time in GMT when the resource was last updated specified in ISO 8601 format.

Returns:

  • (Time) —

    The date and time in GMT when the resource was last updated specified in ISO 8601 format.



233
234
235
# File 'lib/twilio-ruby/rest/video/v1/room/participant/subscribe_rules.rb', line 233

def date_updated
    @properties['date_updated']
end

#inspect ⇒ Object

Provide a detailed, user friendly representation



245
246
247
# File 'lib/twilio-ruby/rest/video/v1/room/participant/subscribe_rules.rb', line 245

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

#participant_sid ⇒ String

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

Returns:

  • (String) —

    The SID of the Participant resource for the Subscribe Rules.



209
210
211
# File 'lib/twilio-ruby/rest/video/v1/room/participant/subscribe_rules.rb', line 209

def participant_sid
    @properties['participant_sid']
end

#room_sid ⇒ String

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

Returns:

  • (String) —

    The SID of the Room resource for the Subscribe Rules



215
216
217
# File 'lib/twilio-ruby/rest/video/v1/room/participant/subscribe_rules.rb', line 215

def room_sid
    @properties['room_sid']
end

#rules ⇒ Array<VideoV1RoomRoomParticipantRoomParticipantSubscribeRuleRules>

Returns A collection of Subscribe Rules that describe how to include or exclude matching tracks. See the Specifying Subscribe Rules section for further information.

Returns:

  • (Array<VideoV1RoomRoomParticipantRoomParticipantSubscribeRuleRules>) —

    A collection of Subscribe Rules that describe how to include or exclude matching tracks. See the Specifying Subscribe Rules section for further information.



221
222
223
# File 'lib/twilio-ruby/rest/video/v1/room/participant/subscribe_rules.rb', line 221

def rules
    @properties['rules']
end

#to_s ⇒ Object

Provide a user friendly representation



239
240
241
# File 'lib/twilio-ruby/rest/video/v1/room/participant/subscribe_rules.rb', line 239

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