Class: InvisibleCollector::Resources::CompanyResource

Inherits:
Object
  • Object
show all
Includes:
DefaultHandlers
Defined in:
lib/invisible_collector/resources/company_resource.rb

Instance Method Summary collapse

Methods included from DefaultHandlers

#execute, #execute_get, #execute_post, #handle, #handles

Constructor Details

#initialize(options = {}) ⇒ CompanyResource

Returns a new instance of CompanyResource.



8
9
10
# File 'lib/invisible_collector/resources/company_resource.rb', line 8

def initialize(options = {})
  super(options)
end

Instance Method Details

#disable_notificationsObject



24
25
26
# File 'lib/invisible_collector/resources/company_resource.rb', line 24

def disable_notifications
  build_response(@connection.put('/companies/disableNotifications'))
end

#enable_notificationsObject



20
21
22
# File 'lib/invisible_collector/resources/company_resource.rb', line 20

def enable_notifications
  build_response(@connection.put('/companies/enableNotifications'))
end

#getObject



12
13
14
# File 'lib/invisible_collector/resources/company_resource.rb', line 12

def get
  build_response(@connection.get('companies'))
end

#update(company) ⇒ Object



16
17
18
# File 'lib/invisible_collector/resources/company_resource.rb', line 16

def update(company)
  build_response(@connection.put('companies', company))
end