docusign_esign 3.10.0.rc1 → 3.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +23 -22
- data/docusign_esign-2.10.0.gem +0 -0
- data/docusign_esign-3.10.0.rc1.gem +0 -0
- data/lib/docusign_esign.rb +2 -1
- data/lib/docusign_esign/models/envelope_form_data.rb +2 -5
- data/lib/docusign_esign/models/envelope_form_data_prefill_form_data.rb +186 -0
- data/lib/docusign_esign/models/tabs.rb +1 -1
- data/lib/docusign_esign/version.rb +1 -1
- data/tests/Gemfile.lock +10 -6
- data/tests/spec/unit_tests_using_jwt_spec.rb +58 -0
- metadata +7 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 41c1b9f636e02c741ab6cae6f1b1a492525d05be19108b5e036636bc2c618030
|
4
|
+
data.tar.gz: 0ec4460f92370ed6d8a278bf0e67d25eb2bab12d6848c4bbe2f81046e2313ca4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eb23a6d6a6803bb4269f2034ec2d2750dec422fa7d060d7768ae51f810761e51b7333aa8e96dc01423db46f1212d7f0e0a030bf6013af0d4fefc96f06a23bdff
|
7
|
+
data.tar.gz: 1f42f5440f895a356aa6210e57d259bb6c093f73055fa58d588eaa2bdfd57b5e7720b1abe046b3022b7ddc5bd2dee45d8b7699c9f399c89b6806162b20b7a4b1
|
data/Gemfile.lock
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
docusign_esign (3.
|
5
|
-
addressable (~> 2.7, >= 2.7.0)
|
4
|
+
docusign_esign (3.10.0)
|
6
5
|
json (~> 2.1, >= 2.1.0)
|
7
6
|
jwt (~> 2.2, >= 2.2.1)
|
8
7
|
typhoeus (~> 1.0, >= 1.0.1)
|
@@ -15,35 +14,37 @@ GEM
|
|
15
14
|
public_suffix (>= 2.0.2, < 5.0)
|
16
15
|
autotest (4.4.6)
|
17
16
|
ZenTest (>= 4.4.1)
|
18
|
-
autotest-fsevent (0.2.
|
17
|
+
autotest-fsevent (0.2.18)
|
19
18
|
sys-uname
|
20
19
|
autotest-growl (0.2.16)
|
21
20
|
autotest-rails-pure (4.1.2)
|
22
|
-
crack (0.4.
|
21
|
+
crack (0.4.5)
|
22
|
+
rexml
|
23
23
|
diff-lcs (1.4.4)
|
24
|
-
ethon (0.
|
25
|
-
ffi (>= 1.
|
26
|
-
ffi (1.
|
24
|
+
ethon (0.14.0)
|
25
|
+
ffi (>= 1.15.0)
|
26
|
+
ffi (1.15.1)
|
27
27
|
hashdiff (1.0.1)
|
28
|
-
json (2.
|
29
|
-
jwt (2.2.
|
28
|
+
json (2.5.1)
|
29
|
+
jwt (2.2.3)
|
30
30
|
public_suffix (4.0.6)
|
31
31
|
rake (12.3.3)
|
32
|
-
|
33
|
-
|
34
|
-
rspec-
|
35
|
-
rspec-
|
36
|
-
|
37
|
-
|
38
|
-
|
32
|
+
rexml (3.2.5)
|
33
|
+
rspec (3.10.0)
|
34
|
+
rspec-core (~> 3.10.0)
|
35
|
+
rspec-expectations (~> 3.10.0)
|
36
|
+
rspec-mocks (~> 3.10.0)
|
37
|
+
rspec-core (3.10.1)
|
38
|
+
rspec-support (~> 3.10.0)
|
39
|
+
rspec-expectations (3.10.1)
|
39
40
|
diff-lcs (>= 1.2.0, < 2.0)
|
40
|
-
rspec-support (~> 3.
|
41
|
-
rspec-mocks (3.
|
41
|
+
rspec-support (~> 3.10.0)
|
42
|
+
rspec-mocks (3.10.2)
|
42
43
|
diff-lcs (>= 1.2.0, < 2.0)
|
43
|
-
rspec-support (~> 3.
|
44
|
-
rspec-support (3.
|
45
|
-
sys-uname (1.2.
|
46
|
-
ffi (
|
44
|
+
rspec-support (~> 3.10.0)
|
45
|
+
rspec-support (3.10.2)
|
46
|
+
sys-uname (1.2.2)
|
47
|
+
ffi (~> 1.1)
|
47
48
|
typhoeus (1.4.0)
|
48
49
|
ethon (>= 0.9.0)
|
49
50
|
vcr (3.0.3)
|
Binary file
|
Binary file
|
data/lib/docusign_esign.rb
CHANGED
@@ -216,6 +216,7 @@ require 'docusign_esign/models/envelope_document'
|
|
216
216
|
require 'docusign_esign/models/envelope_documents_result'
|
217
217
|
require 'docusign_esign/models/envelope_event'
|
218
218
|
require 'docusign_esign/models/envelope_form_data'
|
219
|
+
require 'docusign_esign/models/envelope_form_data_prefill_form_data'
|
219
220
|
require 'docusign_esign/models/envelope_id'
|
220
221
|
require 'docusign_esign/models/envelope_ids_request'
|
221
222
|
require 'docusign_esign/models/envelope_metadata'
|
@@ -516,4 +517,4 @@ module DocuSign_eSign
|
|
516
517
|
end
|
517
518
|
end
|
518
519
|
end
|
519
|
-
end
|
520
|
+
end
|
@@ -22,7 +22,6 @@ module DocuSign_eSign
|
|
22
22
|
#
|
23
23
|
attr_accessor :form_data
|
24
24
|
|
25
|
-
#
|
26
25
|
attr_accessor :prefill_form_data
|
27
26
|
|
28
27
|
#
|
@@ -53,7 +52,7 @@ module DocuSign_eSign
|
|
53
52
|
:'email_subject' => :'String',
|
54
53
|
:'envelope_id' => :'String',
|
55
54
|
:'form_data' => :'Array<FormDataItem>',
|
56
|
-
:'prefill_form_data' => :'
|
55
|
+
:'prefill_form_data' => :'EnvelopeFormDataPrefillFormData',
|
57
56
|
:'recipient_form_data' => :'Array<RecipientFormData>',
|
58
57
|
:'sent_date_time' => :'String',
|
59
58
|
:'status' => :'String'
|
@@ -83,9 +82,7 @@ module DocuSign_eSign
|
|
83
82
|
end
|
84
83
|
|
85
84
|
if attributes.has_key?(:'prefillFormData')
|
86
|
-
|
87
|
-
self.prefill_form_data = value
|
88
|
-
end
|
85
|
+
self.prefill_form_data = attributes[:'prefillFormData']
|
89
86
|
end
|
90
87
|
|
91
88
|
if attributes.has_key?(:'recipientFormData')
|
@@ -0,0 +1,186 @@
|
|
1
|
+
=begin
|
2
|
+
#DocuSign REST API
|
3
|
+
|
4
|
+
#The DocuSign REST API provides you with a powerful, convenient, and simple Web services API for interacting with DocuSign.
|
5
|
+
|
6
|
+
OpenAPI spec version: v2.1
|
7
|
+
Contact: devcenter@docusign.com
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
|
10
|
+
=end
|
11
|
+
|
12
|
+
require 'date'
|
13
|
+
|
14
|
+
module DocuSign_eSign
|
15
|
+
class EnvelopeFormDataPrefillFormData
|
16
|
+
#
|
17
|
+
attr_accessor :form_data
|
18
|
+
|
19
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
20
|
+
def self.attribute_map
|
21
|
+
{
|
22
|
+
:'form_data' => :'formData'
|
23
|
+
}
|
24
|
+
end
|
25
|
+
|
26
|
+
# Attribute type mapping.
|
27
|
+
def self.swagger_types
|
28
|
+
{
|
29
|
+
:'form_data' => :'Array<FormDataItem>'
|
30
|
+
}
|
31
|
+
end
|
32
|
+
|
33
|
+
# Initializes the object
|
34
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
35
|
+
def initialize(attributes = {})
|
36
|
+
return unless attributes.is_a?(Hash)
|
37
|
+
|
38
|
+
# convert string to symbol for hash key
|
39
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
40
|
+
|
41
|
+
if attributes.has_key?(:'formData')
|
42
|
+
if (value = attributes[:'formData']).is_a?(Array)
|
43
|
+
self.form_data = value
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
49
|
+
# @return Array for valid properties with the reasons
|
50
|
+
def list_invalid_properties
|
51
|
+
invalid_properties = Array.new
|
52
|
+
invalid_properties
|
53
|
+
end
|
54
|
+
|
55
|
+
# Check to see if the all the properties in the model are valid
|
56
|
+
# @return true if the model is valid
|
57
|
+
def valid?
|
58
|
+
true
|
59
|
+
end
|
60
|
+
|
61
|
+
# Checks equality by comparing each attribute.
|
62
|
+
# @param [Object] Object to be compared
|
63
|
+
def ==(o)
|
64
|
+
return true if self.equal?(o)
|
65
|
+
self.class == o.class &&
|
66
|
+
form_data == o.form_data
|
67
|
+
end
|
68
|
+
|
69
|
+
# @see the `==` method
|
70
|
+
# @param [Object] Object to be compared
|
71
|
+
def eql?(o)
|
72
|
+
self == o
|
73
|
+
end
|
74
|
+
|
75
|
+
# Calculates hash code according to all attributes.
|
76
|
+
# @return [Fixnum] Hash code
|
77
|
+
def hash
|
78
|
+
[form_data].hash
|
79
|
+
end
|
80
|
+
|
81
|
+
# Builds the object from hash
|
82
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
83
|
+
# @return [Object] Returns the model itself
|
84
|
+
def build_from_hash(attributes)
|
85
|
+
return nil unless attributes.is_a?(Hash)
|
86
|
+
self.class.swagger_types.each_pair do |key, type|
|
87
|
+
if type =~ /\AArray<(.*)>/i
|
88
|
+
# check to ensure the input is an array given that the attribute
|
89
|
+
# is documented as an array but the input is not
|
90
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
91
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
92
|
+
end
|
93
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
94
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
95
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
96
|
+
end
|
97
|
+
|
98
|
+
self
|
99
|
+
end
|
100
|
+
|
101
|
+
# Deserializes the data based on type
|
102
|
+
# @param string type Data type
|
103
|
+
# @param string value Value to be deserialized
|
104
|
+
# @return [Object] Deserialized data
|
105
|
+
def _deserialize(type, value)
|
106
|
+
case type.to_sym
|
107
|
+
when :DateTime
|
108
|
+
DateTime.parse(value)
|
109
|
+
when :Date
|
110
|
+
Date.parse(value)
|
111
|
+
when :String
|
112
|
+
value.to_s
|
113
|
+
when :Integer
|
114
|
+
value.to_i
|
115
|
+
when :Float
|
116
|
+
value.to_f
|
117
|
+
when :BOOLEAN
|
118
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
119
|
+
true
|
120
|
+
else
|
121
|
+
false
|
122
|
+
end
|
123
|
+
when :Object
|
124
|
+
# generic object (usually a Hash), return directly
|
125
|
+
value
|
126
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
127
|
+
inner_type = Regexp.last_match[:inner_type]
|
128
|
+
value.map { |v| _deserialize(inner_type, v) }
|
129
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
130
|
+
k_type = Regexp.last_match[:k_type]
|
131
|
+
v_type = Regexp.last_match[:v_type]
|
132
|
+
{}.tap do |hash|
|
133
|
+
value.each do |k, v|
|
134
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
135
|
+
end
|
136
|
+
end
|
137
|
+
else # model
|
138
|
+
temp_model = DocuSign_eSign.const_get(type).new
|
139
|
+
temp_model.build_from_hash(value)
|
140
|
+
end
|
141
|
+
end
|
142
|
+
|
143
|
+
# Returns the string representation of the object
|
144
|
+
# @return [String] String presentation of the object
|
145
|
+
def to_s
|
146
|
+
to_hash.to_s
|
147
|
+
end
|
148
|
+
|
149
|
+
# to_body is an alias to to_hash (backward compatibility)
|
150
|
+
# @return [Hash] Returns the object in the form of hash
|
151
|
+
def to_body
|
152
|
+
to_hash
|
153
|
+
end
|
154
|
+
|
155
|
+
# Returns the object in the form of hash
|
156
|
+
# @return [Hash] Returns the object in the form of hash
|
157
|
+
def to_hash
|
158
|
+
hash = {}
|
159
|
+
self.class.attribute_map.each_pair do |attr, param|
|
160
|
+
value = self.send(attr)
|
161
|
+
next if value.nil?
|
162
|
+
hash[param] = _to_hash(value)
|
163
|
+
end
|
164
|
+
hash
|
165
|
+
end
|
166
|
+
|
167
|
+
# Outputs non-array value in the form of hash
|
168
|
+
# For object, use to_hash. Otherwise, just return the value
|
169
|
+
# @param [Object] value Any valid value
|
170
|
+
# @return [Hash] Returns the value in the form of hash
|
171
|
+
def _to_hash(value)
|
172
|
+
if value.is_a?(Array)
|
173
|
+
value.compact.map { |v| _to_hash(v) }
|
174
|
+
elsif value.is_a?(Hash)
|
175
|
+
{}.tap do |hash|
|
176
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
177
|
+
end
|
178
|
+
elsif value.respond_to? :to_hash
|
179
|
+
value.to_hash
|
180
|
+
else
|
181
|
+
value
|
182
|
+
end
|
183
|
+
end
|
184
|
+
|
185
|
+
end
|
186
|
+
end
|
@@ -198,7 +198,7 @@ module DocuSign_eSign
|
|
198
198
|
:'full_name_tabs' => :'Array<FullName>',
|
199
199
|
:'initial_here_tabs' => :'Array<InitialHere>',
|
200
200
|
:'last_name_tabs' => :'Array<LastName>',
|
201
|
-
:'list_tabs' => :'Array<
|
201
|
+
:'list_tabs' => :'Array<List>',
|
202
202
|
:'notarize_tabs' => :'Array<Notarize>',
|
203
203
|
:'notary_seal_tabs' => :'Array<NotarySeal>',
|
204
204
|
:'note_tabs' => :'Array<Note>',
|
data/tests/Gemfile.lock
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
PATH
|
2
2
|
remote: ..
|
3
3
|
specs:
|
4
|
-
docusign_esign (
|
4
|
+
docusign_esign (2.10.0)
|
5
|
+
addressable (~> 2.7, >= 2.7.0)
|
5
6
|
json (~> 2.1, >= 2.1.0)
|
6
7
|
jwt (~> 2.2, >= 2.2.1)
|
7
8
|
typhoeus (~> 1.0, >= 1.0.1)
|
@@ -9,12 +10,15 @@ PATH
|
|
9
10
|
GEM
|
10
11
|
remote: https://rubygems.org/
|
11
12
|
specs:
|
13
|
+
addressable (2.7.0)
|
14
|
+
public_suffix (>= 2.0.2, < 5.0)
|
12
15
|
diff-lcs (1.4.4)
|
13
|
-
ethon (0.
|
14
|
-
ffi (>= 1.
|
15
|
-
ffi (1.
|
16
|
-
json (2.
|
17
|
-
jwt (2.2.
|
16
|
+
ethon (0.14.0)
|
17
|
+
ffi (>= 1.15.0)
|
18
|
+
ffi (1.15.1)
|
19
|
+
json (2.5.1)
|
20
|
+
jwt (2.2.3)
|
21
|
+
public_suffix (4.0.6)
|
18
22
|
rspec (3.9.0)
|
19
23
|
rspec-core (~> 3.9.0)
|
20
24
|
rspec-expectations (~> 3.9.0)
|
@@ -306,6 +306,39 @@ describe 'DocuSign Ruby Client Tests' do
|
|
306
306
|
end
|
307
307
|
end
|
308
308
|
end
|
309
|
+
|
310
|
+
context 'get form data' do
|
311
|
+
it 'successfully returns envelope form data' do
|
312
|
+
envelope_form_data = nil
|
313
|
+
|
314
|
+
if !$envelope_id.nil?
|
315
|
+
api_client = create_api_client()
|
316
|
+
envelopes_api = DocuSign_eSign::EnvelopesApi.new(api_client)
|
317
|
+
|
318
|
+
envelope_form_data = envelopes_api.get_form_data($account_id, $envelope_id)
|
319
|
+
end
|
320
|
+
|
321
|
+
expect(envelope_form_data).to be_truthy
|
322
|
+
if !envelope_form_data.nil?
|
323
|
+
expect(envelope_form_data.form_data).to be_truthy
|
324
|
+
if !envelope_form_data.form_data.nil?
|
325
|
+
expect(envelope_form_data.form_data).to be_truthy
|
326
|
+
# expect(envelope_form_data.form_data.length).to be > 0
|
327
|
+
# if envelope_form_data.form_data.length > 0
|
328
|
+
# expect(envelope_form_data.form_data[0].name).to be_truthy
|
329
|
+
# expect(envelope_form_data.prefill_form_data).to be_truthy
|
330
|
+
# if !envelope_form_data.prefill_form_data.nil?
|
331
|
+
# expect(envelope_form_data.prefill_form_data.form_data).to be_truthy
|
332
|
+
# expect(envelope_form_data.prefill_form_data.form_data.length).to be > 0
|
333
|
+
# if envelope_form_data.prefill_form_data.form_data.length > 0
|
334
|
+
# expect(envelope_form_data.prefill_form_data.form_data[0].name).to be_truthy
|
335
|
+
# end
|
336
|
+
# end
|
337
|
+
# end
|
338
|
+
end
|
339
|
+
end
|
340
|
+
end
|
341
|
+
end
|
309
342
|
end
|
310
343
|
|
311
344
|
describe '.list' do
|
@@ -422,5 +455,30 @@ describe 'DocuSign Ruby Client Tests' do
|
|
422
455
|
end
|
423
456
|
end
|
424
457
|
end
|
458
|
+
|
459
|
+
context 'list tabs' do
|
460
|
+
it 'successfully lists envelope tabs' do
|
461
|
+
envelope_summary = nil
|
462
|
+
|
463
|
+
if !$envelope_id.nil?
|
464
|
+
api_client = create_api_client()
|
465
|
+
envelopes_api = DocuSign_eSign::EnvelopesApi.new(api_client)
|
466
|
+
|
467
|
+
options = DocuSign_eSign::GetEnvelopeOptions.new
|
468
|
+
|
469
|
+
envelope_summary = envelopes_api.get_envelope($account_id, $envelope_id, options)
|
470
|
+
|
471
|
+
options = DocuSign_eSign::ListRecipientsOptions.new
|
472
|
+
|
473
|
+
recipients = envelopes_api.list_recipients($account_id, $envelope_id, options)
|
474
|
+
|
475
|
+
tabs = envelopes_api.list_tabs($account_id, $envelope_id, recipients.signers[0].recipient_id)
|
476
|
+
|
477
|
+
sign_here_tabs = tabs.sign_here_tabs
|
478
|
+
|
479
|
+
expect(sign_here_tabs).to be_truthy
|
480
|
+
end
|
481
|
+
end
|
482
|
+
end
|
425
483
|
end
|
426
484
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: docusign_esign
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.10.0
|
4
|
+
version: 3.10.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- DocuSign
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-06-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jwt
|
@@ -265,7 +265,9 @@ files:
|
|
265
265
|
- LICENSE
|
266
266
|
- README.md
|
267
267
|
- Rakefile
|
268
|
+
- docusign_esign-2.10.0.gem
|
268
269
|
- docusign_esign-2.10.0.rc1.gem
|
270
|
+
- docusign_esign-3.10.0.rc1.gem
|
269
271
|
- docusign_esign.gemspec
|
270
272
|
- git_push.sh
|
271
273
|
- lib/docusign_esign.rb
|
@@ -505,6 +507,7 @@ files:
|
|
505
507
|
- lib/docusign_esign/models/envelope_documents_result.rb
|
506
508
|
- lib/docusign_esign/models/envelope_event.rb
|
507
509
|
- lib/docusign_esign/models/envelope_form_data.rb
|
510
|
+
- lib/docusign_esign/models/envelope_form_data_prefill_form_data.rb
|
508
511
|
- lib/docusign_esign/models/envelope_id.rb
|
509
512
|
- lib/docusign_esign/models/envelope_ids_request.rb
|
510
513
|
- lib/docusign_esign/models/envelope_metadata.rb
|
@@ -806,9 +809,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
806
809
|
version: '1.9'
|
807
810
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
808
811
|
requirements:
|
809
|
-
- - "
|
812
|
+
- - ">="
|
810
813
|
- !ruby/object:Gem::Version
|
811
|
-
version:
|
814
|
+
version: '0'
|
812
815
|
requirements: []
|
813
816
|
rubygems_version: 3.0.3
|
814
817
|
signing_key:
|