halo_msp_api 0.2.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.
@@ -36,7 +36,7 @@ module HaloMspApi
36
36
 
37
37
  # GET /Invoice/PDF/{id} - Get Invoice PDF
38
38
  def pdf(id, params = {})
39
- get(resource_path('Invoice', "PDF/#{id}"), params)
39
+ get_resource('Invoice', "#{id}/PDF", params)
40
40
  end
41
41
 
42
42
  # POST /Invoice/updatelines - Update Invoice lines
@@ -46,86 +46,86 @@ module HaloMspApi
46
46
 
47
47
  # GET /Invoice/View - Get Invoice view
48
48
  def view(params = {})
49
- get(resource_path('Invoice', nil, 'View'), params)
49
+ get_resource('Invoice', 'View', params)
50
50
  end
51
51
 
52
52
  # Invoice Change methods
53
53
  # GET /InvoiceChange - List Invoice changes
54
54
  def changes(params = {})
55
- get('InvoiceChange', params)
55
+ list_resource('InvoiceChange', params)
56
56
  end
57
57
 
58
58
  # POST /InvoiceChange - Create Invoice change
59
59
  def create_change(data)
60
- post('InvoiceChange', data)
60
+ create_resource('InvoiceChange', data)
61
61
  end
62
62
 
63
63
  # Invoice Detail Pro Rata methods
64
64
  # GET /InvoiceDetailProRata - List Invoice detail pro rata
65
65
  def detail_pro_rata(params = {})
66
- get('InvoiceDetailProRata', params)
66
+ list_resource('InvoiceDetailProRata', params)
67
67
  end
68
68
 
69
69
  # POST /InvoiceDetailProRata - Create Invoice detail pro rata
70
70
  def create_detail_pro_rata(data)
71
- post('InvoiceDetailProRata', data)
71
+ create_resource('InvoiceDetailProRata', data)
72
72
  end
73
73
 
74
74
  # Invoice Payment methods
75
75
  # GET /InvoicePayment - List Invoice payments
76
76
  def payments(params = {})
77
- get('InvoicePayment', params)
77
+ list_resource('InvoicePayment', params)
78
78
  end
79
79
 
80
80
  # GET /InvoicePayment/{id} - Get specific Invoice payment
81
81
  def payment(id, params = {})
82
- get("InvoicePayment/#{id}", params)
82
+ get_resource('InvoicePayment', id, params)
83
83
  end
84
84
 
85
85
  # POST /InvoicePayment - Create Invoice payment
86
86
  def create_payment(data)
87
- post('InvoicePayment', data)
87
+ create_resource('InvoicePayment', data)
88
88
  end
89
89
 
90
90
  # PUT /InvoicePayment/{id} - Update Invoice payment
91
91
  def update_payment(id, data)
92
- put("InvoicePayment/#{id}", data)
92
+ update_resource('InvoicePayment', id, data)
93
93
  end
94
94
 
95
95
  # DELETE /InvoicePayment/{id} - Delete Invoice payment
96
96
  def delete_payment(id)
97
- delete("InvoicePayment/#{id}")
97
+ delete_resource('InvoicePayment', id)
98
98
  end
99
99
 
100
100
  # Recurring Invoice methods
101
101
  # GET /RecurringInvoice - List Recurring invoices
102
102
  def recurring_invoices(params = {})
103
- get('RecurringInvoice', params)
103
+ list_resource('RecurringInvoice', params)
104
104
  end
105
105
 
106
106
  # GET /RecurringInvoice/{id} - Get specific Recurring invoice
107
107
  def recurring_invoice(id, params = {})
108
- get("RecurringInvoice/#{id}", params)
108
+ get_resource('RecurringInvoice', id, params)
109
109
  end
110
110
 
111
111
  # POST /RecurringInvoice - Create Recurring invoice
112
112
  def create_recurring_invoice(data)
113
- post('RecurringInvoice', data)
113
+ create_resource('RecurringInvoice', data)
114
114
  end
115
115
 
116
116
  # PUT /RecurringInvoice/{id} - Update Recurring invoice
117
117
  def update_recurring_invoice(id, data)
118
- put("RecurringInvoice/#{id}", data)
118
+ update_resource('RecurringInvoice', id, data)
119
119
  end
