Class: Docuseal::Template
- Inherits:
-
Model
- Object
- Model
- Docuseal::Template
show all
- Defined in:
- lib/docuseal/template.rb
Class Method Summary
collapse
Methods inherited from Model
archive, find, list, not_allowed_to, skip_coertion_for, #to_json, to_proc, update
Class Method Details
.clone(id, **attrs) ⇒ Object
24
25
26
27
|
# File 'lib/docuseal/template.rb', line 24
def self.clone(id, **attrs)
response = Docuseal::Client.instance.post("#{path}/#{id}/clone", data: attrs)
new(response.body)
end
|
.create(from:, **attrs) ⇒ Object
12
13
14
|
# File 'lib/docuseal/template.rb', line 12
def self.create(from:, **attrs)
super(path: "#{path}/#{from}", **attrs)
end
|
.path ⇒ Object
3
4
5
|
# File 'lib/docuseal/template.rb', line 3
def self.path
"/templates"
end
|
.update_documents(id, documents: []) ⇒ Object
17
18
19
20
21
|
# File 'lib/docuseal/template.rb', line 17
def self.update_documents(id, documents: [])
return if documents.empty?
response = Docuseal::Client.instance.put("#{path}/#{id}/documents", data: {documents:})
new(response.body)
end
|