Class: Clicksign::Hook

Inherits:
Base
  • Object
show all
Defined in:
lib/clicksign/hook.rb

Class Method Summary collapse

Methods inherited from Base

accept_header, api_url, parse, request

Class Method Details

.all(key) ⇒ Object



3
4
5
6
7
# File 'lib/clicksign/hook.rb', line 3

def self.all(key)
  request :get,
    api_url('documents', key, 'hooks'),
    {}
end

.create(key, url) ⇒ Object



9
10
11
12
13
14
# File 'lib/clicksign/hook.rb', line 9

def self.create(key, url)
  request :post,
    api_url('documents', key, 'hooks'),
    { url: url }.to_json,
    { content_type: "json" }
end

.delete(key, id) ⇒ Object



16
17
18
19
20
# File 'lib/clicksign/hook.rb', line 16

def self.delete(key, id)
  request :delete,
    api_url('documents', key, 'hooks', id),
    {}
end