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.
Files changed (94) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +1 -1
  3. data/docusign_esign-3.1.0.pre.rc1.gem +0 -0
  4. data/lib/docusign_esign.rb +450 -383
  5. data/{tests → lib/docusign_esign/api}/.DS_Store +0 -0
  6. data/lib/docusign_esign/api/accounts_api.rb +69 -8
  7. data/lib/docusign_esign/api/connect_api.rb +400 -0
  8. data/lib/docusign_esign/api/envelopes_api.rb +18 -6
  9. data/lib/docusign_esign/api/organizations_api.rb +232 -0
  10. data/lib/docusign_esign/api/tsps_api.rb +256 -0
  11. data/lib/docusign_esign/models/access_code_format.rb +273 -0
  12. data/lib/docusign_esign/models/account_notification.rb +206 -0
  13. data/lib/docusign_esign/models/account_ui_settings.rb +330 -0
  14. data/lib/docusign_esign/models/bcc_email_archive.rb +276 -0
  15. data/lib/docusign_esign/models/bcc_email_archive_history.rb +237 -0
  16. data/lib/docusign_esign/models/bcc_email_archive_history_list.rb +250 -0
  17. data/lib/docusign_esign/models/bcc_email_archive_list.rb +250 -0
  18. data/lib/docusign_esign/models/bulk_send_request.rb +188 -0
  19. data/lib/docusign_esign/models/bulk_send_response.rb +222 -0
  20. data/lib/docusign_esign/models/bulk_send_test_response.rb +212 -0
  21. data/lib/docusign_esign/models/bulk_sending_copy.rb +222 -0
  22. data/lib/docusign_esign/models/bulk_sending_copy_custom_field.rb +198 -0
  23. data/lib/docusign_esign/models/bulk_sending_copy_recipient.rb +382 -0
  24. data/lib/docusign_esign/models/bulk_sending_copy_tab.rb +198 -0
  25. data/lib/docusign_esign/models/bulk_sending_list.rb +210 -0
  26. data/lib/docusign_esign/models/bulk_sending_list_summaries.rb +190 -0
  27. data/lib/docusign_esign/models/bulk_sending_list_summary.rb +218 -0
  28. data/lib/docusign_esign/models/carbon_copy.rb +19 -1
  29. data/lib/docusign_esign/models/certified_delivery.rb +19 -1
  30. data/lib/docusign_esign/models/comment.rb +392 -0
  31. data/lib/docusign_esign/models/comment_history_result.rb +220 -0
  32. data/lib/docusign_esign/models/comment_publish.rb +244 -0
  33. data/lib/docusign_esign/models/comment_thread.rb +961 -0
  34. data/lib/docusign_esign/models/comments_publish.rb +190 -0
  35. data/lib/docusign_esign/models/connect_salesforce_field.rb +258 -0
  36. data/lib/docusign_esign/models/connect_salesforce_object.rb +272 -0
  37. data/lib/docusign_esign/models/connect_user_object.rb +230 -0
  38. data/lib/docusign_esign/models/direct_debit_processor_information.rb +298 -0
  39. data/lib/docusign_esign/models/display_appliance_document.rb +258 -0
  40. data/lib/docusign_esign/models/display_appliance_document_page.rb +278 -0
  41. data/lib/docusign_esign/models/display_appliance_envelope.rb +328 -0
  42. data/lib/docusign_esign/models/display_appliance_info.rb +235 -0
  43. data/lib/docusign_esign/models/display_appliance_page.rb +278 -0
  44. data/lib/docusign_esign/models/display_appliance_pdf.rb +267 -0
  45. data/lib/docusign_esign/models/display_appliance_recipient.rb +388 -0
  46. data/lib/docusign_esign/models/display_appliance_signer_attachment.rb +248 -0
  47. data/lib/docusign_esign/models/document_fields_information.rb +1 -1
  48. data/lib/docusign_esign/models/document_html_display_settings.rb +11 -1
  49. data/lib/docusign_esign/models/envelope_document.rb +11 -1
  50. data/lib/docusign_esign/models/envelope_metadata.rb +208 -0
  51. data/lib/docusign_esign/models/envelope_purge_configuration.rb +218 -0
  52. data/lib/docusign_esign/models/envelope_transfer_rule.rb +273 -0
  53. data/lib/docusign_esign/models/envelope_transfer_rule_information.rb +250 -0
  54. data/lib/docusign_esign/models/envelope_transfer_rule_request.rb +279 -0
  55. data/lib/docusign_esign/models/external_claim.rb +218 -0
  56. data/lib/docusign_esign/models/external_document_sources.rb +273 -0
  57. data/lib/docusign_esign/models/favorite_templates_content_item.rb +207 -0
  58. data/lib/docusign_esign/models/favorite_templates_info.rb +209 -0
  59. data/lib/docusign_esign/models/feature_available_metadata.rb +198 -0
  60. data/lib/docusign_esign/models/folder_shared_item.rb +289 -0
  61. data/lib/docusign_esign/models/form_data_item.rb +227 -0
  62. data/lib/docusign_esign/models/graphics_context.rb +208 -0
  63. data/lib/docusign_esign/models/id_check_configuration.rb +210 -0
  64. data/lib/docusign_esign/models/id_check_security_step.rb +188 -0
  65. data/lib/docusign_esign/models/locale_policy.rb +595 -0
  66. data/lib/docusign_esign/models/locale_policy_tab.rb +298 -0
  67. data/lib/docusign_esign/models/new_account_definition.rb +11 -1
  68. data/lib/docusign_esign/models/notification_default_settings.rb +196 -0
  69. data/lib/docusign_esign/models/notification_defaults.rb +196 -0
  70. data/lib/docusign_esign/models/offline_attributes.rb +238 -0
  71. data/lib/docusign_esign/models/page_size.rb +198 -0
  72. data/lib/docusign_esign/models/path_extended_element.rb +208 -0
  73. data/lib/docusign_esign/models/pay_pal_legacy_settings.rb +228 -0
  74. data/lib/docusign_esign/models/payment_gateway_account_setting.rb +218 -0
  75. data/lib/docusign_esign/models/payment_method_with_options.rb +200 -0
  76. data/lib/docusign_esign/models/poly_line.rb +218 -0
  77. data/lib/docusign_esign/models/poly_line_overlay.rb +885 -0
  78. data/lib/docusign_esign/models/recipient_email_notification.rb +1 -1
  79. data/lib/docusign_esign/models/recipient_preview_request.rb +278 -0
  80. data/lib/docusign_esign/models/recipient_proof_file.rb +188 -0
  81. data/lib/docusign_esign/models/signature_properties.rb +198 -0
  82. data/lib/docusign_esign/models/signer.rb +11 -2
  83. data/lib/docusign_esign/models/smart_section_display_settings.rb +11 -1
  84. data/lib/docusign_esign/models/tab_group.rb +911 -0
  85. data/lib/docusign_esign/models/usage_history.rb +1 -1
  86. data/lib/docusign_esign/models/user_information.rb +1 -1
  87. data/lib/docusign_esign/models/witness.rb +10 -1
  88. data/lib/docusign_esign/models/workspace_settings.rb +188 -0
  89. data/lib/docusign_esign/version.rb +1 -1
  90. data/tests/Gemfile.lock +1 -1
  91. data/tests/spec/unit_tests_using_jwt_spec.rb +6 -3
  92. metadata +74 -7
  93. data/Gemfile.lock +0 -73
  94. data/lib/docusign_esign/api/trust_service_providers_api.rb +0 -73
