sign_well 1.0.2 → 2.0.0

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: e2b4c38aa54fec1cbfc11f2bb9e24d005ba18a06f406bcf038c8a8a4451048fe
4
- data.tar.gz: e7379a5b36b229056d636be8ab1411bdcd9e7ce11352f1f52516c53eaf708221
3
+ metadata.gz: e57b8457cf10b0706e082e44b7b475e7ba4762e5ff4e26c2042e0da88d1d9704
4
+ data.tar.gz: 219b14547a2aa1e14b2ca26a64ef26f60100c18327d7293dae28aa317d6eb125
5
5
  SHA512:
6
- metadata.gz: 3f87a2f13accaf1d988994e5cf7787a50b957baa5d3a12d38ab3b373bf4be6dadac5fa342d8d43b1a8dd694a02af3f366bbb76c0a71b40192513b71cdc35579b
7
- data.tar.gz: 7386cec5d8d2f71c2b3f80bd711ef5faa709be52ba34a68531df37a0a4f98e9ac8a728c3faebbd3620d0cef11997e79f342e789463331d84489ea937d7396ec5
6
+ metadata.gz: 9df44bf77d425d656a4fab494fffd224cf9ee5d76e98af99b0325eedadd2f56cdda4e6afae961b53641a923da00e05652e9e605030ca00bacc9fa21a793c2752
7
+ data.tar.gz: 9d316ce287b4c891594bbebd7c65db5862c0e9e30b752add25ca54eae2aa6b5b5b07c02be211dd456e9c0dfd2f162383a6d50908cb8212522a0c8e5bbb704934
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 CHANGED
@@ -8,3 +8,5 @@ gemspec
8
8
  gem "rake", "~> 13.0"
9
9
 
10
10
  gem "minitest", "~> 5.0"
11
+
12
+ gem "irb", "~> 1.15"
data/Gemfile.lock CHANGED
@@ -1,52 +1,57 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- sign_well (1.0.2)
5
- faraday (~> 1.7)
6
- faraday_middleware (~> 1.1)
4
+ sign_well (2.0.0)
5
+ faraday (~> 2.12.2)
6
+ ostruct (~> 0.6.1)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- faraday (1.10.0)
12
- faraday-em_http (~> 1.0)
13
- faraday-em_synchrony (~> 1.0)
14
- faraday-excon (~> 1.1)
15
- faraday-httpclient (~> 1.0)
16
- faraday-multipart (~> 1.0)
17
- faraday-net_http (~> 1.0)
18
- faraday-net_http_persistent (~> 1.0)
19
- faraday-patron (~> 1.0)
20
- faraday-rack (~> 1.0)
21
- faraday-retry (~> 1.0)
22
- ruby2_keywords (>= 0.0.4)
23
- faraday-em_http (1.0.0)
24
- faraday-em_synchrony (1.0.0)
25
- faraday-excon (1.1.0)
26
- faraday-httpclient (1.0.1)
27
- faraday-multipart (1.0.3)
28
- multipart-post (>= 1.2, < 3)
29
- faraday-net_http (1.0.1)
30
- faraday-net_http_persistent (1.2.0)
31
- faraday-patron (1.0.0)
32
- faraday-rack (1.0.0)
33
- faraday-retry (1.0.3)
34
- faraday_middleware (1.2.0)
35
- faraday (~> 1.0)
36
- minitest (5.15.0)
37
- multipart-post (2.1.1)
38
- rake (13.0.6)
39
- ruby2_keywords (0.0.5)
11
+ date (3.4.1)
12
+ faraday (2.12.2)
13
+ faraday-net_http (>= 2.0, < 3.5)
14
+ json
15
+ logger
16
+ faraday-net_http (3.4.0)
17
+ net-http (>= 0.5.0)
18
+ io-console (0.8.0)
19
+ irb (1.15.2)
20
+ pp (>= 0.6.0)
21
+ rdoc (>= 4.0.0)
22
+ reline (>= 0.4.2)
23
+ json (2.10.2)
24
+ logger (1.7.0)
25
+ minitest (5.25.5)
26
+ net-http (0.6.0)
27
+ uri
28
+ ostruct (0.6.1)
29
+ pp (0.6.2)
30
+ prettyprint
31
+ prettyprint (0.2.0)
32
+ psych (5.2.3)
33
+ date
34
+ stringio
35
+ rake (13.2.1)
36
+ rdoc (6.13.1)
37
+ psych (>= 4.0.0)
38
+ reline (0.6.1)
39
+ io-console (~> 0.5)
40
+ stringio (3.1.6)
41
+ uri (1.0.3)
40
42
 
