class Juno::Webhooks
Public Class Methods
create(body)
click to toggle source
# File lib/juno/webhooks.rb, line 4 def create(body) post('/notifications/webhooks', body) end
event_types()
click to toggle source
# File lib/juno/webhooks.rb, line 24 def event_types get('/notifications/event-types') end
list()
click to toggle source
# File lib/juno/webhooks.rb, line 8 def list get('/notifications/webhooks') end
remove(id)
click to toggle source
# File lib/juno/webhooks.rb, line 20 def remove(id) delete("/notifications/webhooks/#{id}") end
show(id)
click to toggle source
# File lib/juno/webhooks.rb, line 12 def show(id) get("/notifications/webhooks/#{id}") end
update(id, body)
click to toggle source
# File lib/juno/webhooks.rb, line 16 def update(id, body) patch("/notifications/webhooks/#{id}", body) end
valid_signature?(signature, secret, payload)
click to toggle source
# File lib/juno/webhooks.rb, line 28 def valid_signature?(signature, secret, payload) our_signature = OpenSSL::HMAC.hexdigest('SHA256', secret, payload) our_signature.eql?(signature) end