Class: SignalWire::Relay::CallingErrorEvent
- Inherits:
-
RelayEvent
- Object
- RelayEvent
- SignalWire::Relay::CallingErrorEvent
- Defined in:
- lib/signalwire/relay/relay_event.rb
Overview
calling.error
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
Attributes inherited from RelayEvent
#call_id, #event_type, #params, #timestamp
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(code: '', message: '', **base) ⇒ CallingErrorEvent
constructor
A new instance of CallingErrorEvent.
Constructor Details
#initialize(code: '', message: '', **base) ⇒ CallingErrorEvent
Returns a new instance of CallingErrorEvent.
545 546 547 548 549 |
# File 'lib/signalwire/relay/relay_event.rb', line 545 def initialize(code: '', message: '', **base) super(**base) @code = code @message = end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
532 533 534 |
# File 'lib/signalwire/relay/relay_event.rb', line 532 def code @code end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
532 533 534 |
# File 'lib/signalwire/relay/relay_event.rb', line 532 def @message end |
Class Method Details
.from_payload(payload) ⇒ Object
534 535 536 537 538 539 540 541 542 543 |
# File 'lib/signalwire/relay/relay_event.rb', line 534 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., code: p['code'] || '', message: p['message'] || '' ) end |