DealMakerAPI 0.83.0 → 0.83.1

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.
Files changed (70) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +4 -4
  3. data/lib/DealMakerAPI/models/add506c_document_request.rb +14 -17
  4. data/lib/DealMakerAPI/models/add_document_request.rb +14 -17
  5. data/lib/DealMakerAPI/models/create_bulk_upload_detail_request.rb +16 -17
  6. data/lib/DealMakerAPI/models/create_bulk_upload_request.rb +16 -17
  7. data/lib/DealMakerAPI/models/create_company_request.rb +24 -17
  8. data/lib/DealMakerAPI/models/create_corporation_profile_request.rb +14 -17
  9. data/lib/DealMakerAPI/models/create_deal_setup_request.rb +18 -17
  10. data/lib/DealMakerAPI/models/create_individual_profile_request.rb +14 -17
  11. data/lib/DealMakerAPI/models/create_investor_request.rb +14 -17
  12. data/lib/DealMakerAPI/models/create_joint_profile_request.rb +14 -17
  13. data/lib/DealMakerAPI/models/create_trust_profile_request.rb +14 -17
  14. data/lib/DealMakerAPI/models/edit_investor_tags_request.rb +14 -17
  15. data/lib/DealMakerAPI/models/generate_url_request.rb +14 -17
  16. data/lib/DealMakerAPI/models/patch_corporation_profile_request.rb +12 -17
  17. data/lib/DealMakerAPI/models/patch_individual_profile_request.rb +12 -17
  18. data/lib/DealMakerAPI/models/patch_investor_request.rb +14 -17
  19. data/lib/DealMakerAPI/models/patch_joint_profile_request.rb +12 -17
  20. data/lib/DealMakerAPI/models/patch_trust_profile_request.rb +12 -17
  21. data/lib/DealMakerAPI/models/post_webhooks_request.rb +18 -17
  22. data/lib/DealMakerAPI/models/put_webhooks_id_request.rb +12 -17
  23. data/lib/DealMakerAPI/models/update_investor_request.rb +12 -17
  24. data/lib/DealMakerAPI/models/v1_entities_address.rb +12 -17
  25. data/lib/DealMakerAPI/models/v1_entities_addresses.rb +12 -17
  26. data/lib/DealMakerAPI/models/v1_entities_attachment.rb +12 -17
  27. data/lib/DealMakerAPI/models/v1_entities_background_check_search.rb +12 -17
  28. data/lib/DealMakerAPI/models/v1_entities_bulk_upload.rb +12 -17
  29. data/lib/DealMakerAPI/models/v1_entities_bulk_upload_detail.rb +12 -17
  30. data/lib/DealMakerAPI/models/v1_entities_company.rb +12 -17
  31. data/lib/DealMakerAPI/models/v1_entities_company_deal.rb +12 -17
  32. data/lib/DealMakerAPI/models/v1_entities_company_deals.rb +12 -17
  33. data/lib/DealMakerAPI/models/v1_entities_deal.rb +12 -17
  34. data/lib/DealMakerAPI/models/v1_entities_deal_enterprise.rb +12 -17
  35. data/lib/DealMakerAPI/models/v1_entities_deal_funding_metrics.rb +12 -17
  36. data/lib/DealMakerAPI/models/v1_entities_deal_investor_metrics.rb +12 -17
  37. data/lib/DealMakerAPI/models/v1_entities_deal_issuer.rb +12 -17
  38. data/lib/DealMakerAPI/models/v1_entities_deal_setup.rb +12 -17
  39. data/lib/DealMakerAPI/models/v1_entities_deal_setup_user.rb +12 -17
  40. data/lib/DealMakerAPI/models/v1_entities_deals.rb +12 -17
  41. data/lib/DealMakerAPI/models/v1_entities_express_wire_instruction.rb +12 -17
  42. data/lib/DealMakerAPI/models/v1_entities_express_wire_instructions.rb +12 -17
  43. data/lib/DealMakerAPI/models/v1_entities_investor.rb +12 -17
  44. data/lib/DealMakerAPI/models/v1_entities_investor_otp_access_link.rb +12 -17
  45. data/lib/DealMakerAPI/models/v1_entities_investor_profile_address.rb +12 -17
  46. data/lib/DealMakerAPI/models/v1_entities_investor_profile_corporation.rb +12 -17
  47. data/lib/DealMakerAPI/models/v1_entities_investor_profile_fields_account_holder.rb +12 -17
  48. data/lib/DealMakerAPI/models/v1_entities_investor_profile_fields_corporation.rb +12 -17
  49. data/lib/DealMakerAPI/models/v1_entities_investor_profile_fields_primary_holder.rb +12 -17
  50. data/lib/DealMakerAPI/models/v1_entities_investor_profile_fields_trust.rb +12 -17
  51. data/lib/DealMakerAPI/models/v1_entities_investor_profile_individual.rb +12 -17
  52. data/lib/DealMakerAPI/models/v1_entities_investor_profile_item.rb +12 -17
  53. data/lib/DealMakerAPI/models/v1_entities_investor_profile_joint.rb +12 -17
  54. data/lib/DealMakerAPI/models/v1_entities_investor_profile_owner.rb +12 -17
  55. data/lib/DealMakerAPI/models/v1_entities_investor_profile_trust.rb +12 -17
  56. data/lib/DealMakerAPI/models/v1_entities_investor_profiles.rb +12 -17
  57. data/lib/DealMakerAPI/models/v1_entities_investor_user.rb +12 -17
  58. data/lib/DealMakerAPI/models/v1_entities_investors.rb +12 -17
  59. data/lib/DealMakerAPI/models/v1_entities_presigned_url_result.rb +12 -17
  60. data/lib/DealMakerAPI/models/v1_entities_shareholder.rb +12 -17
  61. data/lib/DealMakerAPI/models/v1_entities_shareholders.rb +12 -17
  62. data/lib/DealMakerAPI/models/v1_entities_shareholders_tags.rb +12 -17
  63. data/lib/DealMakerAPI/models/v1_entities_subscription_agreement.rb +12 -17
  64. data/lib/DealMakerAPI/models/v1_entities_webhooks_deal.rb +12 -17
  65. data/lib/DealMakerAPI/models/v1_entities_webhooks_security_token.rb +12 -17
  66. data/lib/DealMakerAPI/models/v1_entities_webhooks_subscription.rb +12 -17
  67. data/lib/DealMakerAPI/models/v1_entities_webhooks_subscription_deal.rb +12 -17
  68. data/lib/DealMakerAPI/models/v1_entities_webhooks_subscription_deals.rb +12 -17
  69. data/lib/DealMakerAPI/version.rb +1 -1
  70. metadata +2 -2