@@ -0,0 +1,330 @@
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 AccountUISettings
17
+ #
18
+ attr_accessor :enable_easy_sign_can_use_multi_template_apply
19
+
20
+ attr_accessor :enable_easy_sign_can_use_multi_template_apply_metadata
21
+
22
+ #
23
+ attr_accessor :enable_easy_sign_template_upload
24
+
25
+ attr_accessor :enable_easy_sign_template_upload_metadata
26
+
27
+ #
28
+ attr_accessor :hide_send_an_envelope
29
+
30
+ attr_accessor :hide_send_an_envelope_metadata
31
+
32
+ #
33
+ attr_accessor :hide_use_a_template
34
+
35
+ #
36
+ attr_accessor :hide_use_a_template_in_prepare
37
+
38
+ attr_accessor :hide_use_a_template_in_prepare_metadata
39
+
40
+ attr_accessor :hide_use_a_template_metadata
41
+
42
+ #
43
+ attr_accessor :order_based_recipient_id_generation
44
+
45
+ attr_accessor :order_based_recipient_id_generation_metadata
46
+
47
+ #
48
+ attr_accessor :remove_envelope_forwarding
49
+
50
+ attr_accessor :remove_envelope_forwarding_metadata
51
+
52
+ #
53
+ attr_accessor :should_redact_access_code
54
+
55
+ attr_accessor :should_redact_access_code_metadata
56
+
57
+
58
+ # Attribute mapping from ruby-style variable name to JSON key.
59
+ def self.attribute_map
60
+ {
61
+ :'enable_easy_sign_can_use_multi_template_apply' => :'enableEasySignCanUseMultiTemplateApply',
62
+ :'enable_easy_sign_can_use_multi_template_apply_metadata' => :'enableEasySignCanUseMultiTemplateApplyMetadata',
63
+ :'enable_easy_sign_template_upload' => :'enableEasySignTemplateUpload',
64
+ :'enable_easy_sign_template_upload_metadata' => :'enableEasySignTemplateUploadMetadata',
65
+ :'hide_send_an_envelope' => :'hideSendAnEnvelope',
66
+ :'hide_send_an_envelope_metadata' => :'hideSendAnEnvelopeMetadata',
67
+ :'hide_use_a_template' => :'hideUseATemplate',
68
+ :'hide_use_a_template_in_prepare' => :'hideUseATemplateInPrepare',
69
+ :'hide_use_a_template_in_prepare_metadata' => :'hideUseATemplateInPrepareMetadata',
70
+ :'hide_use_a_template_metadata' => :'hideUseATemplateMetadata',
71
+ :'order_based_recipient_id_generation' => :'orderBasedRecipientIdGeneration',
72
+ :'order_based_recipient_id_generation_metadata' => :'orderBasedRecipientIdGenerationMetadata',
73
+ :'remove_envelope_forwarding' => :'removeEnvelopeForwarding',
74
+ :'remove_envelope_forwarding_metadata' => :'removeEnvelopeForwardingMetadata',
75
+ :'should_redact_access_code' => :'shouldRedactAccessCode',
76
+ :'should_redact_access_code_metadata' => :'shouldRedactAccessCodeMetadata'
77
+ }
78
+ end
79
+
80
+ # Attribute type mapping.
81
+ def self.swagger_types
82
+ {
83
+ :'enable_easy_sign_can_use_multi_template_apply' => :'String',
84
+ :'enable_easy_sign_can_use_multi_template_apply_metadata' => :'SettingsMetadata',
85
+ :'enable_easy_sign_template_upload' => :'String',
86
+ :'enable_easy_sign_template_upload_metadata' => :'SettingsMetadata',
87
+ :'hide_send_an_envelope' => :'String',
88
+ :'hide_send_an_envelope_metadata' => :'SettingsMetadata',
89
+ :'hide_use_a_template' => :'String',
90
+ :'hide_use_a_template_in_prepare' => :'String',
91
+ :'hide_use_a_template_in_prepare_metadata' => :'SettingsMetadata',
92
+ :'hide_use_a_template_metadata' => :'SettingsMetadata',
93
+ :'order_based_recipient_id_generation' => :'String',
94
+ :'order_based_recipient_id_generation_metadata' => :'SettingsMetadata',
95
+ :'remove_envelope_forwarding' => :'String',
96
+ :'remove_envelope_forwarding_metadata' => :'SettingsMetadata',
97
+ :'should_redact_access_code' => :'String',
98
+ :'should_redact_access_code_metadata' => :'SettingsMetadata'
99
+ }
100
+ end
101
+
102
+ # Initializes the object
103
+ # @param [Hash] attributes Model attributes in the form of hash
104
+ def initialize(attributes = {})
105
+ return unless attributes.is_a?(Hash)
106
+
107
+ # convert string to symbol for hash key
108
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
109
+
110
+ if attributes.has_key?(:'enableEasySignCanUseMultiTemplateApply')
111
+ self.enable_easy_sign_can_use_multi_template_apply = attributes[:'enableEasySignCanUseMultiTemplateApply']
112
+ end
113
+
114
+ if attributes.has_key?(:'enableEasySignCanUseMultiTemplateApplyMetadata')
115
+ self.enable_easy_sign_can_use_multi_template_apply_metadata = attributes[:'enableEasySignCanUseMultiTemplateApplyMetadata']
116
+ end
117
+
118
+ if attributes.has_key?(:'enableEasySignTemplateUpload')
119
+ self.enable_easy_sign_template_upload = attributes[:'enableEasySignTemplateUpload']
120
+ end
121
+
122
+ if attributes.has_key?(:'enableEasySignTemplateUploadMetadata')
123
+ self.enable_easy_sign_template_upload_metadata = attributes[:'enableEasySignTemplateUploadMetadata']
124
+ end
125
+
126
+ if attributes.has_key?(:'hideSendAnEnvelope')
127
+ self.hide_send_an_envelope = attributes[:'hideSendAnEnvelope']
128
+ end
129
+
130
+ if attributes.has_key?(:'hideSendAnEnvelopeMetadata')
131
+ self.hide_send_an_envelope_metadata = attributes[:'hideSendAnEnvelopeMetadata']
132
+ end
133
+
134
+ if attributes.has_key?(:'hideUseATemplate')
135
+ self.hide_use_a_template = attributes[:'hideUseATemplate']
136
+ end
137
+
138
+ if attributes.has_key?(:'hideUseATemplateInPrepare')
139
+ self.hide_use_a_template_in_prepare = attributes[:'hideUseATemplateInPrepare']
140
+ end
141
+
142
+ if attributes.has_key?(:'hideUseATemplateInPrepareMetadata')
143
+ self.hide_use_a_template_in_prepare_metadata = attributes[:'hideUseATemplateInPrepareMetadata']
144
+ end
145
+
146
+ if attributes.has_key?(:'hideUseATemplateMetadata')
147
+ self.hide_use_a_template_metadata = attributes[:'hideUseATemplateMetadata']
148
+ end
149
+
150
+ if attributes.has_key?(:'orderBasedRecipientIdGeneration')
151
+ self.order_based_recipient_id_generation = attributes[:'orderBasedRecipientIdGeneration']
152
+ end
153
+
154
+ if attributes.has_key?(:'orderBasedRecipientIdGenerationMetadata')
155
+ self.order_based_recipient_id_generation_metadata = attributes[:'orderBasedRecipientIdGenerationMetadata']
156
+ end
157
+
158
+ if attributes.has_key?(:'removeEnvelopeForwarding')
159
+ self.remove_envelope_forwarding = attributes[:'removeEnvelopeForwarding']
160
+ end
161
+
162
+ if attributes.has_key?(:'removeEnvelopeForwardingMetadata')
163
+ self.remove_envelope_forwarding_metadata = attributes[:'removeEnvelopeForwardingMetadata']
164
+ end
165
+
166
+ if attributes.has_key?(:'shouldRedactAccessCode')
167
+ self.should_redact_access_code = attributes[:'shouldRedactAccessCode']
168
+ end
169
+
170
+ if attributes.has_key?(:'shouldRedactAccessCodeMetadata')
171
+ self.should_redact_access_code_metadata = attributes[:'shouldRedactAccessCodeMetadata']
172
+ end
173
+
174
+ end
175
+
176
+ # Show invalid properties with the reasons. Usually used together with valid?
177
+ # @return Array for valid properies with the reasons
178
+ def list_invalid_properties
179
+ invalid_properties = Array.new
180
+ return invalid_properties
181
+ end
182
+
183
+ # Check to see if the all the properties in the model are valid
184
+ # @return true if the model is valid
185
+ def valid?
186
+ return true
187
+ end
188
+
189
+ # Checks equality by comparing each attribute.
190
+ # @param [Object] Object to be compared
191
+ def ==(o)
192
+ return true if self.equal?(o)
193
+ self.class == o.class &&
194
+ enable_easy_sign_can_use_multi_template_apply == o.enable_easy_sign_can_use_multi_template_apply &&
195
+ enable_easy_sign_can_use_multi_template_apply_metadata == o.enable_easy_sign_can_use_multi_template_apply_metadata &&
196
+ enable_easy_sign_template_upload == o.enable_easy_sign_template_upload &&
197
+ enable_easy_sign_template_upload_metadata == o.enable_easy_sign_template_upload_metadata &&
198
+ hide_send_an_envelope == o.hide_send_an_envelope &&
199
+ hide_send_an_envelope_metadata == o.hide_send_an_envelope_metadata &&
200
+ hide_use_a_template == o.hide_use_a_template &&
201
+ hide_use_a_template_in_prepare == o.hide_use_a_template_in_prepare &&
202
+ hide_use_a_template_in_prepare_metadata == o.hide_use_a_template_in_prepare_metadata &&
203
+ hide_use_a_template_metadata == o.hide_use_a_template_metadata &&
204
+ order_based_recipient_id_generation == o.order_based_recipient_id_generation &&
205
+ order_based_recipient_id_generation_metadata == o.order_based_recipient_id_generation_metadata &&
206
+ remove_envelope_forwarding == o.remove_envelope_forwarding &&
207
+ remove_envelope_forwarding_metadata == o.remove_envelope_forwarding_metadata &&
208
+ should_redact_access_code == o.should_redact_access_code &&
209
+ should_redact_access_code_metadata == o.should_redact_access_code_metadata
210
+ end
211
+
212
+ # @see the `==` method
213
+ # @param [Object] Object to be compared
214
+ def eql?(o)
215
+ self == o
216
+ end
217
+
218
+ # Calculates hash code according to all attributes.
219
+ # @return [Fixnum] Hash code
220
+ def hash
221
+ [enable_easy_sign_can_use_multi_template_apply, enable_easy_sign_can_use_multi_template_apply_metadata, enable_easy_sign_template_upload, enable_easy_sign_template_upload_metadata, hide_send_an_envelope, hide_send_an_envelope_metadata, hide_use_a_template, hide_use_a_template_in_prepare, hide_use_a_template_in_prepare_metadata, hide_use_a_template_metadata, order_based_recipient_id_generation, order_based_recipient_id_generation_metadata, remove_envelope_forwarding, remove_envelope_forwarding_metadata, should_redact_access_code, should_redact_access_code_metadata].hash
222
+ end
223
+
224
+ # Builds the object from hash
225
+ # @param [Hash] attributes Model attributes in the form of hash
226
+ # @return [Object] Returns the model itself
227
+ def build_from_hash(attributes)
228
+ return nil unless attributes.is_a?(Hash)
229
+ self.class.swagger_types.each_pair do |key, type|
230
+ if type =~ /\AArray<(.*)>/i
231
+ # check to ensure the input is an array given that the the attribute
232
+ # is documented as an array but the input is not
233
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
234
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
235
+ end
236
+ elsif !attributes[self.class.attribute_map[key]].nil?
237
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
238
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
239
+ end
240
+
241
+ self
242
+ end
243
+
244
+ # Deserializes the data based on type
245
+ # @param string type Data type
246
+ # @param string value Value to be deserialized
247
+ # @return [Object] Deserialized data
248
+ def _deserialize(type, value)
249
+ case type.to_sym
250
+ when :DateTime
251
+ DateTime.parse(value)
252
+ when :Date
253
+ Date.parse(value)
254
+ when :String
255
+ value.to_s
256
+ when :Integer
257
+ value.to_i
258
+ when :Float
259
+ value.to_f
260
+ when :BOOLEAN
261
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
262
+ true
263
+ else
264
+ false
265
+ end
266
+ when :Object
267
+ # generic object (usually a Hash), return directly
268
+ value
269
+ when /\AArray<(?<inner_type>.+)>\z/
270
+ inner_type = Regexp.last_match[:inner_type]
271
+ value.map { |v| _deserialize(inner_type, v) }
272
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
273
+ k_type = Regexp.last_match[:k_type]
274
+ v_type = Regexp.last_match[:v_type]
275
+ {}.tap do |hash|
276
+ value.each do |k, v|
277
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
278
+ end
279
+ end
280
+ else # model
281
+ temp_model = DocuSign_eSign.const_get(type).new
282
+ temp_model.build_from_hash(value)
283
+ end
284
+ end
285
+
286
+ # Returns the string representation of the object
287
+ # @return [String] String presentation of the object
288
+ def to_s
289
+ to_hash.to_s
290
+ end
291
+
292
+ # to_body is an alias to to_hash (backward compatibility)
293
+ # @return [Hash] Returns the object in the form of hash
294
+ def to_body
295
+ to_hash
296
+ end
297
+
298
+ # Returns the object in the form of hash
299
+ # @return [Hash] Returns the object in the form of hash
300
+ def to_hash
301
+ hash = {}
302
+ self.class.attribute_map.each_pair do |attr, param|
303
+ value = self.send(attr)
304
+ next if value.nil?
305
+ hash[param] = _to_hash(value)
306
+ end
307
+ hash
308
+ end
309
+
310
+ # Outputs non-array value in the form of hash
311
+ # For object, use to_hash. Otherwise, just return the value
312
+ # @param [Object] value Any valid value
313
+ # @return [Hash] Returns the value in the form of hash
314
+ def _to_hash(value)
315
+ if value.is_a?(Array)
316
+ value.compact.map{ |v| _to_hash(v) }
317
+ elsif value.is_a?(Hash)
318
+ {}.tap do |hash|
319
+ value.each { |k, v| hash[k] = _to_hash(v) }
320
+ end
321
+ elsif value.respond_to? :to_hash
322
+ value.to_hash
323
+ else
324
+ value
325
+ end
326
+ end
327
+
328
+ end
329
+
330
+ end
@@ -0,0 +1,276 @@
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 BccEmailArchive
17
+ # The account ID associated with the envelope.
18
+ attr_accessor :account_id
19
+
20
+ #
21
+ attr_accessor :bcc_email_archive_id
22
+
23
+ #
24
+ attr_accessor :created
25
+
26
+ attr_accessor :created_by
27
+
28
+ #
29
+ attr_accessor :email
30
+
31
+ #
32
+ attr_accessor :email_notification_id
33
+
34
+ #
35
+ attr_accessor :modified
36
+
37
+ attr_accessor :modified_by
38
+
39
+ # Indicates the envelope status. Valid values are: * sent - The envelope is sent to the recipients. * created - The envelope is saved as a draft and can be modified and sent later.
40
+ attr_accessor :status
41
+
42
+ #
43
+ attr_accessor :uri
44
+
45
+
46
+ # Attribute mapping from ruby-style variable name to JSON key.
47
+ def self.attribute_map
48
+ {
49
+ :'account_id' => :'accountId',
50
+ :'bcc_email_archive_id' => :'bccEmailArchiveId',
51
+ :'created' => :'created',
52
+ :'created_by' => :'createdBy',
53
+ :'email' => :'email',
54
+ :'email_notification_id' => :'emailNotificationId',
55
+ :'modified' => :'modified',
56
+ :'modified_by' => :'modifiedBy',
57
+ :'status' => :'status',
58
+ :'uri' => :'uri'
59
+ }
60
+ end
61
+
62
+ # Attribute type mapping.
63
+ def self.swagger_types
64
+ {
65
+ :'account_id' => :'String',
66
+ :'bcc_email_archive_id' => :'String',
67
+ :'created' => :'String',
68
+ :'created_by' => :'UserInfo',
69
+ :'email' => :'String',
70
+ :'email_notification_id' => :'String',
71
+ :'modified' => :'String',
72
+ :'modified_by' => :'UserInfo',
73
+ :'status' => :'String',
74
+ :'uri' => :'String'
75
+ }
76
+ end
77
+
78
+ # Initializes the object
79
+ # @param [Hash] attributes Model attributes in the form of hash
80
+ def initialize(attributes = {})
81
+ return unless attributes.is_a?(Hash)
82
+
83
+ # convert string to symbol for hash key
84
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
85
+
86
+ if attributes.has_key?(:'accountId')
87
+ self.account_id = attributes[:'accountId']
88
+ end
89
+
90
+ if attributes.has_key?(:'bccEmailArchiveId')
91
+ self.bcc_email_archive_id = attributes[:'bccEmailArchiveId']
92
+ end
93
+
94
+ if attributes.has_key?(:'created')
95
+ self.created = attributes[:'created']
96
+ end
97
+
98
+ if attributes.has_key?(:'createdBy')
99
+ self.created_by = attributes[:'createdBy']
100
+ end
101
+
102
+ if attributes.has_key?(:'email')
103
+ self.email = attributes[:'email']
104
+ end
105
+
106
+ if attributes.has_key?(:'emailNotificationId')
107
+ self.email_notification_id = attributes[:'emailNotificationId']
108
+ end
109
+
110
+ if attributes.has_key?(:'modified')
111
+ self.modified = attributes[:'modified']
112
+ end
113
+
114
+ if attributes.has_key?(:'modifiedBy')
115
+ self.modified_by = attributes[:'modifiedBy']
116
+ end
117
+
118
+ if attributes.has_key?(:'status')
119
+ self.status = attributes[:'status']
120
+ end
121
+
122
+ if attributes.has_key?(:'uri')
123
+ self.uri = attributes[:'uri']
124
+ end
125
+
126
+ end
127
+
128
+ # Show invalid properties with the reasons. Usually used together with valid?
129
+ # @return Array for valid properies with the reasons
130
+ def list_invalid_properties
131
+ invalid_properties = Array.new
132
+ return invalid_properties
133
+ end
134
+
135
+ # Check to see if the all the properties in the model are valid
136
+ # @return true if the model is valid
137
+ def valid?
138
+ return true
139
+ end
140
+
141
+ # Checks equality by comparing each attribute.
142
+ # @param [Object] Object to be compared
143
+ def ==(o)
144
+ return true if self.equal?(o)
145
+ self.class == o.class &&
146
+ account_id == o.account_id &&
147
+ bcc_email_archive_id == o.bcc_email_archive_id &&
148
+ created == o.created &&
149
+ created_by == o.created_by &&
150
+ email == o.email &&
151
+ email_notification_id == o.email_notification_id &&
152
+ modified == o.modified &&
153
+ modified_by == o.modified_by &&
154
+ status == o.status &&
155
+ uri == o.uri
156
+ end
157
+
158
+ # @see the `==` method
159
+ # @param [Object] Object to be compared
160
+ def eql?(o)
161
+ self == o
162
+ end
163
+
164
+ # Calculates hash code according to all attributes.
165
+ # @return [Fixnum] Hash code
166
+ def hash
167
+ [account_id, bcc_email_archive_id, created, created_by, email, email_notification_id, modified, modified_by, status, uri].hash
168
+ end
169
+
170
+ # Builds the object from hash
171
+ # @param [Hash] attributes Model attributes in the form of hash
172
+ # @return [Object] Returns the model itself
173
+ def build_from_hash(attributes)
174
+ return nil unless attributes.is_a?(Hash)
175
+ self.class.swagger_types.each_pair do |key, type|
176
+ if type =~ /\AArray<(.*)>/i
177
+ # check to ensure the input is an array given that the the attribute
178
+ # is documented as an array but the input is not
179
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
180
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
181
+ end
182
+ elsif !attributes[self.class.attribute_map[key]].nil?
183
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
184
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
185
+ end
186
+
187
+ self
188
+ end
189
+
190
+ # Deserializes the data based on type
191
+ # @param string type Data type
192
+ # @param string value Value to be deserialized
193
+ # @return [Object] Deserialized data
194
+ def _deserialize(type, value)
195
+ case type.to_sym
196
+ when :DateTime
197
+ DateTime.parse(value)
198
+ when :Date
199
+ Date.parse(value)
200
+ when :String
201
+ value.to_s
202
+ when :Integer
203
+ value.to_i
204
+ when :Float
205
+ value.to_f
206
+ when :BOOLEAN
207
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
208
+ true
209
+ else
210
+ false
211
+ end
212
+ when :Object
213
+ # generic object (usually a Hash), return directly
214
+ value
215
+ when /\AArray<(?<inner_type>.+)>\z/
216
+ inner_type = Regexp.last_match[:inner_type]
217
+ value.map { |v| _deserialize(inner_type, v) }
218
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
219
+ k_type = Regexp.last_match[:k_type]
220
+ v_type = Regexp.last_match[:v_type]
221
+ {}.tap do |hash|
222
+ value.each do |k, v|
223
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
224
+ end
225
+ end
226
+ else # model
227
+ temp_model = DocuSign_eSign.const_get(type).new
228
+ temp_model.build_from_hash(value)
229
+ end
230
+ end
231
+
232
+ # Returns the string representation of the object
233
+ # @return [String] String presentation of the object
234
+ def to_s
235
+ to_hash.to_s
236
+ end
237
+
238
+ # to_body is an alias to to_hash (backward compatibility)
239
+ # @return [Hash] Returns the object in the form of hash
240
+ def to_body
241
+ to_hash
242
+ end
243
+
244
+ # Returns the object in the form of hash
245
+ # @return [Hash] Returns the object in the form of hash
246
+ def to_hash
247
+ hash = {}
248
+ self.class.attribute_map.each_pair do |attr, param|
249
+ value = self.send(attr)
250
+ next if value.nil?
251
+ hash[param] = _to_hash(value)
252
+ end
253
+ hash
254
+ end
255
+
256
+ # Outputs non-array value in the form of hash
257
+ # For object, use to_hash. Otherwise, just return the value
258
+ # @param [Object] value Any valid value
259
+ # @return [Hash] Returns the value in the form of hash
260
+ def _to_hash(value)
261
+ if value.is_a?(Array)
262
+ value.compact.map{ |v| _to_hash(v) }
263
+ elsif value.is_a?(Hash)
264
+ {}.tap do |hash|
265
+ value.each { |k, v| hash[k] = _to_hash(v) }
266
+ end
267
+ elsif value.respond_to? :to_hash
268
+ value.to_hash
269
+ else
270
+ value
271
+ end
272
+ end
273
+
274
+ end
275
+
276
+ end