Class: Twilio::REST::Insights::V1::CallContext::EventInstance

Inherits:
Twilio::REST::InstanceResource show all
Defined in:
lib/twilio-ruby/rest/insights/v1/call/event.rb

Instance Method Summary collapse

Constructor Details

#initialize(version, payload, call_sid: nil) ⇒ EventInstance

Initialize the EventInstance

Parameters:

  • version (Version)

    Version that contains the resource

  • payload (Hash)

    payload that contains response from Twilio

  • account_sid (String)

    The SID of the Account that created this Event resource.

  • sid (String)

    The SID of the Call resource to fetch.



171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
# File 'lib/twilio-ruby/rest/insights/v1/call/event.rb', line 171

def initialize(version, payload , call_sid: nil)
    super(version)
    
    # Marshaled Properties
    @properties = { 
        'timestamp' => payload['timestamp'],
        'call_sid' => payload['call_sid'],
        'account_sid' => payload['account_sid'],
        'edge' => payload['edge'],
        'group' => payload['group'],
        'level' => payload['level'],
        'name' => payload['name'],
        'carrier_edge' => payload['carrier_edge'],
        'sip_edge' => payload['sip_edge'],
        'sdk_edge' => payload['sdk_edge'],
        'client_edge' => payload['client_edge'],
    }
end

Instance Method Details

#account_sidString

Returns The unique SID identifier of the Account.

Returns:

  • (String)

    The unique SID identifier of the Account.



205
206
207
# File 'lib/twilio-ruby/rest/insights/v1/call/event.rb', line 205

def 
    @properties['account_sid']
end

#call_sidString

Returns The unique SID identifier of the Call.

Returns:

  • (String)

    The unique SID identifier of the Call.



199
200
201
# File 'lib/twilio-ruby/rest/insights/v1/call/event.rb', line 199

def call_sid
    @properties['call_sid']
end

#carrier_edgeHash

Returns Represents the connection between Twilio and our immediate carrier partners. The events here describe the call lifecycle as reported by Twilio’s carrier media gateways.

Returns:

  • (Hash)

    Represents the connection between Twilio and our immediate carrier partners. The events here describe the call lifecycle as reported by Twilio’s carrier media gateways.



235
236
237
# File 'lib/twilio-ruby/rest/insights/v1/call/event.rb', line 235

def carrier_edge
    @properties['carrier_edge']
end

#client_edgeHash

Returns Represents the Twilio media gateway for Client calls. The events here describe the call lifecycle as reported by Twilio’s Voice SDK media gateways.

Returns:

  • (Hash)

    Represents the Twilio media gateway for Client calls. The events here describe the call lifecycle as reported by Twilio’s Voice SDK media gateways.



253
254
255
# File 'lib/twilio-ruby/rest/insights/v1/call/event.rb', line 253

def client_edge
    @properties['client_edge']
end

#edgeTwilioEdge

Returns:

  • (TwilioEdge)


211
212
213
# File 'lib/twilio-ruby/rest/insights/v1/call/event.rb', line 211

def edge
    @properties['edge']
end

#groupString

Returns Event group.

Returns:

  • (String)

    Event group.



217
218
219
# File 'lib/twilio-ruby/rest/insights/v1/call/event.rb', line 217

def group
    @properties['group']
end

#inspectObject

Provide a detailed, user friendly representation



265
266
267
# File 'lib/twilio-ruby/rest/insights/v1/call/event.rb', line 265

def inspect
    "<Twilio.Insights.V1.EventInstance>"
end

#levelLevel

Returns:

  • (Level)


223
224
225
# File 'lib/twilio-ruby/rest/insights/v1/call/event.rb', line 223

def level
    @properties['level']
end

#nameString

Returns Event name.

Returns:

  • (String)

    Event name.



229
230
231
# File 'lib/twilio-ruby/rest/insights/v1/call/event.rb', line 229

def name
    @properties['name']
end

#sdk_edgeHash

Returns Represents the Voice SDK running locally in the browser or in the Android/iOS application. The events here are emitted by the Voice SDK in response to certain call progress events, network changes, or call quality conditions.

Returns:

  • (Hash)

    Represents the Voice SDK running locally in the browser or in the Android/iOS application. The events here are emitted by the Voice SDK in response to certain call progress events, network changes, or call quality conditions.



247
248
249
# File 'lib/twilio-ruby/rest/insights/v1/call/event.rb', line 247

def sdk_edge
    @properties['sdk_edge']
end

#sip_edgeHash

Returns Represents the Twilio media gateway for SIP interface and SIP trunking calls. The events here describe the call lifecycle as reported by Twilio’s public media gateways.

Returns:

  • (Hash)

    Represents the Twilio media gateway for SIP interface and SIP trunking calls. The events here describe the call lifecycle as reported by Twilio’s public media gateways.



241
242
243
# File 'lib/twilio-ruby/rest/insights/v1/call/event.rb', line 241

def sip_edge
    @properties['sip_edge']
end

#timestampString

Returns Event time.

Returns:

  • (String)

    Event time.



193
194
195
# File 'lib/twilio-ruby/rest/insights/v1/call/event.rb', line 193

def timestamp
    @properties['timestamp']
end

#to_sObject

Provide a user friendly representation



259
260
261
# File 'lib/twilio-ruby/rest/insights/v1/call/event.rb', line 259

def to_s
    "<Twilio.Insights.V1.EventInstance>"
end