Class: Plivo::Resources::Phlo

Inherits:
Base::Resource show all
Defined in:
lib/plivo/resources/phlos.rb

Constant Summary

Constants included from Utils

Utils::TYPE_WHITELIST

Instance Attribute Summary

Attributes inherited from Base::Resource

#id

Instance Method Summary collapse

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) ⇒ Phlo

Returns a new instance of Phlo.



7
8
9
10
11
# File 'lib/plivo/resources/phlos.rb', line 7

def initialize(client, options = nil)
  @_name = 'phlo'
  @_identifier_string = 'phlo_id'
  super
end

Instance Method Details

#multi_party_call(node_id) ⇒ Object



23
24
25
26
# File 'lib/plivo/resources/phlos.rb', line 23

def multi_party_call(node_id)
  nodeInterface = NodeInterface.new(@_client, {_phlo_id: @id})
  nodeInterface.getNode(node_id, 'multi_party_call')
end

#run(params = nil) ⇒ Object

def conference_bridge(node_id)

nodeInterface = NodeInterface.new(@_client, {_phlo_id: @id})
nodeInterface.getNode(node_id, 'conference_bridge')

end



33
34
35
36
# File 'lib/plivo/resources/phlos.rb', line 33

def run(params=nil)
  @_resource_uri = ['', 'v1', 'account', @_client.auth_id, @_name, @id, ''].join('/')
  perform_run(params)
end

#to_sObject



13
14
15
16
17
18
19
20
21
# File 'lib/plivo/resources/phlos.rb', line 13

def to_s
  {
      api_id: @api_id,
      phlo_id: @phlo_id,
      name: @name,
      created_on: @created_on,
      phlo_run_id: @phlo_run_id
  }.to_s
end