halo_msp_api 0.1.0 → 0.3.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.
@@ -2,113 +2,109 @@
2
2
 
3
3
  module HaloMspApi
4
4
  module Resources
5
+ # Resource class for Clients
5
6
  class Clients < Base
6
7
  # GET /Client - List of Clients
7
- def list(params = {})
8
- list_resource("Client", params)
8
+ def clients(params = {})
9
+ list_resource('Client', params)
9
10
  end
10
11
 
11
12
  # GET /Client/{id} - Get a specific Client
12
- def get(id, params = {})
13
- get_resource("Client", id, params)
13
+ def client(id, params = {})
14
+ get_resource('Client', id, params)
14
15
  end
15
16
 
16
17
  # POST /Client - Create a new Client
17
- def create(data)
18
- create_resource("Client", data)
18
+ def create_client(data)
19
+ create_resource('Client', data)
19
20
  end
20
21
 
21
22
  # PUT /Client/{id} - Update a Client
22
- def update(id, data)
23
- update_resource("Client", id, data)
23
+ def update_client(id, data)
24
+ update_resource('Client', id, data)
24
25
  end
25
26
 
26
27
  # DELETE /Client/{id} - Delete a Client
27
- def delete(id)
28
- delete_resource("Client", id)
29
- end
30
-
31
- # GET /Client/me - Get current Client information
32
- def me(params = {})
33
- get(resource_path("Client", nil, "me"), params)
28
+ def delete_client(id)
29
+ delete_resource('Client', id)
34
30
  end
35
31
 
36
32
  # GET /Client/NewAccountsId - Get new accounts ID
37
33
  def new_accounts_id(params = {})
38
- get(resource_path("Client", nil, "NewAccountsId"), params)
34
+ get(resource_path('Client', nil, 'NewAccountsId'), params)
39
35
  end
40
36
 
41
37
  # POST /Client/PaymentMethodUpdate - Update payment method
42
38
  def update_payment_method(data)
43
- post(resource_path("Client", nil, "PaymentMethodUpdate"), data)
39
+ post(resource_path('Client', nil, 'PaymentMethodUpdate'), data)
44
40
  end
45
41
 
46
42
  # Client Cache methods
47
43
  # GET /ClientCache - Get Client cache
48
44
  def cache(params = {})
49
- get("/ClientCache", params)
45
+ get('ClientCache', params)
50
46
  end
51
47
 
52
48
  # Client Contract methods
53
49
  # GET /ClientContract - List Client contracts
54
50
  def contracts(params = {})
55
- get("/ClientContract", params)
51
+ list_resource('ClientContract', params)
56
52
  end
57
53
 
58
54
  # GET /ClientContract/{id} - Get specific Client contract
59
55
  def contract(id, params = {})
60
- get("/ClientContract/#{id}", params)
56
+ get_resource('ClientContract', id, params)
61
57
  end
62
58
 
63
59
  # POST /ClientContract - Create Client contract
64
60
  def create_contract(data)
65
- post("/ClientContract", data)
61
+ create_resource('ClientContract', data)
66
62
  end
67
63
 
68
64
  # PUT /ClientContract/{id} - Update Client contract
69
65
  def update_contract(id, data)
70
- put("/ClientContract/#{id}", data)
66
+ update_resource('ClientContract', id, data)
71
67
  end
72
68
 
73
69
  # DELETE /ClientContract/{id} - Delete Client contract
74
70
  def delete_contract(id)
75
- delete("/ClientContract/#{id}")
71
+ delete_resource('ClientContract', id)
76
72
  end
77
73
 
78
74
  # POST /ClientContract/Approval - Client contract approval
79
75
  def contract_approval(data)
80
- post("/ClientContract/Approval", data)
76
+ post('ClientContract/Approval', data)
81
77
  end
82
78
 
83
79
  # GET /ClientContract/NextRef - Get next contract reference
84
80
  def next_contract_ref(params = {})
85
- get("/ClientContract/NextRef", params)
81
+ get('ClientContract/NextRef', params)
86
82
  end
87
83
 
88
84
  # Client Prepay methods
89
85
  # GET /ClientPrepay - List Client prepayments
90
86
  def prepayments(params = {})
91
- get("/ClientPrepay", params)
87
+ list_resource('ClientPrepay', params)
92
88
  end
93
89
 
94
90
  # GET /ClientPrepay/{id} - Get specific Client prepayment
95
91
  def prepayment(id, params = {})
