Class: Plivo::Resources::Node

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

Direct Known Subclasses

PhloMultiPartyCall

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

GetSortedQueryParamString?, compute_signatureV3?, expected_type?, expected_value?, generate_url?, getMapFromQueryString?, is_one_among_string_url?, multi_valid_param?, raise_invalid_request, valid_account?, valid_date_format?, valid_mainaccount?, valid_multiple_destination_integers?, valid_multiple_destination_nos?, valid_param?, valid_range?, valid_signature?, valid_signatureV3?, valid_subaccount?, valid_url?

Constructor Details

#initialize(client, options = nil) ⇒ Node

Returns a new instance of Node.



26
27
28
29
30
# File 'lib/plivo/resources/nodes.rb', line 26

def initialize(client,options=nil)
  @_identifier_string = 'node_id'
  super
  configure_resource_uri
end

Instance Method Details

#member(member_address) ⇒ Object



43
44
45
46
# File 'lib/plivo/resources/nodes.rb', line 43

def member(member_address)
  options = {'member_address' => member_address, 'node_id' => @id, 'phlo_id' => @phlo_id, 'node_type' => @node_type}
  PhloMember.new(@_client, {resource_json: options})
end

#to_sObject



32
33
34
35
36
37
38
39
40
41
# File 'lib/plivo/resources/nodes.rb', line 32

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