@@ -167,6 +167,8 @@ module DealMakerAPI
167
167
 
168
168
  if attributes.key?(:'email')
169
169
  self.email = attributes[:'email']
170
+ else
171
+ self.email = nil
170
172
  end
171
173
 
172
174
  if attributes.key?(:'us_accredited_category')
@@ -241,6 +243,7 @@ module DealMakerAPI
241
243
  # Show invalid properties with the reasons. Usually used together with valid?
242
244
  # @return Array for valid properties with the reasons
243
245
  def list_invalid_properties
246
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
244
247
  invalid_properties = Array.new
245
248
  if @email.nil?
246
249
  invalid_properties.push('invalid value for "email", email cannot be nil.')
@@ -252,6 +255,7 @@ module DealMakerAPI
252
255
  # Check to see if the all the properties in the model are valid
253
256
  # @return true if the model is valid
254
257
  def valid?
258
+ warn '[DEPRECATED] the `valid?` method is obsolete'
255
259
  return false if @email.nil?
256
260
  us_accredited_category_validator = EnumAttributeValidator.new('String', ["income_individual", "assets_individual", "director", "knowledgable_employee", "broker_or_dealer", "investment_advisor_registered", "investment_advisor_relying", "designated_accredited_investor", "not_accredited"])
257
261
  return false unless us_accredited_category_validator.valid?(@us_accredited_category)
@@ -321,37 +325,30 @@ module DealMakerAPI
321
325
  # @param [Hash] attributes Model attributes in the form of hash
322
326
  # @return [Object] Returns the model itself
323
327
  def self.build_from_hash(attributes)
324
- new.build_from_hash(attributes)
325
- end
326
-
327
- # Builds the object from hash
328
- # @param [Hash] attributes Model attributes in the form of hash
329
- # @return [Object] Returns the model itself
330
- def build_from_hash(attributes)
331
328
  return nil unless attributes.is_a?(Hash)
