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

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

Instance Method Summary collapse

Constructor Details

#initialize(version, payload, room_sid: nil, sid: nil) ⇒ AnonymizeInstance

Initialize the AnonymizeInstance

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 Anonymize resource.

  • sid (String) (defaults to: nil)

    The SID of the Call resource to fetch.



129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
# File 'lib/twilio-ruby/rest/video/v1/room/participant/anonymize.rb', line 129

def initialize(version, payload , room_sid: nil, sid: nil)
    super(version)
    
    # Marshaled Properties
    @properties = { 
        'sid' => payload['sid'],
        'room_sid' => payload['room_sid'],
        'account_sid' => payload['account_sid'],
        'status' => payload['status'],
        'identity' => payload['identity'],
        'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
        'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
        'start_time' => Twilio.deserialize_iso8601_datetime(payload['start_time']),
        'end_time' => Twilio.deserialize_iso8601_datetime(payload['end_time']),
        'duration' => payload['duration'] == nil ? payload['duration'] : payload['duration'].to_i,
        'url' => payload['url'],
    }

    # Context
    @instance_context = nil
    @params = { 'room_sid' => room_sid  || @properties['room_sid']  ,'sid' => sid  || @properties['sid']  , }
end

Instance Method Details

#account_sidString

Returns The SID of the [Account](www.twilio.com/docs/iam/api/account) that created the RoomParticipant resource.

Returns:



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

def 
    @properties['account_sid']
end

#contextAnonymizeContext

Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context

Returns:



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

def context
    unless @instance_context
        @instance_context = AnonymizeContext.new(@version , @params['room_sid'], @params['sid'])
    end
    @instance_context
end

#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:



195
196
197
# File 'lib/twilio-ruby/rest/video/v1/room/participant/anonymize.rb', line 195

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:



201
202
203
# File 'lib/twilio-ruby/rest/video/v1/room/participant/anonymize.rb', line 201

def date_updated
    @properties['date_updated']
end

#durationString

Returns The duration in seconds that the participant was ‘connected`. Populated only after the participant is `disconnected`.

Returns:

  • (String)

    The duration in seconds that the participant was ‘connected`. Populated only after the participant is `disconnected`.



219
220
221
# File 'lib/twilio-ruby/rest/video/v1/room/participant/anonymize.rb', line 219

def duration
    @properties['duration']
end

#end_timeTime

Returns The time when the participant disconnected from the room in [ISO 8601](en.wikipedia.org/wiki/ISO_8601#UTC) format.

Returns:



213
214
215
# File 'lib/twilio-ruby/rest/video/v1/room/participant/anonymize.rb', line 213

def end_time
    @properties['end_time']
end

#identityString

Returns The SID of the participant.

Returns:

  • (String)

    The SID of the participant.



189
190
191
# File 'lib/twilio-ruby/rest/video/v1/room/participant/anonymize.rb', line 189

def identity
    @properties['identity']
end

#inspectObject

Provide a detailed, user friendly representation



246
247
248
249
# File 'lib/twilio-ruby/rest/video/v1/room/participant/anonymize.rb', line 246

def inspect
    values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
    "<Twilio.Video.V1.AnonymizeInstance #{values}>"
end

#room_sidString

Returns The SID of the participant’s room.

Returns:

  • (String)

    The SID of the participant’s room.



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

def room_sid
    @properties['room_sid']
end

#sidString

Returns The unique string that we created to identify the RoomParticipant resource.

Returns:

  • (String)

    The unique string that we created to identify the RoomParticipant resource.



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

def sid
    @properties['sid']
end

#start_timeTime

Returns The time of participant connected to the room in [ISO 8601](en.wikipedia.org/wiki/ISO_8601#UTC) format.

Returns:



207
208
209
# File 'lib/twilio-ruby/rest/video/v1/room/participant/anonymize.rb', line 207

def start_time
    @properties['start_time']
end

#statusStatus

Returns:

  • (Status)


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

def status
    @properties['status']
end

#to_sObject

Provide a user friendly representation



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

def to_s
    values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
    "<Twilio.Video.V1.AnonymizeInstance #{values}>"
end

#updateAnonymizeInstance

Update the AnonymizeInstance

Returns:



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

def update

    context.update
end

#urlString

Returns The absolute URL of the resource.

Returns:

  • (String)

    The absolute URL of the resource.



225
226
227
# File 'lib/twilio-ruby/rest/video/v1/room/participant/anonymize.rb', line 225

def url
    @properties['url']
end