Class: VoiceML::EventsList

Inherits:
Object
  • Object
show all
Defined in:
lib/voiceml/models/diagnostics.rb

Overview

‘GET /Calls/Sid/Events` — always an empty list (Twilio-compat stub). The canonical event source is the customer’s StatusCallback URL.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(hash = {}) ⇒ EventsList

Returns a new instance of EventsList.



28
29
30
31
32
33
34
# File 'lib/voiceml/models/diagnostics.rb', line 28

def initialize(hash = {})
  @events    = hash['events']    || []
  @page      = hash['page']      || 0
  @page_size = hash['page_size'] || 0
  @total     = hash['total']     || 0
  @uri       = hash['uri']
end

Instance Attribute Details

#eventsObject (readonly)

Returns the value of attribute events.



26
27
28
# File 'lib/voiceml/models/diagnostics.rb', line 26

def events
  @events
end

#pageObject (readonly)

Returns the value of attribute page.



26
27
28
# File 'lib/voiceml/models/diagnostics.rb', line 26

def page
  @page
end

#page_sizeObject (readonly)

Returns the value of attribute page_size.



26
27
28
# File 'lib/voiceml/models/diagnostics.rb', line 26

def page_size
  @page_size
end

#totalObject (readonly)

Returns the value of attribute total.



26
27
28
# File 'lib/voiceml/models/diagnostics.rb', line 26

def total
  @total
end

#uriObject (readonly)

Returns the value of attribute uri.



26
27
28
# File 'lib/voiceml/models/diagnostics.rb', line 26

def uri
  @uri
end

Class Method Details

.from_hash(hash) ⇒ Object



36
37
38
# File 'lib/voiceml/models/diagnostics.rb', line 36

def self.from_hash(hash)
  new(hash || {})
end