DealMakerAPI 0.82.1 → 0.83.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (92) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +12 -5
  3. data/docs/Add506cDocumentRequest.md +20 -0
  4. data/docs/CompanyApi.md +72 -1
  5. data/docs/CreateBulkUploadDetailRequest.md +22 -0
  6. data/docs/CreateBulkUploadRequest.md +0 -2
  7. data/docs/InvestorApi.md +139 -0
  8. data/docs/UpdateInvestorRequest.md +3 -1
  9. data/docs/UploadApi.md +9 -8
  10. data/docs/V1EntitiesBulkUploadDetail.md +30 -0
  11. data/docs/V1EntitiesPresignedUrlResult.md +20 -0
  12. data/lib/DealMakerAPI/api/company_api.rb +80 -0
  13. data/lib/DealMakerAPI/api/investor_api.rb +147 -0
  14. data/lib/DealMakerAPI/api/upload_api.rb +9 -7
  15. data/lib/DealMakerAPI/models/add506c_document_request.rb +232 -0
  16. data/lib/DealMakerAPI/models/add_document_request.rb +14 -17
  17. data/lib/DealMakerAPI/models/create_bulk_upload_detail_request.rb +249 -0
  18. data/lib/DealMakerAPI/models/create_bulk_upload_request.rb +17 -33
  19. data/lib/DealMakerAPI/models/create_company_request.rb +24 -17
  20. data/lib/DealMakerAPI/models/create_corporation_profile_request.rb +14 -17
  21. data/lib/DealMakerAPI/models/create_deal_setup_request.rb +18 -17
  22. data/lib/DealMakerAPI/models/create_individual_profile_request.rb +14 -17
  23. data/lib/DealMakerAPI/models/create_investor_request.rb +14 -17
  24. data/lib/DealMakerAPI/models/create_joint_profile_request.rb +14 -17
  25. data/lib/DealMakerAPI/models/create_trust_profile_request.rb +14 -17
  26. data/lib/DealMakerAPI/models/edit_investor_tags_request.rb +14 -17
  27. data/lib/DealMakerAPI/models/generate_url_request.rb +14 -17
  28. data/lib/DealMakerAPI/models/patch_corporation_profile_request.rb +12 -17
  29. data/lib/DealMakerAPI/models/patch_individual_profile_request.rb +12 -17
  30. data/lib/DealMakerAPI/models/patch_investor_request.rb +14 -17
  31. data/lib/DealMakerAPI/models/patch_joint_profile_request.rb +12 -17
  32. data/lib/DealMakerAPI/models/patch_trust_profile_request.rb +12 -17
  33. data/lib/DealMakerAPI/models/post_webhooks_request.rb +18 -17
  34. data/lib/DealMakerAPI/models/put_webhooks_id_request.rb +12 -17
  35. data/lib/DealMakerAPI/models/update_investor_request.rb +26 -21
  36. data/lib/DealMakerAPI/models/v1_entities_address.rb +12 -17
  37. data/lib/DealMakerAPI/models/v1_entities_addresses.rb +12 -17
  38. data/lib/DealMakerAPI/models/v1_entities_attachment.rb +12 -17
  39. data/lib/DealMakerAPI/models/v1_entities_background_check_search.rb +12 -17
  40. data/lib/DealMakerAPI/models/v1_entities_bulk_upload.rb +12 -17
  41. data/lib/DealMakerAPI/models/v1_entities_bulk_upload_detail.rb +276 -0
  42. data/lib/DealMakerAPI/models/v1_entities_company.rb +12 -17
  43. data/lib/DealMakerAPI/models/v1_entities_company_deal.rb +12 -17
  44. data/lib/DealMakerAPI/models/v1_entities_company_deals.rb +12 -17
  45. data/lib/DealMakerAPI/models/v1_entities_deal.rb +12 -17
  46. data/lib/DealMakerAPI/models/v1_entities_deal_enterprise.rb +12 -17
  47. data/lib/DealMakerAPI/models/v1_entities_deal_funding_metrics.rb +12 -17
  48. data/lib/DealMakerAPI/models/v1_entities_deal_investor_metrics.rb +12 -17
  49. data/lib/DealMakerAPI/models/v1_entities_deal_issuer.rb +12 -17
  50. data/lib/DealMakerAPI/models/v1_entities_deal_setup.rb +12 -17
  51. data/lib/DealMakerAPI/models/v1_entities_deal_setup_user.rb +12 -17
  52. data/lib/DealMakerAPI/models/v1_entities_deals.rb +12 -17
  53. data/lib/DealMakerAPI/models/v1_entities_express_wire_instruction.rb +12 -17
  54. data/lib/DealMakerAPI/models/v1_entities_express_wire_instructions.rb +12 -17
  55. data/lib/DealMakerAPI/models/v1_entities_investor.rb +12 -17
  56. data/lib/DealMakerAPI/models/v1_entities_investor_otp_access_link.rb +12 -17
  57. data/lib/DealMakerAPI/models/v1_entities_investor_profile_address.rb +12 -17
  58. data/lib/DealMakerAPI/models/v1_entities_investor_profile_corporation.rb +12 -17
  59. data/lib/DealMakerAPI/models/v1_entities_investor_profile_fields_account_holder.rb +12 -17
  60. data/lib/DealMakerAPI/models/v1_entities_investor_profile_fields_corporation.rb +12 -17
  61. data/lib/DealMakerAPI/models/v1_entities_investor_profile_fields_primary_holder.rb +12 -17
  62. data/lib/DealMakerAPI/models/v1_entities_investor_profile_fields_trust.rb +12 -17
  63. data/lib/DealMakerAPI/models/v1_entities_investor_profile_individual.rb +12 -17
  64. data/lib/DealMakerAPI/models/v1_entities_investor_profile_item.rb +12 -17
  65. data/lib/DealMakerAPI/models/v1_entities_investor_profile_joint.rb +12 -17
  66. data/lib/DealMakerAPI/models/v1_entities_investor_profile_owner.rb +12 -17
  67. data/lib/DealMakerAPI/models/v1_entities_investor_profile_trust.rb +12 -17
  68. data/lib/DealMakerAPI/models/v1_entities_investor_profiles.rb +12 -17
  69. data/lib/DealMakerAPI/models/v1_entities_investor_user.rb +12 -17
  70. data/lib/DealMakerAPI/models/v1_entities_investors.rb +12 -17
  71. data/lib/DealMakerAPI/models/v1_entities_presigned_url_result.rb +226 -0
  72. data/lib/DealMakerAPI/models/v1_entities_shareholder.rb +12 -17
  73. data/lib/DealMakerAPI/models/v1_entities_shareholders.rb +12 -17
  74. data/lib/DealMakerAPI/models/v1_entities_shareholders_tags.rb +12 -17
  75. data/lib/DealMakerAPI/models/v1_entities_subscription_agreement.rb +12 -17
  76. data/lib/DealMakerAPI/models/v1_entities_webhooks_deal.rb +12 -17
  77. data/lib/DealMakerAPI/models/v1_entities_webhooks_security_token.rb +12 -17
  78. data/lib/DealMakerAPI/models/v1_entities_webhooks_subscription.rb +12 -17
  79. data/lib/DealMakerAPI/models/v1_entities_webhooks_subscription_deal.rb +12 -17
  80. data/lib/DealMakerAPI/models/v1_entities_webhooks_subscription_deals.rb +12 -17
  81. data/lib/DealMakerAPI/version.rb +1 -1
  82. data/lib/DealMakerAPI.rb +4 -0
  83. data/spec/api/company_api_spec.rb +14 -0
  84. data/spec/api/investor_api_spec.rb +27 -0
  85. data/spec/api/upload_api_spec.rb +2 -2
  86. data/spec/models/add506c_document_request_spec.rb +40 -0
  87. data/spec/models/create_bulk_upload_detail_request_spec.rb +46 -0
  88. data/spec/models/create_bulk_upload_request_spec.rb +0 -6
  89. data/spec/models/update_investor_request_spec.rb +6 -0
  90. data/spec/models/v1_entities_bulk_upload_detail_spec.rb +70 -0
  91. data/spec/models/v1_entities_presigned_url_result_spec.rb +40 -0
  92. metadata +18 -2
