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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +25 -0
- data/Gemfile +3 -8
- data/README.md +32 -32
- data/Rakefile +3 -3
- data/examples/basic_usage.rb +95 -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 +12 -10
- 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 +63 -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,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
|
|
8
|
-
list_resource(
|
|
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
|
|
13
|
-
get_resource(
|
|
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
|
|
18
|
-
create_resource(
|
|
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
|
|
23
|
-
update_resource(
|
|
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
|
|
28
|
-
delete_resource(
|
|
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(
|
|
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(
|
|
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(
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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(
|
|
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(
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
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
|