Class: SignalWire::Relay::FaxAction

Inherits:
Action
  • Object
show all
Defined in:
lib/signalwire/relay/action.rb

Overview

Handle for send_fax or receive_fax.

Instance Attribute Summary

Attributes inherited from Action

#call, #completed, #control_id, #result

Instance Method Summary collapse

Methods inherited from Action

#_check_event, #_resolve, #_set_on_completed, #done?, #on_completed, #wait

Constructor Details

#initialize(call, control_id, method_prefix) ⇒ FaxAction

Returns a new instance of FaxAction.



226
227
228
229
# File 'lib/signalwire/relay/action.rb', line 226

def initialize(call, control_id, method_prefix)
  super(call, control_id, EVENT_CALL_FAX, %w[finished error])
  @method_prefix = method_prefix
end

Instance Method Details

#stopObject



231
232
233
# File 'lib/signalwire/relay/action.rb', line 231

def stop
  @call._execute("#{@method_prefix}.stop", { 'control_id' => @control_id })
end