@@ -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)
@@ -340,6 +340,7 @@ module DealMakerAPI
340
340
  # Show invalid properties with the reasons. Usually used together with valid?
341
341
  # @return Array for valid properties with the reasons
342
342
  def list_invalid_properties
343
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
343
344
  invalid_properties = Array.new
344
345
  invalid_properties
345
346
  end
@@ -347,6 +348,7 @@ module DealMakerAPI
347
348
  # Check to see if the all the properties in the model are valid
348
349
  # @return true if the model is valid
349
350
  def valid?
351
+ warn '[DEPRECATED] the `valid?` method is obsolete'
350
352
  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"])
351
353
  return false unless us_accredited_category_validator.valid?(@us_accredited_category)
352
354
  ca_accredited_investor_validator = EnumAttributeValidator.new('String', ["d", "e", "e_1", "j", "j_1", "k", "l", "q", "v", "x"])
@@ -438,37 +440,30 @@ module DealMakerAPI
438
440
  # @param [Hash] attributes Model attributes in the form of hash
439
441
  # @return [Object] Returns the model itself
440
442
  def self.build_from_hash(attributes)
441
- new.build_from_hash(attributes)
442
- end
443
-
444
- # Builds the object from hash
445
- # @param [Hash] attributes Model attributes in the form of hash
446
- # @return [Object] Returns the model itself
447
- def build_from_hash(attributes)
448
443
  return nil unless attributes.is_a?(Hash)
