Class: Nexmo::Voice::Calls

Inherits:
Object
  • Object
show all
Defined in:
lib/nexmo/voice/calls.rb

Constant Summary collapse

RELATIVE_URL =
'/call/json'.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client = nil) ⇒ Calls

Returns a new instance of Calls.



7
8
9
10
# File 'lib/nexmo/voice/calls.rb', line 7

def initialize(client = nil)
  raise "Can't create a call without Client" unless client
  @client = client
end

Instance Attribute Details

#clientObject

Returns the value of attribute client.



5
6
7
# File 'lib/nexmo/voice/calls.rb', line 5

def client
  @client
end

Instance Method Details

#create(entity = {}) ⇒ Object



12
13
14
# File 'lib/nexmo/voice/calls.rb', line 12

def create(entity = {})
  @client.get(self, entity)
end