41
43
  PLATFORMS
42
- x86_64-darwin-20
44
+ arm64-darwin-23
45
+ ruby
46
+ x86_64-darwin-23
43
47
  x86_64-linux
44
48
 
45
49
  DEPENDENCIES
46
- bundler (~> 2.3.4)
50
+ bundler (~> 2.6.7)
51
+ irb (~> 1.15)
47
52
  minitest (~> 5.0)
48
53
  rake (~> 13.0)
49
54
  sign_well!
50
55
 
51
56
  BUNDLED WITH
52
- 2.3.4
57
+ 2.6.7
data/README.md CHANGED
@@ -1,5 +1,11 @@
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:
@@ -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}
@@ -65,13 +71,21 @@ response.body => Hash of the JSON.body
65
71
  response.to_object => OpenStruct
66
72
  ```
67
73
 
68
- ## [Delete Document](https://developers.signwell.com/reference/delete_api-v1-documents-id)
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
+
82
+ ## [Delete Document](https://developers.signwell.com/reference/delete_api-v1-documents-id--1)
69
83
 
70
84
  ```
71
85
  response = client.delete_document(document_id)
72
86
  ```
73
87
 
74
- ## [Completed PDF](https://developers.signwell.com/reference/get_api-v1-documents-id-completed-pdf)
88
+ ## [Completed PDF](https://developers.signwell.com/reference/get_api-v1-documents-id-completed-pdf-1)
75
89
 
76
90
  ```
77
91
  response = client.completed_pdf(document_id, test_mode: true, url_only: true)
@@ -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-)
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)
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"}],
@@ -110,13 +124,13 @@ response.body => Hash of the JSON.body
110
124
  response.to_object => OpenStruct
111
125
  ```
112
126
 
113
- ## [Delete Template](https://developers.signwell.com/reference/delete_api-v1-document-templates-id)
127
+ ## [Delete Template](https://developers.signwell.com/reference/delete_api-v1-document-templates-id--1)
114
128
 
115
129
  ```
116
130
  client.delete_template(id)
117
131
  ```
118
132
 
119
- ## [Get API Application](https://developers.signwell.com/reference/get_api-v1-api-applications-id)
133
+ ## [Get API Application](https://developers.signwell.com/reference/get_api-v1-api-applications-id--1)
120
134
 
121
135
  ```
122
136
  response = client.api_application(id)
@@ -124,13 +138,13 @@ response.body => Hash of the JSON.body
124
138
  response.to_object => OpenStruct
125
139
  ```
126
140
 
127
- ## [Delete API Application](https://developers.signwell.com/reference/delete_api-v1-api-applications-id)
141
+ ## [Delete API Application](https://developers.signwell.com/reference/delete_api-v1-api-applications-id--1)
128
142
 
129
143
  ```
130
144
  client.delete_api_application(id)
131
145
  ```
132
146
 
133
- ## [List Webhooks](https://developers.signwell.com/reference/get_api-v1-hooks)
147
+ ## [List Webhooks](https://developers.signwell.com/reference/get_api-v1-hooks-1)
134
148
 
135
149
  ```
136
150
  response = client.list_web_hooks
@@ -138,7 +152,7 @@ response.body => Hash of the JSON.body
138
152
  response.to_object => OpenStruct
