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
@@ -121,6 +121,7 @@ module DealMakerAPI
121
121
  # Show invalid properties with the reasons. Usually used together with valid?
122
122
  # @return Array for valid properties with the reasons
123
123
  def list_invalid_properties
124
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
124
125
  invalid_properties = Array.new
125
126
  invalid_properties
126
127
  end
@@ -128,6 +129,7 @@ module DealMakerAPI
128
129
  # Check to see if the all the properties in the model are valid
129
130
  # @return true if the model is valid
130
131
  def valid?
132
+ warn '[DEPRECATED] the `valid?` method is obsolete'
131
133
  true
132
134
  end
133
135
 
@@ -161,37 +163,30 @@ module DealMakerAPI
161
163
  # @param [Hash] attributes Model attributes in the form of hash
162
164
  # @return [Object] Returns the model itself
163
165
  def self.build_from_hash(attributes)
164
- new.build_from_hash(attributes)
165
- end
166
-
167
- # Builds the object from hash
168
- # @param [Hash] attributes Model attributes in the form of hash
169
- # @return [Object] Returns the model itself
170
- def build_from_hash(attributes)
171
166
  return nil unless attributes.is_a?(Hash)
172
167
  attributes = attributes.transform_keys(&:to_sym)
173
- self.class.openapi_types.each_pair do |key, type|
174
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
175
- self.send("#{key}=", nil)
168
+ transformed_hash = {}
169
+ openapi_types.each_pair do |key, type|
170
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
171
+ transformed_hash["#{key}"] = nil
176
172
  elsif type =~ /\AArray<(.*)>/i
177
173
  # check to ensure the input is an array given that the attribute
178
174
  # is documented as an array but the input is not
179
- if attributes[self.class.attribute_map[key]].is_a?(Array)
180
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
175
+ if attributes[attribute_map[key]].is_a?(Array)
176
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
181
177
  end
182
- elsif !attributes[self.class.attribute_map[key]].nil?
183
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
178
+ elsif !attributes[attribute_map[key]].nil?
179
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
184
180
  end
185
181
  end
186
-
187
- self
182
+ new(transformed_hash)
188
183
  end
189
184
 
190
185
  # Deserializes the data based on type
191
186
  # @param string type Data type
192
187
  # @param string value Value to be deserialized
193
188
  # @return [Object] Deserialized data
194
- def _deserialize(type, value)
189
+ def self._deserialize(type, value)
195
190
  case type.to_sym
196
191
  when :Time
197
192
  Time.parse(value)
@@ -121,6 +121,7 @@ module DealMakerAPI
121
121
  # Show invalid properties with the reasons. Usually used together with valid?
122
122
  # @return Array for valid properties with the reasons
123
123
  def list_invalid_properties
124
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
124
125
  invalid_properties = Array.new
125
126
  invalid_properties
126
127
  end
@@ -128,6 +129,7 @@ module DealMakerAPI
128
129
  # Check to see if the all the properties in the model are valid
129
130
  # @return true if the model is valid
130
131
  def valid?
132
+ warn '[DEPRECATED] the `valid?` method is obsolete'
131
133
  true
132
134
  end
133
135
 
@@ -161,37 +163,30 @@ module DealMakerAPI
161
163
  # @param [Hash] attributes Model attributes in the form of hash
162
164
  # @return [Object] Returns the model itself
163
165
  def self.build_from_hash(attributes)
164
- new.build_from_hash(attributes)
165
- end
166
-
167
- # Builds the object from hash
168
- # @param [Hash] attributes Model attributes in the form of hash
169
- # @return [Object] Returns the model itself
170
- def build_from_hash(attributes)
171
166
  return nil unless attributes.is_a?(Hash)
172
167
  attributes = attributes.transform_keys(&:to_sym)
173
- self.class.openapi_types.each_pair do |key, type|
174
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
175
- self.send("#{key}=", nil)
168
+ transformed_hash = {}
169
+ openapi_types.each_pair do |key, type|
170
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
171
+ transformed_hash["#{key}"] = nil
176
172
  elsif type =~ /\AArray<(.*)>/i
177
173
  # check to ensure the input is an array given that the attribute
178
174
  # is documented as an array but the input is not
179
- if attributes[self.class.attribute_map[key]].is_a?(Array)
180
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
175
+ if attributes[attribute_map[key]].is_a?(Array)
176
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
181
177
  end
