sign_well 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 +4 -4
- data/CONTRIBUTING.md +2 -0
- data/Gemfile.lock +6 -5
- data/README.md +27 -11
- data/SECURITY.md +5 -0
- data/lib/sign_well/client.rb +5 -1
- data/lib/sign_well/resource.rb +2 -2
- data/lib/sign_well/resources/document_resource.rb +4 -0
- data/lib/sign_well/version.rb +1 -1
- data/sign_well.gemspec +37 -0
- metadata +6 -4
- data/sign_well-1.0.0.gem +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 13b9c78b424fc39a7fb6989680a83ecfa2d8aee8751c4c984c1fca3cf6064072
|
4
|
+
data.tar.gz: cf2da8c99dee7f33301ce3952cbf7d75d56ca9d35d14be2b4a620667a651994d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1ea0092ec82092cac41e4383b44dbc87e50608cb9ee15b759b8bac211998ae618de553a74955252dfbc2a518f005d010ad855624f05e8a30599a2e88bd1d5e92
|
7
|
+
data.tar.gz: c8ab89dc07bd9dbe8298582291c2bacc9a56aa5937052d70e7be3c5a3d626a665f6964025aff1534bf030718a1f4b30d30e254d8bc654f8ca1a454f1425eb856
|
data/CONTRIBUTING.md
ADDED
data/Gemfile.lock
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
sign_well (1.0.
|
4
|
+
sign_well (1.0.3)
|
5
5
|
faraday (~> 1.7)
|
6
6
|
faraday_middleware (~> 1.1)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
|
-
faraday (1.10.
|
11
|
+
faraday (1.10.3)
|
12
12
|
faraday-em_http (~> 1.0)
|
13
13
|
faraday-em_synchrony (~> 1.0)
|
14
14
|
faraday-excon (~> 1.1)
|
@@ -24,8 +24,8 @@ GEM
|
|
24
24
|
faraday-em_synchrony (1.0.0)
|
25
25
|
faraday-excon (1.1.0)
|
26
26
|
faraday-httpclient (1.0.1)
|
27
|
-
faraday-multipart (1.0.
|
28
|
-
multipart-post (
|
27
|
+
faraday-multipart (1.0.4)
|
28
|
+
multipart-post (~> 2)
|
29
29
|
faraday-net_http (1.0.1)
|
30
30
|
faraday-net_http_persistent (1.2.0)
|
31
31
|
faraday-patron (1.0.0)
|
@@ -34,11 +34,12 @@ GEM
|
|
34
34
|
faraday_middleware (1.2.0)
|
35
35
|
faraday (~> 1.0)
|
36
36
|
minitest (5.15.0)
|
37
|
-
multipart-post (2.
|
37
|
+
multipart-post (2.4.1)
|
38
38
|
rake (13.0.6)
|
39
39
|
ruby2_keywords (0.0.5)
|
40
40
|
|
41
41
|
PLATFORMS
|
42
|
+
arm64-darwin-23
|
42
43
|
x86_64-darwin-20
|
43
44
|
x86_64-linux
|
44
45
|
|
data/README.md
CHANGED
@@ -1,11 +1,17 @@
|
|
1
1
|
# SignWell
|
2
2
|
|
3
|
+
## Support
|
4
|
+
|
5
|
+
If you would like to support this project and haven't signed up to Signwell yet, please consider using this [referral link](https://www.signwell.com/?via=william-gh).
|
6
|
+
|
7
|
+
This gem has been battle tested at [Low](https://low.ie), the best place in Ireland to go for life insurance. We use Signwell to process large 25 page templates. This gem helps creates 1000's of documents a month.
|
8
|
+
|
3
9
|
## Installation
|
4
10
|
|
5
11
|
Add this line to your application's Gemfile:
|
6
12
|
|
7
|
-
```
|
8
|
-
|
13
|
+
```bash
|
14
|
+
bundle add sign_well
|
9
15
|
```
|
10
16
|
|
11
17
|
And then execute:
|
@@ -32,7 +38,7 @@ client = SignWell::Client.new(x_api_key: ENV['X_API_KEY'])
|
|
32
38
|
|
33
39
|
```
|
34
40
|
|
35
|
-
## [Get Document](https://developers.signwell.com/reference/get_api-v1-
|
41
|
+
## [Get Document](https://developers.signwell.com/reference/get_api-v1-document)
|
36
42
|
|
37
43
|
```
|
38
44
|
response = client.document('docment_id')
|
@@ -40,7 +46,7 @@ response.body => Hash of the JSON.body
|
|
40
46
|
response.to_object => OpenStruct
|
41
47
|
```
|
42
48
|
|
43
|
-
## [Create Document](https://developers.signwell.com/reference/post_api-v1-documents
|
49
|
+
## [Create Document](https://developers.signwell.com/reference/post_api-v1-documents)
|
44
50
|
|
45
51
|
```
|
46
52
|
response = client.create_document(test_mode: true, files: [{name: 'test', file_url: 'exmpaledoc.com'}], recipients: [{id: 1, email: 'william@test.com'}])
|
@@ -48,7 +54,7 @@ response.body => Hash of the JSON.body
|
|
48
54
|
response.to_object => OpenStruct
|
49
55
|
```
|
50
56
|
|
51
|
-
## [Create Document from Template](https://developers.signwell.com/reference/post_api-v1-document-templates-documents
|
57
|
+
## [Create Document from Template](https://developers.signwell.com/reference/post_api-v1-document-templates-documents)
|
52
58
|
|
53
59
|
```
|
54
60
|
response = client.create_document_from_template(test_mode: true, template_id: 'template_id', recipients: [{id: 1, email: 'test@test.com', placeholder_name: 'Customer', name: 'Customer'}, {id: 2, email: 'sender@sent.com',name: 'William', placeholder_name: 'Document Sender'}], template_fields: [{api_id: 'TextField_1', value: 'hello'}, {api_id: 'CheckBox_1', value: true}
|
@@ -57,7 +63,7 @@ response.body => Hash of the JSON.body
|
|
57
63
|
response.to_object => OpenStruct
|
58
64
|
```
|
59
65
|
|
60
|
-
## [Update and Send Document](https://developers.signwell.com/reference/post_api-v1-documents-id-send
|
66
|
+
## [Update and Send Document](https://developers.signwell.com/reference/post_api-v1-documents-id-send)
|
61
67
|
|
62
68
|
```
|
63
69
|
response = client.update_and_send_document(document_id, test_mode: true, embedded_signing: true)
|
@@ -65,6 +71,14 @@ response.body => Hash of the JSON.body
|
|
65
71
|
response.to_object => OpenStruct
|
66
72
|
```
|
67
73
|
|
74
|
+
## [Send Reminder]( https://developers.signwell.com/reference/post_api-v1-documents-id-remind)
|
75
|
+
|
76
|
+
```
|
77
|
+
response = client.remind_document(document_id, test_mode: true, embedded_signing: true)
|
78
|
+
response.body => Hash of the JSON.body
|
79
|
+
response.to_object => OpenStruct
|
80
|
+
```
|
81
|
+
|
68
82
|
## [Delete Document](https://developers.signwell.com/reference/delete_api-v1-documents-id--1)
|
69
83
|
|
70
84
|
```
|
@@ -80,7 +94,7 @@ response.to_object => OpenStruct
|
|
80
94
|
```
|
81
95
|
|
82
96
|
|
83
|
-
## [Get Template](https://developers.signwell.com/reference/get_api-v1-
|
97
|
+
## [Get Template](https://developers.signwell.com/reference/get_api-v1-template)
|
84
98
|
|
85
99
|
```
|
86
100
|
response = client.template(tempate_id)
|
@@ -88,7 +102,7 @@ response.body => Hash of the JSON.body
|
|
88
102
|
response.to_object => OpenStruct
|
89
103
|
```
|
90
104
|
|
91
|
-
## [Create Template](https://developers.signwell.com/reference/post_api-v1-
|
105
|
+
## [Create Template](https://developers.signwell.com/reference/post_api-v1-template)
|
92
106
|
|
93
107
|
```
|
94
108
|
body = {test_mode: true, "files"=>[{"name"=>"string.pdf", "file_url"=>"https://file-examples-com.github.io/uploads/2017/10/file-sample_150kB.pdf"}],
|
@@ -146,7 +160,7 @@ response.body => Hash of the JSON.body
|
|
146
160
|
response.to_object => OpenStruct
|
147
161
|
```
|
148
162
|
|
149
|
-
## [Delete Webhook](https://developers.signwell.com/reference/delete_api-v1-hooks-id
|
163
|
+
## [Delete Webhook](https://developers.signwell.com/reference/delete_api-v1-hooks-id)
|
150
164
|
|
151
165
|
```
|
152
166
|
client.delete_web_hook(id)
|
@@ -176,7 +190,9 @@ client.connection.get(path)
|
|
176
190
|
|
177
191
|
## Contributing
|
178
192
|
|
179
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
193
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/williamkennedy/sign_well. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/williamkennedy/sign_well/blob/main/CODE_OF_CONDUCT.md).
|
194
|
+
|
195
|
+
|
180
196
|
|
181
197
|
## License
|
182
198
|
|
@@ -184,4 +200,4 @@ client.connection.get(path)
|
|
184
200
|
|
185
201
|
## Code of Conduct
|
186
202
|
|
187
|
-
Everyone interacting in the SignWell project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/
|
203
|
+
Everyone interacting in the SignWell project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/williamkennedy/sign_well/blob/main/CODE_OF_CONDUCT.md).
|
data/SECURITY.md
ADDED
data/lib/sign_well/client.rb
CHANGED
@@ -11,7 +11,7 @@ module SignWell
|
|
11
11
|
def document(id, params = {})
|
12
12
|
DocumentResource.new(self).get(id, params)
|
13
13
|
end
|
14
|
-
|
14
|
+
|
15
15
|
def create_document(params)
|
16
16
|
DocumentResource.new(self).create(params)
|
17
17
|
end
|
@@ -32,6 +32,10 @@ module SignWell
|
|
32
32
|
DocumentResource.new(self).completed_pdf(id, params)
|
33
33
|
end
|
34
34
|
|
35
|
+
def remind_document(id, params = {})
|
36
|
+
DocumentResource.new(self).remind(id, params)
|
37
|
+
end
|
38
|
+
|
35
39
|
def template(id, params = {})
|
36
40
|
TemplateResource.new(self).get(id, params)
|
37
41
|
end
|
data/lib/sign_well/resource.rb
CHANGED
@@ -15,14 +15,14 @@ module SignWell
|
|
15
15
|
|
16
16
|
def post_request(path, params)
|
17
17
|
client.connection.post(path) do |req|
|
18
|
-
req.
|
18
|
+
req.body = params.to_json
|
19
19
|
req.headers['Content-Type'] = 'application/json'
|
20
20
|
end
|
21
21
|
end
|
22
22
|
|
23
23
|
def patch_request(path, params)
|
24
24
|
client.connection.patch(path) do |req|
|
25
|
-
req.
|
25
|
+
req.body = params.to_json
|
26
26
|
req.headers['Content-Type'] = 'application/json'
|
27
27
|
req.headers['Accept'] = 'application/json'
|
28
28
|
end
|
data/lib/sign_well/version.rb
CHANGED
data/sign_well.gemspec
ADDED
@@ -0,0 +1,37 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "lib/sign_well/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = "sign_well"
|
7
|
+
spec.version = SignWell::VERSION
|
8
|
+
spec.authors = ["William Kennedy"]
|
9
|
+
spec.email = ["william.kennedy@hey.com"]
|
10
|
+
|
11
|
+
spec.summary = "An API wrapper around the SignWell API"
|
12
|
+
spec.description = ""
|
13
|
+
spec.homepage = "https://github.com/williamkennedy/sign_well"
|
14
|
+
spec.license = "MIT"
|
15
|
+
spec.required_ruby_version = ">= 2.7.0"
|
16
|
+
|
17
|
+
# Specify which files should be added to the gem when it is released.
|
18
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
19
|
+
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
20
|
+
`git ls-files -z`.split("\x0").reject do |f|
|
21
|
+
(f == __FILE__) || f.match(%r{\A(?:(?:test|spec|features)/|\.(?:git|travis|circleci)|appveyor)})
|
22
|
+
end
|
23
|
+
end
|
24
|
+
spec.bindir = "exe"
|
25
|
+
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
26
|
+
spec.require_paths = ["lib"]
|
27
|
+
|
28
|
+
# Uncomment to register a new dependency of your gem
|
29
|
+
spec.add_development_dependency "bundler", "~> 2.3.4"
|
30
|
+
spec.add_development_dependency "rake", "~> 13.0"
|
31
|
+
spec.add_development_dependency "minitest", "~> 5.0"
|
32
|
+
|
33
|
+
spec.add_dependency "faraday", "~> 1.7"
|
34
|
+
spec.add_dependency "faraday_middleware", "~> 1.1"
|
35
|
+
# For more information and examples about making a new gem, check out our
|
36
|
+
# guide at: https://bundler.io/guides/creating_gem.html
|
37
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sign_well
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- William Kennedy
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-07-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -89,11 +89,13 @@ extra_rdoc_files: []
|
|
89
89
|
files:
|
90
90
|
- CHANGELOG.md
|
91
91
|
- CODE_OF_CONDUCT.md
|
92
|
+
- CONTRIBUTING.md
|
92
93
|
- Gemfile
|
93
94
|
- Gemfile.lock
|
94
95
|
- LICENSE.txt
|
95
96
|
- README.md
|
96
97
|
- Rakefile
|
98
|
+
- SECURITY.md
|
97
99
|
- bin/console
|
98
100
|
- bin/setup
|
99
101
|
- lib/sign_well.rb
|
@@ -107,7 +109,7 @@ files:
|
|
107
109
|
- lib/sign_well/response.rb
|
108
110
|
- lib/sign_well/version.rb
|
109
111
|
- sig/sign_well.rbs
|
110
|
-
- sign_well
|
112
|
+
- sign_well.gemspec
|
111
113
|
homepage: https://github.com/williamkennedy/sign_well
|
112
114
|
licenses:
|
113
115
|
- MIT
|
@@ -127,7 +129,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
127
129
|
- !ruby/object:Gem::Version
|
128
130
|
version: '0'
|
129
131
|
requirements: []
|
130
|
-
rubygems_version: 3.
|
132
|
+
rubygems_version: 3.5.9
|
131
133
|
signing_key:
|
132
134
|
specification_version: 4
|
133
135
|
summary: An API wrapper around the SignWell API
|
data/sign_well-1.0.0.gem
DELETED
Binary file
|