139
153
  ```
140
154
 
141
- ## [Create Webhooks](https://developers.signwell.com/reference/post_api-v1-hooks)
155
+ ## [Create Webhooks](https://developers.signwell.com/reference/post_api-v1-hooks-1)
142
156
 
143
157
  ```
144
158
  response = client.create_web_hook(test_mode: true, callback_url: 'https://test.com')
@@ -152,7 +166,7 @@ response.to_object => OpenStruct
152
166
  client.delete_web_hook(id)
153
167
  ```
154
168
 
155
- ## [Get Credentials](https://developers.signwell.com/reference/get_api-v1-me)
169
+ ## [Get Credentials](https://developers.signwell.com/reference/get_api-v1-me-1)
156
170
 
157
171
  ```
158
172
  client.me
@@ -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
@@ -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.2"
4
+ VERSION = '2.0.0'
5
5
  end
data/lib/sign_well.rb CHANGED
@@ -1,22 +1,20 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "sign_well/version"
4
- require "faraday"
5
- require "faraday_middleware"
3
+ require 'sign_well/version'
4
+ require 'faraday'
6
5
 
7
6
  module SignWell
8
- autoload :Client, "sign_well/client"
9
- autoload :Resource, "sign_well/resource"
7
+ autoload :Client, 'sign_well/client'
8
+ autoload :Resource, 'sign_well/resource'
10
9
 
11
- #Endpoints
12
-
13
- autoload :DocumentResource, "sign_well/resources/document_resource"
14
- autoload :TemplateResource, "sign_well/resources/template_resource"
15
- autoload :ApiApplicationResource, "sign_well/resources/api_application_resource"
16
- autoload :WebHookResource, "sign_well/resources/web_hook_resource"
17
- autoload :MeResource, "sign_well/resources/me_resource"
10
+ # Endpoints
18
11
 
19
- # Responder
20
- autoload :Response, "sign_well/response"
12
+ autoload :DocumentResource, 'sign_well/resources/document_resource'
13
+ autoload :TemplateResource, 'sign_well/resources/template_resource'
14
+ autoload :ApiApplicationResource, 'sign_well/resources/api_application_resource'
15
+ autoload :WebHookResource, 'sign_well/resources/web_hook_resource'
16
+ autoload :MeResource, 'sign_well/resources/me_resource'
21
17
 
18
+ # Responder
19
+ autoload :Response, 'sign_well/response'
22
20
  end
data/sign_well.gemspec ADDED
@@ -0,0 +1,38 @@
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 = '>= 3.2'
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.6.7'
30
+ spec.add_development_dependency 'irb', '~> 1.15'
31
+ spec.add_development_dependency 'minitest', '~> 5.0'
32
+ spec.add_development_dependency 'rake', '~> 13.0'
33
+
34
+ spec.add_dependency 'faraday', '~> 2.12.2'
35
+ spec.add_dependency 'ostruct', '~> 0.6.1'
36
+ # For more information and examples about making a new gem, check out our
37
+ # guide at: https://bundler.io/guides/creating_gem.html
38
+ end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sign_well
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - William Kennedy
8
- autorequire:
9
8
  bindir: exe
10
9
  cert_chain: []
11
- date: 2022-09-28 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: bundler
@@ -16,28 +15,28 @@ dependencies:
16
15
  requirements:
17
16
  - - "~>"
18
17
  - !ruby/object:Gem::Version
19
- version: 2.3.4
18
+ version: 2.6.7
20
19
  type: :development
21
20
  prerelease: false
22
21
  version_requirements: !ruby/object:Gem::Requirement
23
22
  requirements:
24
23
  - - "~>"
25
24
  - !ruby/object:Gem::Version
26
- version: 2.3.4
25
+ version: 2.6.7
27
26
  - !ruby/object:Gem::Dependency
28
- name: rake
27
+ name: irb
29
28
  requirement: !ruby/object:Gem::Requirement
30
29
  requirements:
31
30
  - - "~>"
32
31
  - !ruby/object:Gem::Version
33
- version: '13.0'
32
+ version: '1.15'
34
33
  type: :development
