Class: Sevk::Resources::Webhooks

Inherits:
Base
  • Object
show all
Defined in:
lib/sevk/resources/webhooks.rb

Instance Attribute Summary

Attributes inherited from Base

#client

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Sevk::Resources::Base

Instance Method Details

#create(params) ⇒ Object



17
18
19
# File 'lib/sevk/resources/webhooks.rb', line 17

def create(params)
  client.post("/webhooks", params)
end

#delete(id) ⇒ Object



25
26
27
# File 'lib/sevk/resources/webhooks.rb', line 25

def delete(id)
  client.delete("/webhooks/#{id}")
end

#get(id) ⇒ Object



13
14
15
# File 'lib/sevk/resources/webhooks.rb', line 13

def get(id)
  client.get("/webhooks/#{id}")
end

#list(page: nil, limit: nil) ⇒ Object



8
9
10
11
# File 'lib/sevk/resources/webhooks.rb', line 8

def list(page: nil, limit: nil)
  params = { page: page, limit: limit }
  client.get("/webhooks#{build_query_string(params)}")
end

#list_events ⇒ Object



33
34
35
# File 'lib/sevk/resources/webhooks.rb', line 33

def list_events
  client.get("/webhooks/events")
end

#test(id) ⇒ Object



29
30
31
# File 'lib/sevk/resources/webhooks.rb', line 29

def test(id)
  client.post("/webhooks/#{id}/test", {})
end

#update(id, params) ⇒ Object



21
22
23
# File 'lib/sevk/resources/webhooks.rb', line 21

def update(id, params)
  client.put("/webhooks/#{id}", params)
end