Class: SignalWire::Relay::QueueEvent
- Inherits:
-
RelayEvent
- Object
- RelayEvent
- SignalWire::Relay::QueueEvent
- Defined in:
- lib/signalwire/relay/relay_event.rb
Overview
calling.call.queue
Instance Attribute Summary collapse
-
#control_id ⇒ Object
readonly
Returns the value of attribute control_id.
-
#position ⇒ Object
readonly
Returns the value of attribute position.
-
#queue_id ⇒ Object
readonly
Returns the value of attribute queue_id.
-
#queue_name ⇒ Object
readonly
Returns the value of attribute queue_name.
-
#size ⇒ Object
readonly
Returns the value of attribute size.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Attributes inherited from RelayEvent
#call_id, #event_type, #params, #timestamp
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(control_id: '', status: '', queue_id: '', queue_name: '', position: 0, size: 0, **base) ⇒ QueueEvent
constructor
A new instance of QueueEvent.
Constructor Details
#initialize(control_id: '', status: '', queue_id: '', queue_name: '', position: 0, size: 0, **base) ⇒ QueueEvent
Returns a new instance of QueueEvent.
423 424 425 426 427 428 429 430 431 432 |
# File 'lib/signalwire/relay/relay_event.rb', line 423 def initialize(control_id: '', status: '', queue_id: '', queue_name: '', position: 0, size: 0, **base) super(**base) @control_id = control_id @status = status @queue_id = queue_id @queue_name = queue_name @position = position @size = size end |
Instance Attribute Details
#control_id ⇒ Object (readonly)
Returns the value of attribute control_id.
406 407 408 |
# File 'lib/signalwire/relay/relay_event.rb', line 406 def control_id @control_id end |
#position ⇒ Object (readonly)
Returns the value of attribute position.
406 407 408 |
# File 'lib/signalwire/relay/relay_event.rb', line 406 def position @position end |
#queue_id ⇒ Object (readonly)
Returns the value of attribute queue_id.
406 407 408 |
# File 'lib/signalwire/relay/relay_event.rb', line 406 def queue_id @queue_id end |
#queue_name ⇒ Object (readonly)
Returns the value of attribute queue_name.
406 407 408 |
# File 'lib/signalwire/relay/relay_event.rb', line 406 def queue_name @queue_name end |
#size ⇒ Object (readonly)
Returns the value of attribute size.
406 407 408 |
# File 'lib/signalwire/relay/relay_event.rb', line 406 def size @size end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
406 407 408 |
# File 'lib/signalwire/relay/relay_event.rb', line 406 def status @status end |
Class Method Details
.from_payload(payload) ⇒ Object
408 409 410 411 412 413 414 415 416 417 418 419 420 421 |
# File 'lib/signalwire/relay/relay_event.rb', line 408 def self.from_payload(payload) base = RelayEvent.from_payload(payload) p = base.params new( event_type: base.event_type, params: base.params, call_id: base.call_id, timestamp: base., control_id: p['control_id'] || '', status: p['status'] || '', queue_id: p['id'] || '', queue_name: p['name'] || '', position: p['position'] || 0, size: p['size'] || 0 ) end |