Class: TotalVoice::Webphone
- Inherits:
-
Object
- Object
- TotalVoice::Webphone
- Defined in:
- lib/api/webphone.rb
Overview
Inicializa o HTTP client
Constant Summary collapse
- ROTA_WEBPHONE =
"/webphone"
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
Instance Method Summary collapse
-
#initialize(client) ⇒ Webphone
constructor
A new instance of Webphone.
-
#url(data) ⇒ json
Requisita a URL do webphone de um ramal.
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
#client ⇒ Object (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
20 21 22 |
# File 'lib/api/webphone.rb', line 20 def url(data) @client.get(Route.new([ROTA_WEBPHONE]), Query.new(data)) end |