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
@@ -119,6 +119,7 @@ module DealMakerAPI
119
119
  # Show invalid properties with the reasons. Usually used together with valid?
120
120
  # @return Array for valid properties with the reasons
121
121
  def list_invalid_properties
122
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
122
123
  invalid_properties = Array.new
123
124
  invalid_properties
124
125
  end
@@ -126,6 +127,7 @@ module DealMakerAPI
126
127
  # Check to see if the all the properties in the model are valid
127
128
  # @return true if the model is valid
128
129
  def valid?
130
+ warn '[DEPRECATED] the `valid?` method is obsolete'
129
131
  true
130
132
  end
131
133
 
@@ -159,37 +161,30 @@ module DealMakerAPI
159
161
  # @param [Hash] attributes Model attributes in the form of hash
160
162
  # @return [Object] Returns the model itself
161
163
  def self.build_from_hash(attributes)
162
- new.build_from_hash(attributes)
163
- end
164
-
165
- # Builds the object from hash
166
- # @param [Hash] attributes Model attributes in the form of hash
167
- # @return [Object] Returns the model itself
168
- def build_from_hash(attributes)
169
164
  return nil unless attributes.is_a?(Hash)
170
165
  attributes = attributes.transform_keys(&:to_sym)
171
- self.class.openapi_types.each_pair do |key, type|
172
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
173
- self.send("#{key}=", nil)
166
+ transformed_hash = {}
167
+ openapi_types.each_pair do |key, type|
168
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
169
+ transformed_hash["#{key}"] = nil
174
170
  elsif type =~ /\AArray<(.*)>/i
175
171
  # check to ensure the input is an array given that the attribute
176
172
  # is documented as an array but the input is not
177
- if attributes[self.class.attribute_map[key]].is_a?(Array)
178
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
173
+ if attributes[attribute_map[key]].is_a?(Array)
174
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
179
175
  end
180
- elsif !attributes[self.class.attribute_map[key]].nil?
181
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
176
+ elsif !attributes[attribute_map[key]].nil?
177
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
182
178
  end
183
179
  end
184
-
185
- self
180
+ new(transformed_hash)
186
181
  end
187
182
 
188
183
  # Deserializes the data based on type
189
184
  # @param string type Data type
190
185
  # @param string value Value to be deserialized
191
186
  # @return [Object] Deserialized data
192
- def _deserialize(type, value)
187
+ def self._deserialize(type, value)
193
188
  case type.to_sym
194
189
  when :Time
195
190
  Time.parse(value)
@@ -146,6 +146,7 @@ module DealMakerAPI
146
146
  # Show invalid properties with the reasons. Usually used together with valid?
147
147
  # @return Array for valid properties with the reasons
148
148
  def list_invalid_properties
149
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
149
150
  invalid_properties = Array.new
150
151
  invalid_properties
151
152
  end
@@ -153,6 +154,7 @@ module DealMakerAPI
153
154
  # Check to see if the all the properties in the model are valid
154
155
  # @return true if the model is valid
155
156
  def valid?
157
+ warn '[DEPRECATED] the `valid?` method is obsolete'
156
158
  true
157
159
  end
158
160
 
@@ -189,37 +191,30 @@ module DealMakerAPI
189
191
  # @param [Hash] attributes Model attributes in the form of hash
190
192
  # @return [Object] Returns the model itself
191
193
  def self.build_from_hash(attributes)
192
- new.build_from_hash(attributes)
193
- end
194
-
195
- # Builds the object from hash
196
- # @param [Hash] attributes Model attributes in the form of hash
197
- # @return [Object] Returns the model itself
198
- def build_from_hash(attributes)
199
194
  return nil unless attributes.is_a?(Hash)
200
195
  attributes = attributes.transform_keys(&:to_sym)
201
- self.class.openapi_types.each_pair do |key, type|
202
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
203
- self.send("#{key}=", nil)
196
+ transformed_hash = {}
197
+ openapi_types.each_pair do |key, type|
198
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
199
+ transformed_hash["#{key}"] = nil
204
200
  elsif type =~ /\AArray<(.*)>/i
205
201
  # check to ensure the input is an array given that the attribute
206
202
  # is documented as an array but the input is not
207
- if attributes[self.class.attribute_map[key]].is_a?(Array)
208
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
203
+ if attributes[attribute_map[key]].is_a?(Array)
204
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
209
205
  end
210
- elsif !attributes[self.class.attribute_map[key]].nil?
211
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
206
+ elsif !attributes[attribute_map[key]].nil?
207
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
212
208
  end
213
209
  end
