Class: Plivo::Resources::Node
- Inherits:
-
Base::Resource
- Object
- Base::Resource
- Plivo::Resources::Node
- Defined in:
- lib/plivo/resources/nodes.rb
Direct Known Subclasses
Constant Summary
Constants included from Utils
Instance Attribute Summary
Attributes inherited from Base::Resource
Instance Method Summary collapse
-
#initialize(client, options = nil) ⇒ Node
constructor
A new instance of Node.
- #member(member_address) ⇒ Object
- #to_s ⇒ Object
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) ⇒ Node
Returns a new instance of Node.
26 27 28 29 30 |
# File 'lib/plivo/resources/nodes.rb', line 26 def initialize(client,=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) = {'member_address' => member_address, 'node_id' => @id, 'phlo_id' => @phlo_id, 'node_type' => @node_type} Member.new(@_client, {resource_json: }) end |
#to_s ⇒ Object
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 |