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

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

Instance Method Summary collapse

Constructor Details

#initialize(version, room_sid, sid) ⇒ AnonymizeContext

Initialize the AnonymizeContext

Parameters:

  • version (Version)

    Version that contains the resource

  • room_sid (String)

    The SID of the room with the participant to update.

  • sid (String)

    The SID of the RoomParticipant resource to update.



53
54
55
56
57
58
59
60
61
# File 'lib/twilio-ruby/rest/video/v1/room/participant/anonymize.rb', line 53

def initialize(version, room_sid, sid)
    super(version)

    # Path Solution
    @solution = { room_sid: room_sid, sid: sid,  }
    @uri = "/Rooms/#{@solution[:room_sid]}/Participants/#{@solution[:sid]}/Anonymize"

    
end

Instance Method Details

#inspectObject

Provide a detailed, user friendly representation



92
93
94
95
# File 'lib/twilio-ruby/rest/video/v1/room/participant/anonymize.rb', line 92

def inspect
    context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
    "#<Twilio.Video.V1.AnonymizeContext #{context}>"
end

#to_sObject

Provide a user friendly representation



85
86
87
88
# File 'lib/twilio-ruby/rest/video/v1/room/participant/anonymize.rb', line 85

def to_s
    context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
    "#<Twilio.Video.V1.AnonymizeContext #{context}>"
end

#updateAnonymizeInstance

Update the AnonymizeInstance

Returns:



65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# File 'lib/twilio-ruby/rest/video/v1/room/participant/anonymize.rb', line 65

def update

    headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
    
    
    
    
    
    payload = @version.update('POST', @uri, headers: headers)
    AnonymizeInstance.new(
        @version,
        payload,
        room_sid: @solution[:room_sid],
        sid: @solution[:sid],
    )
end