96
- get("/ClientPrepay/#{id}", params)
92
+ get_resource('ClientPrepay', id, params)
97
93
  end
98
94
 
99
95
  # POST /ClientPrepay - Create Client prepayment
100
96
  def create_prepayment(data)
101
- post("/ClientPrepay", data)
97
+ create_resource('ClientPrepay', data)
102
98
  end
103
99
 
104
100
  # PUT /ClientPrepay/{id} - Update Client prepayment
105
101
  def update_prepayment(id, data)
106
- put("/ClientPrepay/#{id}", data)
102
+ update_resource('ClientPrepay', id, data)
107
103
  end
108
104
 
109
105
  # DELETE /ClientPrepay/{id} - Delete Client prepayment
110
106
  def delete_prepayment(id)
111
- delete("/ClientPrepay/#{id}")
107
+ delete_resource('ClientPrepay', id)
112
108
  end
113
109
  end
114
110
  end
@@ -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 get_addigy(params = {})
10
- get("/IntegrationData/Get/Addigy", params)
11
+ def addigy(params = {})
12
+ get('IntegrationData/Get/Addigy', params)
11
13
  end
12
14
 
13
- def get_amazon_seller(params = {})
14
- get("/IntegrationData/Get/AmazonSeller", params)
15
+ def amazon_seller(params = {})
16
+ get('IntegrationData/Get/AmazonSeller', params)
15
17
  end
16
18
 
17
- def get_arrow_sphere(params = {})
18
- get("/IntegrationData/Get/ArrowSphere", params)
19
+ def arrow_sphere(params = {})
20
+ get('IntegrationData/Get/ArrowSphere', params)
19
21
  end
20
22
 
21
- def get_atera(params = {})
22
- get("/IntegrationData/Get/Atera", params)
23
+ def atera(params = {})
24
+ get('IntegrationData/Get/Atera', params)
23
25
  end
24
26
 
25
- def get_automate(params = {})
26
- get("/IntegrationData/Get/Automate", params)
27
+ def automate(params = {})
28
+ get('IntegrationData/Get/Automate', params)
27
29
  end
28
30
 
29
- def get_autotask(params = {})
30
- get("/IntegrationData/Get/Autotask", params)
31
+ def autotask(params = {})
32
+ get('IntegrationData/Get/Autotask', params)
31
33
  end
32
34
 
33
- def get_auvik(params = {})
34
- get("/IntegrationData/Get/Auvik", params)
35
+ def auvik(params = {})
36
+ get('IntegrationData/Get/Auvik', params)
35
37
  end
36
38
 
37
- def get_avalara(params = {})
38
- get("/IntegrationData/Get/Avalara", params)
39
+ def avalara(params = {})
40
+ get('IntegrationData/Get/Avalara', params)
39
41
  end
40
42
 
41
- def get_azure_ad(params = {})
42
- get("/IntegrationData/Get/AzureAD", params)
43
+ def azure_ad(params = {})
44
+ get('IntegrationData/Get/AzureAD', params)
43
45
  end
44
46
 
45
- def get_azure_ad_delta(params = {})
46
- get("/IntegrationData/Get/AzureAD/Delta", params)
47
+ def azure_ad_delta(params = {})
48
+ get('IntegrationData/Get/AzureAD/Delta', params)
47
49
  end
48
50
 
49
- def get_azure_sentinel(params = {})
50
- get("/IntegrationData/Get/AzureSentinel", params)
51
+ def azure_sentinel(params = {})
52
+ get('IntegrationData/Get/AzureSentinel', params)
51
53
  end
52
54
 
53
- def get_business_central(params = {})
54
- get("/IntegrationData/Get/BusinessCentral", params)
55
+ def business_central(params = {})
56
+ get('IntegrationData/Get/BusinessCentral', params)
55
57
  end
56
58
 
57
- def get_confluence(params = {})
58
- get("/IntegrationData/Get/Confluence", params)
59
+ def confluence(params = {})
60
+ get('IntegrationData/Get/Confluence', params)
59
61
  end
60
62
 
61
- def get_connectwise(params = {})
62
- get("/IntegrationData/Get/ConnectWise", params)
63
+ def connectwise(params = {})
64
+ get('IntegrationData/Get/ConnectWise', params)
63
65
  end
64
66
 
65
- def get_connectwise_control(params = {})
66
- get("/IntegrationData/Get/ConnectwiseControl", params)
67
+ def connectwise_control(params = {})
68
+ get('IntegrationData/Get/ConnectwiseControl', params)
67
69
  end
68
70
 