332
329
  attributes = attributes.transform_keys(&:to_sym)
333
- self.class.openapi_types.each_pair do |key, type|
334
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
335
- self.send("#{key}=", nil)
330
+ transformed_hash = {}
331
+ openapi_types.each_pair do |key, type|
332
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
333
+ transformed_hash["#{key}"] = nil
336
334
  elsif type =~ /\AArray<(.*)>/i
337
335
  # check to ensure the input is an array given that the attribute
338
336
  # is documented as an array but the input is not
339
- if attributes[self.class.attribute_map[key]].is_a?(Array)
340
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
337
+ if attributes[attribute_map[key]].is_a?(Array)
338
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
341
339
  end
342
- elsif !attributes[self.class.attribute_map[key]].nil?
343
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
340
+ elsif !attributes[attribute_map[key]].nil?
341
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
344
342
  end
345
343
  end
346
-
347
- self
344
+ new(transformed_hash)
348
345
  end
349
346
 
350
347
  # Deserializes the data based on type
351
348
  # @param string type Data type
352
349
  # @param string value Value to be deserialized
353
350
  # @return [Object] Deserialized data
354
- def _deserialize(type, value)
351
+ def self._deserialize(type, value)
355
352
  case type.to_sym
356
353
  when :Time
357
354
  Time.parse(value)
@@ -141,6 +141,8 @@ module DealMakerAPI
141
141
 
142
142
  if attributes.key?(:'email')
143
143
  self.email = attributes[:'email']
144
+ else
145
+ self.email = nil
144
146
  end
145
147
 
146
148
  if attributes.key?(:'investor_profile_id')
@@ -201,6 +203,7 @@ module DealMakerAPI
201
203
  # Show invalid properties with the reasons. Usually used together with valid?
202
204
  # @return Array for valid properties with the reasons
203
205
  def list_invalid_properties
206
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
204
207
  invalid_properties = Array.new
205
208
  if @email.nil?
206
209
  invalid_properties.push('invalid value for "email", email cannot be nil.')
@@ -212,6 +215,7 @@ module DealMakerAPI
212
215
  # Check to see if the all the properties in the model are valid
213
216
  # @return true if the model is valid
214
217
  def valid?
218
+ warn '[DEPRECATED] the `valid?` method is obsolete'
215
219
  return false if @email.nil?
216
220
  allocation_unit_validator = EnumAttributeValidator.new('String', ["securities", "amount"])
217
221
  return false unless allocation_unit_validator.valid?(@allocation_unit)
@@ -276,37 +280,30 @@ module DealMakerAPI
276
280
  # @param [Hash] attributes Model attributes in the form of hash
277
281
  # @return [Object] Returns the model itself
278
282
  def self.build_from_hash(attributes)
279
- new.build_from_hash(attributes)
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
283
  return nil unless attributes.is_a?(Hash)
287
284
  attributes = attributes.transform_keys(&:to_sym)
288
- self.class.openapi_types.each_pair do |key, type|
289
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
290
- self.send("#{key}=", nil)
285
+ transformed_hash = {}
286
+ openapi_types.each_pair do |key, type|
287
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
288
+ transformed_hash["#{key}"] = nil
291
289
  elsif type =~ /\AArray<(.*)>/i
292
290
  # check to ensure the input is an array given that the attribute
293
291
  # is documented as an array but the input is not
294
- if attributes[self.class.attribute_map[key]].is_a?(Array)
295
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
292
+ if attributes[attribute_map[key]].is_a?(Array)
293
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
296
294
  end
297
- elsif !attributes[self.class.attribute_map[key]].nil?
298
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
295
+ elsif !attributes[attribute_map[key]].nil?
296
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
299
297
  end
300
298
  end
301
-
302
- self
299
+ new(transformed_hash)
303
300
  end
304
301
 
305
302
  # Deserializes the data based on type
306
303
  # @param string type Data type
307
304
  # @param string value Value to be deserialized
308
305
  # @return [Object] Deserialized data
309
- def _deserialize(type, value)
306
+ def self._deserialize(type, value)
310
307
  case type.to_sym
311
308
  when :Time
