docusign_esign 2.9.0.rc1 → 2.11.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,216 @@
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
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 PrefillFormData
16
+ #
17
+ attr_accessor :form_data
18
+
19
+ #
20
+ attr_accessor :sender_email
21
+
22
+ #
23
+ attr_accessor :sender_name
24
+
25
+ #
26
+ attr_accessor :sender_user_id
27
+
28
+ # Attribute mapping from ruby-style variable name to JSON key.
29
+ def self.attribute_map
30
+ {
31
+ :'form_data' => :'formData',
32
+ :'sender_email' => :'senderEmail',
33
+ :'sender_name' => :'senderName',
34
+ :'sender_user_id' => :'senderUserId'
35
+ }
36
+ end
37
+
38
+ # Attribute type mapping.
39
+ def self.swagger_types
40
+ {
41
+ :'form_data' => :'Array<NameValue>',
42
+ :'sender_email' => :'String',
43
+ :'sender_name' => :'String',
44
+ :'sender_user_id' => :'String'
45
+ }
46
+ end
47
+
48
+ # Initializes the object
49
+ # @param [Hash] attributes Model attributes in the form of hash
50
+ def initialize(attributes = {})
51
+ return unless attributes.is_a?(Hash)
52
+
53
+ # convert string to symbol for hash key
54
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
55
+
56
+ if attributes.has_key?(:'formData')
57
+ if (value = attributes[:'formData']).is_a?(Array)
58
+ self.form_data = value
59
+ end
60
+ end
61
+
62
+ if attributes.has_key?(:'senderEmail')
63
+ self.sender_email = attributes[:'senderEmail']
64
+ end
65
+
66
+ if attributes.has_key?(:'senderName')
67
+ self.sender_name = attributes[:'senderName']
68
+ end
69
+
70
+ if attributes.has_key?(:'senderUserId')
71
+ self.sender_user_id = attributes[:'senderUserId']
72
+ end
73
+ end
74
+
75
+ # Show invalid properties with the reasons. Usually used together with valid?
76
+ # @return Array for valid properties with the reasons
77
+ def list_invalid_properties
78
+ invalid_properties = Array.new
79
+ invalid_properties
80
+ end
81
+
82
+ # Check to see if the all the properties in the model are valid
83
+ # @return true if the model is valid
84
+ def valid?
85
+ true
86
+ end
87
+
88
+ # Checks equality by comparing each attribute.
89
+ # @param [Object] Object to be compared
90
+ def ==(o)
91
+ return true if self.equal?(o)
92
+ self.class == o.class &&
93
+ form_data == o.form_data &&
94
+ sender_email == o.sender_email &&
95
+ sender_name == o.sender_name &&
96
+ sender_user_id == o.sender_user_id
97
+ end
98
+
99
+ # @see the `==` method
100
+ # @param [Object] Object to be compared
101
+ def eql?(o)
102
+ self == o
103
+ end
104
+
105
+ # Calculates hash code according to all attributes.
106
+ # @return [Fixnum] Hash code
107
+ def hash
108
+ [form_data, sender_email, sender_name, sender_user_id].hash
109
+ end
110
+
111
+ # Builds the object from hash
112
+ # @param [Hash] attributes Model attributes in the form of hash
113
+ # @return [Object] Returns the model itself
114
+ def build_from_hash(attributes)
115
+ return nil unless attributes.is_a?(Hash)
116
+ self.class.swagger_types.each_pair do |key, type|
117
+ if type =~ /\AArray<(.*)>/i
118
+ # check to ensure the input is an array given that the attribute
119
+ # is documented as an array but the input is not
120
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
121
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
122
+ end
123
+ elsif !attributes[self.class.attribute_map[key]].nil?
124
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
125
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
126
+ end
127
+
128
+ self
129
+ end
130
+
131
+ # Deserializes the data based on type
132
+ # @param string type Data type
133
+ # @param string value Value to be deserialized
134
+ # @return [Object] Deserialized data
135
+ def _deserialize(type, value)
136
+ case type.to_sym
137
+ when :DateTime
138
+ DateTime.parse(value)
139
+ when :Date
140
+ Date.parse(value)
141
+ when :String
142
+ value.to_s
143
+ when :Integer
144
+ value.to_i
145
+ when :Float
146
+ value.to_f
147
+ when :BOOLEAN
148
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
149
+ true
150
+ else
151
+ false
152
+ end
153
+ when :Object
154
+ # generic object (usually a Hash), return directly
155
+ value
156
+ when /\AArray<(?<inner_type>.+)>\z/
157
+ inner_type = Regexp.last_match[:inner_type]
158
+ value.map { |v| _deserialize(inner_type, v) }
159
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
160
+ k_type = Regexp.last_match[:k_type]
161
+ v_type = Regexp.last_match[:v_type]
162
+ {}.tap do |hash|
163
+ value.each do |k, v|
164
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
165
+ end
166
+ end
167
+ else # model
168
+ temp_model = DocuSign_eSign.const_get(type).new
169
+ temp_model.build_from_hash(value)
170
+ end
171
+ end
172
+
173
+ # Returns the string representation of the object
174
+ # @return [String] String presentation of the object
175
+ def to_s
176
+ to_hash.to_s
177
+ end
178
+
179
+ # to_body is an alias to to_hash (backward compatibility)
180
+ # @return [Hash] Returns the object in the form of hash
181
+ def to_body
182
+ to_hash
183
+ end
184
+
185
+ # Returns the object in the form of hash
186
+ # @return [Hash] Returns the object in the form of hash
187
+ def to_hash
188
+ hash = {}
189
+ self.class.attribute_map.each_pair do |attr, param|
190
+ value = self.send(attr)
191
+ next if value.nil?
192
+ hash[param] = _to_hash(value)
193
+ end
194
+ hash
195
+ end
196
+
197
+ # Outputs non-array value in the form of hash
198
+ # For object, use to_hash. Otherwise, just return the value
199
+ # @param [Object] value Any valid value
200
+ # @return [Hash] Returns the value in the form of hash
201
+ def _to_hash(value)
202
+ if value.is_a?(Array)
203
+ value.compact.map { |v| _to_hash(v) }
204
+ elsif value.is_a?(Hash)
205
+ {}.tap do |hash|
206
+ value.each { |k, v| hash[k] = _to_hash(v) }
207
+ end
208
+ elsif value.respond_to? :to_hash
209
+ value.to_hash
210
+ else
211
+ value
212
+ end
213
+ end
214
+
215
+ end
216
+ end
@@ -144,7 +144,7 @@ module DocuSign_eSign
144
144
  :'full_name_tabs' => :'Array<FullName>',
