Class: SignalWire::Relay::TranscribeEvent
- Inherits:
-
RelayEvent
- Object
- RelayEvent
- SignalWire::Relay::TranscribeEvent
- Defined in:
- lib/signalwire/relay/relay_event.rb
Overview
calling.call.transcribe
Instance Attribute Summary collapse
-
#control_id ⇒ Object
readonly
Returns the value of attribute control_id.
-
#duration ⇒ Object
readonly
Returns the value of attribute duration.
-
#recording_id ⇒ Object
readonly
Returns the value of attribute recording_id.
-
#size ⇒ Object
readonly
Returns the value of attribute size.
-
#state ⇒ Object
readonly
Returns the value of attribute state.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Attributes inherited from RelayEvent
#call_id, #event_type, #params, #timestamp
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(control_id: '', state: '', url: '', recording_id: '', duration: 0.0, size: 0, **base) ⇒ TranscribeEvent
constructor
A new instance of TranscribeEvent.
Constructor Details
#initialize(control_id: '', state: '', url: '', recording_id: '', duration: 0.0, size: 0, **base) ⇒ TranscribeEvent
Returns a new instance of TranscribeEvent.
474 475 476 477 478 479 480 481 482 483 |
# File 'lib/signalwire/relay/relay_event.rb', line 474 def initialize(control_id: '', state: '', url: '', recording_id: '', duration: 0.0, size: 0, **base) super(**base) @control_id = control_id @state = state @url = url @recording_id = recording_id @duration = duration @size = size end |
Instance Attribute Details
#control_id ⇒ Object (readonly)
Returns the value of attribute control_id.
457 458 459 |
# File 'lib/signalwire/relay/relay_event.rb', line 457 def control_id @control_id end |
#duration ⇒ Object (readonly)
Returns the value of attribute duration.
457 458 459 |
# File 'lib/signalwire/relay/relay_event.rb', line 457 def duration @duration end |
#recording_id ⇒ Object (readonly)
Returns the value of attribute recording_id.
457 458 459 |
# File 'lib/signalwire/relay/relay_event.rb', line 457 def recording_id @recording_id end |
#size ⇒ Object (readonly)
Returns the value of attribute size.
457 458 459 |
# File 'lib/signalwire/relay/relay_event.rb', line 457 def size @size end |
#state ⇒ Object (readonly)
Returns the value of attribute state.
457 458 459 |
# File 'lib/signalwire/relay/relay_event.rb', line 457 def state @state end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
457 458 459 |
# File 'lib/signalwire/relay/relay_event.rb', line 457 def url @url end |
Class Method Details
.from_payload(payload) ⇒ Object
459 460 461 462 463 464 465 466 467 468 469 470 471 472 |
# File 'lib/signalwire/relay/relay_event.rb', line 459 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'] || '', state: p['state'] || '', url: p['url'] || '', recording_id: p['recording_id'] || '', duration: p['duration'] || 0.0, size: p['size'] || 0 ) end |