312
309
  Time.parse(value)
@@ -227,6 +227,8 @@ module DealMakerAPI
227
227
 
228
228
  if attributes.key?(:'email')
229
229
  self.email = attributes[:'email']
230
+ else
231
+ self.email = nil
230
232
  end
231
233
 
232
234
  if attributes.key?(:'us_accredited_category')
@@ -349,6 +351,7 @@ module DealMakerAPI
349
351
  # Show invalid properties with the reasons. Usually used together with valid?
350
352
  # @return Array for valid properties with the reasons
351
353
  def list_invalid_properties
354
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
352
355
  invalid_properties = Array.new
353
356
  if @email.nil?
354
357
  invalid_properties.push('invalid value for "email", email cannot be nil.')
@@ -360,6 +363,7 @@ module DealMakerAPI
360
363
  # Check to see if the all the properties in the model are valid
361
364
  # @return true if the model is valid
362
365
  def valid?
366
+ warn '[DEPRECATED] the `valid?` method is obsolete'
363
367
  return false if @email.nil?
364
368
  us_accredited_category_validator = EnumAttributeValidator.new('String', ["income_individual", "assets_individual", "director", "knowledgable_employee", "broker_or_dealer", "investment_advisor_registered", "investment_advisor_relying", "designated_accredited_investor", "not_accredited"])
365
369
  return false unless us_accredited_category_validator.valid?(@us_accredited_category)
@@ -453,37 +457,30 @@ module DealMakerAPI
453
457
  # @param [Hash] attributes Model attributes in the form of hash
454
458
  # @return [Object] Returns the model itself
455
459
  def self.build_from_hash(attributes)
456
- new.build_from_hash(attributes)
457
- end
458
-
459
- # Builds the object from hash
460
- # @param [Hash] attributes Model attributes in the form of hash
461
- # @return [Object] Returns the model itself
462
- def build_from_hash(attributes)
463
460
  return nil unless attributes.is_a?(Hash)
464
461
  attributes = attributes.transform_keys(&:to_sym)
465
- self.class.openapi_types.each_pair do |key, type|
466
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
467
- self.send("#{key}=", nil)
462
+ transformed_hash = {}
463
+ openapi_types.each_pair do |key, type|
464
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
465
+ transformed_hash["#{key}"] = nil
468
466
  elsif type =~ /\AArray<(.*)>/i
469
467
  # check to ensure the input is an array given that the attribute
470
468
  # is documented as an array but the input is not
471
- if attributes[self.class.attribute_map[key]].is_a?(Array)
472
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
469
+ if attributes[attribute_map[key]].is_a?(Array)
470
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
473
471
  end
474
- elsif !attributes[self.class.attribute_map[key]].nil?
475
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
472
+ elsif !attributes[attribute_map[key]].nil?
473
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
476
474
  end
477
475
  end
478
-
479
- self
476
+ new(transformed_hash)
480
477
  end
481
478
 
482
479
  # Deserializes the data based on type
483
480
  # @param string type Data type
484
481
  # @param string value Value to be deserialized
485
482
  # @return [Object] Deserialized data
486
- def _deserialize(type, value)
483
+ def self._deserialize(type, value)
487
484
  case type.to_sym
488
485
  when :Time
489
486
  Time.parse(value)
@@ -207,6 +207,8 @@ module DealMakerAPI
207
207
 
208
208
  if attributes.key?(:'email')
209
209
  self.email = attributes[:'email']
210
+ else
211
+ self.email = nil
210
212
  end
211
213
 
212
214
  if attributes.key?(:'us_accredited_category')
@@ -335,6 +337,7 @@ module DealMakerAPI
335
337
  # Show invalid properties with the reasons. Usually used together with valid?
336
338
  # @return Array for valid properties with the reasons
337
339
  def list_invalid_properties
340
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
338
341
  invalid_properties = Array.new
339
342
  if @email.nil?
340
343
  invalid_properties.push('invalid value for "email", email cannot be nil.')
@@ -346,6 +349,7 @@ module DealMakerAPI
346
349
  # Check to see if the all the properties in the model are valid
347
350
  # @return true if the model is valid
348
351
  def valid?
352
+ warn '[DEPRECATED] the `valid?` method is obsolete'
349
353
  return false if @email.nil?
