docuseal 1.0.0 → 1.0.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a42565a2583a622dcfef3e7d2c145b4ea79a5b57972791c00b3c8d80f03c2bf4
4
- data.tar.gz: 10bdcee2c2f97e43b746773836ac548646156e3f2825bf4bc563533cf9430d61
3
+ metadata.gz: df6cd59df11dcce0c5c2197072bbe147fd5547452f9cd8f4843adc70acfd3ab2
4
+ data.tar.gz: 23fe9247d7d9b90c170fdcdd6305cd66c990644674d22cf54cbf437c8444777d
5
5
  SHA512:
6
- metadata.gz: 4969ccfcdca73d84d274ff3d31c79ed5beab209179efbe9c8a561477366b4503082497af7cf74e523fce008adc7c88fe553947c042714fb303959ab2473c5ff6
7
- data.tar.gz: a3ca3f193ed03196c1eef26dcd2cc768aa73cd5f2ead6294656928d4333f2dea06f7c9b92a549c928a6980cd122fba7e08064f785a6c751f15dd80cf13cb50f3
6
+ metadata.gz: b3ac3d6203f31ec7c954aee6eef92d0d07bbf6c2c4b56dfee31cb93f365c4c17289484d2efd832868051b099eeae0124ca343057da2ba95fc226437a36eec290
7
+ data.tar.gz: d0444f297d866a07be0c104058eda775f05af1c0eb80159b8759390240c33efe1cf4b22d4b815b6f68d1f2dd478390b8512c68efc3a51e98fc025496901f671e
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # DocuSeal Ruby Library
1
+ # DocuSeal Ruby
2
2
 
3
3
  The DocuSeal Ruby library provides seamless integration with the DocuSeal API, allowing developers to interact with DocuSeal's electronic signature and document management features directly within Ruby applications. This library is designed to simplify API interactions and provide tools for efficient implementation.
4
4
 
@@ -14,23 +14,11 @@ To install the library, run:
14
14
  gem install docuseal
15
15
  ```
16
16
 
17
- If you want to build the gem from source:
18
-
19
- ```sh
20
- gem build docuseal.gemspec
21
- ```
22
-
23
- ### Requirements
24
-
25
- - Ruby 2.5+.
26
-
27
17
  ### Bundler
28
18
 
29
19
  Add the library to your Gemfile for projects using Bundler:
30
20
 
31
21
  ```ruby
32
- source 'https://rubygems.org'
33
-
34
22
  gem 'docuseal'
35
23
  ```
36
24
 
@@ -72,16 +60,298 @@ Docuseal.key = 'your_api_key_here'
72
60
  Docuseal.url = 'https://yourdocusealapp.com/api'
73
61
  ```
74
62
 
