Class: HaloMspApi::Resources::Tickets

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

Overview

Resource class for Tickets rubocop:disable Metrics/ClassLength

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

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

GET /TicketApproval/id - Get specific Ticket approval



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

def approval(id, params = {})
  get_resource('TicketApproval', id, params)
end

#approval_with_sequence(id, seq, params = {}) ⇒ Object

GET /TicketApproval/id&seq - Get specific Ticket approval with sequence



80
81
82
# File 'lib/halo_msp_api/resources/tickets.rb', line 80

def approval_with_sequence(id, seq, params = {})
  get_resource('TicketApproval', "#{id}&#{seq}", params)
end

#approvals(params = {}) ⇒ Object

Ticket Approval methods GET /TicketApproval - List Ticket approvals



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

def approvals(params = {})
  list_resource('TicketApproval', params)
end

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

GET /TicketArea/id - Get specific Ticket area



106
107
108
# File 'lib/halo_msp_api/resources/tickets.rb', line 106

def area(id, params = {})
  get_resource('TicketArea', id, params)
end

#areas(params = {}) ⇒ Object

Ticket Area methods GET /TicketArea - List Ticket areas



101
102
103
# File 'lib/halo_msp_api/resources/tickets.rb', line 101

def areas(params = {})
  list_resource('TicketArea', params)
end

#billable_project(data) ⇒ Object

POST /Tickets/SetBillableProject - Set billable project



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

def billable_project(data)
  post(resource_path('Tickets', nil, 'SetBillableProject'), data)
end

#categories(params = {}) ⇒ Object

GET /Category - List Ticket categories



214
215
216
# File 'lib/halo_msp_api/resources/tickets.rb', line 214

def categories(params = {})
  list_resource('Category', params)
end

#create_approval(data) ⇒ Object

POST /TicketApproval - Create Ticket approval



85
86
87
# File 'lib/halo_msp_api/resources/tickets.rb', line 85

def create_approval(data)
  create_resource('TicketApproval', data)
end

#create_area(data) ⇒ Object

POST /TicketArea - Create Ticket area



111
112
113
# File 'lib/halo_msp_api/resources/tickets.rb', line 111

def create_area(data)
  create_resource('TicketArea', data)
end

#create_rule(data) ⇒ Object

POST /TicketRules - Create Ticket rule



137
138
139
# File 'lib/halo_msp_api/resources/tickets.rb', line 137

def create_rule(data)
  create_resource('TicketRules', data)
end

#create_ticket(data) ⇒ Object

POST /Tickets - Create a new Ticket



19
20
21
# File 'lib/halo_msp_api/resources/tickets.rb', line 19

def create_ticket(data)
  create_resource('Tickets', data)
end

#create_type(data) ⇒ Object

POST /TicketType - Create Ticket type



163
164
165
# File 'lib/halo_msp_api/resources/tickets.rb', line 163

def create_type(data)
  create_resource('TicketType', data)
end

#create_type_group(data) ⇒ Object

POST /TicketTypeGroup - Create Ticket type group



194
195
196
# File 'lib/halo_msp_api/resources/tickets.rb', line 194

def create_type_group(data)
  create_resource('TicketTypeGroup', data)
end

#delete_approval(id) ⇒ Object

DELETE /TicketApproval/id - Delete Ticket approval



95
96
97
# File 'lib/halo_msp_api/resources/tickets.rb', line 95

def delete_approval(id)
  delete("TicketApproval/#{id}")
end

#delete_area(id) ⇒ Object

DELETE /TicketArea/id - Delete Ticket area



121
122
123
# File 'lib/halo_msp_api/resources/tickets.rb', line 121

def delete_area(id)
  delete_resource('TicketArea', id)
end

#delete_rule(id) ⇒ Object

DELETE /TicketRules/id - Delete Ticket rule



147
148
149
# File 'lib/halo_msp_api/resources/tickets.rb', line 147

def delete_rule(id)
  delete_resource('TicketRules', id)
end

#delete_ticket(id) ⇒ Object

DELETE /Tickets/id - Delete a Ticket



29
30
31
# File 'lib/halo_msp_api/resources/tickets.rb', line 29

def delete_ticket(id)
  delete_resource('Tickets', id)
end

#delete_type(id) ⇒ Object

DELETE /TicketType/id - Delete Ticket type



173
174
175
# File 'lib/halo_msp_api/resources/tickets.rb', line 173

def delete_type(id)
  delete_resource('TicketType', id)
end

#delete_type_group(id) ⇒ Object

DELETE /TicketTypeGroup/id - Delete Ticket type group



204
205
206
# File 'lib/halo_msp_api/resources/tickets.rb', line 204

def delete_type_group(id)
  delete_resource('TicketTypeGroup', id)
end

#lookups(params = {}) ⇒ Object

GET /Lookup - List Tenant defined lookups



219
220
221
# File 'lib/halo_msp_api/resources/tickets.rb', line 219

def lookups(params = {})
  list_resource('Lookup', params)
end

#object(params = {}) ⇒ Object

GET /Tickets/Object - Get Ticket object



34
35
36
# File 'lib/halo_msp_api/resources/tickets.rb', line 34

