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

Parameters:

  • version (Version)

    Version that contains the resource

  • conference_sid (String)

    The unique SID identifier of the Conference.

  • participant_sid (String)

    The unique SID identifier of the Participant.


177
178
179
180
181
182
183
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 177

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

Parameters:

  • events (String) (defaults to: :unset)

    Conference events generated by application or participant activity; e.g. `hold`, `mute`, etc.

  • metrics (String) (defaults to: :unset)

    Object. Contains participant call quality metrics.

Returns:


191
192
193
194
195
196
197
198
199
200
201
202
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 191

def fetch(events: :unset, metrics: :unset)
  params = Twilio::Values.of({'Events' => events, 'Metrics' => metrics, })

  payload = @version.fetch('GET', @uri, params: params)

  ConferenceParticipantInstance.new(
      @version,
      payload,
      conference_sid: @solution[:conference_sid],
      participant_sid: @solution[:participant_sid],
  )
end

#inspectObject

Provide a detailed, user friendly representation


213
214
215
216
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 213

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

#to_sObject

Provide a user friendly representation


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

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