75
- ### Basic Examples
63
+ ## API Methods
64
+
65
+ ### list_submissions(params)
66
+
67
+ [Documentation](https://www.docuseal.com/docs/api?lang=ruby#list-all-submissions)
68
+
69
+ Provides the ability to retrieve a list of available submissions.
70
+
71
+
72
+ ```ruby
73
+ Docuseal.list_submissions(limit: 10)
74
+ ```
75
+
76
+ ### get_submission(id)
77
+
78
+ [Documentation](https://www.docuseal.com/docs/api?lang=ruby#get-a-submission)
79
+
80
+ Provides the functionality to retrieve information about a submission.
81
+
82
+
83
+ ```ruby
84
+ Docuseal.get_submission(1001)
85
+ ```
86
+
87
+ ### create_submission(data)
88
+
89
+ [Documentation](https://www.docuseal.com/docs/api?lang=ruby#create-a-submission)
90
+
91
+ This API endpoint allows you to create signature requests (submissions) for a document template and send them to the specified submitters (signers).
92
+
93
+ **Related Guides:**<br>
94
+ [Send documents for signature via API](https://www.docuseal.com/guides/send-documents-for-signature-via-api)
95
+ [Pre-fill PDF document form fields with API](https://www.docuseal.com/guides/pre-fill-pdf-document-form-fields-with-api)
76
96
 
77
- #### List Templates
78
97
 
79
98
  ```ruby
80
- # list templates
81
- Docuseal.list_templates
99
+ Docuseal.create_submission({
100
+ template_id: 1000001,
101
+ send_email: true,
102
+ submitters: [
103
+ {
104
+ role: "First Party",
105
+ email: "john.doe@example.com"
106
+ }
107
+ ]
108
+ })
109
+ ```
110
+
111
+ ### create_submission_from_emails(data)
112
+
113
+ [Documentation](https://www.docuseal.com/docs/api?lang=ruby#create-submissions-from-emails)
114
+
115
+ This API endpoint allows you to create submissions for a document template and send them to the specified email addresses. This is a simplified version of the POST /submissions API to be used with Zapier or other automation tools.
116
+
117
+
118
+ ```ruby
119
+ Docuseal.create_submission_from_emails({
120
+ template_id: 1000001,
121
+ emails: "hi@docuseal.com, example@docuseal.com"
122
+ })
123
+ ```
124
+
125
+ ### archive_submission(id)
82
126
 
83
- # retrieve single template
84
- Docuseal.get_template(1)
127
+ [Documentation](https://www.docuseal.com/docs/api?lang=ruby#archive-a-submission)
128
+
129
+ Allows you to archive a submission.
130
+
131
+
132
+ ```ruby
133
+ Docuseal.archive_submission(1001)
134
+ ```
135
+
136
+ ### list_submitters(params)
137
+
138
+ [Documentation](https://www.docuseal.com/docs/api?lang=ruby#list-all-submitters)
139
+
140
+ Provides the ability to retrieve a list of submitters.
141
+
142
+
143
+ ```ruby
144
+ Docuseal.list_submitters(limit: 10)
145
+ ```
146
+
147
+ ### get_submitter(id)
148
+
149
+ [Documentation](https://www.docuseal.com/docs/api?lang=ruby#get-a-submitter)
150
+
151
+ Provides the functionality to retrieve information about a submitter.
152
+
153
+
154
+ ```ruby
155
+ Docuseal.get_submitter(500001)
156
+ ```
157
+
158
+ ### update_submitter(id, data)
159
+
160
+ [Documentation](https://www.docuseal.com/docs/api?lang=ruby#update-a-submitter)
161
+
162
+ Provides allows you to update submitter details, pre-fill or update field values and re-send emails.
163
+
164
+ **Related Guides:**<br>
165
+ [Automatically sign documents via API](https://www.docuseal.com/guides/pre-fill-pdf-document-form-fields-with-api#automatically_sign_documents_via_api)
166
+
167
+
168
+ ```ruby
169
+ Docuseal.update_submitter(500001, {
170
+ email: "john.doe@example.com",
171
+ fields: [
172
+ {
173
+ name: "First Name",
174
+ default_value: "Acme"
175
+ }
176
+ ]
177
+ })
178
+ ```
179
+
180
+ ### list_templates(params)
181
+
182
+ [Documentation](https://www.docuseal.com/docs/api?lang=ruby#list-all-templates)
183
+
184
+ Provides the ability to retrieve a list of available document templates.
185
+
186
+
187
+ ```ruby
188
+ Docuseal.list_templates(limit: 10)
189
+ ```
190
+
191
+ ### get_template(id)
192
+
193
+ [Documentation](https://www.docuseal.com/docs/api?lang=ruby#get-a-template)
194
+
195
+ Provides the functionality to retrieve information about a document template.
196
+
197
+
198
+ ```ruby
199
+ Docuseal.get_template(1000001)
200
+ ```
201
+
202
+ ### create_template_from_docx(data)
203
+
204
+ [Documentation](https://www.docuseal.com/docs/api?lang=ruby#create-a-template-from-word-docx)
205
+
206
+ Provides the functionality to create a fillable document template for existing Microsoft Word document. Use `{{Field Name;role=Signer1;type=date}}` text tags to define fillable fields in the document. See [https://www.docuseal.com/examples/fieldtags.docx](https://www.docuseal.com/examples/fieldtags.docx) for more text tag formats. Or specify the exact pixel coordinates of the document fields using `fields` param.
207
+
208
+ **Related Guides:**<br>
209
+ [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)
210
+
211
+
212
+ ```ruby
213
+ Docuseal.create_template_from_docx({
214
+ name: "Test DOCX",
215
+ documents: [
216
+ {
217
+ name: "string",
218
+ file: "base64"
219
+ }
220
+ ]
221
+ })
222
+ ```
223
+
224
+ ### create_template_from_html(data)
225
+
226
+ [Documentation](https://www.docuseal.com/docs/api?lang=ruby#create-a-template-from-html)
227
+
228
+ Provides the functionality to seamlessly generate a PDF document template by utilizing the provided HTML content while incorporating pre-defined fields.
229
+
230
+ **Related Guides:**<br>
231
+ [Create PDF document fillable form with HTML](https://www.docuseal.com/guides/create-pdf-document-fillable-form-with-html-api)
232
+
233
+
234
+ ```ruby
235
+ Docuseal.create_template_from_html({
236
+ html: "<p>Lorem Ipsum is simply dummy text of the
237
+ <text-field
238
+ name=\"Industry\"
239
+ role=\"First Party\"
240
+ required=\"false\"
241
+ style=\"width: 80px; height: 16px; display: inline-block; margin-bottom: -4px\">
242
+ </text-field>
243
+ and typesetting industry</p>
244
+ ",
245
+ name: "Test Template"
246
+ })
247
+ ```
248
+
249
+ ### merge_templates(data)
250
+
251
+ [Documentation](https://www.docuseal.com/docs/api?lang=ruby#merge-templates)
252
+
253
+ Allows you to merge multiple templates with documents and fields into a new combined template.
254
+
255
+
256
+ ```ruby
257
+ Docuseal.merge_templates({
258
+ template_ids: [
259
+ 321,
260
+ 432
261
+ ],
262
+ name: "Merged Template"
263
+ })
264
+ ```
265
+
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
+ ### update_template(id, data)
316
+
317
+ [Documentation](https://www.docuseal.com/docs/api?lang=ruby#update-a-template)
318
+
319
+ Provides the functionality to move a document template to a different folder and update the name of the template.
320
+
321
+
322
+ ```ruby
323
+ Docuseal.update_template(1000001, {
324
+ name: "New Document Name",
325
+ folder_name: "New Folder"
326
+ })
327
+ ```
328
+
329
+ ### update_template_documents(id, data)
330
+
331
+ [Documentation](https://www.docuseal.com/docs/api?lang=ruby#update-template-documents)
332
+
333
+ Allows you to add, remove or replace documents in the template with provided PDF/DOCX file or HTML content.
334
+
335
+
336
+ ```ruby
337
+ Docuseal.update_template_documents(1000001, {
338
+ documents: [
339
+ {
340
+ file: "string"
341
+ }
342
+ ]
343
+ })
344
+ ```
345
+
346
+ ### archive_template(id)
347
+
348
+ [Documentation](https://www.docuseal.com/docs/api?lang=ruby#archive-a-template)
349
+
350
+ Allows you to archive a document template.
351
+
352
+
353
+ ```ruby
354
+ Docuseal.archive_template(1000001)
85
355
  ```
86
356
 
87
357
  ### Configuring Timeouts
data/lib/docuseal/api.rb CHANGED
@@ -14,8 +14,8 @@ module Docuseal
14
14
  http.get('/templates', params)
15
15
  end
16
16
 
17
- def get_template(id)
18
- http.get("/templates/#{id}")
17
+ def get_template(id, params = {})
18
+ http.get("/templates/#{id}", params)
19
19
  end
20
20
 
21
21
  def create_template_from_docx(data)
@@ -58,8 +58,8 @@ module Docuseal
58
58
  http.get('/submissions', params)
59
59
  end
60
60
 
61
- def get_submission(id)
62
- http.get("/submissions/#{id}")
61
+ def get_submission(id, params = {})
62
+ http.get("/submissions/#{id}", params)
63
63
  end
64
64
 
65
65
  def create_submission(data)
@@ -82,8 +82,8 @@ module Docuseal
82
82
  http.get('/submitters', params)
83
83
  end
84
84
 
85
- def get_submitter(id)
86
- http.get("/submitters/#{id}")
85
+ def get_submitter(id, params = {})
86
+ http.get("/submitters/#{id}", params)
87
87
  end
88
88
 
89
89
  def update_submitter(id, data)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Docuseal
4
- VERSION = '1.0.0'
4
+ VERSION = '1.0.1'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: docuseal
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - DocuSeal
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-12-24 00:00:00.000000000 Z
11
+ date: 2024-12-25 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: DocuSeal is a document signing platform. This gem provides a Ruby interface
14
14
  to the DocuSeal API.
@@ -32,7 +32,7 @@ metadata:
32
32
  source_code_uri: https://github.com/docusealco/docuseal-ruby
33
33
  documentation_uri: https://www.docuseal.com/docs/api
34
34
  rubygems_mfa_required: 'true'
35
- post_install_message:
35
+ post_install_message:
36
36
  rdoc_options: []
37
37
  require_paths:
38
38
  - lib
@@ -47,8 +47,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
47
47
  - !ruby/object:Gem::Version
48
48
  version: '0'
49
49
  requirements: []
50
- rubygems_version: 3.2.33
51
- signing_key:
50
+ rubygems_version: 3.5.11
51
+ signing_key:
52
52
  specification_version: 4
53
53
  summary: Ruby bindings for DocuSeal API
54
54
  test_files: []