Class: SignalWire::Relay::FaxEvent
- Inherits:
-
RelayEvent
- Object
- RelayEvent
- SignalWire::Relay::FaxEvent
- Defined in:
- lib/signalwire/relay/relay_event.rb
Overview
calling.call.fax
Instance Attribute Summary collapse
-
#control_id ⇒ Object
readonly
Returns the value of attribute control_id.
-
#fax ⇒ Object
readonly
Returns the value of attribute fax.
Attributes inherited from RelayEvent
#call_id, #event_type, #params, #timestamp
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(control_id: '', fax: {}, **base) ⇒ FaxEvent
constructor
A new instance of FaxEvent.
Constructor Details
#initialize(control_id: '', fax: {}, **base) ⇒ FaxEvent
Returns a new instance of FaxEvent.
229 230 231 232 233 |
# File 'lib/signalwire/relay/relay_event.rb', line 229 def initialize(control_id: '', fax: {}, **base) super(**base) @control_id = control_id @fax = fax end |
Instance Attribute Details
#control_id ⇒ Object (readonly)
Returns the value of attribute control_id.
216 217 218 |
# File 'lib/signalwire/relay/relay_event.rb', line 216 def control_id @control_id end |
#fax ⇒ Object (readonly)
Returns the value of attribute fax.
216 217 218 |
# File 'lib/signalwire/relay/relay_event.rb', line 216 def fax @fax end |
Class Method Details
.from_payload(payload) ⇒ Object
218 219 220 221 222 223 224 225 226 227 |
# File 'lib/signalwire/relay/relay_event.rb', line 218 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'] || '', fax: p['fax'] || {} ) end |