Class: HaloMspApi::Resources::Webhooks
- Defined in:
- lib/halo_msp_api/resources/webhooks.rb
Overview
Resource class for Webhooks
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#create_event(data) ⇒ Object
POST /WebhookEvent - Create Webhook event.
-
#create_subscription(data) ⇒ Object
POST /WebhookSubscription - Create Webhook subscription.
-
#create_webhook(data) ⇒ Object
POST /Webhook - Create a new Webhook.
-
#delete_event(id) ⇒ Object
DELETE /WebhookEvent/id - Delete Webhook event.
-
#delete_subscription(id) ⇒ Object
DELETE /WebhookSubscription/id - Delete Webhook subscription.
-
#delete_webhook(id) ⇒ Object
DELETE /Webhook/id - Delete a Webhook.
-
#event(id, params = {}) ⇒ Object
GET /WebhookEvent/id - Get specific Webhook event.
-
#events(params = {}) ⇒ Object
Webhook Event methods GET /WebhookEvent - List Webhook events.
-
#subscription(id, params = {}) ⇒ Object
GET /WebhookSubscription/id - Get specific Webhook subscription.
-
#subscriptions(params = {}) ⇒ Object
Webhook Subscription methods GET /WebhookSubscription - List Webhook subscriptions.
-
#test(data) ⇒ Object
POST /Webhook/test - Test a Webhook.
-
#update_event(id, data) ⇒ Object
PUT /WebhookEvent/id - Update Webhook event.
-
#update_subscription(id, data) ⇒ Object
PUT /WebhookSubscription/id - Update Webhook subscription.
-
#update_webhook(id, data) ⇒ Object
PUT /Webhook/id - Update a Webhook.
-
#webhook(id, params = {}) ⇒ Object
GET /Webhook/id - Get a specific Webhook.
-
#webhooks(params = {}) ⇒ Object
GET /Webhook - List of Webhooks.
Methods inherited from Base
Constructor Details
This class inherits a constructor from HaloMspApi::Resources::Base
Instance Method Details
#create_event(data) ⇒ Object
POST /WebhookEvent - Create Webhook event
49 50 51 |
# File 'lib/halo_msp_api/resources/webhooks.rb', line 49 def create_event(data) create_resource('WebhookEvent', data) end |
#create_subscription(data) ⇒ Object
POST /WebhookSubscription - Create Webhook subscription
75 76 77 |
# File 'lib/halo_msp_api/resources/webhooks.rb', line 75 def create_subscription(data) create_resource('WebhookSubscription', data) end |
#create_webhook(data) ⇒ Object
POST /Webhook - Create a new Webhook
18 19 20 |
# File 'lib/halo_msp_api/resources/webhooks.rb', line 18 def create_webhook(data) create_resource('Webhook', data) end |
#delete_event(id) ⇒ Object
DELETE /WebhookEvent/id - Delete Webhook event
59 60 61 |
# File 'lib/halo_msp_api/resources/webhooks.rb', line 59 def delete_event(id) delete_resource('WebhookEvent', id) end |
#delete_subscription(id) ⇒ Object
DELETE /WebhookSubscription/id - Delete Webhook subscription
85 86 87 |
# File 'lib/halo_msp_api/resources/webhooks.rb', line 85 def delete_subscription(id) delete_resource('WebhookSubscription', id) end |
#delete_webhook(id) ⇒ Object
DELETE /Webhook/id - Delete a Webhook
28 29 30 |
# File 'lib/halo_msp_api/resources/webhooks.rb', line 28 def delete_webhook(id) delete_resource('Webhook', id) end |
#event(id, params = {}) ⇒ Object
GET /WebhookEvent/id - Get specific Webhook event
44 45 46 |
# File 'lib/halo_msp_api/resources/webhooks.rb', line 44 def event(id, params = {}) get_resource('WebhookEvent', id, params) end |
#events(params = {}) ⇒ Object
Webhook Event methods GET /WebhookEvent - List Webhook events
39 40 41 |
# File 'lib/halo_msp_api/resources/webhooks.rb', line 39 def events(params = {}) list_resource('WebhookEvent', params) end |
#subscription(id, params = {}) ⇒ Object
GET /WebhookSubscription/id - Get specific Webhook subscription
70 71 72 |
# File 'lib/halo_msp_api/resources/webhooks.rb', line 70 def subscription(id, params = {}) get_resource('WebhookSubscription', id, params) end |
#subscriptions(params = {}) ⇒ Object
Webhook Subscription methods GET /WebhookSubscription - List Webhook subscriptions
65 66 67 |
# File 'lib/halo_msp_api/resources/webhooks.rb', line 65 def subscriptions(params = {}) list_resource('WebhookSubscription', params) end |
#test(data) ⇒ Object
POST /Webhook/test - Test a Webhook
33 34 35 |
# File 'lib/halo_msp_api/resources/webhooks.rb', line 33 def test(data) post(resource_path('Webhook', nil, 'test'), data) end |
#update_event(id, data) ⇒ Object
PUT /WebhookEvent/id - Update Webhook event
54 55 56 |
# File 'lib/halo_msp_api/resources/webhooks.rb', line 54 def update_event(id, data) update_resource('WebhookEvent', id, data) end |
#update_subscription(id, data) ⇒ Object
PUT /WebhookSubscription/id - Update Webhook subscription
80 81 82 |
# File 'lib/halo_msp_api/resources/webhooks.rb', line 80 def update_subscription(id, data) update_resource('WebhookSubscription', id, data) end |
#update_webhook(id, data) ⇒ Object
PUT /Webhook/id - Update a Webhook
23 24 25 |
# File 'lib/halo_msp_api/resources/webhooks.rb', line 23 def update_webhook(id, data) update_resource('Webhook', id, data) end |
#webhook(id, params = {}) ⇒ Object
GET /Webhook/id - Get a specific Webhook
13 14 15 |
# File 'lib/halo_msp_api/resources/webhooks.rb', line 13 def webhook(id, params = {}) get_resource('Webhook', id, params) end |
#webhooks(params = {}) ⇒ Object
GET /Webhook - List of Webhooks
8 9 10 |
# File 'lib/halo_msp_api/resources/webhooks.rb', line 8 def webhooks(params = {}) list_resource('Webhook', params) end |