69
- def get_connectwise_rmm(params = {})
70
- get("/IntegrationData/Get/ConnectwiseRmm", params)
71
+ def connectwise_rmm(params = {})
72
+ get('IntegrationData/Get/ConnectwiseRmm', params)
71
73
  end
72
74
 
73
- def get_datto(params = {})
74
- get("/IntegrationData/Get/Datto", params)
75
+ def datto(params = {})
76
+ get('IntegrationData/Get/Datto', params)
75
77
  end
76
78
 
77
- def get_datto_commerce(params = {})
78
- get("/IntegrationData/Get/DattoCommerce", params)
79
+ def datto_commerce(params = {})
80
+ get('IntegrationData/Get/DattoCommerce', params)
79
81
  end
80
82
 
81
- def get_dynamics_crm(params = {})
82
- get("/IntegrationData/Get/DynamicsCRM", params)
83
+ def dynamics_crm(params = {})
84
+ get('IntegrationData/Get/DynamicsCRM', params)
83
85
  end
84
86
 
85
- def get_dynatrace(params = {})
86
- get("/IntegrationData/Get/Dynatrace", params)
87
+ def dynatrace(params = {})
88
+ get('IntegrationData/Get/Dynatrace', params)
87
89
  end
88
90
 
89
- def get_exact_online(params = {})
90
- get("/IntegrationData/Get/ExactOnline", params)
91
+ def exact_online(params = {})
92
+ get('IntegrationData/Get/ExactOnline', params)
91
93
  end
92
94
 
93
- def get_facebook(params = {})
94
- get("/IntegrationData/Get/Facebook", params)
95
+ def facebook(params = {})
96
+ get('IntegrationData/Get/Facebook', params)
95
97
  end
96
98
 
97
- def get_freshdesk(params = {})
98
- get("/IntegrationData/Get/Freshdesk", params)
99
+ def freshdesk(params = {})
100
+ get('IntegrationData/Get/Freshdesk', params)
99
101
  end
100
102
 
101
- def get_google_business(params = {})
102
- get("/IntegrationData/Get/GoogleBusiness", params)
103
+ def google_business(params = {})
104
+ get('IntegrationData/Get/GoogleBusiness', params)
103
105
  end
104
106
 
105
- def get_google_workplace(params = {})
106
- get("/IntegrationData/Get/GoogleWorkplace", params)
107
+ def google_workplace(params = {})
108
+ get('IntegrationData/Get/GoogleWorkplace', params)
107
109
  end
108
110
 
109
- def get_hubspot(params = {})
110
- get("/IntegrationData/Get/HubSpot", params)
111
+ def hubspot(params = {})
112
+ get('IntegrationData/Get/HubSpot', params)
111
113
  end
112
114
 
113
- def get_intune(params = {})
114
- get("/IntegrationData/Get/Intune", params)
115
+ def intune(params = {})
116
+ get('IntegrationData/Get/Intune', params)
115
117
  end
116
118
 
117
- def get_it_glue(params = {})
118
- get("/IntegrationData/Get/ITGlue", params)
119
+ def it_glue(params = {})
120
+ get('IntegrationData/Get/ITGlue', params)
119
121
  end
120
122
 
121
- def get_jamf(params = {})
122
- get("/IntegrationData/Get/Jamf", params)
123
+ def jamf(params = {})
124
+ get('IntegrationData/Get/Jamf', params)
123
125
  end
124
126
 
125
- def get_jira(params = {})
126
- get("/IntegrationData/Get/Jira", params)
127
+ def jira(params = {})
128
+ get('IntegrationData/Get/Jira', params)
127
129
  end
128
130
 
129
- def get_jira_service_management(params = {})
130
- get("/IntegrationData/Get/JiraServiceManagement", params)
131
+ def jira_service_management(params = {})
132
+ get('IntegrationData/Get/JiraServiceManagement', params)
131
133
  end
132
134
 
133
- def get_lansweeper(params = {})
134
- get("/IntegrationData/Get/Lansweeper", params)
135
+ def lansweeper(params = {})
136
+ get('IntegrationData/Get/Lansweeper', params)
135
137
  end
136
138
 
137
- def get_microsoft_csp(params = {})
138
- get("/IntegrationData/Get/MicrosoftCSP", params)
139
+ def microsoft_csp(params = {})
140
+ get('IntegrationData/Get/MicrosoftCSP', params)
139
141
  end
140
142
 