120
120
 
121
121
  # DELETE /RecurringInvoice/{id} - Delete Recurring invoice
122
122
  def delete_recurring_invoice(id)
123
- delete("RecurringInvoice/#{id}")
123
+ delete_resource('RecurringInvoice', id)
124
124
  end
125
125
 
126
126
  # GET /RecurringInvoice/Lines - Get Recurring invoice lines
127
127
  def recurring_invoice_lines(params = {})
128
- get('RecurringInvoice/Lines', params)
128
+ get_resource('RecurringInvoice', 'Lines', params)
129
129
  end
130
130
 
131
131
  # POST /RecurringInvoice/process - Process Recurring invoices
@@ -6,27 +6,27 @@ module HaloMspApi
6
6
  class KnowledgeBase < Base
7
7
  # GET /KBArticle - List of Knowledge Base Articles
8
8
  def articles(params = {})
9
- get('KBArticle', params)
9
+ list_resource('KBArticle', params)
10
10
  end
11
11
 
12
12
  # GET /KBArticle/{id} - Get a specific Knowledge Base Article
13
13
  def article(id, params = {})
14
- get("KBArticle/#{id}", params)
14
+ get_resource('KBArticle', id, params)
15
15
  end
16
16
 
17
17
  # POST /KBArticle - Create a new Knowledge Base Article
18
18
  def create_article(data)
19
- post('KBArticle', data)
19
+ create_resource('KBArticle', data)
20
20
  end
21
21
 
22
22
  # PUT /KBArticle/{id} - Update a Knowledge Base Article
23
23
  def update_article(id, data)
24
- put("KBArticle/#{id}", data)
24
+ update_resource('KBArticle', id, data)
25
25
  end
26
26
 
27
27
  # DELETE /KBArticle/{id} - Delete a Knowledge Base Article
28
28
  def delete_article(id)
29
- delete("KBArticle/#{id}")
29
+ delete_resource('KBArticle', id)
30
30
  end
31
31
 
32
32
  # GET /KBArticle/Search - Search Knowledge Base Articles
@@ -37,53 +37,53 @@ module HaloMspApi
37
37
  # Knowledge Base Category methods
38
38
  # GET /KBCategory - List Knowledge Base Categories
39
39
  def categories(params = {})
40
- get('KBCategory', params)
40
+ list_resource('KBCategory', params)
41
41
  end
42
42
 
43
43
  # GET /KBCategory/{id} - Get specific Knowledge Base Category
44
44
  def category(id, params = {})
45
- get("KBCategory/#{id}", params)
45
+ get_resource('KBCategory', id, params)
46
46
  end
47
47
 
48
48
  # POST /KBCategory - Create Knowledge Base Category
49
49
  def create_category(data)
50
- post('KBCategory', data)
50
+ create_resource('KBCategory', data)
51
51
  end
52
52
 
53
53
  # PUT /KBCategory/{id} - Update Knowledge Base Category
54
54
  def update_category(id, data)
55
- put("KBCategory/#{id}", data)
55
+ update_resource('KBCategory', id, data)
56
56
  end
57
57
 
58
58
  # DELETE /KBCategory/{id} - Delete Knowledge Base Category
59
59
  def delete_category(id)
60
- delete("KBCategory/#{id}")
60
+ delete_resource('KBCategory', id)
61
61
  end
62
62
 
63
63
  # Knowledge Base Keywords methods
64
64
  # GET /KBKeywords - List Knowledge Base Keywords
65
65
  def keywords(params = {})
66
- get('KBKeywords', params)
66
+ list_resource('KBKeywords', params)
67
67
  end
68
68
 
69
69
  # GET /KBKeywords/{id} - Get specific Knowledge Base Keywords
70
70
  def keyword(id, params = {})
71
- get("KBKeywords/#{id}", params)
71
+ get_resource('KBKeywords', id, params)
72
72
  end
73
73
 
74
74
  # POST /KBKeywords - Create Knowledge Base Keywords
75
75
  def create_keyword(data)
76
- post('KBKeywords', data)
76
+ create_resource('KBKeywords', data)
77
77
  end
78
78
 
79
79
  # PUT /KBKeywords/{id} - Update Knowledge Base Keywords
80
80
  def update_keyword(id, data)
