assently 1.0.0.beta1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +20 -0
  3. data/.rspec +3 -0
  4. data/.ruby-version +1 -0
  5. data/.travis.yml +15 -0
  6. data/Gemfile +10 -0
  7. data/LICENSE.txt +22 -0
  8. data/README.md +124 -0
  9. data/Rakefile +1 -0
  10. data/assently.gemspec +31 -0
  11. data/lib/assently/api_mappers/case_event_subscription_mapper.rb +12 -0
  12. data/lib/assently/api_mappers/case_mapper.rb +23 -0
  13. data/lib/assently/api_mappers/case_options_mapper.rb +74 -0
  14. data/lib/assently/api_mappers/document_mapper.rb +19 -0
  15. data/lib/assently/api_mappers/form_field_mapper.rb +12 -0
  16. data/lib/assently/api_mappers/party_mapper.rb +13 -0
  17. data/lib/assently/case.rb +50 -0
  18. data/lib/assently/case_event_subscription.rb +29 -0
  19. data/lib/assently/client.rb +129 -0
  20. data/lib/assently/document.rb +64 -0
  21. data/lib/assently/form_field.rb +3 -0
  22. data/lib/assently/id_generator.rb +10 -0
  23. data/lib/assently/party.rb +21 -0
  24. data/lib/assently/serializers/case_serializer.rb +15 -0
  25. data/lib/assently/version.rb +3 -0
  26. data/lib/assently.rb +14 -0
  27. data/spec/assently/api_mappers/case_event_subscription_mapper_spec.rb +23 -0
  28. data/spec/assently/api_mappers/case_mapper_spec.rb +34 -0
  29. data/spec/assently/api_mappers/case_options_mapper_spec.rb +92 -0
  30. data/spec/assently/api_mappers/document_mapper_spec.rb +35 -0
  31. data/spec/assently/api_mappers/form_field_mapper_spec.rb +19 -0
  32. data/spec/assently/api_mappers/party_mapper_spec.rb +24 -0
  33. data/spec/assently/case_event_subscription_spec.rb +18 -0
  34. data/spec/assently/case_spec.rb +68 -0
  35. data/spec/assently/client/create_case_spec.rb +55 -0
  36. data/spec/assently/client/get_case_spec.rb +84 -0
  37. data/spec/assently/client_spec.rb +207 -0
  38. data/spec/assently/document_spec.rb +126 -0
  39. data/spec/assently/form_field_spec.rb +18 -0
  40. data/spec/assently/id_generator_spec.rb +13 -0
  41. data/spec/assently/party_spec.rb +35 -0
  42. data/spec/assently/serializers/case_serializer_spec.rb +39 -0
  43. data/spec/assently_spec.rb +17 -0
  44. data/spec/fixtures/agreement.pdf +0 -0
  45. data/spec/fixtures/cassettes/Assently_Client/_create_case/valid_case.yml +75 -0
  46. data/spec/fixtures/cassettes/Assently_Client/_get_case/case_exists.yml +107 -0
  47. data/spec/fixtures/cassettes/Assently_Client/_get_case/case_missing.yml +43 -0
  48. data/spec/spec_helper.rb +38 -0
  49. metadata +225 -0
