Class: Intercom::Service::Admin

Inherits:
BaseService show all
Includes:
ApiOperations::Find, ApiOperations::List
Defined in:
lib/intercom/service/admin.rb

Instance Attribute Summary

Attributes inherited from BaseService

#client

Instance Method Summary collapse

Methods included from ApiOperations::Find

#find

Methods included from ApiOperations::List

#all

Methods inherited from BaseService

#collection_name, #collection_proxy_class, #from_api, #initialize

Constructor Details

This class inherits a constructor from Intercom::Service::BaseService

Instance Method Details

#collection_classObject



11
12
13
# File 'lib/intercom/service/admin.rb', line 11

def collection_class
  Intercom::Admin
end

#meObject



15
16
17
18
19
# File 'lib/intercom/service/admin.rb', line 15

def me
  response = @client.get("/me", {})
  raise Intercom::HttpError.new('Http Error - No response entity returned') unless response
  from_api(response)
end