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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b255e6788c68a7d121fcdc284d22ee6c93bfa429426f81898df302ae5a293fee
4
- data.tar.gz: ecff23a9c2b0472d2566ab51fccc9eafcecd0e1f1aaa475ecd5c7823cdc07874
3
+ metadata.gz: 13b9c78b424fc39a7fb6989680a83ecfa2d8aee8751c4c984c1fca3cf6064072
4
+ data.tar.gz: cf2da8c99dee7f33301ce3952cbf7d75d56ca9d35d14be2b4a620667a651994d
5
5
  SHA512:
6
- metadata.gz: 105f447a749cf01d9de3cca7e0605de81392fc8f786017ddeaa0567204259bbb247ff76aa190268fe1681b4f25476fde709865e883da71a66523742c389120bb
7
- data.tar.gz: 9d1f186d486407b585b92c09ce85a46ede39febc255ac3873c0321d3c4632507c4f581241529589ee64a5ce727953570a2af3d89ad26402528b6ee69e36e08e4
6
+ metadata.gz: 1ea0092ec82092cac41e4383b44dbc87e50608cb9ee15b759b8bac211998ae618de553a74955252dfbc2a518f005d010ad855624f05e8a30599a2e88bd1d5e92
7
+ data.tar.gz: c8ab89dc07bd9dbe8298582291c2bacc9a56aa5937052d70e7be3c5a3d626a665f6964025aff1534bf030718a1f4b30d30e254d8bc654f8ca1a454f1425eb856
data/CONTRIBUTING.md ADDED
@@ -0,0 +1,2 @@
1
+ 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.
2
+
data/Gemfile.lock CHANGED
@@ -1,14 +1,14 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- sign_well (1.0.1)
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.0)
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.3)
28
- multipart-post (>= 1.2, < 3)
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.1.1)
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
- ```ruby
8
- gem 'sign_well'
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-documents-id--1)
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-1)
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-1)
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-1)
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-document-templates-id--1)
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-document-templates-1)
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--1)
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/[USERNAME]/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/[USERNAME]/sign_well/blob/main/CODE_OF_CONDUCT.md).
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/[USERNAME]/sign_well/blob/main/CODE_OF_CONDUCT.md).
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
@@ -0,0 +1,5 @@
1
+ # Security Policy
2
+
3
+ ## Supported Versions
4
+
5
+ Please create an issue or pull request if you discover any issue
@@ -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
@@ -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.params = params
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.params = params
25
+ req.body = params.to_json
26
26
  req.headers['Content-Type'] = 'application/json'
27
27
  req.headers['Accept'] = 'application/json'
28
28
  end
@@ -23,5 +23,9 @@ module SignWell
23
23
  def completed_pdf(id, params)
24
24
  Response.new(get_request("documents/#{id}/completed_pdf", params).body)
25
25
  end
26
+
27
+ def remind(id, params)
28
+ Response.new(post_request("documents/#{id}/remind", params).body)
29
+ end
26
30
  end
27
31
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SignWell
4
- VERSION = "1.0.1"
4
+ VERSION = "1.0.3"
5
5
  end
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.1
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: 2022-03-07 00:00:00.000000000 Z
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-1.0.0.gem
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.2.15
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