35
34
  prerelease: false
36
35
  version_requirements: !ruby/object:Gem::Requirement
37
36
  requirements:
38
37
  - - "~>"
39
38
  - !ruby/object:Gem::Version
40
- version: '13.0'
39
+ version: '1.15'
41
40
  - !ruby/object:Gem::Dependency
42
41
  name: minitest
43
42
  requirement: !ruby/object:Gem::Requirement
@@ -52,34 +51,48 @@ dependencies:
52
51
  - - "~>"
53
52
  - !ruby/object:Gem::Version
54
53
  version: '5.0'
54
+ - !ruby/object:Gem::Dependency
55
+ name: rake
56
+ requirement: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - "~>"
59
+ - !ruby/object:Gem::Version
60
+ version: '13.0'
61
+ type: :development
62
+ prerelease: false
63
+ version_requirements: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - "~>"
66
+ - !ruby/object:Gem::Version
67
+ version: '13.0'
55
68
  - !ruby/object:Gem::Dependency
56
69
  name: faraday
57
70
  requirement: !ruby/object:Gem::Requirement
58
71
  requirements:
59
72
  - - "~>"
60
73
  - !ruby/object:Gem::Version
61
- version: '1.7'
74
+ version: 2.12.2
62
75
  type: :runtime
63
76
  prerelease: false
64
77
  version_requirements: !ruby/object:Gem::Requirement
65
78
  requirements:
66
79
  - - "~>"
67
80
  - !ruby/object:Gem::Version
68
- version: '1.7'
81
+ version: 2.12.2
69
82
  - !ruby/object:Gem::Dependency
70
- name: faraday_middleware
83
+ name: ostruct
71
84
  requirement: !ruby/object:Gem::Requirement
72
85
  requirements:
73
86
  - - "~>"
74
87
  - !ruby/object:Gem::Version
75
- version: '1.1'
88
+ version: 0.6.1
76
89
  type: :runtime
77
90
  prerelease: false
78
91
  version_requirements: !ruby/object:Gem::Requirement
79
92
  requirements:
80
93
  - - "~>"
81
94
  - !ruby/object:Gem::Version
82
- version: '1.1'
95
+ version: 0.6.1
83
96
  description: ''
84
97
  email:
85
98
  - william.kennedy@hey.com
@@ -89,11 +102,13 @@ extra_rdoc_files: []
89
102
  files:
90
103
  - CHANGELOG.md
91
104
  - CODE_OF_CONDUCT.md
105
+ - CONTRIBUTING.md
92
106
  - Gemfile
93
107
  - Gemfile.lock
94
108
  - LICENSE.txt
95
109
  - README.md
96
110
  - Rakefile
111
+ - SECURITY.md
97
112
  - bin/console
98
113
  - bin/setup
99
114
  - lib/sign_well.rb
@@ -107,11 +122,11 @@ files:
107
122
  - lib/sign_well/response.rb
108
123
  - lib/sign_well/version.rb
109
124
  - sig/sign_well.rbs
125
+ - sign_well.gemspec
110
126
  homepage: https://github.com/williamkennedy/sign_well
111
127
  licenses:
112
128
  - MIT
113
129
  metadata: {}
114
- post_install_message:
115
130
  rdoc_options: []
116
131
  require_paths:
117
132
  - lib
@@ -119,15 +134,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
119
134
  requirements:
120
135
  - - ">="
121
136
  - !ruby/object:Gem::Version
122
- version: 2.7.0
137
+ version: '3.2'
123
138
  required_rubygems_version: !ruby/object:Gem::Requirement
124
139
  requirements:
125
140
  - - ">="
126
141
  - !ruby/object:Gem::Version
127
142
  version: '0'
128
143
  requirements: []
129
- rubygems_version: 3.2.15
130
- signing_key:
144
+ rubygems_version: 3.6.7
131
145
  specification_version: 4
132
146
  summary: An API wrapper around the SignWell API
133
147
  test_files: []