81
- put("KBKeywords/#{id}", data)
81
+ update_resource('KBKeywords', id, data)
82
82
  end
83
83
 
84
84
  # DELETE /KBKeywords/{id} - Delete Knowledge Base Keywords
85
85
  def delete_keyword(id)
86
- delete("KBKeywords/#{id}")
86
+ delete_resource('KBKeywords', id)
87
87
  end
88
88
  end
89
89
  end
@@ -57,27 +57,27 @@ module HaloMspApi
57
57
  # Report Repository methods
58
58
  # GET /ReportRepository - List Report repositories
59
59
  def repositories(params = {})
60
- get('ReportRepository', params)
60
+ list_resource('ReportRepository', params)
61
61
  end
62
62
 
63
63
  # GET /ReportRepository/{id} - Get specific Report repository
64
64
  def repository(id, params = {})
65
- get("ReportRepository/#{id}", params)
65
+ get_resource('ReportRepository', id, params)
66
66
  end
67
67
 
68
68
  # POST /ReportRepository - Create Report repository
69
69
  def create_repository(data)
70
- post('ReportRepository', data)
70
+ create_resource('ReportRepository', data)
71
71
  end
72
72
 
73
73
  # PUT /ReportRepository/{id} - Update Report repository
74
74
  def update_repository(id, data)
75
- put("ReportRepository/#{id}", data)
75
+ update_resource('ReportRepository', id, data)
76
76
  end
77
77
 
78
78
  # DELETE /ReportRepository/{id} - Delete Report repository
79
79
  def delete_repository(id)
80
- delete("ReportRepository/#{id}")
80
+ delete_resource('ReportRepository', id)
81
81
  end
82
82
 
83
83
  # GET /ReportRepository/ReportCategories - Get Report categories
@@ -37,141 +37,141 @@ module HaloMspApi
37
37
  # Service Availability methods
38
38
  # GET /ServiceAvailability - List Service availabilities
39
39
  def availabilities(params = {})
40
- get('ServiceAvailability', params)
40
+ list_resource('ServiceAvailability', params)
41
41
  end
42
42
 
43
43
  # GET /ServiceAvailability/{id} - Get specific Service availability
44
44
  def availability(id, params = {})
45
- get("ServiceAvailability/#{id}", params)
45
+ get_resource('ServiceAvailability', id, params)
46
46
  end
47
47
 
48
48
  # POST /ServiceAvailability - Create Service availability
49
49
  def create_availability(data)
50
- post('ServiceAvailability', data)
50
+ create_resource('ServiceAvailability', data)
51
51
  end
52
52
 
53
53
  # PUT /ServiceAvailability/{id} - Update Service availability
54
54
  def update_availability(id, data)
55
- put("ServiceAvailability/#{id}", data)
55
+ update_resource('ServiceAvailability', id, data)
56
56
  end
57
57
 
58
58
  # DELETE /ServiceAvailability/{id} - Delete Service availability
59
59
  def delete_availability(id)
60
- delete("ServiceAvailability/#{id}")
60
+ delete_resource('ServiceAvailability', id)
61
61
  end
62
62
 
63
63
  # Service Category methods
64
64
  # GET /ServiceCategory - List Service categories
65
65
  def categories(params = {})
66
- get('ServiceCategory', params)
66
+ list_resource('ServiceCategory', params)
67
67
  end
68
68
 
69
69
  # GET /ServiceCategory/{id} - Get specific Service category
70
70
  def category(id, params = {})
71
- get("ServiceCategory/#{id}", params)
71
+ get_resource('ServiceCategory', id, params)
72
72
  end
73
73
 
74
74
  # POST /ServiceCategory - Create Service category
75
75
  def create_category(data)
76
- post('ServiceCategory', data)
76
+ create_resource('ServiceCategory', data)
77
77
  end
78
78
 
79
79
  # PUT /ServiceCategory/{id} - Update Service category
80
80
  def update_category(id, data)
81
- put("ServiceCategory/#{id}", data)
81
+ update_resource('ServiceCategory', id, data)
82
82
  end
83
83
 
84
84
  # DELETE /ServiceCategory/{id} - Delete Service category
85
85
  def delete_category(id)
