Class: Signalwire::Relay::Event
Class Method Summary
collapse
Instance Method Summary
collapse
#build_request, #error?, #error_code, #error_message, from_json, #id, #initialize, #payload, #to_s
Class Method Details
.from_blade(blade_event) ⇒ Object
41
42
43
|
# File 'lib/signalwire/relay/event.rb', line 41
def self.from_blade(blade_event)
new(blade_event.payload)
end
|
Instance Method Details
#call_id ⇒ Object
13
14
15
16
17
|
# File 'lib/signalwire/relay/event.rb', line 13
def call_id
dig(:params, :params, :params, :call_id)
rescue StandardError
nil
end
|
#call_params ⇒ Object
31
32
33
34
35
|
# File 'lib/signalwire/relay/event.rb', line 31
def call_params
dig(:params, :params, :params)
rescue StandardError
{}
end
|
#control_id ⇒ Object
19
20
21
22
23
|
# File 'lib/signalwire/relay/event.rb', line 19
def control_id
dig(:params, :params, :params, :control_id)
rescue StandardError
nil
end
|
#event_params ⇒ Object
25
26
27
28
29
|
# File 'lib/signalwire/relay/event.rb', line 25
def event_params
dig(:params, :params)
rescue StandardError
{}
end
|
#event_type ⇒ Object
5
6
7
|
# File 'lib/signalwire/relay/event.rb', line 5
def event_type
dig(:params, :params, :event_type)
end
|
#message ⇒ Object
37
38
39
|
# File 'lib/signalwire/relay/event.rb', line 37
def message
event_params[:message]
end
|
#name ⇒ Object
9
10
11
|
# File 'lib/signalwire/relay/event.rb', line 9
def name
event_type
end
|