Class: Plivo::Resources::MultiPartyCall

Inherits:
Node show all
Defined in:
lib/plivo/resources/nodes.rb

Constant Summary

Constants included from Utils

Utils::TYPE_WHITELIST

Instance Attribute Summary

Attributes inherited from Base::Resource

#id

Instance Method Summary collapse

Methods inherited from Node

#member, #to_s

Methods included from Utils

expected_type?, expected_value?, raise_invalid_request, valid_account?, valid_mainaccount?, valid_param?, valid_signature?, valid_subaccount?

Constructor Details

#initialize(client, options = nil) ⇒ MultiPartyCall

Returns a new instance of MultiPartyCall.



55
56
57
58
# File 'lib/plivo/resources/nodes.rb', line 55

def initialize(client,options=nil)
  @_name = 'multi_party_call'
  super
end

Instance Method Details

#call(trigger_source, to, role) ⇒ Object



60
61
62
63
# File 'lib/plivo/resources/nodes.rb', line 60

def call(trigger_source, to, role)
  payload = {action: 'call', trigger_source: trigger_source, to: to, role: role}
  perform_update(payload)
end

#cold_transfer(trigger_source, to, role = 'agent') ⇒ Object



70
71
72
73
# File 'lib/plivo/resources/nodes.rb', line 70

def cold_transfer(trigger_source, to, role='agent')
  payload = {action: 'cold_transfer', trigger_source: trigger_source, to: to, role: role}
  perform_update(payload)
end

#warm_transfer(trigger_source, to, role = 'agent') ⇒ Object



65
66
67
68
# File 'lib/plivo/resources/nodes.rb', line 65

def warm_transfer(trigger_source, to, role='agent')
  payload = {action: 'warm_transfer', trigger_source: trigger_source, to: to, role: role}
  perform_update(payload)
end