@@ -0,0 +1,107 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://test.assently.com/api/v2/createcase
6
+ body:
7
+ encoding: UTF-8
8
+ string: |-
9
+ {
10
+ "Id": "0dd15278-54b9-4f89-bd76-8396f5d1bd4e",
11
+ "Name": "Agreement",
12
+ "Documents": [
13
+ {
14
+ "Filename": "agreement.pdf",
15
+ "Data": "JVBERi0xLjMKJcTl8uXrp/Og0MTGCjQgMCBvYmoKPDwgL0xlbmd0aCA1IDAg\nUiAvRmlsdGVyIC9GbGF0ZURlY29kZSA+PgpzdHJlYW0KeAFFjrEKwkAQRHu/\n4pVaeNlN7nKxVQTbwIIfcMZCoiFJ4e+7YmE1zMxjmJmemVyTYwypjcSk1CnE\nphVlGbjyojqtSlkR1uK0hEPuGunEA2H/t9+ZLJvy5GhOifiEFVR/oGtCBXtS\nmSle3tlehnGceE/LeAs77MHZ/FP/ARUJIsAKZW5kc3RyZWFtCmVuZG9iago1\nIDAgb2JqCjEyOAplbmRvYmoKMiAwIG9iago8PCAvVHlwZSAvUGFnZSAvUGFy\nZW50IDMgMCBSIC9SZXNvdXJjZXMgNiAwIFIgL0NvbnRlbnRzIDQgMCBSIC9N\nZWRpYUJveCBbMCAwIDU5NSA4NDJdCj4+CmVuZG9iago2IDAgb2JqCjw8IC9Q\ncm9jU2V0IFsgL1BERiAvVGV4dCBdIC9Db2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DAwMDAwIG4gCjAwMDAwMDU4ODMgMDAwMDAg\nbiAKMDAwMDAwNTkwNCAwMDAwMCBuIAowMDAwMDA1OTMyIDAwMDAwIG4gCjAw\nMDAwMDU5ODQgMDAwMDAgbiAKMDAwMDAwNjAwMyAwMDAwMCBuIAowMDAwMDA2\nMDIyIDAwMDAwIG4gCjAwMDAwMDYwNDkgMDAwMDAgbiAKMDAwMDAwNjA5MSAw\nMDAwMCBuIAowMDAwMDA2MTEwIDAwMDAwIG4gCnRyYWlsZXIKPDwgL1NpemUg\nMjMgL1Jvb3QgMTEgMCBSIC9JbmZvIDEgMCBSIC9JRCBbIDwwYzY4NDVjYjUx\nMTNiMDc0NzIyNGVhZGE2ZjA5NjAyND4KPDBjNjg0NWNiNTExM2IwNzQ3MjI0\nZWFkYTZmMDk2MDI0PiBdID4+CnN0YXJ0eHJlZgo2MzA4CiUlRU9GCg==\n",
16
+ "ContentType": "application/pdf",
17
+ "Size": 6925,
18
+ "FormFields": [
19
+
20
+ ]
21
+ }
22
+ ],
23
+ "Parties": [
24
+ {
25
+ "Name": "First Last",
26
+ "EmailAddress": "name@example.com",
27
+ "SocialSecurityNumber": "3907311744"
28
+ }
29
+ ],
30
+ "AllowedSignatureTypes": [
31
+ "touch"
32
+ ]
33
+ }
34
+ headers:
35
+ Accept:
36
+ - application/json
37
+ Authorization:
38
+ - Basic <ASSENTLY_API_AUTH_HEADER>
39
+ User-Agent:
40
+ - Faraday v0.11.0
41
+ Content-Type:
42
+ - application/json; charset=utf-8
43
+ Accept-Encoding:
44
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
45
+ response:
46
+ status:
47
+ code: 200
48
+ message: OK
49
+ headers:
50
+ Cache-Control:
51
+ - private, s-maxage=0
52
+ X-Frame-Options:
53
+ - SAMEORIGIN
54
+ Set-Cookie:
55
+ - sid=qsyw22yaaorfepswaqauweud; path=/; HttpOnly; Secure
56
+ Date:
57
+ - Mon, 30 Jan 2017 19:29:12 GMT
58
+ Content-Length:
59
+ - '0'
60
+ Strict-Transport-Security:
61
+ - max-age=31536000
62
+ body:
63
+ encoding: UTF-8
64
+ string: ''
65
+ http_version:
66
+ recorded_at: Mon, 30 Jan 2017 19:29:13 GMT
67
+ - request:
68
+ method: get
69
+ uri: https://test.assently.com/api/v2/getcase?id=my-case-id
70
+ body:
71
+ encoding: US-ASCII
72
+ string: ''
73
+ headers:
74
+ Accept:
75
+ - application/json
76
+ Authorization:
77
+ - Basic <ASSENTLY_API_AUTH_HEADER>
78
+ User-Agent:
79
+ - Faraday v0.11.0
80
+ Accept-Encoding:
81
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
82
+ response:
83
+ status:
84
+ code: 200
85
+ message: OK
86
+ headers:
87
+ Cache-Control:
88
+ - private, s-maxage=0
89
+ Content-Type:
90
+ - application/json; charset=utf-8
91
+ X-Frame-Options:
92
+ - SAMEORIGIN
93
+ Set-Cookie:
94
+ - sid=hliu0cfzx2x0kuj0ttsfvc5a; path=/; HttpOnly; Secure
95
+ Date:
96
+ - Thu, 26 Jan 2017 20:23:50 GMT
97
+ Content-Length:
98
+ - '1485'
99
+ Strict-Transport-Security:
100
+ - max-age=31536000
101
+ body:
102
+ encoding: UTF-8
103
+ string: '{"Id":"my-case-id","Status":"Draft","Name":"Agreement","NameAlias":"Agreement_alias","Parties":[{"Id":"30f5","Name":"First
104
+ Last","GroupName":null,"EmailAddress":"name@example.com","SocialSecurityNumber":null,"SignedOn":null,"SignatureData":null,"PartyUrl":"https://test.assently.com/c/5-b0PSlG1AgfIi1LhKVqlpl8jtjrTodpyfjAy63a/0Gv1PSlG1AipJPW1P5kQSgB4nS_yaNdnz8UD44fL","MobilePhone":"","Culture":"","AnyoneCanSign":false,"IpAddress":"","SignatureUrl":null}],"Documents":[{"Id":"54aa","Filename":"agreement.pdf","Data":null,"ContentType":"application/pdf","Size":6925,"Hash":"c466b4b118f825d7fe38d8fc878874daf750160f1227e92a457857acb10b1534945804e0e7071f51696fe8ae5c874abf773ab851d4a35727f2876d87162d0813","Type":"Original","FormFields":{}}],"Visibility":"Group","AllowedSignatureTypes":["Touch"],"Description":"","Stakeholders":[],"Metadata":{},"CancelUrl":null,"ContinueUrl":"","ContinueName":"","ContinueAuto":false,"SendSignRequestEmailToParties":false,"SendFinishEmailToCreator":false,"SendFinishEmailToParties":false,"SendRecallEmailToParties":false,"Culture":"en-US","SignInSequence":false,"IdentityCheck":false,"IsEditable":false,"MergeOnSend":false,"ExpireAfterDays":0,"ExpireOn":null,"RemindAfterDays":0,"RemindOn":null,"CreatedOn":"2017-01-26T20:23:51","TemplateId":null,"SentOn":null,"ReminderSentOn":null,"Hash":null,"AgentUrl":"https://test.assently.com/a/case/view/b964868d-c6a9-4d17-88e6-3a271e49508c","EventCallback":null,"Procedure":"Default"}'
105
+ http_version:
106
+ recorded_at: Thu, 26 Jan 2017 20:23:51 GMT
107
+ recorded_with: VCR 3.0.3
@@ -0,0 +1,43 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://test.assently.com/api/v2/getcase?id=missing-case
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept:
11
+ - application/json
12
+ Authorization:
13
+ - Basic <ASSENTLY_API_AUTH_HEADER>
14
+ User-Agent:
15
+ - Faraday v0.11.0
16
+ Accept-Encoding:
17
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
18
+ response:
19
+ status:
20
+ code: 404
21
+ message: Not Found
22
+ headers:
23
+ Cache-Control:
24
+ - private, s-maxage=0
25
+ Content-Type:
26
+ - text/html; charset=utf-8
27
+ X-Frame-Options:
28
+ - SAMEORIGIN
29
+ Set-Cookie:
30
+ - sid=pwfa3xtx2j0yvt3uyuryylqm; path=/; HttpOnly; Secure
31
+ Date:
32
+ - Mon, 30 Jan 2017 19:33:47 GMT
33
+ Content-Length:
34
+ - '104'
35
+ Strict-Transport-Security:
36
+ - max-age=31536000
37
+ body:
38
+ encoding: UTF-8
39
+ string: '{"error":{"errorCode":"EX404","message":"Not Found","hint":"Request
40
+ parameters may not be well formed"}}'
41
+ http_version:
42
+ recorded_at: Mon, 30 Jan 2017 19:33:48 GMT
43
+ recorded_with: VCR 3.0.3
@@ -0,0 +1,38 @@
1
+ if ENV["CI"]
2
+ require "simplecov"
3
+ SimpleCov.start
4
+ end
5
+
6
+ require "dotenv"
7
+ require "webmock/rspec"
8
+ require "vcr"
9
+ require "uri"
10
+ require "pry"
11
+
12
+ Dotenv.load
13
+
14
+ WebMock.disable_net_connect! allow: "codeclimate.com"
15
+
16
+ VCR.configure do |config|
17
+ config.cassette_library_dir = "spec/fixtures/cassettes"
18
+ config.hook_into :webmock
19
+ config.configure_rspec_metadata!
20
+
21
+ config.filter_sensitive_data("<ASSENTLY_API_AUTH_HEADER>") { Base64.strict_encode64 "#{ENV["ASSENTLY_API_KEY"]}:#{ENV["ASSENTLY_API_SECRET"]}" }
22
+
23
+ config.ignore_hosts "codeclimate.com"
24
+ end
25
+
26
+ RSpec.configure do |config|
27
+ config.order = :random
28
+ Kernel.srand config.seed
29
+
30
+ config.expect_with :rspec do |expectations|
31
+ expectations.syntax = :expect
32
+ end
33
+
34
+ config.mock_with :rspec do |mocks|
35
+ mocks.syntax = :expect
36
+ mocks.verify_partial_doubles = true
37
+ end
38
+ end
metadata ADDED
@@ -0,0 +1,225 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: assently
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0.beta1
5
+ platform: ruby
6
+ authors:
7
+ - Joel Junström
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2017-02-20 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: http
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '2.2'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '2.2'
27
+ - !ruby/object:Gem::Dependency
28
+ name: bundler
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '1.14'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '1.14'
41
+ - !ruby/object:Gem::Dependency
42
+ name: dotenv
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '2.1'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '2.1'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rake
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rspec
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: webmock
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '2.3'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: '2.3'
97
+ - !ruby/object:Gem::Dependency
98
+ name: vcr
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: '3.0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: '3.0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: luhn
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - "~>"
116
+ - !ruby/object:Gem::Version
117
+ version: '1.0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - "~>"
123
+ - !ruby/object:Gem::Version
124
+ version: '1.0'
125
+ description:
126
+ email:
127
+ - joel.junstrom@oktavilla.se
128
+ executables: []
129
+ extensions: []
130
+ extra_rdoc_files: []
131
+ files:
132
+ - ".gitignore"
133
+ - ".rspec"
134
+ - ".ruby-version"
135
+ - ".travis.yml"
136
+ - Gemfile
137
+ - LICENSE.txt
138
+ - README.md
139
+ - Rakefile
140
+ - assently.gemspec
141
+ - lib/assently.rb
142
+ - lib/assently/api_mappers/case_event_subscription_mapper.rb
143
+ - lib/assently/api_mappers/case_mapper.rb
144
+ - lib/assently/api_mappers/case_options_mapper.rb
145
+ - lib/assently/api_mappers/document_mapper.rb
146
+ - lib/assently/api_mappers/form_field_mapper.rb
147
+ - lib/assently/api_mappers/party_mapper.rb
148
+ - lib/assently/case.rb
149
+ - lib/assently/case_event_subscription.rb
150
+ - lib/assently/client.rb
151
+ - lib/assently/document.rb
152
+ - lib/assently/form_field.rb
153
+ - lib/assently/id_generator.rb
154
+ - lib/assently/party.rb
155
+ - lib/assently/serializers/case_serializer.rb
156
+ - lib/assently/version.rb
157
+ - spec/assently/api_mappers/case_event_subscription_mapper_spec.rb
158
+ - spec/assently/api_mappers/case_mapper_spec.rb
159
+ - spec/assently/api_mappers/case_options_mapper_spec.rb
160
+ - spec/assently/api_mappers/document_mapper_spec.rb
161
+ - spec/assently/api_mappers/form_field_mapper_spec.rb
162
+ - spec/assently/api_mappers/party_mapper_spec.rb
163
+ - spec/assently/case_event_subscription_spec.rb
164
+ - spec/assently/case_spec.rb
165
+ - spec/assently/client/create_case_spec.rb
166
+ - spec/assently/client/get_case_spec.rb
167
+ - spec/assently/client_spec.rb
168
+ - spec/assently/document_spec.rb
169
+ - spec/assently/form_field_spec.rb
170
+ - spec/assently/id_generator_spec.rb
171
+ - spec/assently/party_spec.rb
172
+ - spec/assently/serializers/case_serializer_spec.rb
173
+ - spec/assently_spec.rb
174
+ - spec/fixtures/agreement.pdf
175
+ - spec/fixtures/cassettes/Assently_Client/_create_case/valid_case.yml
176
+ - spec/fixtures/cassettes/Assently_Client/_get_case/case_exists.yml
177
+ - spec/fixtures/cassettes/Assently_Client/_get_case/case_missing.yml
178
+ - spec/spec_helper.rb
179
+ homepage: https://github.com/Oktavilla/egree-ruby
180
+ licenses:
181
+ - MIT
182
+ metadata: {}
183
+ post_install_message:
184
+ rdoc_options: []
185
+ require_paths:
186
+ - lib
187
+ required_ruby_version: !ruby/object:Gem::Requirement
188
+ requirements:
189
+ - - "~>"
190
+ - !ruby/object:Gem::Version
191
+ version: '2.0'
192
+ required_rubygems_version: !ruby/object:Gem::Requirement
193
+ requirements:
194
+ - - ">"
195
+ - !ruby/object:Gem::Version
196
+ version: 1.3.1
197
+ requirements: []
198
+ rubyforge_project:
199
+ rubygems_version: 2.6.8
200
+ signing_key:
201
+ specification_version: 4
202
+ summary: Client for the Assently APIv2
203
+ test_files:
204
+ - spec/assently/api_mappers/case_event_subscription_mapper_spec.rb
205
+ - spec/assently/api_mappers/case_mapper_spec.rb
206
+ - spec/assently/api_mappers/case_options_mapper_spec.rb
207
+ - spec/assently/api_mappers/document_mapper_spec.rb
208
+ - spec/assently/api_mappers/form_field_mapper_spec.rb
209
+ - spec/assently/api_mappers/party_mapper_spec.rb
210
+ - spec/assently/case_event_subscription_spec.rb
211
+ - spec/assently/case_spec.rb
212
+ - spec/assently/client/create_case_spec.rb
213
+ - spec/assently/client/get_case_spec.rb
214
+ - spec/assently/client_spec.rb
215
+ - spec/assently/document_spec.rb
216
+ - spec/assently/form_field_spec.rb
217
+ - spec/assently/id_generator_spec.rb
218
+ - spec/assently/party_spec.rb
219
+ - spec/assently/serializers/case_serializer_spec.rb
220
+ - spec/assently_spec.rb
221
+ - spec/fixtures/agreement.pdf
222
+ - spec/fixtures/cassettes/Assently_Client/_create_case/valid_case.yml
223
+ - spec/fixtures/cassettes/Assently_Client/_get_case/case_exists.yml
224
+ - spec/fixtures/cassettes/Assently_Client/_get_case/case_missing.yml
225
+ - spec/spec_helper.rb