182
- elsif !attributes[self.class.attribute_map[key]].nil?
183
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
178
+ elsif !attributes[attribute_map[key]].nil?
179
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
184
180
  end
185
181
  end
186
-
187
- self
182
+ new(transformed_hash)
188
183
  end
189
184
 
190
185
  # Deserializes the data based on type
191
186
  # @param string type Data type
192
187
  # @param string value Value to be deserialized
193
188
  # @return [Object] Deserialized data
194
- def _deserialize(type, value)
189
+ def self._deserialize(type, value)
195
190
  case type.to_sym
196
191
  when :Time
197
192
  Time.parse(value)
@@ -137,6 +137,7 @@ module DealMakerAPI
137
137
  # Show invalid properties with the reasons. Usually used together with valid?
138
138
  # @return Array for valid properties with the reasons
139
139
  def list_invalid_properties
140
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
140
141
  invalid_properties = Array.new
141
142
  invalid_properties
142
143
  end
@@ -144,6 +145,7 @@ module DealMakerAPI
144
145
  # Check to see if the all the properties in the model are valid
145
146
  # @return true if the model is valid
146
147
  def valid?
148
+ warn '[DEPRECATED] the `valid?` method is obsolete'
147
149
  true
148
150
  end
149
151
 
@@ -179,37 +181,30 @@ module DealMakerAPI
179
181
  # @param [Hash] attributes Model attributes in the form of hash
180
182
  # @return [Object] Returns the model itself
181
183
  def self.build_from_hash(attributes)
182
- new.build_from_hash(attributes)
183
- end
184
-
185
- # Builds the object from hash
186
- # @param [Hash] attributes Model attributes in the form of hash
187
- # @return [Object] Returns the model itself
188
- def build_from_hash(attributes)
189
184
  return nil unless attributes.is_a?(Hash)
190
185
  attributes = attributes.transform_keys(&:to_sym)
191
- self.class.openapi_types.each_pair do |key, type|
192
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
193
- self.send("#{key}=", nil)
186
+ transformed_hash = {}
187
+ openapi_types.each_pair do |key, type|
188
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
189
+ transformed_hash["#{key}"] = nil
194
190
  elsif type =~ /\AArray<(.*)>/i
195
191
  # check to ensure the input is an array given that the attribute
196
192
  # is documented as an array but the input is not
197
- if attributes[self.class.attribute_map[key]].is_a?(Array)
198
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
193
+ if attributes[attribute_map[key]].is_a?(Array)
194
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
199
195
  end
200
- elsif !attributes[self.class.attribute_map[key]].nil?
201
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
196
+ elsif !attributes[attribute_map[key]].nil?
197
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
202
198
  end
203
199
  end
204
-
205
- self
200
+ new(transformed_hash)
206
201
  end
207
202
 
208
203
  # Deserializes the data based on type
209
204
  # @param string type Data type
210
205
  # @param string value Value to be deserialized
211
206
  # @return [Object] Deserialized data
212
- def _deserialize(type, value)
207
+ def self._deserialize(type, value)
213
208
  case type.to_sym
214
209
  when :Time
215
210
  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)
@@ -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)
@@ -193,6 +193,7 @@ module DealMakerAPI
193
193
  # Show invalid properties with the reasons. Usually used together with valid?
194
194
  # @return Array for valid properties with the reasons
195
195
  def list_invalid_properties
196
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
196
197
  invalid_properties = Array.new
197
198
  invalid_properties
198
199
  end
@@ -200,6 +201,7 @@ module DealMakerAPI
200
201
  # Check to see if the all the properties in the model are valid
201
202
  # @return true if the model is valid
202
203
  def valid?
204
+ warn '[DEPRECATED] the `valid?` method is obsolete'
203
205
  state_validator = EnumAttributeValidator.new('String', ["draft", "close", "active", "amending", "ending"])
204
206
  return false unless state_validator.valid?(@state)
205
207
  deal_type_validator = EnumAttributeValidator.new('String', ["other_or_unknown", "dm_plus", "dm_basic", "mini_deal", "reg_cf", "reg_a", "warrants", "offering_memorandum", "reg_d_506_c", "reg_d_506_b"])
