Class: TotalVoice::Webphone

Inherits:
Object
  • Object
show all
Defined in:
lib/api/webphone.rb

Overview

Inicializa o HTTP client

Constant Summary collapse

ROTA_WEBPHONE =
"/webphone"

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ Webphone

Returns a new instance of Webphone.



9
10
11
# File 'lib/api/webphone.rb', line 9

def initialize(client)
  @client = client
end

Instance Attribute Details

#clientObject (readonly)

Returns the value of attribute client.



6
7
8
# File 'lib/api/webphone.rb', line 6

def client
  @client
end

Instance Method Details

#url(data) ⇒ json

Requisita a URL do webphone de um ramal

Parameters:

  • data (Hash)

Returns:

  • (json)


19
20
21
# File 'lib/api/webphone.rb', line 19

def url(data)
  @client.get(Route.new([ROTA_WEBPHONE]), data)
end