350
354
  us_accredited_category_validator = EnumAttributeValidator.new('String', ["entity_owned_by_accredited_investors", "broker_or_dealer", "assets_trust", "not_accredited"])
351
355
  return false unless us_accredited_category_validator.valid?(@us_accredited_category)
@@ -423,37 +427,30 @@ module DealMakerAPI
423
427
  # @param [Hash] attributes Model attributes in the form of hash
424
428
  # @return [Object] Returns the model itself
425
429
  def self.build_from_hash(attributes)
426
- new.build_from_hash(attributes)
427
- end
428
-
429
- # Builds the object from hash
430
- # @param [Hash] attributes Model attributes in the form of hash
431
- # @return [Object] Returns the model itself
432
- def build_from_hash(attributes)
433
430
  return nil unless attributes.is_a?(Hash)
434
431
  attributes = attributes.transform_keys(&:to_sym)
435
- self.class.openapi_types.each_pair do |key, type|
436
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
437
- self.send("#{key}=", nil)
432
+ transformed_hash = {}
433
+ openapi_types.each_pair do |key, type|
434
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
435
+ transformed_hash["#{key}"] = nil
438
436
  elsif type =~ /\AArray<(.*)>/i
439
437
  # check to ensure the input is an array given that the attribute
440
438
  # is documented as an array but the input is not
441
- if attributes[self.class.attribute_map[key]].is_a?(Array)
442
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
439
+ if attributes[attribute_map[key]].is_a?(Array)
440
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
443
441
  end
444
- elsif !attributes[self.class.attribute_map[key]].nil?
445
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
442
+ elsif !attributes[attribute_map[key]].nil?
443
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
446
444
  end
447
445
  end
448
-
449
- self
446
+ new(transformed_hash)
450
447
  end
451
448
 
452
449
  # Deserializes the data based on type
453
450
  # @param string type Data type
454
451
  # @param string value Value to be deserialized
455
452
  # @return [Object] Deserialized data
456
- def _deserialize(type, value)
453
+ def self._deserialize(type, value)
457
454
  case type.to_sym
458
455
  when :Time
459
456
  Time.parse(value)
@@ -89,6 +89,8 @@ module DealMakerAPI
89
89
  if (value = attributes[:'tags']).is_a?(Array)
90
90
  self.tags = value
91
91
  end
92
+ else
93
+ self.tags = nil
92
94
  end
93
95
 
94
96
  if attributes.key?(:'mode')
@@ -101,6 +103,7 @@ module DealMakerAPI
101
103
  # Show invalid properties with the reasons. Usually used together with valid?
102
104
  # @return Array for valid properties with the reasons
103
105
  def list_invalid_properties
106
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
104
107
  invalid_properties = Array.new
105
108
  if @tags.nil?
106
109
  invalid_properties.push('invalid value for "tags", tags cannot be nil.')
@@ -112,6 +115,7 @@ module DealMakerAPI
112
115
  # Check to see if the all the properties in the model are valid
113
116
  # @return true if the model is valid
114
117
  def valid?
118
+ warn '[DEPRECATED] the `valid?` method is obsolete'
115
119
  return false if @tags.nil?
116
120
  mode_validator = EnumAttributeValidator.new('String', ["append", "replace"])
117
121
  return false unless mode_validator.valid?(@mode)
@@ -153,37 +157,30 @@ module DealMakerAPI
153
157
  # @param [Hash] attributes Model attributes in the form of hash
154
158
  # @return [Object] Returns the model itself
155
159
  def self.build_from_hash(attributes)
156
- new.build_from_hash(attributes)
157
- end
158
-
159
- # Builds the object from hash
160
- # @param [Hash] attributes Model attributes in the form of hash
161
- # @return [Object] Returns the model itself
162
- def build_from_hash(attributes)
163
160
  return nil unless attributes.is_a?(Hash)
164
161
  attributes = attributes.transform_keys(&:to_sym)
165
- self.class.openapi_types.each_pair do |key, type|
166
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
167
- self.send("#{key}=", nil)
162
+ transformed_hash = {}
163
+ openapi_types.each_pair do |key, type|
164
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
165
+ transformed_hash["#{key}"] = nil
168
166
  elsif type =~ /\AArray<(.*)>/i
