DealMakerAPI 0.83.0 → 0.83.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +9 -4
  3. data/docs/CompanyApi.md +213 -0
  4. data/docs/V1EntitiesBulkUploadDetails.md +18 -0
  5. data/docs/V1EntitiesBulkUploads.md +18 -0
  6. data/lib/DealMakerAPI/api/company_api.rb +210 -0
  7. data/lib/DealMakerAPI/configuration.rb +9 -7
  8. data/lib/DealMakerAPI/models/add506c_document_request.rb +14 -17
  9. data/lib/DealMakerAPI/models/add_document_request.rb +14 -17
  10. data/lib/DealMakerAPI/models/create_bulk_upload_detail_request.rb +16 -17
  11. data/lib/DealMakerAPI/models/create_bulk_upload_request.rb +16 -17
  12. data/lib/DealMakerAPI/models/create_company_request.rb +24 -17
  13. data/lib/DealMakerAPI/models/create_corporation_profile_request.rb +14 -17
  14. data/lib/DealMakerAPI/models/create_deal_setup_request.rb +18 -17
  15. data/lib/DealMakerAPI/models/create_individual_profile_request.rb +14 -17
  16. data/lib/DealMakerAPI/models/create_investor_request.rb +14 -17
  17. data/lib/DealMakerAPI/models/create_joint_profile_request.rb +14 -17
  18. data/lib/DealMakerAPI/models/create_trust_profile_request.rb +14 -17
  19. data/lib/DealMakerAPI/models/edit_investor_tags_request.rb +14 -17
  20. data/lib/DealMakerAPI/models/generate_url_request.rb +14 -17
  21. data/lib/DealMakerAPI/models/patch_corporation_profile_request.rb +12 -17
  22. data/lib/DealMakerAPI/models/patch_individual_profile_request.rb +12 -17
  23. data/lib/DealMakerAPI/models/patch_investor_request.rb +14 -17
  24. data/lib/DealMakerAPI/models/patch_joint_profile_request.rb +12 -17
  25. data/lib/DealMakerAPI/models/patch_trust_profile_request.rb +12 -17
  26. data/lib/DealMakerAPI/models/post_webhooks_request.rb +18 -17
  27. data/lib/DealMakerAPI/models/put_webhooks_id_request.rb +12 -17
  28. data/lib/DealMakerAPI/models/update_investor_request.rb +12 -17
  29. data/lib/DealMakerAPI/models/v1_entities_address.rb +12 -17
  30. data/lib/DealMakerAPI/models/v1_entities_addresses.rb +12 -17
  31. data/lib/DealMakerAPI/models/v1_entities_attachment.rb +12 -17
  32. data/lib/DealMakerAPI/models/v1_entities_background_check_search.rb +12 -17
  33. data/lib/DealMakerAPI/models/v1_entities_bulk_upload.rb +12 -17
  34. data/lib/DealMakerAPI/models/v1_entities_bulk_upload_detail.rb +12 -17
  35. data/lib/DealMakerAPI/models/v1_entities_bulk_upload_details.rb +215 -0
  36. data/lib/DealMakerAPI/models/v1_entities_bulk_uploads.rb +215 -0
  37. data/lib/DealMakerAPI/models/v1_entities_company.rb +12 -17
  38. data/lib/DealMakerAPI/models/v1_entities_company_deal.rb +12 -17
  39. data/lib/DealMakerAPI/models/v1_entities_company_deals.rb +12 -17
  40. data/lib/DealMakerAPI/models/v1_entities_deal.rb +12 -17
  41. data/lib/DealMakerAPI/models/v1_entities_deal_enterprise.rb +12 -17
  42. data/lib/DealMakerAPI/models/v1_entities_deal_funding_metrics.rb +12 -17
  43. data/lib/DealMakerAPI/models/v1_entities_deal_investor_metrics.rb +12 -17
  44. data/lib/DealMakerAPI/models/v1_entities_deal_issuer.rb +12 -17
  45. data/lib/DealMakerAPI/models/v1_entities_deal_setup.rb +12 -17
  46. data/lib/DealMakerAPI/models/v1_entities_deal_setup_user.rb +12 -17
  47. data/lib/DealMakerAPI/models/v1_entities_deals.rb +12 -17
  48. data/lib/DealMakerAPI/models/v1_entities_express_wire_instruction.rb +12 -17
  49. data/lib/DealMakerAPI/models/v1_entities_express_wire_instructions.rb +12 -17
  50. data/lib/DealMakerAPI/models/v1_entities_investor.rb +12 -17
  51. data/lib/DealMakerAPI/models/v1_entities_investor_otp_access_link.rb +12 -17
  52. data/lib/DealMakerAPI/models/v1_entities_investor_profile_address.rb +12 -17
  53. data/lib/DealMakerAPI/models/v1_entities_investor_profile_corporation.rb +12 -17
  54. data/lib/DealMakerAPI/models/v1_entities_investor_profile_fields_account_holder.rb +12 -17
  55. data/lib/DealMakerAPI/models/v1_entities_investor_profile_fields_corporation.rb +12 -17
  56. data/lib/DealMakerAPI/models/v1_entities_investor_profile_fields_primary_holder.rb +12 -17
  57. data/lib/DealMakerAPI/models/v1_entities_investor_profile_fields_trust.rb +12 -17
  58. data/lib/DealMakerAPI/models/v1_entities_investor_profile_individual.rb +12 -17
  59. data/lib/DealMakerAPI/models/v1_entities_investor_profile_item.rb +12 -17
  60. data/lib/DealMakerAPI/models/v1_entities_investor_profile_joint.rb +12 -17
  61. data/lib/DealMakerAPI/models/v1_entities_investor_profile_owner.rb +12 -17
  62. data/lib/DealMakerAPI/models/v1_entities_investor_profile_trust.rb +12 -17
  63. data/lib/DealMakerAPI/models/v1_entities_investor_profiles.rb +12 -17
  64. data/lib/DealMakerAPI/models/v1_entities_investor_user.rb +12 -17
  65. data/lib/DealMakerAPI/models/v1_entities_investors.rb +12 -17
  66. data/lib/DealMakerAPI/models/v1_entities_presigned_url_result.rb +12 -17
  67. data/lib/DealMakerAPI/models/v1_entities_shareholder.rb +12 -17
  68. data/lib/DealMakerAPI/models/v1_entities_shareholders.rb +12 -17
  69. data/lib/DealMakerAPI/models/v1_entities_shareholders_tags.rb +12 -17
  70. data/lib/DealMakerAPI/models/v1_entities_subscription_agreement.rb +12 -17
  71. data/lib/DealMakerAPI/models/v1_entities_webhooks_deal.rb +12 -17
  72. data/lib/DealMakerAPI/models/v1_entities_webhooks_security_token.rb +12 -17
  73. data/lib/DealMakerAPI/models/v1_entities_webhooks_subscription.rb +12 -17
  74. data/lib/DealMakerAPI/models/v1_entities_webhooks_subscription_deal.rb +12 -17
  75. data/lib/DealMakerAPI/models/v1_entities_webhooks_subscription_deals.rb +12 -17
  76. data/lib/DealMakerAPI/version.rb +1 -1
  77. data/lib/DealMakerAPI.rb +2 -0
  78. data/spec/api/company_api_spec.rb +41 -0
  79. data/spec/models/v1_entities_bulk_upload_details_spec.rb +34 -0
  80. data/spec/models/v1_entities_bulk_uploads_spec.rb +34 -0
  81. metadata +10 -2
