Module: Convertkit::Client::Webhooks
- Included in:
- Convertkit::Client
- Defined in:
- lib/convertkit/client/webhooks.rb
Instance Method Summary collapse
Instance Method Details
#create_webhook(url, events) ⇒ Object
4 5 6 7 8 9 10 |
# File 'lib/convertkit/client/webhooks.rb', line 4 def create_webhook(url, events) response = connection.post("automations/hooks") do |f| f.params['target_url'] = url f.params['event'] = events end response.body end |
#remove_webhook(rule_id) ⇒ Object
12 13 14 |
# File 'lib/convertkit/client/webhooks.rb', line 12 def remove_webhook(rule_id) connection.delete("automations/hooks/#{rule_id}").body end |