169
167
  # check to ensure the input is an array given that the attribute
170
168
  # is documented as an array but the input is not
171
- if attributes[self.class.attribute_map[key]].is_a?(Array)
172
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
169
+ if attributes[attribute_map[key]].is_a?(Array)
170
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
173
171
  end
174
- elsif !attributes[self.class.attribute_map[key]].nil?
175
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
172
+ elsif !attributes[attribute_map[key]].nil?
173
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
176
174
  end
177
175
  end
178
-
179
- self
176
+ new(transformed_hash)
180
177
  end
181
178
 
182
179
  # Deserializes the data based on type
183
180
  # @param string type Data type
184
181
  # @param string value Value to be deserialized
185
182
  # @return [Object] Deserialized data
186
- def _deserialize(type, value)
183
+ def self._deserialize(type, value)
187
184
  case type.to_sym
188
185
  when :Time
189
186
  Time.parse(value)
@@ -60,12 +60,15 @@ module DealMakerAPI
60
60
 
61
61
  if attributes.key?(:'filename')
62
62
  self.filename = attributes[:'filename']
63
+ else
64
+ self.filename = nil
63
65
  end
64
66
  end
65
67
 
66
68
  # Show invalid properties with the reasons. Usually used together with valid?
67
69
  # @return Array for valid properties with the reasons
68
70
  def list_invalid_properties
71
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
69
72
  invalid_properties = Array.new
70
73
  if @filename.nil?
71
74
  invalid_properties.push('invalid value for "filename", filename cannot be nil.')
@@ -77,6 +80,7 @@ module DealMakerAPI
77
80
  # Check to see if the all the properties in the model are valid
78
81
  # @return true if the model is valid
79
82
  def valid?
83
+ warn '[DEPRECATED] the `valid?` method is obsolete'
80
84
  return false if @filename.nil?
81
85
  true
82
86
  end
@@ -105,37 +109,30 @@ module DealMakerAPI
105
109
  # @param [Hash] attributes Model attributes in the form of hash
106
110
  # @return [Object] Returns the model itself
107
111
  def self.build_from_hash(attributes)
108
- new.build_from_hash(attributes)
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
112
  return nil unless attributes.is_a?(Hash)
116
113
  attributes = attributes.transform_keys(&:to_sym)
117
- self.class.openapi_types.each_pair do |key, type|
118
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
119
- self.send("#{key}=", nil)
114
+ transformed_hash = {}
115
+ openapi_types.each_pair do |key, type|
116
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
117
+ transformed_hash["#{key}"] = nil
120
118
  elsif type =~ /\AArray<(.*)>/i
121
119
  # check to ensure the input is an array given that the attribute
122
120
  # is documented as an array but the input is not
123
- if attributes[self.class.attribute_map[key]].is_a?(Array)
124
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
121
+ if attributes[attribute_map[key]].is_a?(Array)
122
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
125
123
  end
126
- elsif !attributes[self.class.attribute_map[key]].nil?
127
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
124
+ elsif !attributes[attribute_map[key]].nil?
125
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
128
126
  end
129
127
  end
130
-
131
- self
128
+ new(transformed_hash)
132
129
  end
133
130
 
134
131
  # Deserializes the data based on type
135
132
  # @param string type Data type
136
133
  # @param string value Value to be deserialized
137
134
  # @return [Object] Deserialized data
138
- def _deserialize(type, value)
135
+ def self._deserialize(type, value)
139
136
  case type.to_sym
140
137
  when :Time
141
138
  Time.parse(value)
@@ -304,6 +304,7 @@ module DealMakerAPI
304
304
  # Show invalid properties with the reasons. Usually used together with valid?
305
305
  # @return Array for valid properties with the reasons
306
306
  def list_invalid_properties
307
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
307
308
  invalid_properties = Array.new
308
309
  invalid_properties
309
310
  end
@@ -311,6 +312,7 @@ module DealMakerAPI
311
312
  # Check to see if the all the properties in the model are valid
312
313
  # @return true if the model is valid
313
314
  def valid?
