Class: Twilio::REST::Video::V1::RoomContext::ParticipantContext::SubscribedTrackInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Video::V1::RoomContext::ParticipantContext::SubscribedTrackInstance
- Defined in:
- lib/twilio-ruby/rest/video/v1/room/participant/subscribed_track.rb
Instance Method Summary collapse
-
#context ⇒ SubscribedTrackContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#date_created ⇒ Time
The date and time in GMT when the resource was created specified in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.
-
#date_updated ⇒ Time
The date and time in GMT when the resource was last updated specified in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.
-
#enabled ⇒ Boolean
Whether the track is enabled.
-
#fetch ⇒ SubscribedTrackInstance
Fetch the SubscribedTrackInstance.
-
#initialize(version, payload, room_sid: nil, participant_sid: nil, sid: nil) ⇒ SubscribedTrackInstance
constructor
Initialize the SubscribedTrackInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
- #kind ⇒ Kind
-
#name ⇒ String
The track name.
-
#participant_sid ⇒ String
The SID of the participant that subscribes to the track.
-
#publisher_sid ⇒ String
The SID of the participant that publishes the track.
-
#room_sid ⇒ String
The SID of the room where the track is published.
-
#sid ⇒ String
The unique string that we created to identify the RoomParticipantSubscribedTrack resource.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#url ⇒ String
The absolute URL of the resource.
Constructor Details
#initialize(version, payload, room_sid: nil, participant_sid: nil, sid: nil) ⇒ SubscribedTrackInstance
Initialize the SubscribedTrackInstance
225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 |
# File 'lib/twilio-ruby/rest/video/v1/room/participant/subscribed_track.rb', line 225 def initialize(version, payload , room_sid: nil, participant_sid: nil, sid: nil) super(version) # Marshaled Properties @properties = { 'sid' => payload['sid'], 'participant_sid' => payload['participant_sid'], 'publisher_sid' => payload['publisher_sid'], 'room_sid' => payload['room_sid'], 'name' => payload['name'], 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']), 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']), 'enabled' => payload['enabled'], 'kind' => payload['kind'], 'url' => payload['url'], } # Context @instance_context = nil @params = { 'room_sid' => room_sid || @properties['room_sid'] ,'participant_sid' => participant_sid || @properties['participant_sid'] ,'sid' => sid || @properties['sid'] , } end |
Instance Method Details
#context ⇒ SubscribedTrackContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
251 252 253 254 255 256 |
# File 'lib/twilio-ruby/rest/video/v1/room/participant/subscribed_track.rb', line 251 def context unless @instance_context @instance_context = SubscribedTrackContext.new(@version , @params['room_sid'], @params['participant_sid'], @params['sid']) end @instance_context end |
#date_created ⇒ Time
Returns The date and time in GMT when the resource was created specified in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.
290 291 292 |
# File 'lib/twilio-ruby/rest/video/v1/room/participant/subscribed_track.rb', line 290 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](en.wikipedia.org/wiki/ISO_8601) format.
296 297 298 |
# File 'lib/twilio-ruby/rest/video/v1/room/participant/subscribed_track.rb', line 296 def date_updated @properties['date_updated'] end |
#enabled ⇒ Boolean
Returns Whether the track is enabled.
302 303 304 |
# File 'lib/twilio-ruby/rest/video/v1/room/participant/subscribed_track.rb', line 302 def enabled @properties['enabled'] end |
#fetch ⇒ SubscribedTrackInstance
Fetch the SubscribedTrackInstance
321 322 323 324 |
# File 'lib/twilio-ruby/rest/video/v1/room/participant/subscribed_track.rb', line 321 def fetch context.fetch end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
335 336 337 338 |
# File 'lib/twilio-ruby/rest/video/v1/room/participant/subscribed_track.rb', line 335 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Video.V1.SubscribedTrackInstance #{values}>" end |
#kind ⇒ Kind
308 309 310 |
# File 'lib/twilio-ruby/rest/video/v1/room/participant/subscribed_track.rb', line 308 def kind @properties['kind'] end |
#name ⇒ String
Returns The track name. Must have no more than 128 characters and be unique among the participant’s published tracks.
284 285 286 |
# File 'lib/twilio-ruby/rest/video/v1/room/participant/subscribed_track.rb', line 284 def name @properties['name'] end |
#participant_sid ⇒ String
Returns The SID of the participant that subscribes to the track.
266 267 268 |
# File 'lib/twilio-ruby/rest/video/v1/room/participant/subscribed_track.rb', line 266 def participant_sid @properties['participant_sid'] end |
#publisher_sid ⇒ String
Returns The SID of the participant that publishes the track.
272 273 274 |
# File 'lib/twilio-ruby/rest/video/v1/room/participant/subscribed_track.rb', line 272 def publisher_sid @properties['publisher_sid'] end |
#room_sid ⇒ String
Returns The SID of the room where the track is published.
278 279 280 |
# File 'lib/twilio-ruby/rest/video/v1/room/participant/subscribed_track.rb', line 278 def room_sid @properties['room_sid'] end |
#sid ⇒ String
Returns The unique string that we created to identify the RoomParticipantSubscribedTrack resource.
260 261 262 |
# File 'lib/twilio-ruby/rest/video/v1/room/participant/subscribed_track.rb', line 260 def sid @properties['sid'] end |
#to_s ⇒ Object
Provide a user friendly representation
328 329 330 331 |
# File 'lib/twilio-ruby/rest/video/v1/room/participant/subscribed_track.rb', line 328 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Video.V1.SubscribedTrackInstance #{values}>" end |
#url ⇒ String
Returns The absolute URL of the resource.
314 315 316 |
# File 'lib/twilio-ruby/rest/video/v1/room/participant/subscribed_track.rb', line 314 def url @properties['url'] end |