Module: WOTC::Client::Webhooks
- Included in:
- WOTC::Client
- Defined in:
- lib/wotc/client/webhooks.rb
Overview
Defines methods related to webhooks.
Instance Method Summary collapse
-
#create_webhook(options = {}) ⇒ Object
Create a webhook.
-
#delete_webhook(webhook_id) ⇒ Object
Delete a webhook.
-
#update_webhook(webhook_id, options = {}) ⇒ Object
Update a webhook.
-
#webhooks(options = {}) ⇒ Object
List company webhooks.
Instance Method Details
#create_webhook(options = {}) ⇒ Object
Create a webhook
11 12 13 |
# File 'lib/wotc/client/webhooks.rb', line 11 def create_webhook( = {}) post('webhooks', ) end |
#delete_webhook(webhook_id) ⇒ Object
Delete a webhook
21 22 23 |
# File 'lib/wotc/client/webhooks.rb', line 21 def delete_webhook(webhook_id) delete("webhooks/#{webhook_id}") end |
#update_webhook(webhook_id, options = {}) ⇒ Object
Update a webhook
16 17 18 |
# File 'lib/wotc/client/webhooks.rb', line 16 def update_webhook(webhook_id, = {}) put("webhooks/#{webhook_id}", ) end |
#webhooks(options = {}) ⇒ Object
List company webhooks
6 7 8 |
# File 'lib/wotc/client/webhooks.rb', line 6 def webhooks(={}) paginate('webhooks') end |