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

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

Defined Under Namespace

Classes: ConferenceParticipantContext, ConferenceParticipantInstance, ConferenceParticipantList, ConferenceParticipantPage

Instance Method Summary collapse

Constructor Details

#initialize(version, conference_sid) ⇒ ConferenceContext

Initialize the ConferenceContext

Parameters:

  • version (Version)

    Version that contains the resource

  • conference_sid (String)

    The unique SID identifier of the Conference.



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

def initialize(version, conference_sid)
    super(version)

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

    # Dependents
    @conference_participants = nil
end

Instance Method Details

#conference_participants(participant_sid = :unset) ⇒ ConferenceParticipantList, ConferenceParticipantContext

Access the conference_participants

Returns:

Raises:

  • (ArgumentError)


219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
# File 'lib/twilio-ruby/rest/insights/v1/conference.rb', line 219

def conference_participants(participant_sid=:unset)

    raise ArgumentError, 'participant_sid cannot be nil' if participant_sid.nil?

    if participant_sid != :unset
        return ConferenceParticipantContext.new(@version, @solution[:conference_sid],participant_sid )
    end

    unless @conference_participants
        @conference_participants = ConferenceParticipantList.new(
            @version, conference_sid: @solution[:conference_sid], )
    end

 @conference_participants
end

#fetchConferenceInstance

Fetch the ConferenceInstance

Returns:



205
206
207
208
209
210
211
212
213
# File 'lib/twilio-ruby/rest/insights/v1/conference.rb', line 205

def fetch

    payload = @version.fetch('GET', @uri)
    ConferenceInstance.new(
        @version,
        payload,
        conference_sid: @solution[:conference_sid],
    )
end

#inspectObject

Provide a detailed, user friendly representation



244
245
246
247
# File 'lib/twilio-ruby/rest/insights/v1/conference.rb', line 244

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

#to_sObject

Provide a user friendly representation



237
238
239
240
# File 'lib/twilio-ruby/rest/insights/v1/conference.rb', line 237

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