86
- delete("ServiceCategory/#{id}")
86
+ delete_resource('ServiceCategory', id)
87
87
  end
88
88
 
89
89
  # Service Request Details methods
90
90
  # GET /ServiceRequestDetails - List Service request details
91
91
  def request_details(params = {})
92
- get('ServiceRequestDetails', params)
92
+ list_resource('ServiceRequestDetails', params)
93
93
  end
94
94
 
95
95
  # GET /ServiceRequestDetails/{id} - Get specific Service request details
96
96
  def request_detail(id, params = {})
97
- get("ServiceRequestDetails/#{id}", params)
97
+ get_resource('ServiceRequestDetails', id, params)
98
98
  end
99
99
 
100
100
  # POST /ServiceRequestDetails - Create Service request details
101
101
  def create_request_detail(data)
102
- post('ServiceRequestDetails', data)
102
+ create_resource('ServiceRequestDetails', data)
103
103
  end
104
104
 
105
105
  # PUT /ServiceRequestDetails/{id} - Update Service request details
106
106
  def update_request_detail(id, data)
107
- put("ServiceRequestDetails/#{id}", data)
107
+ update_resource('ServiceRequestDetails', id, data)
108
108
  end
109
109
 
110
110
  # DELETE /ServiceRequestDetails/{id} - Delete Service request details
111
111
  def delete_request_detail(id)
112
- delete("ServiceRequestDetails/#{id}")
112
+ delete_resource('ServiceRequestDetails', id)
113
113
  end
114
114
 
115
115
  # Service Restriction methods
116
116
  # GET /ServiceRestriction - List Service restrictions
117
117
  def restrictions(params = {})
118
- get('ServiceRestriction', params)
118
+ list_resource('ServiceRestriction', params)
119
119
  end
120
120
 
121
121
  # POST /ServiceRestriction - Create Service restriction
122
122
  def create_restriction(data)
123
- post('ServiceRestriction', data)
123
+ create_resource('ServiceRestriction', data)
124
124
  end
125
125
 
126
126
  # Service Status methods
127
127
  # GET /ServiceStatus - List Service statuses
128
128
  def statuses(params = {})
129
- get('ServiceStatus', params)
129
+ list_resource('ServiceStatus', params)
130
130
  end
131
131
 
132
132
  # GET /ServiceStatus/{id} - Get specific Service status
133
133
  def status(id, params = {})
134
- get("ServiceStatus/#{id}", params)
134
+ get_resource('ServiceStatus', id, params)
135
135
  end
136
136
 
137
137
  # POST /ServiceStatus - Create Service status
138
138
  def create_status(data)
139
- post('ServiceStatus', data)
139
+ create_resource('ServiceStatus', data)
140
140
  end
141
141
 
142
142
  # PUT /ServiceStatus/{id} - Update Service status
143
143
  def update_status(id, data)
144
- put("ServiceStatus/#{id}", data)
144
+ update_resource('ServiceStatus', id, data)
145
145
  end
146
146
 
147
147
  # DELETE /ServiceStatus/{id} - Delete Service status
148
148
  def delete_status(id)
149
- delete("ServiceStatus/#{id}")
149
+ delete_resource('ServiceStatus', id)
150
150
  end
151
151
 
152
152
  # GET /ServiceStatus/Subscribe - List Service status subscriptions
153
153
  def status_subscriptions(params = {})
154
- get('ServiceStatus/Subscribe', params)
154
+ list_resource('ServiceStatus/Subscribe', params)
155
155
  end
156
156
 
157
157
  # GET /ServiceStatus/Subscribe/{id} - Get specific Service status subscription
158
158
  def status_subscription(id, params = {})
159
- get("ServiceStatus/Subscribe/#{id}", params)
159
+ get_resource('ServiceStatus/Subscribe', id, params)
160
160
  end
161
161
 
162
162
  # POST /ServiceStatus/Subscribe - Create Service status subscription
163
163
  def create_status_subscription(data)
164
- post('ServiceStatus/Subscribe', data)
164
+ create_resource('ServiceStatus/Subscribe', data)
165
165
  end
166
166
 
167
167
  # PUT /ServiceStatus/Subscribe/{id} - Update Service status subscription
168
168
  def update_status_subscription(id, data)
