Class: Twilio::REST::Insights::V1::ConferenceContext::ConferenceParticipantContext

Inherits:
Twilio::REST::InstanceContext show all
Defined in:
lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb

Instance Method Summary collapse

Constructor Details

#initialize(version, conference_sid, participant_sid) ⇒ ConferenceParticipantContext

Initialize the ConferenceParticipantContext



157
158
159
160
161
162
163
164
165
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 157

def initialize(version, conference_sid, participant_sid)
    super(version)

    # Path Solution
    @solution = { conference_sid: conference_sid, participant_sid: participant_sid,  }
    @uri = "/Conferences/#{@solution[:conference_sid]}/Participants/#{@solution[:participant_sid]}"

    
end

Instance Method Details

#fetch(events: :unset, metrics: :unset) ⇒ ConferenceParticipantInstance

Fetch the ConferenceParticipantInstance



171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 171

def fetch(
    events: :unset, 
    metrics: :unset
)

    params = Twilio::Values.of({
        'Events' => events,
        'Metrics' => metrics,
    })
    headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
    
    
    
    
    
    payload = @version.fetch('GET', @uri, params: params, headers: headers)
    ConferenceParticipantInstance.new(
        @version,
        payload,
        conference_sid: @solution[:conference_sid],
        participant_sid: @solution[:participant_sid],
    )
end

#inspectObject

Provide a detailed, user friendly representation



205
206
207
208
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 205

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

#to_sObject

Provide a user friendly representation



198
199
200
201
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 198

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