315
+ warn '[DEPRECATED] the `valid?` method is obsolete'
314
316
  us_accredited_category_validator = EnumAttributeValidator.new('String', ["entity_owned_by_accredited_investors", "assets_other", "assets_family_office", "assets_benefit_plan", "assets_state_plan", "assets_501_c_3", "assets_corporation", "broker_or_dealer", "bank_3_a_2", "business_development_company", "private_business_development_company", "investment_company", "rural_business_investment_company", "insurance_company", "family_client", "not_accredited"])
315
317
  return false unless us_accredited_category_validator.valid?(@us_accredited_category)
316
318
  ca_accredited_investor_validator = EnumAttributeValidator.new('String', ["a", "b", "c", "d", "f", "g", "h", "i", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "x"])
@@ -386,37 +388,30 @@ module DealMakerAPI
386
388
  # @param [Hash] attributes Model attributes in the form of hash
387
389
  # @return [Object] Returns the model itself
388
390
  def self.build_from_hash(attributes)
389
- new.build_from_hash(attributes)
390
- end
391
-
392
- # Builds the object from hash
393
- # @param [Hash] attributes Model attributes in the form of hash
394
- # @return [Object] Returns the model itself
395
- def build_from_hash(attributes)
396
391
  return nil unless attributes.is_a?(Hash)
397
392
  attributes = attributes.transform_keys(&:to_sym)
398
- self.class.openapi_types.each_pair do |key, type|
399
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
400
- self.send("#{key}=", nil)
393
+ transformed_hash = {}
394
+ openapi_types.each_pair do |key, type|
395
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
396
+ transformed_hash["#{key}"] = nil
401
397
  elsif type =~ /\AArray<(.*)>/i
402
398
  # check to ensure the input is an array given that the attribute
403
399
  # is documented as an array but the input is not
404
- if attributes[self.class.attribute_map[key]].is_a?(Array)
405
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
400
+ if attributes[attribute_map[key]].is_a?(Array)
401
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
406
402
  end
407
- elsif !attributes[self.class.attribute_map[key]].nil?
408
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
403
+ elsif !attributes[attribute_map[key]].nil?
404
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
409
405
  end
410
406
  end
411
-
412
- self
407
+ new(transformed_hash)
413
408
  end
414
409
 
415
410
  # Deserializes the data based on type
416
411
  # @param string type Data type
417
412
  # @param string value Value to be deserialized
418
413
  # @return [Object] Deserialized data
419
- def _deserialize(type, value)
414
+ def self._deserialize(type, value)
420
415
  case type.to_sym
421
416
  when :Time
422
417
  Time.parse(value)
@@ -232,6 +232,7 @@ module DealMakerAPI
232
232
  # Show invalid properties with the reasons. Usually used together with valid?
233
233
  # @return Array for valid properties with the reasons
234
234
  def list_invalid_properties
235
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
235
236
  invalid_properties = Array.new
236
237
  invalid_properties
237
238
  end
@@ -239,6 +240,7 @@ module DealMakerAPI
239
240
  # Check to see if the all the properties in the model are valid
240
241
  # @return true if the model is valid
241
242
  def valid?
243
+ warn '[DEPRECATED] the `valid?` method is obsolete'
242
244
  us_accredited_category_validator = EnumAttributeValidator.new('String', ["income_individual", "assets_individual", "director", "knowledgable_employee", "broker_or_dealer", "investment_advisor_registered", "investment_advisor_relying", "designated_accredited_investor", "not_accredited"])
243
245
  return false unless us_accredited_category_validator.valid?(@us_accredited_category)
244
246
  ca_accredited_investor_validator = EnumAttributeValidator.new('String', ["d", "e", "e_1", "j", "j_1", "k", "l", "q", "v", "x"])
@@ -306,37 +308,30 @@ module DealMakerAPI
306
308
  # @param [Hash] attributes Model attributes in the form of hash
307
309
  # @return [Object] Returns the model itself
308
310
  def self.build_from_hash(attributes)
309
- new.build_from_hash(attributes)
310
- end
311
-
312
- # Builds the object from hash
313
- # @param [Hash] attributes Model attributes in the form of hash
314
- # @return [Object] Returns the model itself
315
- def build_from_hash(attributes)
316
311
  return nil unless attributes.is_a?(Hash)
317
312
  attributes = attributes.transform_keys(&:to_sym)