449
444
  attributes = attributes.transform_keys(&:to_sym)
450
- self.class.openapi_types.each_pair do |key, type|
451
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
452
- self.send("#{key}=", nil)
445
+ transformed_hash = {}
446
+ openapi_types.each_pair do |key, type|
447
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
448
+ transformed_hash["#{key}"] = nil
453
449
  elsif type =~ /\AArray<(.*)>/i
454
450
  # check to ensure the input is an array given that the attribute
455
451
  # is documented as an array but the input is not
456
- if attributes[self.class.attribute_map[key]].is_a?(Array)
457
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
452
+ if attributes[attribute_map[key]].is_a?(Array)
453
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
458
454
  end
459
- elsif !attributes[self.class.attribute_map[key]].nil?
460
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
455
+ elsif !attributes[attribute_map[key]].nil?
456
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
461
457
  end
462
458
  end
463
-
464
- self
459
+ new(transformed_hash)
465
460
  end
466
461
 
467
462
  # Deserializes the data based on type
468
463
  # @param string type Data type
469
464
  # @param string value Value to be deserialized
470
465
  # @return [Object] Deserialized data
471
- def _deserialize(type, value)
466
+ def self._deserialize(type, value)
472
467
  case type.to_sym
473
468
  when :Time
474
469
  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", "broker_or_dealer", "assets_trust", "not_accredited"])
315
317
  return false unless us_accredited_category_validator.valid?(@us_accredited_category)
316
318
  ca_accredited_investor_validator = EnumAttributeValidator.new('String', ["p", "w"])
@@ -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)
@@ -80,10 +80,14 @@ module DealMakerAPI
80
80
 
81
81
  if attributes.key?(:'name')
82
82
  self.name = attributes[:'name']
83
+ else
84
+ self.name = nil
83
85
  end
84
86
 
85
87
  if attributes.key?(:'enabled')
86
88
  self.enabled = attributes[:'enabled']