214
-
215
- self
210
+ new(transformed_hash)
216
211
  end
217
212
 
218
213
  # Deserializes the data based on type
219
214
  # @param string type Data type
220
215
  # @param string value Value to be deserialized
221
216
  # @return [Object] Deserialized data
222
- def _deserialize(type, value)
217
+ def self._deserialize(type, value)
223
218
  case type.to_sym
224
219
  when :Time
225
220
  Time.parse(value)
@@ -119,6 +119,7 @@ module DealMakerAPI
119
119
  # Show invalid properties with the reasons. Usually used together with valid?
120
120
  # @return Array for valid properties with the reasons
121
121
  def list_invalid_properties
122
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
122
123
  invalid_properties = Array.new
123
124
  invalid_properties
124
125
  end
@@ -126,6 +127,7 @@ module DealMakerAPI
126
127
  # Check to see if the all the properties in the model are valid
127
128
  # @return true if the model is valid
128
129
  def valid?
130
+ warn '[DEPRECATED] the `valid?` method is obsolete'
129
131
  true
130
132
  end
131
133
 
@@ -159,37 +161,30 @@ module DealMakerAPI
159
161
  # @param [Hash] attributes Model attributes in the form of hash
160
162
  # @return [Object] Returns the model itself
161
163
  def self.build_from_hash(attributes)
162
- new.build_from_hash(attributes)
163
- end
164
-
165
- # Builds the object from hash
166
- # @param [Hash] attributes Model attributes in the form of hash
167
- # @return [Object] Returns the model itself
168
- def build_from_hash(attributes)
169
164
  return nil unless attributes.is_a?(Hash)
170
165
  attributes = attributes.transform_keys(&:to_sym)
171
- self.class.openapi_types.each_pair do |key, type|
172
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
173
- self.send("#{key}=", nil)
166
+ transformed_hash = {}
167
+ openapi_types.each_pair do |key, type|
168
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
169
+ transformed_hash["#{key}"] = nil
174
170
  elsif type =~ /\AArray<(.*)>/i
175
171
  # check to ensure the input is an array given that the attribute
176
172
  # is documented as an array but the input is not
177
- if attributes[self.class.attribute_map[key]].is_a?(Array)
178
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
173
+ if attributes[attribute_map[key]].is_a?(Array)
174
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
179
175
  end
180
- elsif !attributes[self.class.attribute_map[key]].nil?
181
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
176
+ elsif !attributes[attribute_map[key]].nil?
177
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
182
178
  end
183
179
  end
184
-
185
- self
180
+ new(transformed_hash)
186
181
  end
187
182
 
188
183
  # Deserializes the data based on type
189
184
  # @param string type Data type
190
185
  # @param string value Value to be deserialized
191
186
  # @return [Object] Deserialized data
192
- def _deserialize(type, value)
187
+ def self._deserialize(type, value)
193
188
  case type.to_sym
194
189
  when :Time
195
190
  Time.parse(value)
@@ -168,6 +168,7 @@ module DealMakerAPI
168
168
  # Show invalid properties with the reasons. Usually used together with valid?
169
169
  # @return Array for valid properties with the reasons
170
170
  def list_invalid_properties
171
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
171
172
  invalid_properties = Array.new
172
173
  invalid_properties
173
174
  end
@@ -175,6 +176,7 @@ module DealMakerAPI
175
176
  # Check to see if the all the properties in the model are valid
176
177
  # @return true if the model is valid
177
178
  def valid?
179
+ warn '[DEPRECATED] the `valid?` method is obsolete'
178
180
  type_validator = EnumAttributeValidator.new('String', ["individual", "joint", "corporation", "trust"])
179
181
  return false unless type_validator.valid?(@type)
180
182
  true
@@ -223,37 +225,30 @@ module DealMakerAPI
223
225
  # @param [Hash] attributes Model attributes in the form of hash
224
226
  # @return [Object] Returns the model itself
225
227
  def self.build_from_hash(attributes)
226
- new.build_from_hash(attributes)
227
- end
228
-
229
- # Builds the object from hash
230
- # @param [Hash] attributes Model attributes in the form of hash
231
- # @return [Object] Returns the model itself
232
- def build_from_hash(attributes)
233
228
  return nil unless attributes.is_a?(Hash)
234
229
  attributes = attributes.transform_keys(&:to_sym)
235
- self.class.openapi_types.each_pair do |key, type|
236
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
237
- self.send("#{key}=", nil)
230
+ transformed_hash = {}
231
+ openapi_types.each_pair do |key, type|
232
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
233
+ transformed_hash["#{key}"] = nil
238
234
  elsif type =~ /\AArray<(.*)>/i