318
- self.class.openapi_types.each_pair do |key, type|
319
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
320
- self.send("#{key}=", nil)
313
+ transformed_hash = {}
314
+ openapi_types.each_pair do |key, type|
315
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
316
+ transformed_hash["#{key}"] = nil
321
317
  elsif type =~ /\AArray<(.*)>/i
322
318
  # check to ensure the input is an array given that the attribute
323
319
  # is documented as an array but the input is not
324
- if attributes[self.class.attribute_map[key]].is_a?(Array)
325
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
320
+ if attributes[attribute_map[key]].is_a?(Array)
321
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
326
322
  end
327
- elsif !attributes[self.class.attribute_map[key]].nil?
328
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
323
+ elsif !attributes[attribute_map[key]].nil?
324
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
329
325
  end
330
326
  end
331
-
332
- self
327
+ new(transformed_hash)
333
328
  end
334
329
 
335
330
  # Deserializes the data based on type
336
331
  # @param string type Data type
337
332
  # @param string value Value to be deserialized
338
333
  # @return [Object] Deserialized data
339
- def _deserialize(type, value)
334
+ def self._deserialize(type, value)
340
335
  case type.to_sym
341
336
  when :Time
342
337
  Time.parse(value)
@@ -87,6 +87,8 @@ module DealMakerAPI
87
87
 
88
88
  if attributes.key?(:'investor_profile_id')
89
89
  self.investor_profile_id = attributes[:'investor_profile_id']
90
+ else
91
+ self.investor_profile_id = nil
90
92
  end
91
93
 
92
94
  if attributes.key?(:'current_step')
@@ -99,6 +101,7 @@ module DealMakerAPI
99
101
  # Show invalid properties with the reasons. Usually used together with valid?
100
102
  # @return Array for valid properties with the reasons
101
103
  def list_invalid_properties
104
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
102
105
  invalid_properties = Array.new
103
106
  if @investor_profile_id.nil?
104
107
  invalid_properties.push('invalid value for "investor_profile_id", investor_profile_id cannot be nil.')
@@ -110,6 +113,7 @@ module DealMakerAPI
110
113
  # Check to see if the all the properties in the model are valid
111
114
  # @return true if the model is valid
112
115
  def valid?
116
+ warn '[DEPRECATED] the `valid?` method is obsolete'
113
117
  return false if @investor_profile_id.nil?
114
118
  current_step_validator = EnumAttributeValidator.new('String', ["contact-information", "investor-confirmation"])
115
119
  return false unless current_step_validator.valid?(@current_step)
@@ -151,37 +155,30 @@ module DealMakerAPI
151
155
  # @param [Hash] attributes Model attributes in the form of hash
152
156
  # @return [Object] Returns the model itself
153
157
  def self.build_from_hash(attributes)
154
- new.build_from_hash(attributes)
155
- end
156
-
157
- # Builds the object from hash
158
- # @param [Hash] attributes Model attributes in the form of hash
159
- # @return [Object] Returns the model itself
160
- def build_from_hash(attributes)
161
158
  return nil unless attributes.is_a?(Hash)
162
159
  attributes = attributes.transform_keys(&:to_sym)
163
- self.class.openapi_types.each_pair do |key, type|
164
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
165
- self.send("#{key}=", nil)
160
+ transformed_hash = {}
161
+ openapi_types.each_pair do |key, type|
162
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
163
+ transformed_hash["#{key}"] = nil
166
164
  elsif type =~ /\AArray<(.*)>/i
167
165
  # check to ensure the input is an array given that the attribute
168
166
  # is documented as an array but the input is not
169
- if attributes[self.class.attribute_map[key]].is_a?(Array)
170
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
167
+ if attributes[attribute_map[key]].is_a?(Array)
168
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
171
169
  end
172
- elsif !attributes[self.class.attribute_map[key]].nil?
173
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
170
+ elsif !attributes[attribute_map[key]].nil?
171
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
174
172
  end
175
173
  end
176
-
177
- self
174
+ new(transformed_hash)
178
175
  end
179
176
 
180
177
  # Deserializes the data based on type
181
178
  # @param string type Data type
182
179
  # @param string value Value to be deserialized
183
180
  # @return [Object] Deserialized data
184
- def _deserialize(type, value)
181
+ def self._deserialize(type, value)
185
182
  case type.to_sym
186
183
  when :Time
187
184
  Time.parse(value)