89
+ else
90
+ self.enabled = nil
87
91
  end
88
92
 
89
93
  if attributes.key?(:'url')
@@ -98,12 +102,15 @@ module DealMakerAPI
98
102
  if (value = attributes[:'webhook_subscription_deals_deal_id']).is_a?(Array)
99
103
  self.webhook_subscription_deals_deal_id = value
100
104
  end
105
+ else
106
+ self.webhook_subscription_deals_deal_id = nil
101
107
  end
102
108
  end
103
109
 
104
110
  # Show invalid properties with the reasons. Usually used together with valid?
105
111
  # @return Array for valid properties with the reasons
106
112
  def list_invalid_properties
113
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
107
114
  invalid_properties = Array.new
108
115
  if @name.nil?
109
116
  invalid_properties.push('invalid value for "name", name cannot be nil.')
@@ -123,6 +130,7 @@ module DealMakerAPI
123
130
  # Check to see if the all the properties in the model are valid
124
131
  # @return true if the model is valid
125
132
  def valid?
133
+ warn '[DEPRECATED] the `valid?` method is obsolete'
126
134
  return false if @name.nil?
127
135
  return false if @enabled.nil?
128
136
  return false if @webhook_subscription_deals_deal_id.nil?
@@ -157,37 +165,30 @@ module DealMakerAPI
157
165
  # @param [Hash] attributes Model attributes in the form of hash
158
166
  # @return [Object] Returns the model itself
159
167
  def self.build_from_hash(attributes)
160
- new.build_from_hash(attributes)
161
- end
162
-
163
- # Builds the object from hash
164
- # @param [Hash] attributes Model attributes in the form of hash
165
- # @return [Object] Returns the model itself
166
- def build_from_hash(attributes)
167
168
  return nil unless attributes.is_a?(Hash)
168
169
  attributes = attributes.transform_keys(&:to_sym)
169
- self.class.openapi_types.each_pair do |key, type|
170
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
171
- self.send("#{key}=", nil)
170
+ transformed_hash = {}
171
+ openapi_types.each_pair do |key, type|
172
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
173
+ transformed_hash["#{key}"] = nil
172
174
  elsif type =~ /\AArray<(.*)>/i
173
175
  # check to ensure the input is an array given that the attribute
174
176
  # is documented as an array but the input is not
175
- if attributes[self.class.attribute_map[key]].is_a?(Array)
176
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
177
+ if attributes[attribute_map[key]].is_a?(Array)
178
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
177
179
  end
178
- elsif !attributes[self.class.attribute_map[key]].nil?
179
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
180
+ elsif !attributes[attribute_map[key]].nil?
181
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
180
182
  end
181
183
  end
182
-
183
- self
184
+ new(transformed_hash)
184
185
  end
185
186
 
186
187
  # Deserializes the data based on type
187
188
  # @param string type Data type
188
189
  # @param string value Value to be deserialized
189
190
  # @return [Object] Deserialized data
190
- def _deserialize(type, value)
191
+ def self._deserialize(type, value)
191
192
  case type.to_sym
192
193
  when :Time
193
194
  Time.parse(value)
@@ -126,6 +126,7 @@ module DealMakerAPI
126
126
  # Show invalid properties with the reasons. Usually used together with valid?
127
127
  # @return Array for valid properties with the reasons
128
128
  def list_invalid_properties
129
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
129
130
  invalid_properties = Array.new
130
131
  invalid_properties
131
132
  end
@@ -133,6 +134,7 @@ module DealMakerAPI
133
134
  # Check to see if the all the properties in the model are valid
134
135
  # @return true if the model is valid
135
136
  def valid?
137
+ warn '[DEPRECATED] the `valid?` method is obsolete'
136
138
  true
137
139
  end
138
140
 
@@ -166,37 +168,30 @@ module DealMakerAPI
166
168
  # @param [Hash] attributes Model attributes in the form of hash
167
169
  # @return [Object] Returns the model itself
