docuseal 1.0.1 → 1.0.3

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: df6cd59df11dcce0c5c2197072bbe147fd5547452f9cd8f4843adc70acfd3ab2
4
- data.tar.gz: 23fe9247d7d9b90c170fdcdd6305cd66c990644674d22cf54cbf437c8444777d
3
+ metadata.gz: a5616bb23965d6fed6cb2cb823b40307db764d914c06af6efa4c46a5881ba93a
4
+ data.tar.gz: 1a7bb67e5761eb187012fdd2f0084a708262a2589e3a73667c21af2db9dfdcb7
5
5
  SHA512:
6
- metadata.gz: b3ac3d6203f31ec7c954aee6eef92d0d07bbf6c2c4b56dfee31cb93f365c4c17289484d2efd832868051b099eeae0124ca343057da2ba95fc226437a36eec290
7
- data.tar.gz: d0444f297d866a07be0c104058eda775f05af1c0eb80159b8759390240c33efe1cf4b22d4b815b6f68d1f2dd478390b8512c68efc3a51e98fc025496901f671e
6
+ metadata.gz: 8245e9657f887cb82b1aa08516889fed72f73ce3fcef1a65cd269eb9a2e7db51273c088184efc58a690b8e36a47bc704eb7d79d4f63e3a45bd63a5352c436294
7
+ data.tar.gz: 72d07dca090081fc2b60980f8224a47aa6109f85e4c551c241221389fe61dbcddd354c8d90f36c719283bd0ed646207d2c3f7a474554dd262d08d617803514fd
data/README.md CHANGED
@@ -4,7 +4,7 @@ The DocuSeal Ruby library provides seamless integration with the DocuSeal API, a
4
4
 
5
5
  ## Documentation
6
6
 
7
- Detailed documentation is available at [DocuSeal API Docs](https://www.docuseal.com/docs/api).
7
+ Detailed documentation is available at [DocuSeal API Docs](https://www.docuseal.com/docs/api?lang=ruby).
8
8
 
9
9
  ## Installation
10
10
 
@@ -49,9 +49,9 @@ Docuseal.key = 'your_api_key_here'
49
49
  Docuseal.url = 'https://api.docuseal.eu'
50
50
  ```
51
51
 
52
- #### On-Premise
52
+ #### On-Premises
53
53
 
54
- For on-premise installations, API keys can be retrieved from the API settings page of your deployed application, e.g., https://yourdocusealapp.com/settings/api.
54
+ For on-premises installations, API keys can be retrieved from the API settings page of your deployed application, e.g., https://yourdocusealapp.com/settings/api.
55
55
 
56
56
  ```ruby
57
57
  require 'docuseal'
@@ -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)
@@ -159,7 +170,7 @@ Docuseal.get_submitter(500001)
159
170
 
160
171
  [Documentation](https://www.docuseal.com/docs/api?lang=ruby#update-a-submitter)
161
172
 
162
- Provides allows you to update submitter details, pre-fill or update field values and re-send emails.
173
+ Allows you to update submitter details, pre-fill or update field values and re-send emails.
163
174
 
164
175
  **Related Guides:**<br>
165
176
  [Automatically sign documents via API](https://www.docuseal.com/guides/pre-fill-pdf-document-form-fields-with-api#automatically_sign_documents_via_api)
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
data/lib/docuseal/http.rb CHANGED
@@ -7,6 +7,8 @@ require 'net/http'
7
7
 
8
8
  module Docuseal
9
9
  class Http
10
+ USER_AGENT = "DocuSeal Ruby v#{VERSION}"
11
+
10
12
  BODY_METHODS = %i[post put].freeze
11
13
 
12
14
  attr_reader :config
@@ -51,7 +53,8 @@ module Docuseal
51
53
  def headers
52
54
  {
53
55
  'X-Auth-Token' => config[:key],
54
- 'Content-Type' => 'application/json'
56
+ 'Content-Type' => 'application/json',
57
+ 'User-Agent' => USER_AGENT
55
58
  }
56
59
  end
57
60
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Docuseal
4
- VERSION = '1.0.1'
4
+ VERSION = '1.0.3'
5
5
  end
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
- :key, :key=,
48
- :url, :url=,
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.1
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - DocuSeal
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2024-12-25 00:00:00.000000000 Z
10
+ date: 2025-04-16 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.
@@ -30,9 +29,8 @@ metadata:
30
29
  bug_tracker_uri: https://github.com/docusealco/docuseal-ruby/issues
31
30
  homepage_uri: https://www.docuseal.com
32
31
  source_code_uri: https://github.com/docusealco/docuseal-ruby
33
- documentation_uri: https://www.docuseal.com/docs/api
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.5.11
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: []