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

Instance Method Details

#create_webhook(options = {}) ⇒ Object

Create a webhook



11
12
13
# File 'lib/wotc/client/webhooks.rb', line 11

def create_webhook(options = {})
  post('webhooks', options)
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, options = {})
  put("webhooks/#{webhook_id}", options)
end

#webhooks(options = {}) ⇒ Object

List company webhooks



6
7
8
# File 'lib/wotc/client/webhooks.rb', line 6

def webhooks(options={})
  paginate('webhooks')
end