168
170
  def self.build_from_hash(attributes)
169
- new.build_from_hash(attributes)
170
- end
171
-
172
- # Builds the object from hash
173
- # @param [Hash] attributes Model attributes in the form of hash
174
- # @return [Object] Returns the model itself
175
- def build_from_hash(attributes)
176
171
  return nil unless attributes.is_a?(Hash)
177
172
  attributes = attributes.transform_keys(&:to_sym)
178
- self.class.openapi_types.each_pair do |key, type|
179
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
180
- self.send("#{key}=", nil)
173
+ transformed_hash = {}
174
+ openapi_types.each_pair do |key, type|
175
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
176
+ transformed_hash["#{key}"] = nil
181
177
  elsif type =~ /\AArray<(.*)>/i
182
178
  # check to ensure the input is an array given that the attribute
183
179
  # is documented as an array but the input is not
184
- if attributes[self.class.attribute_map[key]].is_a?(Array)
185
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
180
+ if attributes[attribute_map[key]].is_a?(Array)
181
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
186
182
  end
187
- elsif !attributes[self.class.attribute_map[key]].nil?
188
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
183
+ elsif !attributes[attribute_map[key]].nil?
184
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
189
185
  end
190
186
  end
191
-
192
- self
187
+ new(transformed_hash)
193
188
  end
194
189
 
195
190
  # Deserializes the data based on type
196
191
  # @param string type Data type
197
192
  # @param string value Value to be deserialized
198
193
  # @return [Object] Deserialized data
199
- def _deserialize(type, value)
194
+ def self._deserialize(type, value)
200
195
  case type.to_sym
201
196
  when :Time
202
197
  Time.parse(value)
@@ -30,6 +30,9 @@ module DealMakerAPI
30
30
  # The investment value of the investor.
31
31
  attr_accessor :investment_value
32
32
 
33
+ # The notes of the investor.
34
+ attr_accessor :notes
35
+
33
36
  class EnumAttributeValidator
34
37
  attr_reader :datatype
35
38
  attr_reader :allowable_values
@@ -59,7 +62,8 @@ module DealMakerAPI
59
62
  :'warrant_certificate_number' => :'warrant_certificate_number',
60
63
  :'allocated_amount' => :'allocated_amount',
61
64
  :'allocation_unit' => :'allocation_unit',
62
- :'investment_value' => :'investment_value'
65
+ :'investment_value' => :'investment_value',
66
+ :'notes' => :'notes'
63
67
  }
64
68
  end
65
69
 
@@ -75,7 +79,8 @@ module DealMakerAPI
75
79
  :'warrant_certificate_number' => :'Integer',
76
80
  :'allocated_amount' => :'Float',
77
81
  :'allocation_unit' => :'String',
78
- :'investment_value' => :'Float'
82
+ :'investment_value' => :'Float',
83
+ :'notes' => :'String'
79
84
  }
80
85
  end
81
86
 
@@ -121,11 +126,16 @@ module DealMakerAPI
121
126
  if attributes.key?(:'investment_value')
122
127
  self.investment_value = attributes[:'investment_value']
123
128
  end
129
+
130
+ if attributes.key?(:'notes')
131
+ self.notes = attributes[:'notes']
132
+ end
124
133
  end
125
134
 
126
135
  # Show invalid properties with the reasons. Usually used together with valid?
127
136
  # @return Array for valid properties with the reasons
128
137
  def list_invalid_properties
138
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
129
139
  invalid_properties = Array.new
130
140
  invalid_properties
131
141
  end
@@ -133,6 +143,7 @@ module DealMakerAPI
133
143
  # Check to see if the all the properties in the model are valid
134
144
  # @return true if the model is valid
135
145
  def valid?
146
+ warn '[DEPRECATED] the `valid?` method is obsolete'
136
147
  allocation_unit_validator = EnumAttributeValidator.new('String', ["securities", "amount"])