@@ -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)
@@ -138,6 +138,7 @@ module DealMakerAPI
138
138
  # Show invalid properties with the reasons. Usually used together with valid?
139
139
  # @return Array for valid properties with the reasons
140
140
  def list_invalid_properties
141
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
141
142
  invalid_properties = Array.new
142
143
  invalid_properties
143
144
  end
@@ -145,6 +146,7 @@ module DealMakerAPI
145
146
  # Check to see if the all the properties in the model are valid
146
147
  # @return true if the model is valid
147
148
  def valid?
149
+ warn '[DEPRECATED] the `valid?` method is obsolete'
148
150
  true
149
151
  end
150
152
 
@@ -180,37 +182,30 @@ module DealMakerAPI
180
182
  # @param [Hash] attributes Model attributes in the form of hash
181
183
  # @return [Object] Returns the model itself
182
184
  def self.build_from_hash(attributes)
183
- new.build_from_hash(attributes)
184
- end
185
-
186
- # Builds the object from hash
187
- # @param [Hash] attributes Model attributes in the form of hash
188
- # @return [Object] Returns the model itself
189
- def build_from_hash(attributes)
190
185
  return nil unless attributes.is_a?(Hash)
191
186
  attributes = attributes.transform_keys(&:to_sym)
192
- self.class.openapi_types.each_pair do |key, type|
193
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
194
- self.send("#{key}=", nil)
187
+ transformed_hash = {}
188
+ openapi_types.each_pair do |key, type|
189
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
190
+ transformed_hash["#{key}"] = nil
195
191
  elsif type =~ /\AArray<(.*)>/i