239
235
  # check to ensure the input is an array given that the attribute
240
236
  # is documented as an array but the input is not
241
- if attributes[self.class.attribute_map[key]].is_a?(Array)
242
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
237
+ if attributes[attribute_map[key]].is_a?(Array)
238
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
243
239
  end
244
- elsif !attributes[self.class.attribute_map[key]].nil?
245
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
240
+ elsif !attributes[attribute_map[key]].nil?
241
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
246
242
  end
247
243
  end
248
-
249
- self
244
+ new(transformed_hash)
250
245
  end
251
246
 
252
247
  # Deserializes the data based on type
253
248
  # @param string type Data type
254
249
  # @param string value Value to be deserialized
255
250
  # @return [Object] Deserialized data
256
- def _deserialize(type, value)
251
+ def self._deserialize(type, value)
257
252
  case type.to_sym
258
253
  when :Time
259
254
  Time.parse(value)
@@ -66,6 +66,7 @@ module DealMakerAPI
66
66
  # Show invalid properties with the reasons. Usually used together with valid?
67
67
  # @return Array for valid properties with the reasons
68
68
  def list_invalid_properties
69
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
69
70
  invalid_properties = Array.new
70
71
  invalid_properties
71
72
  end
@@ -73,6 +74,7 @@ module DealMakerAPI
73
74
  # Check to see if the all the properties in the model are valid
74
75
  # @return true if the model is valid
75
76
  def valid?
77
+ warn '[DEPRECATED] the `valid?` method is obsolete'
76
78
  true
77
79
  end
78
80
 
@@ -100,37 +102,30 @@ module DealMakerAPI
100
102
  # @param [Hash] attributes Model attributes in the form of hash
101
103
  # @return [Object] Returns the model itself
102
104
  def self.build_from_hash(attributes)
103
- new.build_from_hash(attributes)
104
- end
105
-
106
- # Builds the object from hash
107
- # @param [Hash] attributes Model attributes in the form of hash
108
- # @return [Object] Returns the model itself
109
- def build_from_hash(attributes)
110
105
  return nil unless attributes.is_a?(Hash)
111
106
  attributes = attributes.transform_keys(&:to_sym)
112
- self.class.openapi_types.each_pair do |key, type|
113
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
114
- self.send("#{key}=", nil)
107
+ transformed_hash = {}
108
+ openapi_types.each_pair do |key, type|
109
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
110
+ transformed_hash["#{key}"] = nil
115
111
  elsif type =~ /\AArray<(.*)>/i
116
112
  # check to ensure the input is an array given that the attribute
117
113
  # is documented as an array but the input is not
118
- if attributes[self.class.attribute_map[key]].is_a?(Array)
119
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
114
+ if attributes[attribute_map[key]].is_a?(Array)
115
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
120
116
  end
121
- elsif !attributes[self.class.attribute_map[key]].nil?
122
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
117
+ elsif !attributes[attribute_map[key]].nil?
118
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
123
119
  end
124
120
  end
125
-
126
- self
121
+ new(transformed_hash)
127
122
  end
128
123
 
129
124
  # Deserializes the data based on type
130
125
  # @param string type Data type
131
126
  # @param string value Value to be deserialized
132
127
  # @return [Object] Deserialized data
133
- def _deserialize(type, value)
128
+ def self._deserialize(type, value)
134
129
  case type.to_sym
135
130
  when :Time
136
131
  Time.parse(value)
@@ -185,6 +185,7 @@ module DealMakerAPI
185
185
  # Show invalid properties with the reasons. Usually used together with valid?
186
186
  # @return Array for valid properties with the reasons
187
187
  def list_invalid_properties
188
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
188
189
  invalid_properties = Array.new
189
190
  invalid_properties
190
191
  end
@@ -192,6 +193,7 @@ module DealMakerAPI
192
193
  # Check to see if the all the properties in the model are valid
193
194
  # @return true if the model is valid
194
195
  def valid?
196
+ warn '[DEPRECATED] the `valid?` method is obsolete'
195
197
  type_validator = EnumAttributeValidator.new('String', ["individual", "joint", "corporation", "trust"])
196
198
  return false unless type_validator.valid?(@type)
197
199
  true
@@ -242,37 +244,30 @@ module DealMakerAPI
242
244
  # @param [Hash] attributes Model attributes in the form of hash
243
245
  # @return [Object] Returns the model itself
244
246
  def self.build_from_hash(attributes)