145
145
  :'initial_here_tabs' => :'Array<InitialHere>',
146
146
  :'last_name_tabs' => :'Array<LastName>',
147
- :'list_tabs' => :'Array<Array>',
147
+ :'list_tabs' => :'Array<List>',
148
148
  :'notarize_tabs' => :'Array<Notarize>',
149
149
  :'note_tabs' => :'Array<Note>',
150
150
  :'number_tabs' => :'Array<Number>',
@@ -144,7 +144,7 @@ module DocuSign_eSign
144
144
  :'full_name_tabs' => :'Array<FullName>',
145
145
  :'initial_here_tabs' => :'Array<InitialHere>',
146
146
  :'last_name_tabs' => :'Array<LastName>',
147
- :'list_tabs' => :'Array<Array>',
147
+ :'list_tabs' => :'Array<List>',
148
148
  :'notarize_tabs' => :'Array<Notarize>',
149
149
  :'note_tabs' => :'Array<Note>',
150
150
  :'number_tabs' => :'Array<Number>',
@@ -10,5 +10,5 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git
10
10
  =end
11
11
 
12
12
  module DocuSign_eSign
13
- VERSION = '2.9.0.rc1'
13
+ VERSION = '2.11.0.rc1'
14
14
  end
data/tests/Gemfile.lock CHANGED
@@ -1,8 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- docusign_esign (2.9.0.rc1)
5
- addressable (~> 2.7, >= 2.7.0)
4
+ docusign_esign (3.11.0.rc1)
6
5
  json (~> 2.1, >= 2.1.0)
7
6
  jwt (~> 2.2, >= 2.2.1)
8
7
  typhoeus (~> 1.0, >= 1.0.1)
@@ -10,15 +9,12 @@ PATH
10
9
  GEM
11
10
  remote: https://rubygems.org/
12
11
  specs:
13
- addressable (2.7.0)
14
- public_suffix (>= 2.0.2, < 5.0)
15
12
  diff-lcs (1.4.4)
16
- ethon (0.12.0)
17
- ffi (>= 1.3.0)
18
- ffi (1.13.1)
19
- json (2.3.1)
20
- jwt (2.2.2)
21
- public_suffix (4.0.6)
13
+ ethon (0.14.0)
14
+ ffi (>= 1.15.0)
15
+ ffi (1.15.3)
16
+ json (2.5.1)
17
+ jwt (2.2.3)
22
18
  rspec (3.9.0)
23
19
  rspec-core (~> 3.9.0)
24
20
  rspec-expectations (~> 3.9.0)
