Class: Clicksign::Envelope
- Inherits:
-
Base
- Object
- Base
- Clicksign::Envelope
show all
- Defined in:
- lib/clicksign/envelope.rb
Class Method Summary
collapse
Methods inherited from Base
api_url, build_data, headers, parse, request
Class Method Details
.create(params = {}) ⇒ Object
7
8
9
10
11
12
|
# File 'lib/clicksign/envelope.rb', line 7
def self.create params={}
request :post,
api_url(model_name),
build_data(params, model_name),
{}
end
|
.find(key) ⇒ Object
14
15
16
17
18
|
# File 'lib/clicksign/envelope.rb', line 14
def self.find key
request :get,
api_url(model_name, key),
{}
end
|
.model_name ⇒ Object
3
4
5
|
# File 'lib/clicksign/envelope.rb', line 3
def self.model_name
'envelopes'
end
|
.remove(key) ⇒ Object
31
32
33
34
35
|
# File 'lib/clicksign/envelope.rb', line 31
def self.remove key
request :delete,
api_url(model_name, key),
{}
end
|
.update(params = {}, key) ⇒ Object
20
21
22
23
24
25
26
27
28
29
|
# File 'lib/clicksign/envelope.rb', line 20
def self.update params={}, key
unless params[:data]&[:id]
raise 'must_send_envelope_id_inside_body'
end
request :patch,
api_url(model_name, key),
build_data(params, model_name, key ),
{}
end
|