245
- new.build_from_hash(attributes)
246
- end
247
-
248
- # Builds the object from hash
249
- # @param [Hash] attributes Model attributes in the form of hash
250
- # @return [Object] Returns the model itself
251
- def build_from_hash(attributes)
252
247
  return nil unless attributes.is_a?(Hash)
253
248
  attributes = attributes.transform_keys(&:to_sym)
254
- self.class.openapi_types.each_pair do |key, type|
255
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
256
- self.send("#{key}=", nil)
249
+ transformed_hash = {}
250
+ openapi_types.each_pair do |key, type|
251
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
252
+ transformed_hash["#{key}"] = nil
257
253
  elsif type =~ /\AArray<(.*)>/i
258
254
  # check to ensure the input is an array given that the attribute
259
255
  # is documented as an array but the input is not
260
- if attributes[self.class.attribute_map[key]].is_a?(Array)
261
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
256
+ if attributes[attribute_map[key]].is_a?(Array)
257
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
262
258
  end
263
- elsif !attributes[self.class.attribute_map[key]].nil?
264
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
259
+ elsif !attributes[attribute_map[key]].nil?
260
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
265
261
  end
266
262
  end
267
-
268
- self
263
+ new(transformed_hash)
269
264
  end
270
265
 
271
266
  # Deserializes the data based on type
272
267
  # @param string type Data type
273
268
  # @param string value Value to be deserialized
274
269
  # @return [Object] Deserialized data
275
- def _deserialize(type, value)
270
+ def self._deserialize(type, value)
276
271
  case type.to_sym
277
272
  when :Time
278
273
  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)
@@ -176,6 +176,7 @@ module DealMakerAPI
176
176
  # Show invalid properties with the reasons. Usually used together with valid?
177
177
  # @return Array for valid properties with the reasons
178
178
  def list_invalid_properties
179
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
179
180
  invalid_properties = Array.new
180
181
  invalid_properties
181
182
  end
@@ -183,6 +184,7 @@ module DealMakerAPI
183
184
  # Check to see if the all the properties in the model are valid
184
185
  # @return true if the model is valid
185
186
  def valid?
187
+ warn '[DEPRECATED] the `valid?` method is obsolete'
186
188
  type_validator = EnumAttributeValidator.new('String', ["individual", "joint", "corporation", "trust"])
187
189
  return false unless type_validator.valid?(@type)
188
190
  true
@@ -232,37 +234,30 @@ module DealMakerAPI
232
234
  # @param [Hash] attributes Model attributes in the form of hash
233
235
  # @return [Object] Returns the model itself
234
236
  def self.build_from_hash(attributes)
235
- new.build_from_hash(attributes)
236
- end
237
-
238
- # Builds the object from hash
239
- # @param [Hash] attributes Model attributes in the form of hash
240
- # @return [Object] Returns the model itself
241
- def build_from_hash(attributes)
242
237
  return nil unless attributes.is_a?(Hash)
243
238
  attributes = attributes.transform_keys(&:to_sym)
244
- self.class.openapi_types.each_pair do |key, type|
245
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
246
- self.send("#{key}=", nil)
239
+ transformed_hash = {}
240
+ openapi_types.each_pair do |key, type|
241
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
242
+ transformed_hash["#{key}"] = nil
247
243
  elsif type =~ /\AArray<(.*)>/i
248
244
  # check to ensure the input is an array given that the attribute
249
245
  # is documented as an array but the input is not
250
- if attributes[self.class.attribute_map[key]].is_a?(Array)
251
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
246
+ if attributes[attribute_map[key]].is_a?(Array)
247
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
252
248
  end
253
- elsif !attributes[self.class.attribute_map[key]].nil?
254
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
249
+ elsif !attributes[attribute_map[key]].nil?
250
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
255
251
  end
256
252
  end
257
-
258
- self
253
+ new(transformed_hash)
259
254
  end
260
255
 
261
256
  # Deserializes the data based on type
262
257
  # @param string type Data type
263
258
  # @param string value Value to be deserialized
264
259
  # @return [Object] Deserialized data
265
- def _deserialize(type, value)
260
+ def self._deserialize(type, value)
266
261
  case type.to_sym
267
262
  when :Time
268
263
  Time.parse(value)
@@ -66,6 +66,7 @@ module DealMakerAPI
66
66
  # Show invalid properties with the reasons. Usually used together with valid?
67
67
  # @return Array for valid properties with the reasons
68
68
  def list_invalid_properties
69
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
69
70
  invalid_properties = Array.new
70
71
  invalid_properties
71
72
  end
@@ -73,6 +74,7 @@ module DealMakerAPI
73
74
  # Check to see if the all the properties in the model are valid