137
148
  return false unless allocation_unit_validator.valid?(@allocation_unit)
138
149
  true
@@ -157,7 +168,8 @@ module DealMakerAPI
157
168
  warrant_certificate_number == o.warrant_certificate_number &&
158
169
  allocated_amount == o.allocated_amount &&
159
170
  allocation_unit == o.allocation_unit &&
160
- investment_value == o.investment_value
171
+ investment_value == o.investment_value &&
172
+ notes == o.notes
161
173
  end
162
174
 
163
175
  # @see the `==` method
@@ -169,44 +181,37 @@ module DealMakerAPI
169
181
  # Calculates hash code according to all attributes.
170
182
  # @return [Integer] Hash code
171
183
  def hash
172
- [warrant_expiry_date, warrant_certificate_number, allocated_amount, allocation_unit, investment_value].hash
184
+ [warrant_expiry_date, warrant_certificate_number, allocated_amount, allocation_unit, investment_value, notes].hash
173
185
  end
174
186
 
175
187
  # Builds the object from hash
176
188
  # @param [Hash] attributes Model attributes in the form of hash
177
189
  # @return [Object] Returns the model itself
178
190
  def self.build_from_hash(attributes)
179
- new.build_from_hash(attributes)
180
- end
181
-
182
- # Builds the object from hash
183
- # @param [Hash] attributes Model attributes in the form of hash
184
- # @return [Object] Returns the model itself
185
- def build_from_hash(attributes)
186
191
  return nil unless attributes.is_a?(Hash)
187
192
  attributes = attributes.transform_keys(&:to_sym)
188
- self.class.openapi_types.each_pair do |key, type|
189
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
190
- self.send("#{key}=", nil)
193
+ transformed_hash = {}
194
+ openapi_types.each_pair do |key, type|
195
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
196
+ transformed_hash["#{key}"] = nil
191
197
  elsif type =~ /\AArray<(.*)>/i
192
198
  # check to ensure the input is an array given that the attribute
193
199
  # is documented as an array but the input is not
194
- if attributes[self.class.attribute_map[key]].is_a?(Array)
195
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
200
+ if attributes[attribute_map[key]].is_a?(Array)
201
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
196
202
  end
197
- elsif !attributes[self.class.attribute_map[key]].nil?
198
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
203
+ elsif !attributes[attribute_map[key]].nil?
204
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
199
205
  end
200
206
  end
201
-
202
- self
207
+ new(transformed_hash)
203
208
  end
204
209
 
205
210
  # Deserializes the data based on type
206
211
  # @param string type Data type
207
212
  # @param string value Value to be deserialized
208
213
  # @return [Object] Deserialized data
209
- def _deserialize(type, value)
214
+ def self._deserialize(type, value)
210
215
  case type.to_sym
211
216
  when :Time
212
217
  Time.parse(value)
@@ -111,6 +111,7 @@ module DealMakerAPI
111
111
  # Show invalid properties with the reasons. Usually used together with valid?
112
112
  # @return Array for valid properties with the reasons
113
113
  def list_invalid_properties
114
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
114
115
  invalid_properties = Array.new
115
116
  invalid_properties
116
117
  end
@@ -118,6 +119,7 @@ module DealMakerAPI
118
119
  # Check to see if the all the properties in the model are valid
119
120
  # @return true if the model is valid
120
121
  def valid?
122
+ warn '[DEPRECATED] the `valid?` method is obsolete'
121
123
  true
122
124
  end
123
125
 
@@ -150,37 +152,30 @@ module DealMakerAPI
150
152
  # @param [Hash] attributes Model attributes in the form of hash
151
153
  # @return [Object] Returns the model itself
152
154
  def self.build_from_hash(attributes)
153
- new.build_from_hash(attributes)
154
- end
155
-
156
- # Builds the object from hash
157
- # @param [Hash] attributes Model attributes in the form of hash
158
- # @return [Object] Returns the model itself
159
- def build_from_hash(attributes)
160
155
  return nil unless attributes.is_a?(Hash)
