echosign 1.0.2
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 +7 -0
- data/.gitignore +4 -0
- data/.rspec +2 -0
- data/Gemfile +3 -0
- data/Gemfile.lock +91 -0
- data/LICENSE +21 -0
- data/LICENSE.txt +22 -0
- data/README.md +87 -0
- data/Rakefile +12 -0
- data/echosign.gemspec +36 -0
- data/features/support/env.rb +8 -0
- data/fixtures/agreement.pdf +0 -0
- data/fixtures/vcr_cassettes/agreement_combined_pdf.yml +1465 -0
- data/fixtures/vcr_cassettes/agreement_document_file.yml +1465 -0
- data/fixtures/vcr_cassettes/agreement_documents.yml +42 -0
- data/fixtures/vcr_cassettes/agreement_form_data.yml +44 -0
- data/fixtures/vcr_cassettes/agreement_info.yml +50 -0
- data/fixtures/vcr_cassettes/agreement_signing_urls.yml +42 -0
- data/fixtures/vcr_cassettes/audit_trail_pdf.yml +1643 -0
- data/fixtures/vcr_cassettes/cancel_agreement.yml +46 -0
- data/fixtures/vcr_cassettes/create_agreement.yml +50 -0
- data/fixtures/vcr_cassettes/create_reminder.yml +47 -0
- data/fixtures/vcr_cassettes/create_transient_document.yml +716 -0
- data/fixtures/vcr_cassettes/create_user.yml +50 -0
- data/fixtures/vcr_cassettes/create_widget.yml +48 -0
- data/fixtures/vcr_cassettes/get_agreements.yml +46 -0
- data/fixtures/vcr_cassettes/get_library_document.yml +45 -0
- data/fixtures/vcr_cassettes/get_library_document_data.yml +1191 -0
- data/fixtures/vcr_cassettes/get_library_document_file.yml +42 -0
- data/fixtures/vcr_cassettes/get_library_documents.yml +47 -0
- data/fixtures/vcr_cassettes/get_token.yml +44 -0
- data/fixtures/vcr_cassettes/get_user.yml +46 -0
- data/fixtures/vcr_cassettes/get_users.yml +43 -0
- data/fixtures/vcr_cassettes/get_widget.yml +49 -0
- data/fixtures/vcr_cassettes/get_widget_document_file.yml +2682 -0
- data/fixtures/vcr_cassettes/get_widget_documents.yml +44 -0
- data/fixtures/vcr_cassettes/get_widgets.yml +50 -0
- data/fixtures/vcr_cassettes/library_combined_document.yml +2197 -0
- data/fixtures/vcr_cassettes/library_document_audit_trail.yml +1570 -0
- data/fixtures/vcr_cassettes/personalize_widget.yml +47 -0
- data/fixtures/vcr_cassettes/update_widget_status.yml +46 -0
- data/lib/echosign.rb +11 -0
- data/lib/echosign/agreement.rb +34 -0
- data/lib/echosign/agreement/client.rb +118 -0
- data/lib/echosign/agreement/fileinfo.rb +20 -0
- data/lib/echosign/agreement/form_field_location.rb +20 -0
- data/lib/echosign/agreement/phone_info.rb +19 -0
- data/lib/echosign/agreement/recipient.rb +22 -0
- data/lib/echosign/agreement/recipient_security_option.rb +20 -0
- data/lib/echosign/agreement/request.rb +144 -0
- data/lib/echosign/agreement/request_form_field.rb +15 -0
- data/lib/echosign/agreement/url_file_info.rb +18 -0
- data/lib/echosign/client.rb +82 -0
- data/lib/echosign/credentials.rb +33 -0
- data/lib/echosign/library_documents/client.rb +83 -0
- data/lib/echosign/library_documents/request.rb +78 -0
- data/lib/echosign/mega_sign.rb +32 -0
- data/lib/echosign/mega_sign/client.rb +119 -0
- data/lib/echosign/mega_sign/request.rb +144 -0
- data/lib/echosign/refresh.rb +25 -0
- data/lib/echosign/reminder.rb +17 -0
- data/lib/echosign/request.rb +165 -0
- data/lib/echosign/user.rb +29 -0
- data/lib/echosign/validatable.rb +54 -0
- data/lib/echosign/version.rb +3 -0
- data/lib/echosign/widget.rb +176 -0
- data/lib/echosign/widget/client.rb +127 -0
- data/lib/echosign/widget/counter_signer_info.rb +19 -0
- data/lib/echosign/widget/request.rb +135 -0
- data/lib/echosign/widget/widget_completion_info.rb +25 -0
- data/lib/echosign/widget/widget_personalization.rb +21 -0
- data/lib/echosign/widget/widget_security_option.rb +22 -0
- data/lib/echosign/widget/widget_signer_security_option.rb +18 -0
- data/lib/echosign/widget/widget_status.rb +20 -0
- data/lib/echosign/widget/widget_vaulting_info.rb +16 -0
- data/spec/lib/agreement/client_spec.rb +157 -0
- data/spec/lib/client_spec.rb +78 -0
- data/spec/lib/library_documents/client_spec.rb +71 -0
- data/spec/lib/request_spec.rb +18 -0
- data/spec/lib/shared_client.rb +22 -0
- data/spec/lib/user_spec.rb +6 -0
- data/spec/lib/validatable_spec.rb +110 -0
- data/spec/lib/version_spec.rb +7 -0
- data/spec/lib/widget/client_spec.rb +154 -0
- data/spec/spec_helper.rb +22 -0
- metadata +307 -0
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
require 'spec_helper'
|
|
2
|
+
require 'lib/shared_client.rb'
|
|
3
|
+
|
|
4
|
+
describe Echosign::Client do
|
|
5
|
+
include_context "shared client"
|
|
6
|
+
|
|
7
|
+
describe '.create_user' do
|
|
8
|
+
let (:user_params) do
|
|
9
|
+
{
|
|
10
|
+
firstName: 'JohnQ',
|
|
11
|
+
lastName: 'Public',
|
|
12
|
+
email: 'publius@comcast.net',
|
|
13
|
+
password: 'kN12oK9p!3',
|
|
14
|
+
title: 'Hedge Wizard'
|
|
15
|
+
}
|
|
16
|
+
end
|
|
17
|
+
let (:user) { Echosign::User.new(user_params) }
|
|
18
|
+
|
|
19
|
+
it 'returns the User ID' do
|
|
20
|
+
VCR.use_cassette('create_user', :record => :once) do
|
|
21
|
+
user_id = client.create_user(user)
|
|
22
|
+
expect(user_id).to_not be_nil
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
describe '.get_users' do
|
|
28
|
+
let(:email) { "cthomas@railjumper.com" }
|
|
29
|
+
it 'returns user data' do
|
|
30
|
+
VCR.use_cassette('get_users', :record => :once) do
|
|
31
|
+
response = client.get_users(email)
|
|
32
|
+
expect(response).to be_a Hash
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
describe '.get_user' do
|
|
38
|
+
let(:id) { "2AAABLblqZhBp6sZ412RCo4_5P1OCDATcuKQf3gzb7M-kea77rqC7h6kzMKSpofswP8rY9Cwv9Vw*" }
|
|
39
|
+
it 'returns user data' do
|
|
40
|
+
VCR.use_cassette('get_user', :record => :once) do
|
|
41
|
+
response = client.get_user(id)
|
|
42
|
+
expect(response).to be_a Hash
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
describe '.create_reminder' do
|
|
48
|
+
let(:reminderInfo) { {
|
|
49
|
+
agreementId: "2AAABLblqZhA79nM-6ALjW2nXMKKb_ECz-Nr2yr_WrJ-3-Vz7d5D5_Dn9B6K-25C_EDktQqawW7M*",
|
|
50
|
+
comment: "Hey don't forget..."
|
|
51
|
+
} }
|
|
52
|
+
let(:reminder) { Echosign::Reminder.new(reminderInfo) }
|
|
53
|
+
|
|
54
|
+
it 'returns result' do
|
|
55
|
+
VCR.use_cassette('create_reminder', :record => :once) do
|
|
56
|
+
response = client.create_reminder(reminder)
|
|
57
|
+
expect(response).to be_a Hash
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
describe '.create_transient_document' do
|
|
63
|
+
let(:file_name) { 'agreement.pdf' }
|
|
64
|
+
let(:mime_type) { 'application/pdf' }
|
|
65
|
+
let(:file) { File.new("fixtures/agreement.pdf", 'rb') }
|
|
66
|
+
|
|
67
|
+
it 'returns the transient document ID' do
|
|
68
|
+
VCR.use_cassette('create_transient_document', :record => :once) do
|
|
69
|
+
tran_doc_id = client.create_transient_document(file_name, mime_type, file)
|
|
70
|
+
expect(tran_doc_id).to_not be_nil
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
end # describe Echosign::Client
|
|
77
|
+
|
|
78
|
+
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
require 'spec_helper'
|
|
2
|
+
|
|
3
|
+
describe Echosign::Client do
|
|
4
|
+
include_context "shared client"
|
|
5
|
+
|
|
6
|
+
describe '.get_library_documents' do
|
|
7
|
+
let(:user_id) { nil }
|
|
8
|
+
let(:user_email) { 'cthomas@railjumper.com' }
|
|
9
|
+
it 'returns info about library documents' do
|
|
10
|
+
VCR.use_cassette('get_library_documents', :record => :once) do
|
|
11
|
+
response = client.get_library_documents(user_id, user_email)
|
|
12
|
+
expect(response).to be_a Hash
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
describe '.get_library_document' do
|
|
18
|
+
let(:library_document_id) {"2AAABLblqZhCri9FNiCHjwsixnFegzTxO6cP52B-FIhfOXZjjDHggZoYPQB5r0YS66QZg4DLQV-g*"}
|
|
19
|
+
it 'returns info about library document' do
|
|
20
|
+
VCR.use_cassette('get_library_document', :record => :once) do
|
|
21
|
+
response = client.get_library_document(library_document_id)
|
|
22
|
+
expect(response).to be_a Hash
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
describe '.get_library_document_files' do
|
|
28
|
+
let(:library_document_id) {"2AAABLblqZhAlC4t0c3xAJ92RFv44xFGZhbCuHpalUdpcHW9k72imMEG-W1SYCmUoia1ZNgQZ-FE*"}
|
|
29
|
+
it 'returns info about library document files' do
|
|
30
|
+
VCR.use_cassette('get_library_document_file', :record => :once) do
|
|
31
|
+
response = client.get_library_document_files(library_document_id)
|
|
32
|
+
expect(response).to be_a Hash
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
describe '.get_library_document_file' do
|
|
38
|
+
let(:library_document_id) { "2AAABLblqZhAlC4t0c3xAJ92RFv44xFGZhbCuHpalUdpcHW9k72imMEG-W1SYCmUoia1ZNgQZ-FE*" }
|
|
39
|
+
let(:file_id) { "2AAABLblqZhD0YJu7EaQ3t2aKYe74spEGcgIXHeloWBdhkceuEbfqs9cw0pdkFB6z3RR4N8OWkZg*" }
|
|
40
|
+
it 'returns library document file data' do
|
|
41
|
+
VCR.use_cassette('get_library_document_data', :record => :once) do
|
|
42
|
+
response = client.get_library_document_file(library_document_id, file_id)
|
|
43
|
+
expect(response).to_not be_nil
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
describe '.library_document_audit_trail' do
|
|
49
|
+
let(:library_document_id) { "2AAABLblqZhAlC4t0c3xAJ92RFv44xFGZhbCuHpalUdpcHW9k72imMEG-W1SYCmUoia1ZNgQZ-FE*" }
|
|
50
|
+
it 'returns library document file data' do
|
|
51
|
+
VCR.use_cassette('library_document_audit_trail', :record => :once) do
|
|
52
|
+
response = client.library_document_audit_trail(library_document_id)
|
|
53
|
+
expect(response).to_not be_nil
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
describe '.library_combined_document' do
|
|
59
|
+
let(:library_document_id) { "2AAABLblqZhAlC4t0c3xAJ92RFv44xFGZhbCuHpalUdpcHW9k72imMEG-W1SYCmUoia1ZNgQZ-FE*" }
|
|
60
|
+
it 'returns library combined document file data' do
|
|
61
|
+
VCR.use_cassette('library_combined_document', :record => :once) do
|
|
62
|
+
response = client.library_combined_document(library_document_id, nil, true)
|
|
63
|
+
expect(response).to_not be_nil
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
end
|
|
71
|
+
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
require 'spec_helper'
|
|
2
|
+
require 'lib/shared_client.rb'
|
|
3
|
+
|
|
4
|
+
describe Echosign::Request do
|
|
5
|
+
include_context "shared client"
|
|
6
|
+
|
|
7
|
+
describe '#get_token' do
|
|
8
|
+
|
|
9
|
+
it 'returns the accessToken' do
|
|
10
|
+
VCR.use_cassette('get_token', :record => :once) do
|
|
11
|
+
token = Echosign::Request.get_token(credentials)
|
|
12
|
+
expect(token).to_not be_nil
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
end
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
RSpec.shared_context "shared client" do
|
|
2
|
+
|
|
3
|
+
let(:app_id) { "9Q444442AX82M" }
|
|
4
|
+
let(:app_secret) { "390db09fc6672388b9457593a7" }
|
|
5
|
+
let(:api_key) { "XCFDJKSFLNL5Y" }
|
|
6
|
+
let(:email) { "nobody@nobody.com" }
|
|
7
|
+
let(:password) { "password" }
|
|
8
|
+
|
|
9
|
+
#let(:email) { "cthomas@railjumper.com" }
|
|
10
|
+
#let(:password) { "badpassword" }
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
let(:credentials) do
|
|
14
|
+
Echosign::Credentials.new(app_id, app_secret, api_key, email, password)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
let(:client) do
|
|
18
|
+
VCR.use_cassette('get_token', :record => :once) do
|
|
19
|
+
Echosign::Client.new(credentials)
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
require 'spec_helper'
|
|
2
|
+
|
|
3
|
+
require 'echosign/validatable'
|
|
4
|
+
|
|
5
|
+
describe Echosign::Validatable do
|
|
6
|
+
|
|
7
|
+
let(:first_name) { "John" }
|
|
8
|
+
let(:last_name) { "Public" }
|
|
9
|
+
|
|
10
|
+
let(:params) do
|
|
11
|
+
{
|
|
12
|
+
firstName: first_name,
|
|
13
|
+
lastName: last_name,
|
|
14
|
+
phone: "885551234"
|
|
15
|
+
}
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
let(:validatable_object) do
|
|
19
|
+
class Foo
|
|
20
|
+
include Echosign::Validatable
|
|
21
|
+
end
|
|
22
|
+
Foo.new
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
describe ".validate_field" do
|
|
26
|
+
|
|
27
|
+
context "when field is nil" do
|
|
28
|
+
let(:first_name) { nil }
|
|
29
|
+
|
|
30
|
+
it "raises an invalid parameter error" do
|
|
31
|
+
expect do
|
|
32
|
+
validatable_object.validate_field(first_name, params)
|
|
33
|
+
end.to raise_error(Echosign::RequiredParameterError)
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
context "when field is empty" do
|
|
38
|
+
let(:first_name) { '' }
|
|
39
|
+
|
|
40
|
+
it "raises an invalid parameter error" do
|
|
41
|
+
expect do
|
|
42
|
+
validatable_object.validate_field(first_name, params)
|
|
43
|
+
end.to raise_error(Echosign::RequiredParameterError)
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
context "when key is not present" do
|
|
49
|
+
it "raises an invalid parameter error" do
|
|
50
|
+
expect do
|
|
51
|
+
validatable_object.validate_field([:unknown_field], params)
|
|
52
|
+
end.to raise_error(Echosign::RequiredParameterError)
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
describe '.require_keys' do
|
|
59
|
+
let(:required_fields) do
|
|
60
|
+
[
|
|
61
|
+
:firstName,
|
|
62
|
+
:lastName
|
|
63
|
+
]
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
context 'when all required fields are present' do
|
|
67
|
+
it 'it does not raise an error' do
|
|
68
|
+
expect do
|
|
69
|
+
validatable_object.require_keys(required_fields, params)
|
|
70
|
+
end.to_not raise_error
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
context 'when a required field is not present' do
|
|
75
|
+
it 'it raises an error' do
|
|
76
|
+
expect do
|
|
77
|
+
validatable_object.require_keys(required_fields.push(:unknown_field), params)
|
|
78
|
+
end.to raise_error(Echosign::RequiredParameterError)
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
describe '.require_exactly_one' do
|
|
84
|
+
context 'when more than one key value is present' do
|
|
85
|
+
it 'it raises an error' do
|
|
86
|
+
expect do
|
|
87
|
+
validatable_object.require_exactly_one([:firstName, :lastName], params)
|
|
88
|
+
end.to raise_error(Echosign::ParameterError)
|
|
89
|
+
end
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
context 'when none of the key values are present' do
|
|
93
|
+
it 'it raises an error' do
|
|
94
|
+
expect do
|
|
95
|
+
validatable_object.require_exactly_one([:unknown_field], params)
|
|
96
|
+
end.to raise_error(Echosign::ParameterError)
|
|
97
|
+
end
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
context 'when exactly one of the key values is present' do
|
|
101
|
+
it 'it does not raise an error' do
|
|
102
|
+
expect do
|
|
103
|
+
validatable_object.require_exactly_one([:firstName], params)
|
|
104
|
+
end.to_not raise_error
|
|
105
|
+
end
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
end
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
require 'spec_helper'
|
|
2
|
+
|
|
3
|
+
describe Echosign::Client do
|
|
4
|
+
include_context "shared client"
|
|
5
|
+
|
|
6
|
+
describe '.create_widget' do
|
|
7
|
+
|
|
8
|
+
let(:url_file_info_params) do
|
|
9
|
+
{
|
|
10
|
+
url: 'http://findgoplayers.com/resume.pdf',
|
|
11
|
+
mimeType: 'application/pdf',
|
|
12
|
+
name: 'resume.pdf'
|
|
13
|
+
}
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
let(:file_info_params) do
|
|
17
|
+
{
|
|
18
|
+
documentURL: Echosign::UrlFileInfo.new(url_file_info_params)
|
|
19
|
+
}
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
let(:widget_params) do
|
|
23
|
+
{
|
|
24
|
+
signatureFlow: 'SENDER_SIGNS_LAST',
|
|
25
|
+
fileInfos: [ Echosign::Fileinfo.new(file_info_params) ],
|
|
26
|
+
name: 'Test widget'
|
|
27
|
+
}
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
let(:widget) { Echosign::Widget.new(nil, nil, widget_params) }
|
|
31
|
+
|
|
32
|
+
it 'returns widget info' do
|
|
33
|
+
VCR.use_cassette('create_widget', :record => :once) do
|
|
34
|
+
widget_response = client.create_widget(widget)
|
|
35
|
+
expect(widget_response).to be_a Hash
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
describe '.personalize_widget' do
|
|
41
|
+
let(:widget_id) { "2AAABLblqZhD_6RpgbZh5ZVlLXz1H1kfVzw4vHB91MtmjNHBDorFqO0H3_cGzBudZxiWNzPXFzOc*" }
|
|
42
|
+
let(:personalization_params) do
|
|
43
|
+
{
|
|
44
|
+
email: "cthomas@railjumper.com"
|
|
45
|
+
}
|
|
46
|
+
end
|
|
47
|
+
let(:personalization) { Echosign::WidgetPersonalization.new(personalization_params) }
|
|
48
|
+
|
|
49
|
+
it 'returns widget info' do
|
|
50
|
+
VCR.use_cassette('personalize_widget', :record => :once) do
|
|
51
|
+
widget_response = client.personalize_widget(widget_id, personalization)
|
|
52
|
+
expect(widget_response).to be_a Hash
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
describe '.update_widget_status' do
|
|
58
|
+
let(:widget_id) { "2AAABLblqZhD_6RpgbZh5ZVlLXz1H1kfVzw4vHB91MtmjNHBDorFqO0H3_cGzBudZxiWNzPXFzOc*" }
|
|
59
|
+
let(:status_params) do
|
|
60
|
+
{
|
|
61
|
+
value: 'ENABLE',
|
|
62
|
+
message: 'Hey guys, hope you like this widget.'
|
|
63
|
+
}
|
|
64
|
+
end
|
|
65
|
+
let(:status) { Echosign::WidgetStatus.new(status_params) }
|
|
66
|
+
|
|
67
|
+
it 'returns widget info' do
|
|
68
|
+
VCR.use_cassette('update_widget_status', :record => :once) do
|
|
69
|
+
widget_response = client.update_widget_status(widget_id, status)
|
|
70
|
+
expect(widget_response).to be_a Hash
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
describe '.get_widgets' do
|
|
76
|
+
it 'returns widgets info' do
|
|
77
|
+
VCR.use_cassette('get_widgets', :record => :once) do
|
|
78
|
+
widget_response = client.get_widgets
|
|
79
|
+
expect(widget_response).to be_a Hash
|
|
80
|
+
end
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
describe '.get_widget' do
|
|
85
|
+
let(:widget_id) { "2AAABLblqZhD_6RpgbZh5ZVlLXz1H1kfVzw4vHB91MtmjNHBDorFqO0H3_cGzBudZxiWNzPXFzOc*" }
|
|
86
|
+
it 'returns widget info' do
|
|
87
|
+
VCR.use_cassette('get_widget', :record => :once) do
|
|
88
|
+
widget_response = client.get_widget(widget_id)
|
|
89
|
+
expect(widget_response).to be_a Hash
|
|
90
|
+
end
|
|
91
|
+
end
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
describe '.get_widget_documents' do
|
|
95
|
+
let(:widget_id) { "2AAABLblqZhD_6RpgbZh5ZVlLXz1H1kfVzw4vHB91MtmjNHBDorFqO0H3_cGzBudZxiWNzPXFzOc*" }
|
|
96
|
+
|
|
97
|
+
it 'returns widget documents info' do
|
|
98
|
+
VCR.use_cassette('get_widget_documents', :record => :once) do
|
|
99
|
+
widget_response = client.get_widget_documents(widget_id)
|
|
100
|
+
expect(widget_response).to be_a Hash
|
|
101
|
+
end
|
|
102
|
+
end
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
describe '.get_widget_document_file' do
|
|
106
|
+
let(:widget_id) { "2AAABLblqZhD_6RpgbZh5ZVlLXz1H1kfVzw4vHB91MtmjNHBDorFqO0H3_cGzBudZxiWNzPXFzOc*" }
|
|
107
|
+
let(:document_id) { "2AAABLblqZhCGyGn1bpbXp-Kt-QXX8fsBWhjjO-bUKd0NQ184Xxm-mE6gg0DN0e-3k0Lwj6IPw9Q*" }
|
|
108
|
+
|
|
109
|
+
it 'returns widget document file' do
|
|
110
|
+
VCR.use_cassette('get_widget_document_file', :record => :once) do
|
|
111
|
+
widget_response = client.get_widget_document_file(widget_id, document_id)
|
|
112
|
+
expect(widget_response).to_not be_nil
|
|
113
|
+
end
|
|
114
|
+
end
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
# describe '.get_widget_audit_trail' do
|
|
118
|
+
# let(:widget_id) { "2AAABLblqZhD_6RpgbZh5ZVlLXz1H1kfVzw4vHB91MtmjNHBDorFqO0H3_cGzBudZxiWNzPXFzOc*" }
|
|
119
|
+
|
|
120
|
+
# it 'returns widget document file' do
|
|
121
|
+
# VCR.use_cassette('get_widget_audit_trail', :record => :once) do
|
|
122
|
+
# widget_response = client.get_widget_audit_trail(widget_id)
|
|
123
|
+
# binding.pry
|
|
124
|
+
# expect(widget_response).to_not be_nil
|
|
125
|
+
# end
|
|
126
|
+
# end
|
|
127
|
+
# end
|
|
128
|
+
|
|
129
|
+
# describe '.get_widget_combined_pdf' do
|
|
130
|
+
# let(:widget_id) { "2AAABLblqZhD_6RpgbZh5ZVlLXz1H1kfVzw4vHB91MtmjNHBDorFqO0H3_cGzBudZxiWNzPXFzOc*" }
|
|
131
|
+
|
|
132
|
+
# it 'returns widget document file' do
|
|
133
|
+
# VCR.use_cassette('get_widget_combined_pdf', :record => :once) do
|
|
134
|
+
# widget_response = client.get_widget_combined_pdf(widget_id)
|
|
135
|
+
# binding.pry
|
|
136
|
+
# expect(widget_response).to_not be_nil
|
|
137
|
+
# end
|
|
138
|
+
# end
|
|
139
|
+
# end
|
|
140
|
+
|
|
141
|
+
# describe '.get_widget_form_data' do
|
|
142
|
+
# let(:widget_id) { "2AAABLblqZhD_6RpgbZh5ZVlLXz1H1kfVzw4vHB91MtmjNHBDorFqO0H3_cGzBudZxiWNzPXFzOc*" }
|
|
143
|
+
|
|
144
|
+
# it 'returns widget document file' do
|
|
145
|
+
# VCR.use_cassette('get_widget_form_data', :record => :once) do
|
|
146
|
+
# widget_response = client.get_widget_form_data(widget_id)
|
|
147
|
+
# binding.pry
|
|
148
|
+
# expect(widget_response).to_not be_nil
|
|
149
|
+
# end
|
|
150
|
+
# end
|
|
151
|
+
# end
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
end
|