@@ -263,37 +265,30 @@ module DealMakerAPI
263
265
  # @param [Hash] attributes Model attributes in the form of hash
264
266
  # @return [Object] Returns the model itself
265
267
  def self.build_from_hash(attributes)
266
- new.build_from_hash(attributes)
267
- end
268
-
269
- # Builds the object from hash
270
- # @param [Hash] attributes Model attributes in the form of hash
271
- # @return [Object] Returns the model itself
272
- def build_from_hash(attributes)
273
268
  return nil unless attributes.is_a?(Hash)
274
269
  attributes = attributes.transform_keys(&:to_sym)
275
- self.class.openapi_types.each_pair do |key, type|
276
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
277
- self.send("#{key}=", nil)
270
+ transformed_hash = {}
271
+ openapi_types.each_pair do |key, type|
272
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
273
+ transformed_hash["#{key}"] = nil
278
274
  elsif type =~ /\AArray<(.*)>/i
279
275
  # check to ensure the input is an array given that the attribute
280
276
  # is documented as an array but the input is not
281
- if attributes[self.class.attribute_map[key]].is_a?(Array)
282
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
277
+ if attributes[attribute_map[key]].is_a?(Array)
278
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
283
279
  end
284
- elsif !attributes[self.class.attribute_map[key]].nil?
285
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
280
+ elsif !attributes[attribute_map[key]].nil?
281
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
286
282
  end
287
283
  end
288
-
289
- self
284
+ new(transformed_hash)
290
285
  end
291
286
 
292
287
  # Deserializes the data based on type
293
288
  # @param string type Data type
294
289
  # @param string value Value to be deserialized
295
290
  # @return [Object] Deserialized data
296
- def _deserialize(type, value)
291
+ def self._deserialize(type, value)
297
292
  case type.to_sym
298
293
  when :Time
299
294
  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)
@@ -129,6 +129,7 @@ module DealMakerAPI
129
129
  # Show invalid properties with the reasons. Usually used together with valid?
130
130
  # @return Array for valid properties with the reasons
131
131
  def list_invalid_properties
132
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
132
133
  invalid_properties = Array.new
133
134
  invalid_properties
134
135
  end
@@ -136,6 +137,7 @@ module DealMakerAPI
136
137
  # Check to see if the all the properties in the model are valid
137
138
  # @return true if the model is valid
138
139
  def valid?
140
+ warn '[DEPRECATED] the `valid?` method is obsolete'
139
141
  true
140
142
  end
141
143
 
@@ -170,37 +172,30 @@ module DealMakerAPI
170
172
  # @param [Hash] attributes Model attributes in the form of hash
171
173
  # @return [Object] Returns the model itself
172
174
  def self.build_from_hash(attributes)
173
- new.build_from_hash(attributes)
174
- end
175
-
176
- # Builds the object from hash
177
- # @param [Hash] attributes Model attributes in the form of hash
178
- # @return [Object] Returns the model itself
179
- def build_from_hash(attributes)
180
175
  return nil unless attributes.is_a?(Hash)
181
176
  attributes = attributes.transform_keys(&:to_sym)
182
- self.class.openapi_types.each_pair do |key, type|
183
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
184
- self.send("#{key}=", nil)
177
+ transformed_hash = {}
178
+ openapi_types.each_pair do |key, type|
179
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
180
+ transformed_hash["#{key}"] = nil
185
181
  elsif type =~ /\AArray<(.*)>/i
186
182
  # check to ensure the input is an array given that the attribute
187
183
  # is documented as an array but the input is not
188
- if attributes[self.class.attribute_map[key]].is_a?(Array)
189
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
184
+ if attributes[attribute_map[key]].is_a?(Array)
185
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
190
186
  end
191
- elsif !attributes[self.class.attribute_map[key]].nil?
192
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
187
+ elsif !attributes[attribute_map[key]].nil?
188
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
193
189
  end
194
190
  end
195
-
196
- self
191
+ new(transformed_hash)
197
192
  end
198
193
 
199
194
  # Deserializes the data based on type
200
195
  # @param string type Data type
201
196
  # @param string value Value to be deserialized
202
197
  # @return [Object] Deserialized data
203
- def _deserialize(type, value)
198
+ def self._deserialize(type, value)
204
199
  case type.to_sym
205
200
  when :Time
206
201
  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)
@@ -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)