Class: HaloMspApi::Resources::Organisations

Inherits:
Base
  • Object
show all
Defined in:
lib/halo_msp_api/resources/organisations.rb

Overview

Resource class for Organisations

Instance Attribute Summary

Attributes inherited from Base

#client_instance

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from HaloMspApi::Resources::Base

Instance Method Details

#create_organisation(data) ⇒ Object

POST /Organisation - Create a new Organisation



18
19
20
# File 'lib/halo_msp_api/resources/organisations.rb', line 18

def create_organisation(data)
  create_resource('Organisation', data)
end

#delete_organisation(id) ⇒ Object

DELETE /Organisation/id - Delete an Organisation



28
29
30
# File 'lib/halo_msp_api/resources/organisations.rb', line 28

def delete_organisation(id)
  delete_resource('Organisation', id)
end

#organisation(id, params = {}) ⇒ Object

GET /Organisation/id - Get a specific Organisation



13
14
15
# File 'lib/halo_msp_api/resources/organisations.rb', line 13

def organisation(id, params = {})
  get_resource('Organisation', id, params)
end

#organisations(params = {}) ⇒ Object

GET /Organisation - List of Organisations



8
9
10
# File 'lib/halo_msp_api/resources/organisations.rb', line 8

def organisations(params = {})
  list_resource('Organisation', params)
end

#update_organisation(id, data) ⇒ Object

PUT /Organisation/id - Update an Organisation



23
24
25
# File 'lib/halo_msp_api/resources/organisations.rb', line 23

def update_organisation(id, data)
  update_resource('Organisation', id, data)
end