Class: HaloMspApi::Resources::Actions

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

Overview

Resource class for Actions

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

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

GET /Actions/id - Get a specific Action



15
16
17
# File 'lib/halo_msp_api/resources/actions.rb', line 15

def action(id, params = {})
  get_resource('Actions', id, params)
end

#actions(options = {}) ⇒ Object

GET /Actions - List of Actions Parameters based on swagger.json specification



9
10
11
12
# File 'lib/halo_msp_api/resources/actions.rb', line 9

def actions(options = {})
  params = build_list_params(options)
  get('/Actions', params)
end

#create_action(data) ⇒ Object

POST /Actions - Create a new Action



20
21
22
# File 'lib/halo_msp_api/resources/actions.rb', line 20

def create_action(data)
  create_resource('Actions', data)
end

#create_reaction(data) ⇒ Object

POST /ActionReaction - Create action reaction



46
47
48
# File 'lib/halo_msp_api/resources/actions.rb', line 46

def create_reaction(data)
  create_resource('ActionReaction', data)
end

#create_review(data) ⇒ Object

POST /ActionReview - Create action review



72
73
74
# File 'lib/halo_msp_api/resources/actions.rb', line 72

def create_review(data)
  create_resource('ActionReview', data)
end

#delete_action(id) ⇒ Object

DELETE /Actions/id - Delete an Action



30
31
32
# File 'lib/halo_msp_api/resources/actions.rb', line 30

def delete_action(id)
  delete_resource('Actions', id)
end

#delete_reaction(id) ⇒ Object

DELETE /ActionReaction/id - Delete action reaction



56
57
58
# File 'lib/halo_msp_api/resources/actions.rb', line 56

def delete_reaction(id)
  delete_resource('ActionReaction', id)
end

#delete_review(id) ⇒ Object

DELETE /ActionReview/id - Delete action review



82
83
84
# File 'lib/halo_msp_api/resources/actions.rb', line 82

def delete_review(id)
  delete_resource('ActionReview', id)
end

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

GET /ActionReaction/id - Get specific action reaction



41
42
43
# File 'lib/halo_msp_api/resources/actions.rb', line 41

def reaction(id, params = {})
  get_resource('ActionReaction', id, params)
end

#reactions(params = {}) ⇒ Object

Action Reactions methods GET /ActionReaction - List action reactions



36
37
38
# File 'lib/halo_msp_api/resources/actions.rb', line 36

def reactions(params = {})
  list_resource('ActionReaction', params)
end

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

GET /ActionReview/id - Get specific action review



67
68
69
# File 'lib/halo_msp_api/resources/actions.rb', line 67

def review(id, params = {})
  get_resource('ActionReview', id, params)
end

#reviews(params = {}) ⇒ Object

Action Review methods GET /ActionReview - List action reviews



62
63
64
# File 'lib/halo_msp_api/resources/actions.rb', line 62

def reviews(params = {})
  list_resource('ActionReview', params)
end

#update_action(id, data) ⇒ Object

PUT /Actions/id - Update an Action



25
26
27
# File 'lib/halo_msp_api/resources/actions.rb', line 25

def update_action(id, data)
  update_resource('Actions', id, data)
end

#update_reaction(id, data) ⇒ Object

PUT /ActionReaction/id - Update action reaction



51
52
53
# File 'lib/halo_msp_api/resources/actions.rb', line 51

def update_reaction(id, data)
  update_resource('ActionReaction', id, data)
end

#update_review(id, data) ⇒ Object

PUT /ActionReview/id - Update action review



77
78
79
# File 'lib/halo_msp_api/resources/actions.rb', line 77

def update_review(id, data)
  update_resource('ActionReview', id, data)
end