@@ -307,6 +307,39 @@ describe 'DocuSign Ruby Client Tests' do
307
307
  end
308
308
  end
309
309
  end
310
+
311
+ context 'get form data' do
312
+ it 'successfully returns envelope form data' do
313
+ envelope_form_data = nil
314
+
315
+ if !$envelope_id.nil?
316
+ api_client = create_api_client()
317
+ envelopes_api = DocuSign_eSign::EnvelopesApi.new(api_client)
318
+
319
+ envelope_form_data = envelopes_api.get_form_data($account_id, $envelope_id)
320
+ end
321
+
322
+ expect(envelope_form_data).to be_truthy
323
+ if !envelope_form_data.nil?
324
+ expect(envelope_form_data.form_data).to be_truthy
325
+ if !envelope_form_data.form_data.nil?
326
+ expect(envelope_form_data.form_data).to be_truthy
327
+ # expect(envelope_form_data.form_data.length).to be > 0
328
+ # if envelope_form_data.form_data.length > 0
329
+ # expect(envelope_form_data.form_data[0].name).to be_truthy
330
+ # expect(envelope_form_data.prefill_form_data).to be_truthy
331
+ # if !envelope_form_data.prefill_form_data.nil?
332
+ # expect(envelope_form_data.prefill_form_data.form_data).to be_truthy
333
+ # expect(envelope_form_data.prefill_form_data.form_data.length).to be > 0
334
+ # if envelope_form_data.prefill_form_data.form_data.length > 0
335
+ # expect(envelope_form_data.prefill_form_data.form_data[0].name).to be_truthy
336
+ # end
337
+ # end
338
+ # end
339
+ end
340
+ end
341
+ end
342
+ end
310
343
  end
311
344
 
312
345
  describe '.list' do
@@ -423,5 +456,30 @@ describe 'DocuSign Ruby Client Tests' do
423
456
  end
424
457
  end
425
458
  end
459
+
460
+ context 'list tabs' do
461
+ it 'successfully lists envelope tabs' do
462
+ envelope_summary = nil
463
+
464
+ if !$envelope_id.nil?
465
+ api_client = create_api_client()
466
+ envelopes_api = DocuSign_eSign::EnvelopesApi.new(api_client)
467
+
468
+ options = DocuSign_eSign::GetEnvelopeOptions.new
469
+
470
+ envelope_summary = envelopes_api.get_envelope($account_id, $envelope_id, options)
471
+
472
+ options = DocuSign_eSign::ListRecipientsOptions.new
473
+
474
+ recipients = envelopes_api.list_recipients($account_id, $envelope_id, options)
475
+
476
+ tabs = envelopes_api.list_tabs($account_id, $envelope_id, recipients.signers[0].recipient_id)
477
+
478
+ sign_here_tabs = tabs.sign_here_tabs
479
+
480
+ expect(sign_here_tabs).to be_truthy
481
+ end
482
+ end
483
+ end
426
484
  end
427
485
  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: 2.9.0.rc1
4
+ version: 2.11.0.rc1
5
5
  platform: ruby
6
6
  authors:
7
7
  - DocuSign
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-04-14 00:00:00.000000000 Z
11
+ date: 2021-07-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jwt
@@ -285,7 +285,6 @@ files:
285
285
  - LICENSE
286
286
  - README.md
287
287
  - Rakefile
288
- - docusign_esign-3.9.0.rc1.gem
289
288
  - docusign_esign.gemspec
290
289
  - git_push.sh
291
290
  - lib/docusign_esign.rb
@@ -472,6 +471,7 @@ files:
472
471
  - lib/docusign_esign/models/envelope_documents_result.rb
473
472
  - lib/docusign_esign/models/envelope_event.rb
474
473
  - lib/docusign_esign/models/envelope_form_data.rb
474
+ - lib/docusign_esign/models/envelope_form_data_prefill_form_data.rb
475
475
  - lib/docusign_esign/models/envelope_id.rb
476
476
  - lib/docusign_esign/models/envelope_ids_request.rb
477
477
  - lib/docusign_esign/models/envelope_notification_request.rb
@@ -567,6 +567,7 @@ files:
567
567
  - lib/docusign_esign/models/power_forms_form_data_response.rb
568
568
  - lib/docusign_esign/models/power_forms_request.rb
569
569
  - lib/docusign_esign/models/power_forms_response.rb
570
+ - lib/docusign_esign/models/prefill_form_data.rb
570
571
  - lib/docusign_esign/models/property_metadata.rb
571
572
  - lib/docusign_esign/models/province.rb
572
573
  - lib/docusign_esign/models/provisioning_information.rb
Binary file