196
192
  # check to ensure the input is an array given that the attribute
197
193
  # is documented as an array but the input is not
198
- if attributes[self.class.attribute_map[key]].is_a?(Array)
199
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
194
+ if attributes[attribute_map[key]].is_a?(Array)
195
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
200
196
  end
201
- elsif !attributes[self.class.attribute_map[key]].nil?
202
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
197
+ elsif !attributes[attribute_map[key]].nil?
198
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
203
199
  end
204
200
  end
205
-
206
- self
201
+ new(transformed_hash)
207
202
  end
208
203
 
209
204
  # Deserializes the data based on type
210
205
  # @param string type Data type
211
206
  # @param string value Value to be deserialized
212
207
  # @return [Object] Deserialized data
213
- def _deserialize(type, value)
208
+ def self._deserialize(type, value)
214
209
  case type.to_sym
215
210
  when :Time
216
211
  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)
@@ -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)
@@ -130,6 +130,7 @@ module DealMakerAPI
130
130
  # Show invalid properties with the reasons. Usually used together with valid?
131
131
  # @return Array for valid properties with the reasons
132
132
  def list_invalid_properties
133
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
133
134
  invalid_properties = Array.new
134
135
  invalid_properties
135
136
  end
@@ -137,6 +138,7 @@ module DealMakerAPI
137
138
  # Check to see if the all the properties in the model are valid
138
139
  # @return true if the model is valid
139
140
  def valid?
141
+ warn '[DEPRECATED] the `valid?` method is obsolete'
140
142
  true
141
143
  end
142
144
 
@@ -171,37 +173,30 @@ module DealMakerAPI
171
173
  # @param [Hash] attributes Model attributes in the form of hash
172
174
  # @return [Object] Returns the model itself
173
175
  def self.build_from_hash(attributes)
174
- new.build_from_hash(attributes)
175
- end
176
-
177
- # Builds the object from hash
178
- # @param [Hash] attributes Model attributes in the form of hash
179
- # @return [Object] Returns the model itself
180
- def build_from_hash(attributes)
181
176
  return nil unless attributes.is_a?(Hash)
182
177
  attributes = attributes.transform_keys(&:to_sym)
183
- self.class.openapi_types.each_pair do |key, type|
184
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
185
- self.send("#{key}=", nil)
178
+ transformed_hash = {}
179
+ openapi_types.each_pair do |key, type|
180
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
181
+ transformed_hash["#{key}"] = nil
186
182
  elsif type =~ /\AArray<(.*)>/i
187
183
  # check to ensure the input is an array given that the attribute
188
184
  # is documented as an array but the input is not
189
- if attributes[self.class.attribute_map[key]].is_a?(Array)
190
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
185
+ if attributes[attribute_map[key]].is_a?(Array)
186
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
191
187
  end
192
- elsif !attributes[self.class.attribute_map[key]].nil?
193
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
188
+ elsif !attributes[attribute_map[key]].nil?
189
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
194
190
  end
195
191
  end
196
-
197
- self
192
+ new(transformed_hash)
198
193
  end
199
194
 
200
195
  # Deserializes the data based on type
201
196
  # @param string type Data type
202
197
  # @param string value Value to be deserialized
203
198
  # @return [Object] Deserialized data
204
- def _deserialize(type, value)
199
+ def self._deserialize(type, value)
205
200
  case type.to_sym
206
201
  when :Time
207
202
  Time.parse(value)