Class: HaloMspApi::Resources::Agents

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

Overview

Resource class for Agents

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

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

GET /Agent/id - Get a specific Agent



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

def agent(id, params = {})
  get_resource('Agent', id, params)
end

#agents(params = {}) ⇒ Object

GET /Agent - List of Agents



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

def agents(params = {})
  list_resource('Agent', params)
end

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

GET /AgentCheckIn/id - Get specific Agent check-in



54
55
56
# File 'lib/halo_msp_api/resources/agents.rb', line 54

def check_in(id, params = {})
  get_resource('AgentCheckIn', id, params)
end

#check_ins(params = {}) ⇒ Object

Agent Check-in related methods GET /AgentCheckIn - List Agent check-ins



49
50
51
# File 'lib/halo_msp_api/resources/agents.rb', line 49

def check_ins(params = {})
  list_resource('AgentCheckIn', params)
end

#clear_cacheObject

POST /Agent/ClearCache - Clear Agent cache



38
39
40
# File 'lib/halo_msp_api/resources/agents.rb', line 38

def clear_cache
  post(resource_path('Agent', nil, 'ClearCache'))
end

#create_agent(data) ⇒ Object

POST /Agent - Create a new Agent



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

def create_agent(data)
  create_resource('Agent', data)
end

#create_check_in(data) ⇒ Object

POST /AgentCheckIn - Create Agent check-in



59
60
61
# File 'lib/halo_msp_api/resources/agents.rb', line 59

def create_check_in(data)
  create_resource('AgentCheckIn', data)
end

#create_event_subscription(data) ⇒ Object

POST /AgentEventSubscription - Create Agent event subscription



75
76
77
# File 'lib/halo_msp_api/resources/agents.rb', line 75

def create_event_subscription(data)
  create_resource('AgentEventSubscription', data)
end

#create_presence_subscription(data) ⇒ Object

POST /AgentPresenceSubscription - Create Agent presence subscription



96
97
98
# File 'lib/halo_msp_api/resources/agents.rb', line 96

def create_presence_subscription(data)
  create_resource('AgentPresenceSubscription', data)
end

#delete_agent(id) ⇒ Object

DELETE /Agent/id - Delete an Agent



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

def delete_agent(id)
  delete_resource('Agent', id)
end

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

GET /AgentEventSubscription/id - Get specific Agent event subscription



70
71
72
# File 'lib/halo_msp_api/resources/agents.rb', line 70

def event_subscription(id, params = {})
  get_resource('AgentEventSubscription', id, params)
end

#event_subscriptions(params = {}) ⇒ Object

Agent Event Subscription methods GET /AgentEventSubscription - List Agent event subscriptions



65
66
67
# File 'lib/halo_msp_api/resources/agents.rb', line 65

def event_subscriptions(params = {})
  list_resource('AgentEventSubscription', params)
end

#image(id) ⇒ Object

GET /AgentImage/id - Get Agent image



43
44
45
# File 'lib/halo_msp_api/resources/agents.rb', line 43

def image(id)
  get_resource('AgentImage', id)
end

#me(params = {}) ⇒ Object

GET /Agent/me - Get current Agent information



33
34
35
# File 'lib/halo_msp_api/resources/agents.rb', line 33

def me(params = {})
  get_resource('Agent', 'me', params)
end

#presence_rules(params = {}) ⇒ Object

Agent Presence related methods GET /AgentPresenceRule - List Agent presence rules



81
82
83
# File 'lib/halo_msp_api/resources/agents.rb', line 81

def presence_rules(params = {})
  list_resource('AgentPresenceRule', params)
end

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

GET /AgentPresenceSubscription/id - Get specific Agent presence subscription



91
92
93
# File 'lib/halo_msp_api/resources/agents.rb', line 91

def presence_subscription(id, params = {})
  get_resource('AgentPresenceSubscription', id, params)
end

#presence_subscriptions(params = {}) ⇒ Object

GET /AgentPresenceSubscription - List Agent presence subscriptions



86
87
88
# File 'lib/halo_msp_api/resources/agents.rb', line 86

def presence_subscriptions(params = {})
  list_resource('AgentPresenceSubscription', params)
end

#update_agent(id, data) ⇒ Object

PUT /Agent/id - Update an Agent



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

def update_agent(id, data)
  update_resource('Agent', id, data)
end