169
- put("ServiceStatus/Subscribe/#{id}", data)
169
+ update_resource('ServiceStatus/Subscribe', id, data)
170
170
  end
171
171
 
172
172
  # DELETE /ServiceStatus/Subscribe/{id} - Delete Service status subscription
173
173
  def delete_status_subscription(id)
174
- delete("ServiceStatus/Subscribe/#{id}")
174
+ delete_resource('ServiceStatus/Subscribe', id)
175
175
  end
176
176
  end
177
177
  end
@@ -32,53 +32,53 @@ module HaloMspApi
32
32
  # SLA Policy methods
33
33
  # GET /SLAPolicy - List SLA policies
34
34
  def policies(params = {})
35
- get('SLAPolicy', params)
35
+ list_resource('SLAPolicy', params)
36
36
  end
37
37
 
38
38
  # GET /SLAPolicy/{id} - Get specific SLA policy
39
39
  def policy(id, params = {})
40
- get("SLAPolicy/#{id}", params)
40
+ get_resource('SLAPolicy', id, params)
41
41
  end
42
42
 
43
43
  # POST /SLAPolicy - Create SLA policy
44
44
  def create_policy(data)
45
- post('SLAPolicy', data)
45
+ create_resource('SLAPolicy', data)
46
46
  end
47
47
 
48
48
  # PUT /SLAPolicy/{id} - Update SLA policy
49
49
  def update_policy(id, data)
50
- put("SLAPolicy/#{id}", data)
50
+ update_resource('SLAPolicy', id, data)
51
51
  end
52
52
 
53
53
  # DELETE /SLAPolicy/{id} - Delete SLA policy
54
54
  def delete_policy(id)
55
- delete("SLAPolicy/#{id}")
55
+ delete_resource('SLAPolicy', id)
56
56
  end
57
57
 
58
58
  # SLA Target methods
59
59
  # GET /SLATarget - List SLA targets
60
60
  def targets(params = {})
61
- get('SLATarget', params)
61
+ list_resource('SLATarget', params)
62
62
  end
63
63
 
64
64
  # GET /SLATarget/{id} - Get specific SLA target
65
65
  def target(id, params = {})
66
- get("SLATarget/#{id}", params)
66
+ get_resource('SLATarget', id, params)
67
67
  end
68
68
 
69
69
  # POST /SLATarget - Create SLA target
70
70
  def create_target(data)
71
- post('SLATarget', data)
71
+ create_resource('SLATarget', data)
72
72
  end
73
73
 
74
74
  # PUT /SLATarget/{id} - Update SLA target
75
75
  def update_target(id, data)
76
- put("SLATarget/#{id}", data)
76
+ update_resource('SLATarget', id, data)
77
77
  end
78
78
 
79
79
  # DELETE /SLATarget/{id} - Delete SLA target
80
80
  def delete_target(id)
81
- delete("SLATarget/#{id}")
81
+ delete_resource('SLATarget', id)
82
82
  end
83
83
  end
84
84
  end
@@ -32,27 +32,27 @@ module HaloMspApi
32
32
  # Supplier Contract methods
33
33
  # GET /SupplierContract - List Supplier contracts
34
34
  def contracts(params = {})
35
- get('SupplierContract', params)
35
+ list_resource('SupplierContract', params)
36
36
  end
37
37
 
38
38
  # GET /SupplierContract/{id} - Get specific Supplier contract
39
39
  def contract(id, params = {})
40
- get("SupplierContract/#{id}", params)
40
+ get_resource('SupplierContract', id, params)
41
41
  end
42
42
 
43
43
  # POST /SupplierContract - Create Supplier contract
44
44
  def create_contract(data)
45
- post('SupplierContract', data)
45
+ create_resource('SupplierContract', data)
46
46
  end
47
47
 
48
48
  # PUT /SupplierContract/{id} - Update Supplier contract
49
49
  def update_contract(id, data)
50
- put("SupplierContract/#{id}", data)
50
+ update_resource('SupplierContract', id, data)
51
51
  end
52
52
 
53
53
  # DELETE /SupplierContract/{id} - Delete Supplier contract
54
54
  def delete_contract(id)
55
- delete("SupplierContract/#{id}")
55
+ delete_resource('SupplierContract', id)
56
56
  end
57
57
  end
58
58
  end