141
- def get_ninja_rmm(params = {})
142
- get("/IntegrationData/Get/NinjaRMM", params)
143
+ def ninja_rmm(params = {})
144
+ get('IntegrationData/Get/NinjaRMM', params)
143
145
  end
144
146
 
145
- def get_okta(params = {})
146
- get("/IntegrationData/Get/Okta", params)
147
+ def okta(params = {})
148
+ get('IntegrationData/Get/Okta', params)
147
149
  end
148
150
 
149
- def get_pager_duty(params = {})
150
- get("/IntegrationData/Get/PagerDuty", params)
151
+ def pager_duty(params = {})
152
+ get('IntegrationData/Get/PagerDuty', params)
151
153
  end
152
154
 
153
- def get_quickbooks_online(params = {})
154
- get("/IntegrationData/Get/QuickBooksOnline", params)
155
+ def quickbooks_online(params = {})
156
+ get('IntegrationData/Get/QuickBooksOnline', params)
155
157
  end
156
158
 
157
- def get_salesforce(params = {})
158
- get("/IntegrationData/Get/Salesforce", params)
159
+ def salesforce(params = {})
160
+ get('IntegrationData/Get/Salesforce', params)
159
161
  end
160
162
 
161
- def get_service_now(params = {})
162
- get("/IntegrationData/Get/ServiceNow", params)
163
+ def service_now(params = {})
164
+ get('IntegrationData/Get/ServiceNow', params)
163
165
  end
164
166
 
165
- def get_shopify(params = {})
166
- get("/IntegrationData/Get/Shopify", params)
167
+ def shopify(params = {})
168
+ get('IntegrationData/Get/Shopify', params)
167
169
  end
168
170
 
169
- def get_slack(params = {})
170
- get("/IntegrationData/Get/Slack", params)
171
+ def slack(params = {})
172
+ get('IntegrationData/Get/Slack', params)
171
173
  end
172
174
 
173
- def get_stripe(params = {})
174
- get("/IntegrationData/Get/Stripe", params)
175
+ def stripe(params = {})
176
+ get('IntegrationData/Get/Stripe', params)
175
177
  end
176
178
 
177
- def get_xero(params = {})
178
- get("/IntegrationData/Get/Xero", params)
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("/IntegrationData/Import/BusinessCentral", data)
185
+ post('IntegrationData/Import/BusinessCentral', data)
184
186
  end
185
187
 
186
188
  def import_exact_online(data)
187
- post("/IntegrationData/Import/ExactOnline", data)
189
+ post('IntegrationData/Import/ExactOnline', data)
188
190
  end
189
191
 
190
192
  def import_jira(data)
191
- post("/IntegrationData/Import/Jira", data)
193
+ post('IntegrationData/Import/Jira', data)
192
194
  end
193
195
 
194
196
  def import_quickbooks_online(data)
195
- post("/IntegrationData/Import/QuickBooksOnline", data)
197
+ post('IntegrationData/Import/QuickBooksOnline', data)
196
198
  end
197
199
 
198
200
  def import_xero(data)
199
- post("/IntegrationData/Import/Xero", data)
201
+ post('IntegrationData/Import/Xero', data)
200
202
  end
201
203
 
202
204
  # Link methods
203
205
  def link_jira(data)
204
- post("/IntegrationData/Link/Jira", data)
206
+ post('IntegrationData/Link/Jira', data)
205
207
  end
206
208
 
207
209
  def unlink_jira(data)
208
- post("/IntegrationData/Unlink/Jira", data)
210
+ post('IntegrationData/Unlink/Jira', data)
209
211
  end
210
212
 
211
213
  # Search methods
212
214
  def search_jira(params = {})
213
- get("/IntegrationData/Search/Jira", params)
215
+ get('IntegrationData/Search/Jira', params)
214
216
  end
215
217
 
216
218
  # Validation methods
217
219
  def validate_jira(data)
218
- post("/IntegrationData/Validate/Jira", data)
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("/IntegrationConfiguration", params)
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("/IntegrationConfiguration/#{id}", params)
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("/IntegrationConfiguration", data)
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("/IntegrationConfiguration/#{id}", data)
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("/IntegrationConfiguration/#{id}")
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("/IntegrationError", params)
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("/IntegrationError/#{id}", params)
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("/IntegrationRequest", params)
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("/IntegrationRequest/#{id}", params)
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("/IntegrationRequest", data)
273
+ post('IntegrationRequest', data)
272
274
  end
273
275
  end
274
276
  end
275
277
  end
278
+ # rubocop:enable Metrics/ClassLength