Module: Tacokit::Client::Webhooks

Included in:
Tacokit::Client
Defined in:
lib/tacokit/client/webhooks.rb

Instance Method Summary collapse

Instance Method Details

#create_webhook(token, model_id, callback_url, options = {}) ⇒ Object

Create a webhook



14
15
16
17
18
19
# File 'lib/tacokit/client/webhooks.rb', line 14

def create_webhook(token, model_id, callback_url, options = {})
  options.update \
    model_id: model_id,
    callback_url: callback_url
  post "webhooks", options
end

#delete_webhook(webhook_id) ⇒ Object

Delete a webhook



24
25
26
# File 'lib/tacokit/client/webhooks.rb', line 24

def delete_webhook(webhook_id)
  delete webhook_path(webhook_id)
end

#update_webhook(webhook_id, options = {}) ⇒ Object

Update a webhook



7
8
9
# File 'lib/tacokit/client/webhooks.rb', line 7

def update_webhook(webhook_id, options = {})
  put webhook_path(webhook_id), options
end