74
75
  # @return true if the model is valid
75
76
  def valid?
77
+ warn '[DEPRECATED] the `valid?` method is obsolete'
76
78
  true
77
79
  end
78
80
 
@@ -100,37 +102,30 @@ module DealMakerAPI
100
102
  # @param [Hash] attributes Model attributes in the form of hash
101
103
  # @return [Object] Returns the model itself
102
104
  def self.build_from_hash(attributes)
103
- new.build_from_hash(attributes)
104
- end
105
-
106
- # Builds the object from hash
107
- # @param [Hash] attributes Model attributes in the form of hash
108
- # @return [Object] Returns the model itself
109
- def build_from_hash(attributes)
110
105
  return nil unless attributes.is_a?(Hash)
111
106
  attributes = attributes.transform_keys(&:to_sym)
112
- self.class.openapi_types.each_pair do |key, type|
113
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
114
- self.send("#{key}=", nil)
107
+ transformed_hash = {}
108
+ openapi_types.each_pair do |key, type|
109
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
110
+ transformed_hash["#{key}"] = nil
115
111
  elsif type =~ /\AArray<(.*)>/i
116
112
  # check to ensure the input is an array given that the attribute
117
113
  # is documented as an array but the input is not
118
- if attributes[self.class.attribute_map[key]].is_a?(Array)
119
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
114
+ if attributes[attribute_map[key]].is_a?(Array)
115
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
120
116
  end
121
- elsif !attributes[self.class.attribute_map[key]].nil?
122
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
117
+ elsif !attributes[attribute_map[key]].nil?
118
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
123
119
  end
124
120
  end
125
-
126
- self
121
+ new(transformed_hash)
127
122
  end
128
123
 
129
124
  # Deserializes the data based on type
130
125
  # @param string type Data type
131
126
  # @param string value Value to be deserialized
132
127
  # @return [Object] Deserialized data
133
- def _deserialize(type, value)
128
+ def self._deserialize(type, value)
134
129
  case type.to_sym
135
130
  when :Time
136
131
  Time.parse(value)
@@ -75,6 +75,7 @@ module DealMakerAPI
75
75
  # Show invalid properties with the reasons. Usually used together with valid?
76
76
  # @return Array for valid properties with the reasons
77
77
  def list_invalid_properties
78
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
78
79
  invalid_properties = Array.new
79
80
  invalid_properties
80
81
  end
@@ -82,6 +83,7 @@ module DealMakerAPI
82
83
  # Check to see if the all the properties in the model are valid
83
84
  # @return true if the model is valid
84
85
  def valid?
86
+ warn '[DEPRECATED] the `valid?` method is obsolete'
85
87
  true
86
88
  end
87
89
 
@@ -110,37 +112,30 @@ module DealMakerAPI
110
112
  # @param [Hash] attributes Model attributes in the form of hash
111
113
  # @return [Object] Returns the model itself
112
114
  def self.build_from_hash(attributes)
113
- new.build_from_hash(attributes)
114
- end
115
-
116
- # Builds the object from hash
117
- # @param [Hash] attributes Model attributes in the form of hash
118
- # @return [Object] Returns the model itself
119
- def build_from_hash(attributes)
120
115
  return nil unless attributes.is_a?(Hash)
121
116
  attributes = attributes.transform_keys(&:to_sym)
122
- self.class.openapi_types.each_pair do |key, type|
123
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
124
- self.send("#{key}=", nil)
117
+ transformed_hash = {}
118
+ openapi_types.each_pair do |key, type|
119
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
120
+ transformed_hash["#{key}"] = nil
125
121
  elsif type =~ /\AArray<(.*)>/i
126
122
  # check to ensure the input is an array given that the attribute
127
123
  # is documented as an array but the input is not
128
- if attributes[self.class.attribute_map[key]].is_a?(Array)
129
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
124
+ if attributes[attribute_map[key]].is_a?(Array)
125
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
130
126
  end
131
- elsif !attributes[self.class.attribute_map[key]].nil?
132
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
127
+ elsif !attributes[attribute_map[key]].nil?
128
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
133
129
  end
134
130
  end
135
-
136
- self
131
+ new(transformed_hash)
137
132
  end
138
133
 
139
134
  # Deserializes the data based on type
140
135
  # @param string type Data type
141
136
  # @param string value Value to be deserialized
142
137
  # @return [Object] Deserialized data
143
- def _deserialize(type, value)
138
+ def self._deserialize(type, value)
144
139
  case type.to_sym
145
140
  when :Time
146
141
  Time.parse(value)