def object(params = {})
  get(resource_path('Tickets', nil, 'Object'), params)
end

#process_children(data) ⇒ Object

POST /Tickets/processchildren - Process child tickets



39
40
41
# File 'lib/halo_msp_api/resources/tickets.rb', line 39

def process_children(data)
  post(resource_path('Tickets', nil, 'processchildren'), data)
end

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

GET /TicketRules/id - Get specific Ticket rule



132
133
134
# File 'lib/halo_msp_api/resources/tickets.rb', line 132

def rule(id, params = {})
  get_resource('TicketRules', id, params)
end

#rules(params = {}) ⇒ Object

Ticket Rules methods GET /TicketRules - List Ticket rules



127
128
129
# File 'lib/halo_msp_api/resources/tickets.rb', line 127

def rules(params = {})
  list_resource('TicketRules', params)
end

#sales_mailbox(params = {}) ⇒ Object

GET /Tickets/salesmailbox - Get sales mailbox tickets



44
45
46
# File 'lib/halo_msp_api/resources/tickets.rb', line 44

def sales_mailbox(params = {})
  get(resource_path('Tickets', nil, 'salesmailbox'), params)
end

#statuses(params = {}) ⇒ Object

GET /Status - List Ticket statuses



209
210
211
# File 'lib/halo_msp_api/resources/tickets.rb', line 209

def statuses(params = {})
  list_resource('Status', params)
end

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

GET /Tickets/id - Get a specific Ticket



14
15
16
# File 'lib/halo_msp_api/resources/tickets.rb', line 14

def ticket(id, params = {})
  get_resource('Tickets', id, params)
end

#tickets(params = {}) ⇒ Object

GET /Tickets - List of Tickets



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

def tickets(params = {})
  list_resource('Tickets', params)
end

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

GET /TicketType/id - Get specific Ticket type



158
159
160
# File 'lib/halo_msp_api/resources/tickets.rb', line 158

def type(id, params = {})
  get_resource('TicketType', id, params)
end

#type_fields(params = {}) ⇒ Object

GET /TicketTypeField - List Ticket type fields



178
179
180
# File 'lib/halo_msp_api/resources/tickets.rb', line 178

def type_fields(params = {})
  list_resource('TicketTypeField', params)
end

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

GET /TicketTypeGroup/id - Get specific Ticket type group



189
190
191
# File 'lib/halo_msp_api/resources/tickets.rb', line 189

def type_group(id, params = {})
  get_resource('TicketTypeGroup', id, params)
end

#type_groups(params = {}) ⇒ Object

Ticket Type Group methods GET /TicketTypeGroup - List Ticket type groups



184
185
186
# File 'lib/halo_msp_api/resources/tickets.rb', line 184

def type_groups(params = {})
  list_resource('TicketTypeGroup', params)
end

#types(params = {}) ⇒ Object

Ticket Type methods GET /TicketType - List Ticket types



153
154
155
# File 'lib/halo_msp_api/resources/tickets.rb', line 153

def types(params = {})
  list_resource('TicketType', params)
end

#update_approval(id, data) ⇒ Object

PUT /TicketApproval/id - Update Ticket approval



90
91
92
# File 'lib/halo_msp_api/resources/tickets.rb', line 90

def update_approval(id, data)
  put("TicketApproval/#{id}", data)
end

#update_area(id, data) ⇒ Object

PUT /TicketArea/id - Update Ticket area



116
117
118
# File 'lib/halo_msp_api/resources/tickets.rb', line 116

def update_area(id, data)
  update_resource('TicketArea', id, data)
end

#update_rule(id, data) ⇒ Object

PUT /TicketRules/id - Update Ticket rule



142
143
144
# File 'lib/halo_msp_api/resources/tickets.rb', line 142

def update_rule(id, data)
  update_resource('TicketRules', id, data)
end

#update_ticket(id, data) ⇒ Object

PUT /Tickets/id - Update a Ticket



24
25
26
# File 'lib/halo_msp_api/resources/tickets.rb', line 24

def update_ticket(id, data)
  update_resource('Tickets', id, data)
end

#update_type(id, data) ⇒ Object

PUT /TicketType/id - Update Ticket type



168
169
170
# File 'lib/halo_msp_api/resources/tickets.rb', line 168

def update_type(id, data)
  update_resource('TicketType', id, data)
end

#update_type_group(id, data) ⇒ Object

PUT /TicketTypeGroup/id - Update Ticket type group



199
200
201
# File 'lib/halo_msp_api/resources/tickets.rb', line 199

def update_type_group(id, data)
  update_resource('TicketTypeGroup', id, data)
end

#view(params = {}) ⇒ Object

GET /Tickets/View - Get Ticket view



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

def view(params = {})
  get(resource_path('Tickets', nil, 'View'), params)
end

#vote(data) ⇒ Object

POST /Tickets/vote - Vote on a ticket



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

def vote(data)
  post(resource_path('Tickets', nil, 'vote'), data)
end

#zapier(data) ⇒ Object

POST /Tickets/zapier - Zapier integration



64
65
66
# File 'lib/halo_msp_api/resources/tickets.rb', line 64

def zapier(data)
  post(resource_path('Tickets', nil, 'zapier'), data)
end