Class: SignalWire::Relay::HoldEvent
- Inherits:
-
RelayEvent
- Object
- RelayEvent
- SignalWire::Relay::HoldEvent
- Defined in:
- lib/signalwire/relay/relay_event.rb
Overview
calling.call.hold
Instance Attribute Summary collapse
-
#state ⇒ Object
readonly
Returns the value of attribute state.
Attributes inherited from RelayEvent
#call_id, #event_type, #params, #timestamp
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(state: '', **base) ⇒ HoldEvent
constructor
A new instance of HoldEvent.
Constructor Details
#initialize(state: '', **base) ⇒ HoldEvent
Returns a new instance of HoldEvent.
500 501 502 503 |
# File 'lib/signalwire/relay/relay_event.rb', line 500 def initialize(state: '', **base) super(**base) @state = state end |
Instance Attribute Details
#state ⇒ Object (readonly)
Returns the value of attribute state.
488 489 490 |
# File 'lib/signalwire/relay/relay_event.rb', line 488 def state @state end |
Class Method Details
.from_payload(payload) ⇒ Object
490 491 492 493 494 495 496 497 498 |
# File 'lib/signalwire/relay/relay_event.rb', line 490 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., state: p['state'] || '' ) end |