docuseal 1.0.2 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +131 -56
- data/lib/docuseal/api.rb +13 -1
- data/lib/docuseal/version.rb +1 -1
- data/lib/docuseal.rb +3 -25
- metadata +3 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ca5c0906e609ef75ff0f131f22da63bb906bb46fc66081f221913fa4bef43d4d
|
|
4
|
+
data.tar.gz: 7c7bc5a38feb904100cbdd1178ddf96c20256d7f62fa181d53b9372cbceef6cb
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0c5e32bccefb205560e84c33670fad28eb03cc7fe3683158dd292ca4516bdbadd0b55ded527d9edb40af204ebcf32a076aacfc5a0f97464b56ebb2a1d26d765d
|
|
7
|
+
data.tar.gz: 7c7d65d7f00d11c4b9e8950d744296b98763699b060cada99e45bef76f2f485cd91473f0f5c473934e7bf979c53bb5ae6dfb6b836f6ef09156b4f495fc20fbf8
|
data/README.md
CHANGED
|
@@ -84,6 +84,17 @@ Provides the functionality to retrieve information about a submission.
|
|
|
84
84
|
Docuseal.get_submission(1001)
|
|
85
85
|
```
|
|
86
86
|
|
|
87
|
+
### get_submission_documents(id)
|
|
88
|
+
|
|
89
|
+
[Documentation](https://www.docuseal.com/docs/api?lang=ruby#get-submission-documents)
|
|
90
|
+
|
|
91
|
+
This endpoint returns a list of partially filled documents for a submission. If the submission has been completed, the final signed documents are returned.
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
```ruby
|
|
95
|
+
Docuseal.get_submission_documents(1001)
|
|
96
|
+
```
|
|
97
|
+
|
|
87
98
|
### create_submission(data)
|
|
88
99
|
|
|
89
100
|
[Documentation](https://www.docuseal.com/docs/api?lang=ruby#create-a-submission)
|
|
@@ -108,17 +119,81 @@ Docuseal.create_submission({
|
|
|
108
119
|
})
|
|
109
120
|
```
|
|
110
121
|
|
|
111
|
-
###
|
|
122
|
+
### create_submission_from_pdf(data)
|
|
112
123
|
|
|
113
|
-
[Documentation](https://www.docuseal.com/docs/api?lang=ruby#create-
|
|
124
|
+
[Documentation](https://www.docuseal.com/docs/api?lang=ruby#create-a-submission-from-pdf)
|
|
114
125
|
|
|
115
|
-
|
|
126
|
+
Provides the functionality to create one-off submission request from a PDF file. Use `{{Field Name;role=Signer1;type=date}}` text tags to define fillable fields in the document. See [https://www.docuseal.com/examples/fieldtags.pdf](https://www.docuseal.com/examples/fieldtags.pdf) for more text tag formats. Or specify the exact pixel coordinates of the document fields using `fields` param.
|
|
127
|
+
|
|
128
|
+
**Related Guides:**<br>
|
|
129
|
+
[Use embedded text field tags to create a fillable form](https://www.docuseal.com/guides/use-embedded-text-field-tags-in-the-pdf-to-create-a-fillable-form)
|
|
116
130
|
|
|
117
131
|
|
|
118
132
|
```ruby
|
|
119
|
-
Docuseal.
|
|
120
|
-
|
|
121
|
-
|
|
133
|
+
Docuseal.create_submission_from_pdf({
|
|
134
|
+
name: "Test PDF",
|
|
135
|
+
documents: [
|
|
136
|
+
{
|
|
137
|
+
name: "string",
|
|
138
|
+
file: "base64",
|
|
139
|
+
fields: [
|
|
140
|
+
{
|
|
141
|
+
name: "string",
|
|
142
|
+
areas: [
|
|
143
|
+
{
|
|
144
|
+
x: 0,
|
|
145
|
+
y: 0,
|
|
146
|
+
w: 0,
|
|
147
|
+
h: 0,
|
|
148
|
+
page: 1
|
|
149
|
+
}
|
|
150
|
+
]
|
|
151
|
+
}
|
|
152
|
+
]
|
|
153
|
+
}
|
|
154
|
+
],
|
|
155
|
+
submitters: [
|
|
156
|
+
{
|
|
157
|
+
role: "First Party",
|
|
158
|
+
email: "john.doe@example.com"
|
|
159
|
+
}
|
|
160
|
+
]
|
|
161
|
+
})
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
### create_submission_from_html(data)
|
|
165
|
+
|
|
166
|
+
[Documentation](https://www.docuseal.com/docs/api?lang=ruby#create-a-submission-from-html)
|
|
167
|
+
|
|
168
|
+
This API endpoint allows you to create a one-off submission request document using the provided HTML content, with special field tags rendered as a fillable and signable form.
|
|
169
|
+
|
|
170
|
+
**Related Guides:**<br>
|
|
171
|
+
[Create PDF document fillable form with HTML](https://www.docuseal.com/guides/create-pdf-document-fillable-form-with-html-api)
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
```ruby
|
|
175
|
+
Docuseal.create_submission_from_html({
|
|
176
|
+
name: "Test PDF",
|
|
177
|
+
documents: [
|
|
178
|
+
{
|
|
179
|
+
name: "Test Document",
|
|
180
|
+
html: "<p>Lorem Ipsum is simply dummy text of the
|
|
181
|
+
<text-field
|
|
182
|
+
name=\"Industry\"
|
|
183
|
+
role=\"First Party\"
|
|
184
|
+
required=\"false\"
|
|
185
|
+
style=\"width: 80px; height: 16px; display: inline-block; margin-bottom: -4px\">
|
|
186
|
+
</text-field>
|
|
187
|
+
and typesetting industry</p>
|
|
188
|
+
"
|
|
189
|
+
}
|
|
190
|
+
],
|
|
191
|
+
submitters: [
|
|
192
|
+
{
|
|
193
|
+
role: "First Party",
|
|
194
|
+
email: "john.doe@example.com"
|
|
195
|
+
}
|
|
196
|
+
]
|
|
122
197
|
})
|
|
123
198
|
```
|
|
124
199
|
|
|
@@ -148,7 +223,7 @@ Docuseal.list_submitters(limit: 10)
|
|
|
148
223
|
|
|
149
224
|
[Documentation](https://www.docuseal.com/docs/api?lang=ruby#get-a-submitter)
|
|
150
225
|
|
|
151
|
-
Provides
|
|
226
|
+
Provides functionality to retrieve information about a submitter, along with the submitter documents and field values.
|
|
152
227
|
|
|
153
228
|
|
|
154
229
|
```ruby
|
|
@@ -199,6 +274,42 @@ Provides the functionality to retrieve information about a document template.
|
|
|
199
274
|
Docuseal.get_template(1000001)
|
|
200
275
|
```
|
|
201
276
|
|
|
277
|
+
### create_template_from_pdf(data)
|
|
278
|
+
|
|
279
|
+
[Documentation](https://www.docuseal.com/docs/api?lang=ruby#create-a-template-from-pdf)
|
|
280
|
+
|
|
281
|
+
Provides the functionality to create a fillable document template for a PDF file. Use `{{Field Name;role=Signer1;type=date}}` text tags to define fillable fields in the document. See [https://www.docuseal.com/examples/fieldtags.pdf](https://www.docuseal.com/examples/fieldtags.pdf) for more text tag formats. Or specify the exact pixel coordinates of the document fields using `fields` param.
|
|
282
|
+
|
|
283
|
+
**Related Guides:**<br>
|
|
284
|
+
[Use embedded text field tags to create a fillable form](https://www.docuseal.com/guides/use-embedded-text-field-tags-in-the-pdf-to-create-a-fillable-form)
|
|
285
|
+
|
|
286
|
+
|
|
287
|
+
```ruby
|
|
288
|
+
Docuseal.create_template_from_pdf({
|
|
289
|
+
name: "Test PDF",
|
|
290
|
+
documents: [
|
|
291
|
+
{
|
|
292
|
+
name: "string",
|
|
293
|
+
file: "base64",
|
|
294
|
+
fields: [
|
|
295
|
+
{
|
|
296
|
+
name: "string",
|
|
297
|
+
areas: [
|
|
298
|
+
{
|
|
299
|
+
x: 0,
|
|
300
|
+
y: 0,
|
|
301
|
+
w: 0,
|
|
302
|
+
h: 0,
|
|
303
|
+
page: 1
|
|
304
|
+
}
|
|
305
|
+
]
|
|
306
|
+
}
|
|
307
|
+
]
|
|
308
|
+
}
|
|
309
|
+
]
|
|
310
|
+
})
|
|
311
|
+
```
|
|
312
|
+
|
|
202
313
|
### create_template_from_docx(data)
|
|
203
314
|
|
|
204
315
|
[Documentation](https://www.docuseal.com/docs/api?lang=ruby#create-a-template-from-word-docx)
|
|
@@ -246,6 +357,19 @@ and typesetting industry</p>
|
|
|
246
357
|
})
|
|
247
358
|
```
|
|
248
359
|
|
|
360
|
+
### clone_template(id, data)
|
|
361
|
+
|
|
362
|
+
[Documentation](https://www.docuseal.com/docs/api?lang=ruby#clone-a-template)
|
|
363
|
+
|
|
364
|
+
Allows you to clone existing template into a new template.
|
|
365
|
+
|
|
366
|
+
|
|
367
|
+
```ruby
|
|
368
|
+
Docuseal.clone_template(1000001, {
|
|
369
|
+
name: "Cloned Template"
|
|
370
|
+
})
|
|
371
|
+
```
|
|
372
|
+
|
|
249
373
|
### merge_templates(data)
|
|
250
374
|
|
|
251
375
|
[Documentation](https://www.docuseal.com/docs/api?lang=ruby#merge-templates)
|
|
@@ -263,55 +387,6 @@ Docuseal.merge_templates({
|
|
|
263
387
|
})
|
|
264
388
|
```
|
|
265
389
|
|
|
266
|
-
### create_template_from_pdf(data)
|
|
267
|
-
|
|
268
|
-
[Documentation](https://www.docuseal.com/docs/api?lang=ruby#create-a-template-from-existing-pdf)
|
|
269
|
-
|
|
270
|
-
Provides the functionality to create a fillable document template for existing PDF file. Use `{{Field Name;role=Signer1;type=date}}` text tags to define fillable fields in the document. See [https://www.docuseal.com/examples/fieldtags.pdf](https://www.docuseal.com/examples/fieldtags.pdf) for more text tag formats. Or specify the exact pixel coordinates of the document fields using `fields` param.
|
|
271
|
-
|
|
272
|
-
**Related Guides:**<br>
|
|
273
|
-
[Use embedded text field tags to create a fillable form](https://www.docuseal.com/guides/use-embedded-text-field-tags-in-the-pdf-to-create-a-fillable-form)
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
```ruby
|
|
277
|
-
Docuseal.create_template_from_pdf({
|
|
278
|
-
name: "Test PDF",
|
|
279
|
-
documents: [
|
|
280
|
-
{
|
|
281
|
-
name: "string",
|
|
282
|
-
file: "base64",
|
|
283
|
-
fields: [
|
|
284
|
-
{
|
|
285
|
-
name: "string",
|
|
286
|
-
areas: [
|
|
287
|
-
{
|
|
288
|
-
x: 0,
|
|
289
|
-
y: 0,
|
|
290
|
-
w: 0,
|
|
291
|
-
h: 0,
|
|
292
|
-
page: 1
|
|
293
|
-
}
|
|
294
|
-
]
|
|
295
|
-
}
|
|
296
|
-
]
|
|
297
|
-
}
|
|
298
|
-
]
|
|
299
|
-
})
|
|
300
|
-
```
|
|
301
|
-
|
|
302
|
-
### clone_template(id, data)
|
|
303
|
-
|
|
304
|
-
[Documentation](https://www.docuseal.com/docs/api?lang=ruby#clone-a-template)
|
|
305
|
-
|
|
306
|
-
Allows you to clone existing template into a new template.
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
```ruby
|
|
310
|
-
Docuseal.clone_template(1000001, {
|
|
311
|
-
name: "Cloned Template"
|
|
312
|
-
})
|
|
313
|
-
```
|
|
314
|
-
|
|
315
390
|
### update_template(id, data)
|
|
316
391
|
|
|
317
392
|
[Documentation](https://www.docuseal.com/docs/api?lang=ruby#update-a-template)
|
data/lib/docuseal/api.rb
CHANGED
|
@@ -4,7 +4,7 @@ module Docuseal
|
|
|
4
4
|
class Api
|
|
5
5
|
Error = Class.new(StandardError)
|
|
6
6
|
|
|
7
|
-
attr_reader :http
|
|
7
|
+
private attr_reader :http
|
|
8
8
|
|
|
9
9
|
def initialize(config)
|
|
10
10
|
@http = Http.new(config)
|
|
@@ -62,6 +62,10 @@ module Docuseal
|
|
|
62
62
|
http.get("/submissions/#{id}", params)
|
|
63
63
|
end
|
|
64
64
|
|
|
65
|
+
def get_submission_documents(id, params = {})
|
|
66
|
+
http.get("/submissions/#{id}/documents", params)
|
|
67
|
+
end
|
|
68
|
+
|
|
65
69
|
def create_submission(data)
|
|
66
70
|
http.post('/submissions/init', data)
|
|
67
71
|
end
|
|
@@ -70,6 +74,14 @@ module Docuseal
|
|
|
70
74
|
http.post('/submissions/emails', data)
|
|
71
75
|
end
|
|
72
76
|
|
|
77
|
+
def create_submission_from_pdf(data)
|
|
78
|
+
http.post('/submissions/pdf', data)
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
def create_submission_from_html(data)
|
|
82
|
+
http.post('/submissions/html', data)
|
|
83
|
+
end
|
|
84
|
+
|
|
73
85
|
def archive_submission(id)
|
|
74
86
|
http.delete("/submissions/#{id}")
|
|
75
87
|
end
|
data/lib/docuseal/version.rb
CHANGED
data/lib/docuseal.rb
CHANGED
|
@@ -21,33 +21,11 @@ module Docuseal
|
|
|
21
21
|
|
|
22
22
|
extend Forwardable
|
|
23
23
|
|
|
24
|
-
def_delegators :api,
|
|
25
|
-
:list_templates,
|
|
26
|
-
:get_template,
|
|
27
|
-
:create_template_from_docx,
|
|
28
|
-
:create_template_from_html,
|
|
29
|
-
:create_template_from_pdf,
|
|
30
|
-
:merge_templates,
|
|
31
|
-
:clone_template,
|
|
32
|
-
:update_template,
|
|
33
|
-
:update_template_documents,
|
|
34
|
-
:archive_template,
|
|
35
|
-
:permanently_delete_template,
|
|
36
|
-
:list_submissions,
|
|
37
|
-
:get_submission,
|
|
38
|
-
:create_submission,
|
|
39
|
-
:create_submission_from_emails,
|
|
40
|
-
:archive_submission,
|
|
41
|
-
:permanently_delete_submission,
|
|
42
|
-
:list_submitters,
|
|
43
|
-
:get_submitter,
|
|
44
|
-
:update_submitter
|
|
24
|
+
def_delegators :api, *Docuseal::Api.instance_methods(false)
|
|
45
25
|
|
|
46
26
|
def_delegators :config,
|
|
47
|
-
|
|
48
|
-
:
|
|
49
|
-
:open_timeout, :open_timeout=,
|
|
50
|
-
:read_timeout, :read_timeout=
|
|
27
|
+
*Docuseal::Configuration.members,
|
|
28
|
+
*Docuseal::Configuration.members.map { |name| :"#{name}=" }
|
|
51
29
|
|
|
52
30
|
def config
|
|
53
31
|
@config ||= Configuration.new(DEFAULT_CONFIG)
|
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: docuseal
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- DocuSeal
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 2025-06-07 00:00:00.000000000 Z
|
|
12
11
|
dependencies: []
|
|
13
12
|
description: DocuSeal is a document signing platform. This gem provides a Ruby interface
|
|
14
13
|
to the DocuSeal API.
|
|
@@ -32,7 +31,6 @@ metadata:
|
|
|
32
31
|
source_code_uri: https://github.com/docusealco/docuseal-ruby
|
|
33
32
|
documentation_uri: https://www.docuseal.com/docs/api?lang=ruby
|
|
34
33
|
rubygems_mfa_required: 'true'
|
|
35
|
-
post_install_message:
|
|
36
34
|
rdoc_options: []
|
|
37
35
|
require_paths:
|
|
38
36
|
- lib
|
|
@@ -47,8 +45,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
47
45
|
- !ruby/object:Gem::Version
|
|
48
46
|
version: '0'
|
|
49
47
|
requirements: []
|
|
50
|
-
rubygems_version: 3.
|
|
51
|
-
signing_key:
|
|
48
|
+
rubygems_version: 3.6.2
|
|
52
49
|
specification_version: 4
|
|
53
50
|
summary: Ruby bindings for DocuSeal API
|
|
54
51
|
test_files: []
|