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.



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

def initialize(client)
  @client = client
end

Instance Attribute Details

#clientObject (readonly)

Returns the value of attribute client.



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

def client
  @client
end

Instance Method Details

#url(data) ⇒ json

Requisita a URL do webphone de um ramal

Parameters:

  • data (Hash)

Returns:

  • (json)


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

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