Class: GetResponseApi::Client
- Inherits:
-
Object
- Object
- GetResponseApi::Client
- Defined in:
- lib/get_response_api/client.rb
Instance Method Summary collapse
- #account ⇒ Object
-
#initialize(api_key) ⇒ Client
constructor
A new instance of Client.
Constructor Details
#initialize(api_key) ⇒ Client
Returns a new instance of Client.
3 4 5 |
# File 'lib/get_response_api/client.rb', line 3 def initialize(api_key) @connection = Connection.new(api_key) end |
Instance Method Details
#account ⇒ Object
7 8 9 10 11 12 13 14 |
# File 'lib/get_response_api/client.rb', line 7 def account response = @connection.get('/accounts').parsed_response if error?(response) && response['message'] return response['message'] end response end |