docusign_esign 2.1.0 → 2.2.0.pre.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +1 -1
- data/docusign_esign-3.1.0.pre.rc1.gem +0 -0
- data/lib/docusign_esign.rb +450 -383
- data/{tests → lib/docusign_esign/api}/.DS_Store +0 -0
- data/lib/docusign_esign/api/accounts_api.rb +69 -8
- data/lib/docusign_esign/api/connect_api.rb +400 -0
- data/lib/docusign_esign/api/envelopes_api.rb +18 -6
- data/lib/docusign_esign/api/organizations_api.rb +232 -0
- data/lib/docusign_esign/api/tsps_api.rb +256 -0
- data/lib/docusign_esign/models/access_code_format.rb +273 -0
- data/lib/docusign_esign/models/account_notification.rb +206 -0
- data/lib/docusign_esign/models/account_ui_settings.rb +330 -0
- data/lib/docusign_esign/models/bcc_email_archive.rb +276 -0
- data/lib/docusign_esign/models/bcc_email_archive_history.rb +237 -0
- data/lib/docusign_esign/models/bcc_email_archive_history_list.rb +250 -0
- data/lib/docusign_esign/models/bcc_email_archive_list.rb +250 -0
- data/lib/docusign_esign/models/bulk_send_request.rb +188 -0
- data/lib/docusign_esign/models/bulk_send_response.rb +222 -0
- data/lib/docusign_esign/models/bulk_send_test_response.rb +212 -0
- data/lib/docusign_esign/models/bulk_sending_copy.rb +222 -0
- data/lib/docusign_esign/models/bulk_sending_copy_custom_field.rb +198 -0
- data/lib/docusign_esign/models/bulk_sending_copy_recipient.rb +382 -0
- data/lib/docusign_esign/models/bulk_sending_copy_tab.rb +198 -0
- data/lib/docusign_esign/models/bulk_sending_list.rb +210 -0
- data/lib/docusign_esign/models/bulk_sending_list_summaries.rb +190 -0
- data/lib/docusign_esign/models/bulk_sending_list_summary.rb +218 -0
- data/lib/docusign_esign/models/carbon_copy.rb +19 -1
- data/lib/docusign_esign/models/certified_delivery.rb +19 -1
- data/lib/docusign_esign/models/comment.rb +392 -0
- data/lib/docusign_esign/models/comment_history_result.rb +220 -0
- data/lib/docusign_esign/models/comment_publish.rb +244 -0
- data/lib/docusign_esign/models/comment_thread.rb +961 -0
- data/lib/docusign_esign/models/comments_publish.rb +190 -0
- data/lib/docusign_esign/models/connect_salesforce_field.rb +258 -0
- data/lib/docusign_esign/models/connect_salesforce_object.rb +272 -0
- data/lib/docusign_esign/models/connect_user_object.rb +230 -0
- data/lib/docusign_esign/models/direct_debit_processor_information.rb +298 -0
- data/lib/docusign_esign/models/display_appliance_document.rb +258 -0
- data/lib/docusign_esign/models/display_appliance_document_page.rb +278 -0
- data/lib/docusign_esign/models/display_appliance_envelope.rb +328 -0
- data/lib/docusign_esign/models/display_appliance_info.rb +235 -0
- data/lib/docusign_esign/models/display_appliance_page.rb +278 -0
- data/lib/docusign_esign/models/display_appliance_pdf.rb +267 -0
- data/lib/docusign_esign/models/display_appliance_recipient.rb +388 -0
- data/lib/docusign_esign/models/display_appliance_signer_attachment.rb +248 -0
- data/lib/docusign_esign/models/document_fields_information.rb +1 -1
- data/lib/docusign_esign/models/document_html_display_settings.rb +11 -1
- data/lib/docusign_esign/models/envelope_document.rb +11 -1
- data/lib/docusign_esign/models/envelope_metadata.rb +208 -0
- data/lib/docusign_esign/models/envelope_purge_configuration.rb +218 -0
- data/lib/docusign_esign/models/envelope_transfer_rule.rb +273 -0
- data/lib/docusign_esign/models/envelope_transfer_rule_information.rb +250 -0
- data/lib/docusign_esign/models/envelope_transfer_rule_request.rb +279 -0
- data/lib/docusign_esign/models/external_claim.rb +218 -0
- data/lib/docusign_esign/models/external_document_sources.rb +273 -0
- data/lib/docusign_esign/models/favorite_templates_content_item.rb +207 -0
- data/lib/docusign_esign/models/favorite_templates_info.rb +209 -0
- data/lib/docusign_esign/models/feature_available_metadata.rb +198 -0
- data/lib/docusign_esign/models/folder_shared_item.rb +289 -0
- data/lib/docusign_esign/models/form_data_item.rb +227 -0
- data/lib/docusign_esign/models/graphics_context.rb +208 -0
- data/lib/docusign_esign/models/id_check_configuration.rb +210 -0
- data/lib/docusign_esign/models/id_check_security_step.rb +188 -0
- data/lib/docusign_esign/models/locale_policy.rb +595 -0
- data/lib/docusign_esign/models/locale_policy_tab.rb +298 -0
- data/lib/docusign_esign/models/new_account_definition.rb +11 -1
- data/lib/docusign_esign/models/notification_default_settings.rb +196 -0
- data/lib/docusign_esign/models/notification_defaults.rb +196 -0
- data/lib/docusign_esign/models/offline_attributes.rb +238 -0
- data/lib/docusign_esign/models/page_size.rb +198 -0
- data/lib/docusign_esign/models/path_extended_element.rb +208 -0
- data/lib/docusign_esign/models/pay_pal_legacy_settings.rb +228 -0
- data/lib/docusign_esign/models/payment_gateway_account_setting.rb +218 -0
- data/lib/docusign_esign/models/payment_method_with_options.rb +200 -0
- data/lib/docusign_esign/models/poly_line.rb +218 -0
- data/lib/docusign_esign/models/poly_line_overlay.rb +885 -0
- data/lib/docusign_esign/models/recipient_email_notification.rb +1 -1
- data/lib/docusign_esign/models/recipient_preview_request.rb +278 -0
- data/lib/docusign_esign/models/recipient_proof_file.rb +188 -0
- data/lib/docusign_esign/models/signature_properties.rb +198 -0
- data/lib/docusign_esign/models/signer.rb +11 -2
- data/lib/docusign_esign/models/smart_section_display_settings.rb +11 -1
- data/lib/docusign_esign/models/tab_group.rb +911 -0
- data/lib/docusign_esign/models/usage_history.rb +1 -1
- data/lib/docusign_esign/models/user_information.rb +1 -1
- data/lib/docusign_esign/models/witness.rb +10 -1
- data/lib/docusign_esign/models/workspace_settings.rb +188 -0
- data/lib/docusign_esign/version.rb +1 -1
- data/tests/Gemfile.lock +1 -1
- data/tests/spec/unit_tests_using_jwt_spec.rb +6 -3
- metadata +74 -7
- data/Gemfile.lock +0 -73
- data/lib/docusign_esign/api/trust_service_providers_api.rb +0 -73
@@ -0,0 +1,388 @@
|
|
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
|
+
|
16
|
+
class DisplayApplianceRecipient
|
17
|
+
#
|
18
|
+
attr_accessor :cfr_part11
|
19
|
+
|
20
|
+
#
|
21
|
+
attr_accessor :company
|
22
|
+
|
23
|
+
#
|
24
|
+
attr_accessor :digital_signature_base64
|
25
|
+
|
26
|
+
#
|
27
|
+
attr_accessor :email
|
28
|
+
|
29
|
+
#
|
30
|
+
attr_accessor :full_name
|
31
|
+
|
32
|
+
#
|
33
|
+
attr_accessor :initials_base64
|
34
|
+
|
35
|
+
#
|
36
|
+
attr_accessor :in_person_email
|
37
|
+
|
38
|
+
#
|
39
|
+
attr_accessor :is_notary
|
40
|
+
|
41
|
+
#
|
42
|
+
attr_accessor :notary_seal_base64
|
43
|
+
|
44
|
+
#
|
45
|
+
attr_accessor :phone_number
|
46
|
+
|
47
|
+
#
|
48
|
+
attr_accessor :recipient_complete_count
|
49
|
+
|
50
|
+
#
|
51
|
+
attr_accessor :recipient_guid_id
|
52
|
+
|
53
|
+
# Unique for the recipient. It is used by the tab element to indicate which recipient is to sign the Document.
|
54
|
+
attr_accessor :recipient_id
|
55
|
+
|
56
|
+
#
|
57
|
+
attr_accessor :recipient_status
|
58
|
+
|
59
|
+
#
|
60
|
+
attr_accessor :recipient_type
|
61
|
+
|
62
|
+
#
|
63
|
+
attr_accessor :row_state
|
64
|
+
|
65
|
+
#
|
66
|
+
attr_accessor :signature_base64
|
67
|
+
|
68
|
+
#
|
69
|
+
attr_accessor :signed
|
70
|
+
|
71
|
+
#
|
72
|
+
attr_accessor :signer_apply_tabs
|
73
|
+
|
74
|
+
#
|
75
|
+
attr_accessor :signer_attachment_base64
|
76
|
+
|
77
|
+
#
|
78
|
+
attr_accessor :user_name
|
79
|
+
|
80
|
+
|
81
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
82
|
+
def self.attribute_map
|
83
|
+
{
|
84
|
+
:'cfr_part11' => :'cfrPart11',
|
85
|
+
:'company' => :'company',
|
86
|
+
:'digital_signature_base64' => :'digitalSignatureBase64',
|
87
|
+
:'email' => :'email',
|
88
|
+
:'full_name' => :'fullName',
|
89
|
+
:'initials_base64' => :'initialsBase64',
|
90
|
+
:'in_person_email' => :'inPersonEmail',
|
91
|
+
:'is_notary' => :'isNotary',
|
92
|
+
:'notary_seal_base64' => :'notarySealBase64',
|
93
|
+
:'phone_number' => :'phoneNumber',
|
94
|
+
:'recipient_complete_count' => :'recipientCompleteCount',
|
95
|
+
:'recipient_guid_id' => :'recipientGuidId',
|
96
|
+
:'recipient_id' => :'recipientId',
|
97
|
+
:'recipient_status' => :'recipientStatus',
|
98
|
+
:'recipient_type' => :'recipientType',
|
99
|
+
:'row_state' => :'rowState',
|
100
|
+
:'signature_base64' => :'signatureBase64',
|
101
|
+
:'signed' => :'signed',
|
102
|
+
:'signer_apply_tabs' => :'signerApplyTabs',
|
103
|
+
:'signer_attachment_base64' => :'signerAttachmentBase64',
|
104
|
+
:'user_name' => :'userName'
|
105
|
+
}
|
106
|
+
end
|
107
|
+
|
108
|
+
# Attribute type mapping.
|
109
|
+
def self.swagger_types
|
110
|
+
{
|
111
|
+
:'cfr_part11' => :'BOOLEAN',
|
112
|
+
:'company' => :'String',
|
113
|
+
:'digital_signature_base64' => :'String',
|
114
|
+
:'email' => :'String',
|
115
|
+
:'full_name' => :'String',
|
116
|
+
:'initials_base64' => :'String',
|
117
|
+
:'in_person_email' => :'String',
|
118
|
+
:'is_notary' => :'BOOLEAN',
|
119
|
+
:'notary_seal_base64' => :'String',
|
120
|
+
:'phone_number' => :'String',
|
121
|
+
:'recipient_complete_count' => :'Integer',
|
122
|
+
:'recipient_guid_id' => :'String',
|
123
|
+
:'recipient_id' => :'String',
|
124
|
+
:'recipient_status' => :'String',
|
125
|
+
:'recipient_type' => :'String',
|
126
|
+
:'row_state' => :'String',
|
127
|
+
:'signature_base64' => :'String',
|
128
|
+
:'signed' => :'BOOLEAN',
|
129
|
+
:'signer_apply_tabs' => :'BOOLEAN',
|
130
|
+
:'signer_attachment_base64' => :'String',
|
131
|
+
:'user_name' => :'String'
|
132
|
+
}
|
133
|
+
end
|
134
|
+
|
135
|
+
# Initializes the object
|
136
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
137
|
+
def initialize(attributes = {})
|
138
|
+
return unless attributes.is_a?(Hash)
|
139
|
+
|
140
|
+
# convert string to symbol for hash key
|
141
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
142
|
+
|
143
|
+
if attributes.has_key?(:'cfrPart11')
|
144
|
+
self.cfr_part11 = attributes[:'cfrPart11']
|
145
|
+
end
|
146
|
+
|
147
|
+
if attributes.has_key?(:'company')
|
148
|
+
self.company = attributes[:'company']
|
149
|
+
end
|
150
|
+
|
151
|
+
if attributes.has_key?(:'digitalSignatureBase64')
|
152
|
+
self.digital_signature_base64 = attributes[:'digitalSignatureBase64']
|
153
|
+
end
|
154
|
+
|
155
|
+
if attributes.has_key?(:'email')
|
156
|
+
self.email = attributes[:'email']
|
157
|
+
end
|
158
|
+
|
159
|
+
if attributes.has_key?(:'fullName')
|
160
|
+
self.full_name = attributes[:'fullName']
|
161
|
+
end
|
162
|
+
|
163
|
+
if attributes.has_key?(:'initialsBase64')
|
164
|
+
self.initials_base64 = attributes[:'initialsBase64']
|
165
|
+
end
|
166
|
+
|
167
|
+
if attributes.has_key?(:'inPersonEmail')
|
168
|
+
self.in_person_email = attributes[:'inPersonEmail']
|
169
|
+
end
|
170
|
+
|
171
|
+
if attributes.has_key?(:'isNotary')
|
172
|
+
self.is_notary = attributes[:'isNotary']
|
173
|
+
end
|
174
|
+
|
175
|
+
if attributes.has_key?(:'notarySealBase64')
|
176
|
+
self.notary_seal_base64 = attributes[:'notarySealBase64']
|
177
|
+
end
|
178
|
+
|
179
|
+
if attributes.has_key?(:'phoneNumber')
|
180
|
+
self.phone_number = attributes[:'phoneNumber']
|
181
|
+
end
|
182
|
+
|
183
|
+
if attributes.has_key?(:'recipientCompleteCount')
|
184
|
+
self.recipient_complete_count = attributes[:'recipientCompleteCount']
|
185
|
+
end
|
186
|
+
|
187
|
+
if attributes.has_key?(:'recipientGuidId')
|
188
|
+
self.recipient_guid_id = attributes[:'recipientGuidId']
|
189
|
+
end
|
190
|
+
|
191
|
+
if attributes.has_key?(:'recipientId')
|
192
|
+
self.recipient_id = attributes[:'recipientId']
|
193
|
+
end
|
194
|
+
|
195
|
+
if attributes.has_key?(:'recipientStatus')
|
196
|
+
self.recipient_status = attributes[:'recipientStatus']
|
197
|
+
end
|
198
|
+
|
199
|
+
if attributes.has_key?(:'recipientType')
|
200
|
+
self.recipient_type = attributes[:'recipientType']
|
201
|
+
end
|
202
|
+
|
203
|
+
if attributes.has_key?(:'rowState')
|
204
|
+
self.row_state = attributes[:'rowState']
|
205
|
+
end
|
206
|
+
|
207
|
+
if attributes.has_key?(:'signatureBase64')
|
208
|
+
self.signature_base64 = attributes[:'signatureBase64']
|
209
|
+
end
|
210
|
+
|
211
|
+
if attributes.has_key?(:'signed')
|
212
|
+
self.signed = attributes[:'signed']
|
213
|
+
end
|
214
|
+
|
215
|
+
if attributes.has_key?(:'signerApplyTabs')
|
216
|
+
self.signer_apply_tabs = attributes[:'signerApplyTabs']
|
217
|
+
end
|
218
|
+
|
219
|
+
if attributes.has_key?(:'signerAttachmentBase64')
|
220
|
+
self.signer_attachment_base64 = attributes[:'signerAttachmentBase64']
|
221
|
+
end
|
222
|
+
|
223
|
+
if attributes.has_key?(:'userName')
|
224
|
+
self.user_name = attributes[:'userName']
|
225
|
+
end
|
226
|
+
|
227
|
+
end
|
228
|
+
|
229
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
230
|
+
# @return Array for valid properies with the reasons
|
231
|
+
def list_invalid_properties
|
232
|
+
invalid_properties = Array.new
|
233
|
+
return invalid_properties
|
234
|
+
end
|
235
|
+
|
236
|
+
# Check to see if the all the properties in the model are valid
|
237
|
+
# @return true if the model is valid
|
238
|
+
def valid?
|
239
|
+
return true
|
240
|
+
end
|
241
|
+
|
242
|
+
# Checks equality by comparing each attribute.
|
243
|
+
# @param [Object] Object to be compared
|
244
|
+
def ==(o)
|
245
|
+
return true if self.equal?(o)
|
246
|
+
self.class == o.class &&
|
247
|
+
cfr_part11 == o.cfr_part11 &&
|
248
|
+
company == o.company &&
|
249
|
+
digital_signature_base64 == o.digital_signature_base64 &&
|
250
|
+
email == o.email &&
|
251
|
+
full_name == o.full_name &&
|
252
|
+
initials_base64 == o.initials_base64 &&
|
253
|
+
in_person_email == o.in_person_email &&
|
254
|
+
is_notary == o.is_notary &&
|
255
|
+
notary_seal_base64 == o.notary_seal_base64 &&
|
256
|
+
phone_number == o.phone_number &&
|
257
|
+
recipient_complete_count == o.recipient_complete_count &&
|
258
|
+
recipient_guid_id == o.recipient_guid_id &&
|
259
|
+
recipient_id == o.recipient_id &&
|
260
|
+
recipient_status == o.recipient_status &&
|
261
|
+
recipient_type == o.recipient_type &&
|
262
|
+
row_state == o.row_state &&
|
263
|
+
signature_base64 == o.signature_base64 &&
|
264
|
+
signed == o.signed &&
|
265
|
+
signer_apply_tabs == o.signer_apply_tabs &&
|
266
|
+
signer_attachment_base64 == o.signer_attachment_base64 &&
|
267
|
+
user_name == o.user_name
|
268
|
+
end
|
269
|
+
|
270
|
+
# @see the `==` method
|
271
|
+
# @param [Object] Object to be compared
|
272
|
+
def eql?(o)
|
273
|
+
self == o
|
274
|
+
end
|
275
|
+
|
276
|
+
# Calculates hash code according to all attributes.
|
277
|
+
# @return [Fixnum] Hash code
|
278
|
+
def hash
|
279
|
+
[cfr_part11, company, digital_signature_base64, email, full_name, initials_base64, in_person_email, is_notary, notary_seal_base64, phone_number, recipient_complete_count, recipient_guid_id, recipient_id, recipient_status, recipient_type, row_state, signature_base64, signed, signer_apply_tabs, signer_attachment_base64, user_name].hash
|
280
|
+
end
|
281
|
+
|
282
|
+
# Builds the object from hash
|
283
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
284
|
+
# @return [Object] Returns the model itself
|
285
|
+
def build_from_hash(attributes)
|
286
|
+
return nil unless attributes.is_a?(Hash)
|
287
|
+
self.class.swagger_types.each_pair do |key, type|
|
288
|
+
if type =~ /\AArray<(.*)>/i
|
289
|
+
# check to ensure the input is an array given that the the attribute
|
290
|
+
# is documented as an array but the input is not
|
291
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
292
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
293
|
+
end
|
294
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
295
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
296
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
297
|
+
end
|
298
|
+
|
299
|
+
self
|
300
|
+
end
|
301
|
+
|
302
|
+
# Deserializes the data based on type
|
303
|
+
# @param string type Data type
|
304
|
+
# @param string value Value to be deserialized
|
305
|
+
# @return [Object] Deserialized data
|
306
|
+
def _deserialize(type, value)
|
307
|
+
case type.to_sym
|
308
|
+
when :DateTime
|
309
|
+
DateTime.parse(value)
|
310
|
+
when :Date
|
311
|
+
Date.parse(value)
|
312
|
+
when :String
|
313
|
+
value.to_s
|
314
|
+
when :Integer
|
315
|
+
value.to_i
|
316
|
+
when :Float
|
317
|
+
value.to_f
|
318
|
+
when :BOOLEAN
|
319
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
320
|
+
true
|
321
|
+
else
|
322
|
+
false
|
323
|
+
end
|
324
|
+
when :Object
|
325
|
+
# generic object (usually a Hash), return directly
|
326
|
+
value
|
327
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
328
|
+
inner_type = Regexp.last_match[:inner_type]
|
329
|
+
value.map { |v| _deserialize(inner_type, v) }
|
330
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
331
|
+
k_type = Regexp.last_match[:k_type]
|
332
|
+
v_type = Regexp.last_match[:v_type]
|
333
|
+
{}.tap do |hash|
|
334
|
+
value.each do |k, v|
|
335
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
336
|
+
end
|
337
|
+
end
|
338
|
+
else # model
|
339
|
+
temp_model = DocuSign_eSign.const_get(type).new
|
340
|
+
temp_model.build_from_hash(value)
|
341
|
+
end
|
342
|
+
end
|
343
|
+
|
344
|
+
# Returns the string representation of the object
|
345
|
+
# @return [String] String presentation of the object
|
346
|
+
def to_s
|
347
|
+
to_hash.to_s
|
348
|
+
end
|
349
|
+
|
350
|
+
# to_body is an alias to to_hash (backward compatibility)
|
351
|
+
# @return [Hash] Returns the object in the form of hash
|
352
|
+
def to_body
|
353
|
+
to_hash
|
354
|
+
end
|
355
|
+
|
356
|
+
# Returns the object in the form of hash
|
357
|
+
# @return [Hash] Returns the object in the form of hash
|
358
|
+
def to_hash
|
359
|
+
hash = {}
|
360
|
+
self.class.attribute_map.each_pair do |attr, param|
|
361
|
+
value = self.send(attr)
|
362
|
+
next if value.nil?
|
363
|
+
hash[param] = _to_hash(value)
|
364
|
+
end
|
365
|
+
hash
|
366
|
+
end
|
367
|
+
|
368
|
+
# Outputs non-array value in the form of hash
|
369
|
+
# For object, use to_hash. Otherwise, just return the value
|
370
|
+
# @param [Object] value Any valid value
|
371
|
+
# @return [Hash] Returns the value in the form of hash
|
372
|
+
def _to_hash(value)
|
373
|
+
if value.is_a?(Array)
|
374
|
+
value.compact.map{ |v| _to_hash(v) }
|
375
|
+
elsif value.is_a?(Hash)
|
376
|
+
{}.tap do |hash|
|
377
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
378
|
+
end
|
379
|
+
elsif value.respond_to? :to_hash
|
380
|
+
value.to_hash
|
381
|
+
else
|
382
|
+
value
|
383
|
+
end
|
384
|
+
end
|
385
|
+
|
386
|
+
end
|
387
|
+
|
388
|
+
end
|
@@ -0,0 +1,248 @@
|
|
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
|
+
|
16
|
+
class DisplayApplianceSignerAttachment
|
17
|
+
#
|
18
|
+
attr_accessor :attachment_description
|
19
|
+
|
20
|
+
#
|
21
|
+
attr_accessor :attachment_tab_id
|
22
|
+
|
23
|
+
# Specifies the document ID number that the tab is placed on. This must refer to an existing Document's ID attribute.
|
24
|
+
attr_accessor :document_id
|
25
|
+
|
26
|
+
# The envelope ID of the envelope status that failed to post.
|
27
|
+
attr_accessor :envelope_id
|
28
|
+
|
29
|
+
#
|
30
|
+
attr_accessor :page_count
|
31
|
+
|
32
|
+
#
|
33
|
+
attr_accessor :page_id
|
34
|
+
|
35
|
+
# Unique for the recipient. It is used by the tab element to indicate which recipient is to sign the Document.
|
36
|
+
attr_accessor :recipient_id
|
37
|
+
|
38
|
+
|
39
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
40
|
+
def self.attribute_map
|
41
|
+
{
|
42
|
+
:'attachment_description' => :'attachmentDescription',
|
43
|
+
:'attachment_tab_id' => :'attachmentTabId',
|
44
|
+
:'document_id' => :'documentId',
|
45
|
+
:'envelope_id' => :'envelopeId',
|
46
|
+
:'page_count' => :'pageCount',
|
47
|
+
:'page_id' => :'pageId',
|
48
|
+
:'recipient_id' => :'recipientId'
|
49
|
+
}
|
50
|
+
end
|
51
|
+
|
52
|
+
# Attribute type mapping.
|
53
|
+
def self.swagger_types
|
54
|
+
{
|
55
|
+
:'attachment_description' => :'String',
|
56
|
+
:'attachment_tab_id' => :'String',
|
57
|
+
:'document_id' => :'String',
|
58
|
+
:'envelope_id' => :'String',
|
59
|
+
:'page_count' => :'Integer',
|
60
|
+
:'page_id' => :'String',
|
61
|
+
:'recipient_id' => :'String'
|
62
|
+
}
|
63
|
+
end
|
64
|
+
|
65
|
+
# Initializes the object
|
66
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
67
|
+
def initialize(attributes = {})
|
68
|
+
return unless attributes.is_a?(Hash)
|
69
|
+
|
70
|
+
# convert string to symbol for hash key
|
71
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
72
|
+
|
73
|
+
if attributes.has_key?(:'attachmentDescription')
|
74
|
+
self.attachment_description = attributes[:'attachmentDescription']
|
75
|
+
end
|
76
|
+
|
77
|
+
if attributes.has_key?(:'attachmentTabId')
|
78
|
+
self.attachment_tab_id = attributes[:'attachmentTabId']
|
79
|
+
end
|
80
|
+
|
81
|
+
if attributes.has_key?(:'documentId')
|
82
|
+
self.document_id = attributes[:'documentId']
|
83
|
+
end
|
84
|
+
|
85
|
+
if attributes.has_key?(:'envelopeId')
|
86
|
+
self.envelope_id = attributes[:'envelopeId']
|
87
|
+
end
|
88
|
+
|
89
|
+
if attributes.has_key?(:'pageCount')
|
90
|
+
self.page_count = attributes[:'pageCount']
|
91
|
+
end
|
92
|
+
|
93
|
+
if attributes.has_key?(:'pageId')
|
94
|
+
self.page_id = attributes[:'pageId']
|
95
|
+
end
|
96
|
+
|
97
|
+
if attributes.has_key?(:'recipientId')
|
98
|
+
self.recipient_id = attributes[:'recipientId']
|
99
|
+
end
|
100
|
+
|
101
|
+
end
|
102
|
+
|
103
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
104
|
+
# @return Array for valid properies with the reasons
|
105
|
+
def list_invalid_properties
|
106
|
+
invalid_properties = Array.new
|
107
|
+
return invalid_properties
|
108
|
+
end
|
109
|
+
|
110
|
+
# Check to see if the all the properties in the model are valid
|
111
|
+
# @return true if the model is valid
|
112
|
+
def valid?
|
113
|
+
return true
|
114
|
+
end
|
115
|
+
|
116
|
+
# Checks equality by comparing each attribute.
|
117
|
+
# @param [Object] Object to be compared
|
118
|
+
def ==(o)
|
119
|
+
return true if self.equal?(o)
|
120
|
+
self.class == o.class &&
|
121
|
+
attachment_description == o.attachment_description &&
|
122
|
+
attachment_tab_id == o.attachment_tab_id &&
|
123
|
+
document_id == o.document_id &&
|
124
|
+
envelope_id == o.envelope_id &&
|
125
|
+
page_count == o.page_count &&
|
126
|
+
page_id == o.page_id &&
|
127
|
+
recipient_id == o.recipient_id
|
128
|
+
end
|
129
|
+
|
130
|
+
# @see the `==` method
|
131
|
+
# @param [Object] Object to be compared
|
132
|
+
def eql?(o)
|
133
|
+
self == o
|
134
|
+
end
|
135
|
+
|
136
|
+
# Calculates hash code according to all attributes.
|
137
|
+
# @return [Fixnum] Hash code
|
138
|
+
def hash
|
139
|
+
[attachment_description, attachment_tab_id, document_id, envelope_id, page_count, page_id, recipient_id].hash
|
140
|
+
end
|
141
|
+
|
142
|
+
# Builds the object from hash
|
143
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
144
|
+
# @return [Object] Returns the model itself
|
145
|
+
def build_from_hash(attributes)
|
146
|
+
return nil unless attributes.is_a?(Hash)
|
147
|
+
self.class.swagger_types.each_pair do |key, type|
|
148
|
+
if type =~ /\AArray<(.*)>/i
|
149
|
+
# check to ensure the input is an array given that the the attribute
|
150
|
+
# is documented as an array but the input is not
|
151
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
152
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
153
|
+
end
|
154
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
155
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
156
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
157
|
+
end
|
158
|
+
|
159
|
+
self
|
160
|
+
end
|
161
|
+
|
162
|
+
# Deserializes the data based on type
|
163
|
+
# @param string type Data type
|
164
|
+
# @param string value Value to be deserialized
|
165
|
+
# @return [Object] Deserialized data
|
166
|
+
def _deserialize(type, value)
|
167
|
+
case type.to_sym
|
168
|
+
when :DateTime
|
169
|
+
DateTime.parse(value)
|
170
|
+
when :Date
|
171
|
+
Date.parse(value)
|
172
|
+
when :String
|
173
|
+
value.to_s
|
174
|
+
when :Integer
|
175
|
+
value.to_i
|
176
|
+
when :Float
|
177
|
+
value.to_f
|
178
|
+
when :BOOLEAN
|
179
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
180
|
+
true
|
181
|
+
else
|
182
|
+
false
|
183
|
+
end
|
184
|
+
when :Object
|
185
|
+
# generic object (usually a Hash), return directly
|
186
|
+
value
|
187
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
188
|
+
inner_type = Regexp.last_match[:inner_type]
|
189
|
+
value.map { |v| _deserialize(inner_type, v) }
|
190
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
191
|
+
k_type = Regexp.last_match[:k_type]
|
192
|
+
v_type = Regexp.last_match[:v_type]
|
193
|
+
{}.tap do |hash|
|
194
|
+
value.each do |k, v|
|
195
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
196
|
+
end
|
197
|
+
end
|
198
|
+
else # model
|
199
|
+
temp_model = DocuSign_eSign.const_get(type).new
|
200
|
+
temp_model.build_from_hash(value)
|
201
|
+
end
|
202
|
+
end
|
203
|
+
|
204
|
+
# Returns the string representation of the object
|
205
|
+
# @return [String] String presentation of the object
|
206
|
+
def to_s
|
207
|
+
to_hash.to_s
|
208
|
+
end
|
209
|
+
|
210
|
+
# to_body is an alias to to_hash (backward compatibility)
|
211
|
+
# @return [Hash] Returns the object in the form of hash
|
212
|
+
def to_body
|
213
|
+
to_hash
|
214
|
+
end
|
215
|
+
|
216
|
+
# Returns the object in the form of hash
|
217
|
+
# @return [Hash] Returns the object in the form of hash
|
218
|
+
def to_hash
|
219
|
+
hash = {}
|
220
|
+
self.class.attribute_map.each_pair do |attr, param|
|
221
|
+
value = self.send(attr)
|
222
|
+
next if value.nil?
|
223
|
+
hash[param] = _to_hash(value)
|
224
|
+
end
|
225
|
+
hash
|
226
|
+
end
|
227
|
+
|
228
|
+
# Outputs non-array value in the form of hash
|
229
|
+
# For object, use to_hash. Otherwise, just return the value
|
230
|
+
# @param [Object] value Any valid value
|
231
|
+
# @return [Hash] Returns the value in the form of hash
|
232
|
+
def _to_hash(value)
|
233
|
+
if value.is_a?(Array)
|
234
|
+
value.compact.map{ |v| _to_hash(v) }
|
235
|
+
elsif value.is_a?(Hash)
|
236
|
+
{}.tap do |hash|
|
237
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
238
|
+
end
|
239
|
+
elsif value.respond_to? :to_hash
|
240
|
+
value.to_hash
|
241
|
+
else
|
242
|
+
value
|
243
|
+
end
|
244
|
+
end
|
245
|
+
|
246
|
+
end
|
247
|
+
|
248
|
+
end
|