Class: SignalWire::Relay::ConferenceEvent

Inherits:
RelayEvent
  • Object
show all
Defined in:
lib/signalwire/relay/relay_event.rb

Overview

calling.conference

Instance Attribute Summary collapse

Attributes inherited from RelayEvent

#call_id, #event_type, #params, #timestamp

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(conference_id: '', name: '', status: '', **base) ⇒ ConferenceEvent

Returns a new instance of ConferenceEvent.



522
523
524
525
526
527
# File 'lib/signalwire/relay/relay_event.rb', line 522

def initialize(conference_id: '', name: '', status: '', **base)
  super(**base)
  @conference_id = conference_id
  @name          = name
  @status        = status
end

Instance Attribute Details

#conference_idObject (readonly)

Returns the value of attribute conference_id.



508
509
510
# File 'lib/signalwire/relay/relay_event.rb', line 508

def conference_id
  @conference_id
end

#nameObject (readonly)

Returns the value of attribute name.



508
509
510
# File 'lib/signalwire/relay/relay_event.rb', line 508

def name
  @name
end

#statusObject (readonly)

Returns the value of attribute status.



508
509
510
# File 'lib/signalwire/relay/relay_event.rb', line 508

def status
  @status
end

Class Method Details

.from_payload(payload) ⇒ Object



510
511
512
513
514
515
516
517
518
519
520
# File 'lib/signalwire/relay/relay_event.rb', line 510

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.timestamp,
    conference_id: p['conference_id'] || '',
    name:          p['name'] || '',
    status:        p['status'] || ''
  )
end