Class: Twilio::REST::Api::V2010::AccountContext::CallContext::EventInstance

Inherits:
InstanceResource
  • Object
show all
Defined in:
lib/twilio-ruby/rest/api/v2010/account/call/event.rb

Instance Method Summary collapse

Constructor Details

#initialize(version, payload, account_sid: nil, 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) (defaults to: nil)

    The SID of the Account that created this Event resource.

  • sid (String)

    The SID of the Call resource to fetch.



254
255
256
257
258
259
260
261
262
263
# File 'lib/twilio-ruby/rest/api/v2010/account/call/event.rb', line 254

def initialize(version, payload , account_sid: nil, call_sid: nil)
    super(version)
    
    
    # Marshaled Properties
    @properties = { 
        'request' => payload['request'],
        'response' => payload['response'],
    }
end

Instance Method Details

#inspectObject

Provide a detailed, user friendly representation



286
287
288
# File 'lib/twilio-ruby/rest/api/v2010/account/call/event.rb', line 286

def inspect
    "<Twilio.Api.V2010.EventInstance>"
end

#requestHash

Returns Contains a dictionary representing the request of the call.

Returns:

  • (Hash)

    Contains a dictionary representing the request of the call.



268
269
270
# File 'lib/twilio-ruby/rest/api/v2010/account/call/event.rb', line 268

def request
    @properties['request']
end

#responseHash

Returns Contains a dictionary representing the call response, including a list of the call events.

Returns:

  • (Hash)

    Contains a dictionary representing the call response, including a list of the call events.



274
275
276
# File 'lib/twilio-ruby/rest/api/v2010/account/call/event.rb', line 274

def response
    @properties['response']
end

#to_sObject

Provide a user friendly representation



280
281
282
# File 'lib/twilio-ruby/rest/api/v2010/account/call/event.rb', line 280

def to_s
    "<Twilio.Api.V2010.EventInstance>"
end