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.



153
154
155
156
157
158
159
160
161
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 153

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:



167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 167

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



195
196
197
198
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 195

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

#to_sObject

Provide a user friendly representation



188
189
190
191
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 188

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