DealMakerAPI 0.83.0 → 0.83.1

Sign up to get free protection for your applications and to get access to all the features.
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
@@ -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)
@@ -135,6 +135,7 @@ module DealMakerAPI
135
135
  # Show invalid properties with the reasons. Usually used together with valid?
136
136
  # @return Array for valid properties with the reasons
137
137
  def list_invalid_properties
138
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
138
139
  invalid_properties = Array.new
139
140
  invalid_properties
140
141
  end
@@ -142,6 +143,7 @@ module DealMakerAPI
142
143
  # Check to see if the all the properties in the model are valid
143
144
  # @return true if the model is valid
144
145
  def valid?
146
+ warn '[DEPRECATED] the `valid?` method is obsolete'
145
147
  allocation_unit_validator = EnumAttributeValidator.new('String', ["securities", "amount"])
146
148
  return false unless allocation_unit_validator.valid?(@allocation_unit)
147
149
  true
@@ -186,37 +188,30 @@ module DealMakerAPI
186
188
  # @param [Hash] attributes Model attributes in the form of hash
187
189
  # @return [Object] Returns the model itself
188
190
  def self.build_from_hash(attributes)
189
- new.build_from_hash(attributes)
190
- end
191
-
192
- # Builds the object from hash
193
- # @param [Hash] attributes Model attributes in the form of hash
194
- # @return [Object] Returns the model itself
195
- def build_from_hash(attributes)
196
191
  return nil unless attributes.is_a?(Hash)
197
192
  attributes = attributes.transform_keys(&:to_sym)
198
- self.class.openapi_types.each_pair do |key, type|
199
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
200
- 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
201
197
  elsif type =~ /\AArray<(.*)>/i
202
198
  # check to ensure the input is an array given that the attribute
203
199
  # is documented as an array but the input is not
204
- if attributes[self.class.attribute_map[key]].is_a?(Array)
205
- 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) }
206
202
  end
207
- elsif !attributes[self.class.attribute_map[key]].nil?
208
- 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]])
209
205
  end
210
206
  end
211
-
212
- self
207
+ new(transformed_hash)
213
208
  end
214
209
 
215
210
  # Deserializes the data based on type
216
211
  # @param string type Data type
217
212
  # @param string value Value to be deserialized
218
213
  # @return [Object] Deserialized data
219
- def _deserialize(type, value)
214
+ def self._deserialize(type, value)
220
215
  case type.to_sym
221
216
  when :Time
222
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)
@@ -84,6 +84,7 @@ module DealMakerAPI
84
84
  # Show invalid properties with the reasons. Usually used together with valid?
85
85
  # @return Array for valid properties with the reasons
86
86
  def list_invalid_properties
87
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
87
88
  invalid_properties = Array.new
88
89
  invalid_properties
89
90
  end
@@ -91,6 +92,7 @@ module DealMakerAPI
91
92
  # Check to see if the all the properties in the model are valid
92
93
  # @return true if the model is valid
93
94
  def valid?
95
+ warn '[DEPRECATED] the `valid?` method is obsolete'
94
96
  true
95
97
  end
96
98
 
@@ -120,37 +122,30 @@ module DealMakerAPI
120
122
  # @param [Hash] attributes Model attributes in the form of hash
121
123
  # @return [Object] Returns the model itself
122
124
  def self.build_from_hash(attributes)
123
- new.build_from_hash(attributes)
124
- end
125
-
126
- # Builds the object from hash
127
- # @param [Hash] attributes Model attributes in the form of hash
128
- # @return [Object] Returns the model itself
129
- def build_from_hash(attributes)
130
125
  return nil unless attributes.is_a?(Hash)
131
126
  attributes = attributes.transform_keys(&:to_sym)
132
- self.class.openapi_types.each_pair do |key, type|
133
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
134
- self.send("#{key}=", nil)
127
+ transformed_hash = {}
128
+ openapi_types.each_pair do |key, type|
129
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
130
+ transformed_hash["#{key}"] = nil
135
131
  elsif type =~ /\AArray<(.*)>/i
136
132
  # check to ensure the input is an array given that the attribute
137
133
  # is documented as an array but the input is not
138
- if attributes[self.class.attribute_map[key]].is_a?(Array)
139
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
134
+ if attributes[attribute_map[key]].is_a?(Array)
135
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
140
136
  end
141
- elsif !attributes[self.class.attribute_map[key]].nil?
142
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
137
+ elsif !attributes[attribute_map[key]].nil?
138
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
143
139
  end
144
140
  end
145
-
146
- self
141
+ new(transformed_hash)
147
142
  end
148
143
 
149
144
  # Deserializes the data based on type
150
145
  # @param string type Data type
151
146
  # @param string value Value to be deserialized
152
147
  # @return [Object] Deserialized data
153
- def _deserialize(type, value)
148
+ def self._deserialize(type, value)
154
149
  case type.to_sym
155
150
  when :Time
156
151
  Time.parse(value)
@@ -84,6 +84,7 @@ module DealMakerAPI
84
84
  # Show invalid properties with the reasons. Usually used together with valid?
85
85
  # @return Array for valid properties with the reasons
86
86
  def list_invalid_properties
87
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
87
88
  invalid_properties = Array.new
88
89
  invalid_properties
89
90
  end
@@ -91,6 +92,7 @@ module DealMakerAPI
91
92
  # Check to see if the all the properties in the model are valid
92
93
  # @return true if the model is valid
93
94
  def valid?
95
+ warn '[DEPRECATED] the `valid?` method is obsolete'
94
96
  true
95
97
  end
96
98
 
@@ -120,37 +122,30 @@ module DealMakerAPI
120
122
  # @param [Hash] attributes Model attributes in the form of hash
121
123
  # @return [Object] Returns the model itself
122
124
  def self.build_from_hash(attributes)
123
- new.build_from_hash(attributes)
124
- end
125
-
126
- # Builds the object from hash
127
- # @param [Hash] attributes Model attributes in the form of hash
128
- # @return [Object] Returns the model itself
129
- def build_from_hash(attributes)
130
125
  return nil unless attributes.is_a?(Hash)
131
126
  attributes = attributes.transform_keys(&:to_sym)
132
- self.class.openapi_types.each_pair do |key, type|
133
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
134
- self.send("#{key}=", nil)
127
+ transformed_hash = {}
128
+ openapi_types.each_pair do |key, type|
129
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
130
+ transformed_hash["#{key}"] = nil
135
131
  elsif type =~ /\AArray<(.*)>/i
136
132
  # check to ensure the input is an array given that the attribute
137
133
  # is documented as an array but the input is not
138
- if attributes[self.class.attribute_map[key]].is_a?(Array)
139
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
134
+ if attributes[attribute_map[key]].is_a?(Array)
135
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
140
136
  end
141
- elsif !attributes[self.class.attribute_map[key]].nil?
142
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
137
+ elsif !attributes[attribute_map[key]].nil?
138
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
143
139
  end
144
140
  end
145
-
146
- self
141
+ new(transformed_hash)
147
142
  end
148
143
 
149
144
  # Deserializes the data based on type
150
145
  # @param string type Data type
151
146
  # @param string value Value to be deserialized
152
147
  # @return [Object] Deserialized data
153
- def _deserialize(type, value)
148
+ def self._deserialize(type, value)
154
149
  case type.to_sym
155
150
  when :Time
156
151
  Time.parse(value)