Class: BaseCRM::AccountsService

Inherits:
Object
  • Object
show all
Defined in:
lib/basecrm/services/accounts_service.rb

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ AccountsService

Returns a new instance of AccountsService.



5
6
7
# File 'lib/basecrm/services/accounts_service.rb', line 5

def initialize(client)
  @client = client
end

Instance Method Details

#selfAccount

Retrieve account details

get ‘/accounts/self’

Returns detailed information about your account

Returns:



16
17
18
19
# File 'lib/basecrm/services/accounts_service.rb', line 16

def self
  _, _, root = @client.get("/accounts/self")
  Account.new(root[:data])
end