Module: Tacokit::Client::Webhooks
- Included in:
- Tacokit::Client
- Defined in:
- lib/tacokit/client/webhooks.rb
Overview
Methods for the Webhooks API
Instance Method Summary (collapse)
-
- (Tacokit::Resource<Webhook>) create_webhook(model_id, callback_url, options = {})
Create a webhook.
-
- (Object) delete_webhook(webhook_id)
Delete a webhook.
-
- (Tacokit::Resource<Webhook>) update_webhook(webhook_id, options = {})
Update a webhook.
Instance Method Details
- (Tacokit::Resource<Webhook>) create_webhook(model_id, callback_url, options = {})
Create a webhook
27 28 29 30 31 32 |
# File 'lib/tacokit/client/webhooks.rb', line 27 def create_webhook(model_id, callback_url, = {}) .update \ model_id: model_id, callback_url: callback_url post "webhooks", end |
- (Object) delete_webhook(webhook_id)
Delete a webhook
37 38 39 |
# File 'lib/tacokit/client/webhooks.rb', line 37 def delete_webhook(webhook_id) delete webhook_path(webhook_id) end |
- (Tacokit::Resource<Webhook>) update_webhook(webhook_id, options = {})
Update a webhook
13 14 15 |
# File 'lib/tacokit/client/webhooks.rb', line 13 def update_webhook(webhook_id, = {}) put webhook_path(webhook_id), end |