halo_msp_api 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +17 -0
- data/Gemfile +3 -8
- data/README.md +11 -8
- data/Rakefile +3 -3
- data/examples/basic_usage.rb +90 -31
- data/lib/halo_msp_api/client.rb +49 -28
- data/lib/halo_msp_api/configuration.rb +1 -0
- data/lib/halo_msp_api/error.rb +1 -0
- data/lib/halo_msp_api/resources/actions.rb +21 -20
- data/lib/halo_msp_api/resources/agents.rb +24 -23
- data/lib/halo_msp_api/resources/appointments.rb +18 -17
- data/lib/halo_msp_api/resources/assets.rb +33 -32
- data/lib/halo_msp_api/resources/base.rb +10 -9
- data/lib/halo_msp_api/resources/clients.rb +26 -30
- data/lib/halo_msp_api/resources/integrations.rb +109 -106
- data/lib/halo_msp_api/resources/invoices.rb +32 -31
- data/lib/halo_msp_api/resources/knowledge_base.rb +17 -16
- data/lib/halo_msp_api/resources/organisations.rb +11 -10
- data/lib/halo_msp_api/resources/products.rb +33 -0
- data/lib/halo_msp_api/resources/purchase_orders.rb +16 -15
- data/lib/halo_msp_api/resources/quotations.rb +14 -13
- data/lib/halo_msp_api/resources/reports.rb +23 -22
- data/lib/halo_msp_api/resources/sales_orders.rb +16 -15
- data/lib/halo_msp_api/resources/services.rb +39 -38
- data/lib/halo_msp_api/resources/slas.rb +21 -20
- data/lib/halo_msp_api/resources/suppliers.rb +16 -15
- data/lib/halo_msp_api/resources/tickets.rb +48 -45
- data/lib/halo_msp_api/resources/users.rb +20 -24
- data/lib/halo_msp_api/resources/webhooks.rb +22 -21
- data/lib/halo_msp_api/version.rb +1 -1
- data/lib/halo_msp_api.rb +26 -24
- metadata +12 -14
|
@@ -2,274 +2,277 @@
|
|
|
2
2
|
|
|
3
3
|
module HaloMspApi
|
|
4
4
|
module Resources
|
|
5
|
+
# Resource class for Integrations
|
|
6
|
+
# rubocop:disable Metrics/ClassLength
|
|
5
7
|
class Integrations < Base
|
|
6
8
|
# Integration Data methods - these handle the massive number of third-party integrations
|
|
7
|
-
|
|
9
|
+
|
|
8
10
|
# GET methods for various integrations
|
|
9
|
-
def
|
|
10
|
-
get(
|
|
11
|
+
def addigy(params = {})
|
|
12
|
+
get('IntegrationData/Get/Addigy', params)
|
|
11
13
|
end
|
|
12
14
|
|
|
13
|
-
def
|
|
14
|
-
get(
|
|
15
|
+
def amazon_seller(params = {})
|
|
16
|
+
get('IntegrationData/Get/AmazonSeller', params)
|
|
15
17
|
end
|
|
16
18
|
|
|
17
|
-
def
|
|
18
|
-
get(
|
|
19
|
+
def arrow_sphere(params = {})
|
|
20
|
+
get('IntegrationData/Get/ArrowSphere', params)
|
|
19
21
|
end
|
|
20
22
|
|
|
21
|
-
def
|
|
22
|
-
get(
|
|
23
|
+
def atera(params = {})
|
|
24
|
+
get('IntegrationData/Get/Atera', params)
|
|
23
25
|
end
|
|
24
26
|
|
|
25
|
-
def
|
|
26
|
-
get(
|
|
27
|
+
def automate(params = {})
|
|
28
|
+
get('IntegrationData/Get/Automate', params)
|
|
27
29
|
end
|
|
28
30
|
|
|
29
|
-
def
|
|
30
|
-
get(
|
|
31
|
+
def autotask(params = {})
|
|
32
|
+
get('IntegrationData/Get/Autotask', params)
|
|
31
33
|
end
|
|
32
34
|
|
|
33
|
-
def
|
|
34
|
-
get(
|
|
35
|
+
def auvik(params = {})
|
|
36
|
+
get('IntegrationData/Get/Auvik', params)
|
|
35
37
|
end
|
|
36
38
|
|
|
37
|
-
def
|
|
38
|
-
get(
|
|
39
|
+
def avalara(params = {})
|
|
40
|
+
get('IntegrationData/Get/Avalara', params)
|
|
39
41
|
end
|
|
40
42
|
|
|
41
|
-
def
|
|
42
|
-
get(
|
|
43
|
+
def azure_ad(params = {})
|
|
44
|
+
get('IntegrationData/Get/AzureAD', params)
|
|
43
45
|
end
|
|
44
46
|
|
|
45
|
-
def
|
|
46
|
-
get(
|
|
47
|
+
def azure_ad_delta(params = {})
|
|
48
|
+
get('IntegrationData/Get/AzureAD/Delta', params)
|
|
47
49
|
end
|
|
48
50
|
|
|
49
|
-
def
|
|
50
|
-
get(
|
|
51
|
+
def azure_sentinel(params = {})
|
|
52
|
+
get('IntegrationData/Get/AzureSentinel', params)
|
|
51
53
|
end
|
|
52
54
|
|
|
53
|
-
def
|
|
54
|
-
get(
|
|
55
|
+
def business_central(params = {})
|
|
56
|
+
get('IntegrationData/Get/BusinessCentral', params)
|
|
55
57
|
end
|
|
56
58
|
|
|
57
|
-
def
|
|
58
|
-
get(
|
|
59
|
+
def confluence(params = {})
|
|
60
|
+
get('IntegrationData/Get/Confluence', params)
|
|
59
61
|
end
|
|
60
62
|
|
|
61
|
-
def
|
|
62
|
-
get(
|
|
63
|
+
def connectwise(params = {})
|
|
64
|
+
get('IntegrationData/Get/ConnectWise', params)
|
|
63
65
|
end
|
|
64
66
|
|
|
65
|
-
def
|
|
66
|
-
get(
|
|
67
|
+
def connectwise_control(params = {})
|
|
68
|
+
get('IntegrationData/Get/ConnectwiseControl', params)
|
|
67
69
|
end
|
|
68
70
|
|
|
69
|
-
def
|
|
70
|
-
get(
|
|
71
|
+
def connectwise_rmm(params = {})
|
|
72
|
+
get('IntegrationData/Get/ConnectwiseRmm', params)
|
|
71
73
|
end
|
|
72
74
|
|
|
73
|
-
def
|
|
74
|
-
get(
|
|
75
|
+
def datto(params = {})
|
|
76
|
+
get('IntegrationData/Get/Datto', params)
|
|
75
77
|
end
|
|
76
78
|
|
|
77
|
-
def
|
|
78
|
-
get(
|
|
79
|
+
def datto_commerce(params = {})
|
|
80
|
+
get('IntegrationData/Get/DattoCommerce', params)
|
|
79
81
|
end
|
|
80
82
|
|
|
81
|
-
def
|
|
82
|
-
get(
|
|
83
|
+
def dynamics_crm(params = {})
|
|
84
|
+
get('IntegrationData/Get/DynamicsCRM', params)
|
|
83
85
|
end
|
|
84
86
|
|
|
85
|
-
def
|
|
86
|
-
get(
|
|
87
|
+
def dynatrace(params = {})
|
|
88
|
+
get('IntegrationData/Get/Dynatrace', params)
|
|
87
89
|
end
|
|
88
90
|
|
|
89
|
-
def
|
|
90
|
-
get(
|
|
91
|
+
def exact_online(params = {})
|
|
92
|
+
get('IntegrationData/Get/ExactOnline', params)
|
|
91
93
|
end
|
|
92
94
|
|
|
93
|
-
def
|
|
94
|
-
get(
|
|
95
|
+
def facebook(params = {})
|
|
96
|
+
get('IntegrationData/Get/Facebook', params)
|
|
95
97
|
end
|
|
96
98
|
|
|
97
|
-
def
|
|
98
|
-
get(
|
|
99
|
+
def freshdesk(params = {})
|
|
100
|
+
get('IntegrationData/Get/Freshdesk', params)
|
|
99
101
|
end
|
|
100
102
|
|
|
101
|
-
def
|
|
102
|
-
get(
|
|
103
|
+
def google_business(params = {})
|
|
104
|
+
get('IntegrationData/Get/GoogleBusiness', params)
|
|
103
105
|
end
|
|
104
106
|
|
|
105
|
-
def
|
|
106
|
-
get(
|
|
107
|
+
def google_workplace(params = {})
|
|
108
|
+
get('IntegrationData/Get/GoogleWorkplace', params)
|
|
107
109
|
end
|
|
108
110
|
|
|
109
|
-
def
|
|
110
|
-
get(
|
|
111
|
+
def hubspot(params = {})
|
|
112
|
+
get('IntegrationData/Get/HubSpot', params)
|
|
111
113
|
end
|
|
112
114
|
|
|
113
|
-
def
|
|
114
|
-
get(
|
|
115
|
+
def intune(params = {})
|
|
116
|
+
get('IntegrationData/Get/Intune', params)
|
|
115
117
|
end
|
|
116
118
|
|
|
117
|
-
def
|
|
118
|
-
get(
|
|
119
|
+
def it_glue(params = {})
|
|
120
|
+
get('IntegrationData/Get/ITGlue', params)
|
|
119
121
|
end
|
|
120
122
|
|
|
121
|
-
def
|
|
122
|
-
get(
|
|
123
|
+
def jamf(params = {})
|
|
124
|
+
get('IntegrationData/Get/Jamf', params)
|
|
123
125
|
end
|
|
124
126
|
|
|
125
|
-
def
|
|
126
|
-
get(
|
|
127
|
+
def jira(params = {})
|
|
128
|
+
get('IntegrationData/Get/Jira', params)
|
|
127
129
|
end
|
|
128
130
|
|
|
129
|
-
def
|
|
130
|
-
get(
|
|
131
|
+
def jira_service_management(params = {})
|
|
132
|
+
get('IntegrationData/Get/JiraServiceManagement', params)
|
|
131
133
|
end
|
|
132
134
|
|
|
133
|
-
def
|
|
134
|
-
get(
|
|
135
|
+
def lansweeper(params = {})
|
|
136
|
+
get('IntegrationData/Get/Lansweeper', params)
|
|
135
137
|
end
|
|
136
138
|
|
|
137
|
-
def
|
|
138
|
-
get(
|
|
139
|
+
def microsoft_csp(params = {})
|
|
140
|
+
get('IntegrationData/Get/MicrosoftCSP', params)
|
|
139
141
|
end
|
|
140
142
|
|
|
141
|
-
def
|
|
142
|
-
get(
|
|
143
|
+
def ninja_rmm(params = {})
|
|
144
|
+
get('IntegrationData/Get/NinjaRMM', params)
|
|
143
145
|
end
|
|
144
146
|
|
|
145
|
-
def
|
|
146
|
-
get(
|
|
147
|
+
def okta(params = {})
|
|
148
|
+
get('IntegrationData/Get/Okta', params)
|
|
147
149
|
end
|
|
148
150
|
|
|
149
|
-
def
|
|
150
|
-
get(
|
|
151
|
+
def pager_duty(params = {})
|
|
152
|
+
get('IntegrationData/Get/PagerDuty', params)
|
|
151
153
|
end
|
|
152
154
|
|
|
153
|
-
def
|
|
154
|
-
get(
|
|
155
|
+
def quickbooks_online(params = {})
|
|
156
|
+
get('IntegrationData/Get/QuickBooksOnline', params)
|
|
155
157
|
end
|
|
156
158
|
|
|
157
|
-
def
|
|
158
|
-
get(
|
|
159
|
+
def salesforce(params = {})
|
|
160
|
+
get('IntegrationData/Get/Salesforce', params)
|
|
159
161
|
end
|
|
160
162
|
|
|
161
|
-
def
|
|
162
|
-
get(
|
|
163
|
+
def service_now(params = {})
|
|
164
|
+
get('IntegrationData/Get/ServiceNow', params)
|
|
163
165
|
end
|
|
164
166
|
|
|
165
|
-
def
|
|
166
|
-
get(
|
|
167
|
+
def shopify(params = {})
|
|
168
|
+
get('IntegrationData/Get/Shopify', params)
|
|
167
169
|
end
|
|
168
170
|
|
|
169
|
-
def
|
|
170
|
-
get(
|
|
171
|
+
def slack(params = {})
|
|
172
|
+
get('IntegrationData/Get/Slack', params)
|
|
171
173
|
end
|
|
172
174
|
|
|
173
|
-
def
|
|
174
|
-
get(
|
|
175
|
+
def stripe(params = {})
|
|
176
|
+
get('IntegrationData/Get/Stripe', params)
|
|
175
177
|
end
|
|
176
178
|
|
|
177
|
-
def
|
|
178
|
-
get(
|
|
179
|
+
def xero(params = {})
|
|
180
|
+
get('IntegrationData/Get/Xero', params)
|
|
179
181
|
end
|
|
180
182
|
|
|
181
183
|
# Import methods for various integrations
|
|
182
184
|
def import_business_central(data)
|
|
183
|
-
post(
|
|
185
|
+
post('IntegrationData/Import/BusinessCentral', data)
|
|
184
186
|
end
|
|
185
187
|
|
|
186
188
|
def import_exact_online(data)
|
|
187
|
-
post(
|
|
189
|
+
post('IntegrationData/Import/ExactOnline', data)
|
|
188
190
|
end
|
|
189
191
|
|
|
190
192
|
def import_jira(data)
|
|
191
|
-
post(
|
|
193
|
+
post('IntegrationData/Import/Jira', data)
|
|
192
194
|
end
|
|
193
195
|
|
|
194
196
|
def import_quickbooks_online(data)
|
|
195
|
-
post(
|
|
197
|
+
post('IntegrationData/Import/QuickBooksOnline', data)
|
|
196
198
|
end
|
|
197
199
|
|
|
198
200
|
def import_xero(data)
|
|
199
|
-
post(
|
|
201
|
+
post('IntegrationData/Import/Xero', data)
|
|
200
202
|
end
|
|
201
203
|
|
|
202
204
|
# Link methods
|
|
203
205
|
def link_jira(data)
|
|
204
|
-
post(
|
|
206
|
+
post('IntegrationData/Link/Jira', data)
|
|
205
207
|
end
|
|
206
208
|
|
|
207
209
|
def unlink_jira(data)
|
|
208
|
-
post(
|
|
210
|
+
post('IntegrationData/Unlink/Jira', data)
|
|
209
211
|
end
|
|
210
212
|
|
|
211
213
|
# Search methods
|
|
212
214
|
def search_jira(params = {})
|
|
213
|
-
get(
|
|
215
|
+
get('IntegrationData/Search/Jira', params)
|
|
214
216
|
end
|
|
215
217
|
|
|
216
218
|
# Validation methods
|
|
217
219
|
def validate_jira(data)
|
|
218
|
-
post(
|
|
220
|
+
post('IntegrationData/Validate/Jira', data)
|
|
219
221
|
end
|
|
220
222
|
|
|
221
223
|
# Integration Configuration methods
|
|
222
224
|
# GET /IntegrationConfiguration - List Integration configurations
|
|
223
225
|
def configurations(params = {})
|
|
224
|
-
get(
|
|
226
|
+
get('IntegrationConfiguration', params)
|
|
225
227
|
end
|
|
226
228
|
|
|
227
229
|
# GET /IntegrationConfiguration/{id} - Get specific Integration configuration
|
|
228
230
|
def configuration(id, params = {})
|
|
229
|
-
get("
|
|
231
|
+
get("IntegrationConfiguration/#{id}", params)
|
|
230
232
|
end
|
|
231
233
|
|
|
232
234
|
# POST /IntegrationConfiguration - Create Integration configuration
|
|
233
235
|
def create_configuration(data)
|
|
234
|
-
post(
|
|
236
|
+
post('IntegrationConfiguration', data)
|
|
235
237
|
end
|
|
236
238
|
|
|
237
239
|
# PUT /IntegrationConfiguration/{id} - Update Integration configuration
|
|
238
240
|
def update_configuration(id, data)
|
|
239
|
-
put("
|
|
241
|
+
put("IntegrationConfiguration/#{id}", data)
|
|
240
242
|
end
|
|
241
243
|
|
|
242
244
|
# DELETE /IntegrationConfiguration/{id} - Delete Integration configuration
|
|
243
245
|
def delete_configuration(id)
|
|
244
|
-
delete("
|
|
246
|
+
delete("IntegrationConfiguration/#{id}")
|
|
245
247
|
end
|
|
246
248
|
|
|
247
249
|
# Integration Error methods
|
|
248
250
|
# GET /IntegrationError - List Integration errors
|
|
249
251
|
def errors(params = {})
|
|
250
|
-
get(
|
|
252
|
+
get('IntegrationError', params)
|
|
251
253
|
end
|
|
252
254
|
|
|
253
255
|
# GET /IntegrationError/{id} - Get specific Integration error
|
|
254
256
|
def error(id, params = {})
|
|
255
|
-
get("
|
|
257
|
+
get("IntegrationError/#{id}", params)
|
|
256
258
|
end
|
|
257
259
|
|
|
258
260
|
# Integration Request methods
|
|
259
261
|
# GET /IntegrationRequest - List Integration requests
|
|
260
262
|
def requests(params = {})
|
|
261
|
-
get(
|
|
263
|
+
get('IntegrationRequest', params)
|
|
262
264
|
end
|
|
263
265
|
|
|
264
266
|
# GET /IntegrationRequest/{id} - Get specific Integration request
|
|
265
267
|
def request(id, params = {})
|
|
266
|
-
get("
|
|
268
|
+
get("IntegrationRequest/#{id}", params)
|
|
267
269
|
end
|
|
268
270
|
|
|
269
271
|
# POST /IntegrationRequest - Create Integration request
|
|
270
272
|
def create_request(data)
|
|
271
|
-
post(
|
|
273
|
+
post('IntegrationRequest', data)
|
|
272
274
|
end
|
|
273
275
|
end
|
|
274
276
|
end
|
|
275
277
|
end
|
|
278
|
+
# rubocop:enable Metrics/ClassLength
|
|
@@ -2,139 +2,140 @@
|
|
|
2
2
|
|
|
3
3
|
module HaloMspApi
|
|
4
4
|
module Resources
|
|
5
|
+
# Resource class for Invoices
|
|
5
6
|
class Invoices < Base
|
|
6
7
|
# GET /Invoice - List of Invoices
|
|
7
|
-
def
|
|
8
|
-
list_resource(
|
|
8
|
+
def invoices(params = {})
|
|
9
|
+
list_resource('Invoice', params)
|
|
9
10
|
end
|
|
10
11
|
|
|
11
12
|
# GET /Invoice/{id} - Get a specific Invoice
|
|
12
|
-
def
|
|
13
|
-
get_resource(
|
|
13
|
+
def invoice(id, params = {})
|
|
14
|
+
get_resource('Invoice', id, params)
|
|
14
15
|
end
|
|
15
16
|
|
|
16
17
|
# POST /Invoice - Create a new Invoice
|
|
17
|
-
def
|
|
18
|
-
create_resource(
|
|
18
|
+
def create_invoice(data)
|
|
19
|
+
create_resource('Invoice', data)
|
|
19
20
|
end
|
|
20
21
|
|
|
21
22
|
# PUT /Invoice/{id} - Update an Invoice
|
|
22
|
-
def
|
|
23
|
-
update_resource(
|
|
23
|
+
def update_invoice(id, data)
|
|
24
|
+
update_resource('Invoice', id, data)
|
|
24
25
|
end
|
|
25
26
|
|
|
26
27
|
# DELETE /Invoice/{id} - Delete an Invoice
|
|
27
|
-
def
|
|
28
|
-
delete_resource(
|
|
28
|
+
def delete_invoice(id)
|
|
29
|
+
delete_resource('Invoice', id)
|
|
29
30
|
end
|
|
30
31
|
|
|
31
32
|
# POST /Invoice/{id}/void - Void an Invoice
|
|
32
33
|
def void(id, data = {})
|
|
33
|
-
post(resource_path(
|
|
34
|
+
post(resource_path('Invoice', "#{id}/void"), data)
|
|
34
35
|
end
|
|
35
36
|
|
|
36
37
|
# GET /Invoice/PDF/{id} - Get Invoice PDF
|
|
37
38
|
def pdf(id, params = {})
|
|
38
|
-
get(resource_path(
|
|
39
|
+
get(resource_path('Invoice', "PDF/#{id}"), params)
|
|
39
40
|
end
|
|
40
41
|
|
|
41
42
|
# POST /Invoice/updatelines - Update Invoice lines
|
|
42
43
|
def update_lines(data)
|
|
43
|
-
post(resource_path(
|
|
44
|
+
post(resource_path('Invoice', nil, 'updatelines'), data)
|
|
44
45
|
end
|
|
45
46
|
|
|
46
47
|
# GET /Invoice/View - Get Invoice view
|
|
47
48
|
def view(params = {})
|
|
48
|
-
get(resource_path(
|
|
49
|
+
get(resource_path('Invoice', nil, 'View'), params)
|
|
49
50
|
end
|
|
50
51
|
|
|
51
52
|
# Invoice Change methods
|
|
52
53
|
# GET /InvoiceChange - List Invoice changes
|
|
53
54
|
def changes(params = {})
|
|
54
|
-
get(
|
|
55
|
+
get('InvoiceChange', params)
|
|
55
56
|
end
|
|
56
57
|
|
|
57
58
|
# POST /InvoiceChange - Create Invoice change
|
|
58
59
|
def create_change(data)
|
|
59
|
-
post(
|
|
60
|
+
post('InvoiceChange', data)
|
|
60
61
|
end
|
|
61
62
|
|
|
62
63
|
# Invoice Detail Pro Rata methods
|
|
63
64
|
# GET /InvoiceDetailProRata - List Invoice detail pro rata
|
|
64
65
|
def detail_pro_rata(params = {})
|
|
65
|
-
get(
|
|
66
|
+
get('InvoiceDetailProRata', params)
|
|
66
67
|
end
|
|
67
68
|
|
|
68
69
|
# POST /InvoiceDetailProRata - Create Invoice detail pro rata
|
|
69
70
|
def create_detail_pro_rata(data)
|
|
70
|
-
post(
|
|
71
|
+
post('InvoiceDetailProRata', data)
|
|
71
72
|
end
|
|
72
73
|
|
|
73
74
|
# Invoice Payment methods
|
|
74
75
|
# GET /InvoicePayment - List Invoice payments
|
|
75
76
|
def payments(params = {})
|
|
76
|
-
get(
|
|
77
|
+
get('InvoicePayment', params)
|
|
77
78
|
end
|
|
78
79
|
|
|
79
80
|
# GET /InvoicePayment/{id} - Get specific Invoice payment
|
|
80
81
|
def payment(id, params = {})
|
|
81
|
-
get("
|
|
82
|
+
get("InvoicePayment/#{id}", params)
|
|
82
83
|
end
|
|
83
84
|
|
|
84
85
|
# POST /InvoicePayment - Create Invoice payment
|
|
85
86
|
def create_payment(data)
|
|
86
|
-
post(
|
|
87
|
+
post('InvoicePayment', data)
|
|
87
88
|
end
|
|
88
89
|
|
|
89
90
|
# PUT /InvoicePayment/{id} - Update Invoice payment
|
|
90
91
|
def update_payment(id, data)
|
|
91
|
-
put("
|
|
92
|
+
put("InvoicePayment/#{id}", data)
|
|
92
93
|
end
|
|
93
94
|
|
|
94
95
|
# DELETE /InvoicePayment/{id} - Delete Invoice payment
|
|
95
96
|
def delete_payment(id)
|
|
96
|
-
delete("
|
|
97
|
+
delete("InvoicePayment/#{id}")
|
|
97
98
|
end
|
|
98
99
|
|
|
99
100
|
# Recurring Invoice methods
|
|
100
101
|
# GET /RecurringInvoice - List Recurring invoices
|
|
101
102
|
def recurring_invoices(params = {})
|
|
102
|
-
get(
|
|
103
|
+
get('RecurringInvoice', params)
|
|
103
104
|
end
|
|
104
105
|
|
|
105
106
|
# GET /RecurringInvoice/{id} - Get specific Recurring invoice
|
|
106
107
|
def recurring_invoice(id, params = {})
|
|
107
|
-
get("
|
|
108
|
+
get("RecurringInvoice/#{id}", params)
|
|
108
109
|
end
|
|
109
110
|
|
|
110
111
|
# POST /RecurringInvoice - Create Recurring invoice
|
|
111
112
|
def create_recurring_invoice(data)
|
|
112
|
-
post(
|
|
113
|
+
post('RecurringInvoice', data)
|
|
113
114
|
end
|
|
114
115
|
|
|
115
116
|
# PUT /RecurringInvoice/{id} - Update Recurring invoice
|
|
116
117
|
def update_recurring_invoice(id, data)
|
|
117
|
-
put("
|
|
118
|
+
put("RecurringInvoice/#{id}", data)
|
|
118
119
|
end
|
|
119
120
|
|
|
120
121
|
# DELETE /RecurringInvoice/{id} - Delete Recurring invoice
|
|
121
122
|
def delete_recurring_invoice(id)
|
|
122
|
-
delete("
|
|
123
|
+
delete("RecurringInvoice/#{id}")
|
|
123
124
|
end
|
|
124
125
|
|
|
125
126
|
# GET /RecurringInvoice/Lines - Get Recurring invoice lines
|
|
126
127
|
def recurring_invoice_lines(params = {})
|
|
127
|
-
get(
|
|
128
|
+
get('RecurringInvoice/Lines', params)
|
|
128
129
|
end
|
|
129
130
|
|
|
130
131
|
# POST /RecurringInvoice/process - Process Recurring invoices
|
|
131
132
|
def process_recurring_invoices(data)
|
|
132
|
-
post(
|
|
133
|
+
post('RecurringInvoice/process', data)
|
|
133
134
|
end
|
|
134
135
|
|
|
135
136
|
# POST /RecurringInvoice/updatelines - Update Recurring invoice lines
|
|
136
137
|
def update_recurring_invoice_lines(data)
|
|
137
|
-
post(
|
|
138
|
+
post('RecurringInvoice/updatelines', data)
|
|
138
139
|
end
|
|
139
140
|
end
|
|
140
141
|
end
|
|
@@ -2,87 +2,88 @@
|
|
|
2
2
|
|
|
3
3
|
module HaloMspApi
|
|
4
4
|
module Resources
|
|
5
|
+
# Resource class for Knowledge Base
|
|
5
6
|
class KnowledgeBase < Base
|
|
6
7
|
# GET /KBArticle - List of Knowledge Base Articles
|
|
7
8
|
def articles(params = {})
|
|
8
|
-
get(
|
|
9
|
+
get('KBArticle', params)
|
|
9
10
|
end
|
|
10
11
|
|
|
11
12
|
# GET /KBArticle/{id} - Get a specific Knowledge Base Article
|
|
12
13
|
def article(id, params = {})
|
|
13
|
-
get("
|
|
14
|
+
get("KBArticle/#{id}", params)
|
|
14
15
|
end
|
|
15
16
|
|
|
16
17
|
# POST /KBArticle - Create a new Knowledge Base Article
|
|
17
18
|
def create_article(data)
|
|
18
|
-
post(
|
|
19
|
+
post('KBArticle', data)
|
|
19
20
|
end
|
|
20
21
|
|
|
21
22
|
# PUT /KBArticle/{id} - Update a Knowledge Base Article
|
|
22
23
|
def update_article(id, data)
|
|
23
|
-
put("
|
|
24
|
+
put("KBArticle/#{id}", data)
|
|
24
25
|
end
|
|
25
26
|
|
|
26
27
|
# DELETE /KBArticle/{id} - Delete a Knowledge Base Article
|
|
27
28
|
def delete_article(id)
|
|
28
|
-
delete("
|
|
29
|
+
delete("KBArticle/#{id}")
|
|
29
30
|
end
|
|
30
31
|
|
|
31
32
|
# GET /KBArticle/Search - Search Knowledge Base Articles
|
|
32
33
|
def search_articles(params = {})
|
|
33
|
-
get(
|
|
34
|
+
get('KBArticle/Search', params)
|
|
34
35
|
end
|
|
35
36
|
|
|
36
37
|
# Knowledge Base Category methods
|
|
37
38
|
# GET /KBCategory - List Knowledge Base Categories
|
|
38
39
|
def categories(params = {})
|
|
39
|
-
get(
|
|
40
|
+
get('KBCategory', params)
|
|
40
41
|
end
|
|
41
42
|
|
|
42
43
|
# GET /KBCategory/{id} - Get specific Knowledge Base Category
|
|
43
44
|
def category(id, params = {})
|
|
44
|
-
get("
|
|
45
|
+
get("KBCategory/#{id}", params)
|
|
45
46
|
end
|
|
46
47
|
|
|
47
48
|
# POST /KBCategory - Create Knowledge Base Category
|
|
48
49
|
def create_category(data)
|
|
49
|
-
post(
|
|
50
|
+
post('KBCategory', data)
|
|
50
51
|
end
|
|
51
52
|
|
|
52
53
|
# PUT /KBCategory/{id} - Update Knowledge Base Category
|
|
53
54
|
def update_category(id, data)
|
|
54
|
-
put("
|
|
55
|
+
put("KBCategory/#{id}", data)
|
|
55
56
|
end
|
|
56
57
|
|
|
57
58
|
# DELETE /KBCategory/{id} - Delete Knowledge Base Category
|
|
58
59
|
def delete_category(id)
|
|
59
|
-
delete("
|
|
60
|
+
delete("KBCategory/#{id}")
|
|
60
61
|
end
|
|
61
62
|
|
|
62
63
|
# Knowledge Base Keywords methods
|
|
63
64
|
# GET /KBKeywords - List Knowledge Base Keywords
|
|
64
65
|
def keywords(params = {})
|
|
65
|
-
get(
|
|
66
|
+
get('KBKeywords', params)
|
|
66
67
|
end
|
|
67
68
|
|
|
68
69
|
# GET /KBKeywords/{id} - Get specific Knowledge Base Keywords
|
|
69
70
|
def keyword(id, params = {})
|
|
70
|
-
get("
|
|
71
|
+
get("KBKeywords/#{id}", params)
|
|
71
72
|
end
|
|
72
73
|
|
|
73
74
|
# POST /KBKeywords - Create Knowledge Base Keywords
|
|
74
75
|
def create_keyword(data)
|
|
75
|
-
post(
|
|
76
|
+
post('KBKeywords', data)
|
|
76
77
|
end
|
|
77
78
|
|
|
78
79
|
# PUT /KBKeywords/{id} - Update Knowledge Base Keywords
|
|
79
80
|
def update_keyword(id, data)
|
|
80
|
-
put("
|
|
81
|
+
put("KBKeywords/#{id}", data)
|
|
81
82
|
end
|
|
82
83
|
|
|
83
84
|
# DELETE /KBKeywords/{id} - Delete Knowledge Base Keywords
|
|
84
85
|
def delete_keyword(id)
|
|
85
|
-
delete("
|
|
86
|
+
delete("KBKeywords/#{id}")
|
|
86
87
|
end
|
|
87
88
|
end
|
|
88
89
|
end
|