161
156
  attributes = attributes.transform_keys(&:to_sym)
162
- self.class.openapi_types.each_pair do |key, type|
163
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
164
- self.send("#{key}=", nil)
157
+ transformed_hash = {}
158
+ openapi_types.each_pair do |key, type|
159
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
160
+ transformed_hash["#{key}"] = nil
165
161
  elsif type =~ /\AArray<(.*)>/i
166
162
  # check to ensure the input is an array given that the attribute
167
163
  # is documented as an array but the input is not
168
- if attributes[self.class.attribute_map[key]].is_a?(Array)
169
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
164
+ if attributes[attribute_map[key]].is_a?(Array)
165
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
170
166
  end
171
- elsif !attributes[self.class.attribute_map[key]].nil?
172
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
167
+ elsif !attributes[attribute_map[key]].nil?
168
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
173
169
  end
174
170
  end
175
-
176
- self
171
+ new(transformed_hash)
177
172
  end
178
173
 
179
174
  # Deserializes the data based on type
180
175
  # @param string type Data type
181
176
  # @param string value Value to be deserialized
182
177
  # @return [Object] Deserialized data
183
- def _deserialize(type, value)
178
+ def self._deserialize(type, value)
184
179
  case type.to_sym
185
180
  when :Time
186
181
  Time.parse(value)
@@ -65,6 +65,7 @@ module DealMakerAPI
65
65
  # Show invalid properties with the reasons. Usually used together with valid?
66
66
  # @return Array for valid properties with the reasons
67
67
  def list_invalid_properties
68
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
68
69
  invalid_properties = Array.new
69
70
  invalid_properties
70
71
  end
@@ -72,6 +73,7 @@ module DealMakerAPI
72
73
  # Check to see if the all the properties in the model are valid
73
74
  # @return true if the model is valid
74
75
  def valid?
76
+ warn '[DEPRECATED] the `valid?` method is obsolete'
75
77
  true
76
78
  end
77
79
 
@@ -99,37 +101,30 @@ module DealMakerAPI
99
101
  # @param [Hash] attributes Model attributes in the form of hash
100
102
  # @return [Object] Returns the model itself
101
103
  def self.build_from_hash(attributes)
102
- new.build_from_hash(attributes)
103
- end
104
-
105
- # Builds the object from hash
106
- # @param [Hash] attributes Model attributes in the form of hash
107
- # @return [Object] Returns the model itself
108
- def build_from_hash(attributes)
109
104
  return nil unless attributes.is_a?(Hash)
110
105
  attributes = attributes.transform_keys(&:to_sym)
111
- self.class.openapi_types.each_pair do |key, type|
112
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
113
- self.send("#{key}=", nil)
106
+ transformed_hash = {}
107
+ openapi_types.each_pair do |key, type|
108
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
109
+ transformed_hash["#{key}"] = nil
114
110
  elsif type =~ /\AArray<(.*)>/i
115
111
  # check to ensure the input is an array given that the attribute
116
112
  # is documented as an array but the input is not
117
- if attributes[self.class.attribute_map[key]].is_a?(Array)
118
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
113
+ if attributes[attribute_map[key]].is_a?(Array)
114
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
119
115
  end
120
- elsif !attributes[self.class.attribute_map[key]].nil?
121
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
116
+ elsif !attributes[attribute_map[key]].nil?
117
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
122
118
  end
123
119
  end
124
-
125
- self
120
+ new(transformed_hash)
126
121
  end
127
122
 
128
123
  # Deserializes the data based on type
129
124
  # @param string type Data type
130
125
  # @param string value Value to be deserialized
131
126
  # @return [Object] Deserialized data
132
- def _deserialize(type, value)
127
+ def self._deserialize(type, value)
133
128
  case type.to_sym
134
129
  when :Time
135
130
  Time.parse(value)