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
@@ -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)
@@ -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)
@@ -76,6 +76,7 @@ module DealMakerAPI
76
76
  # Show invalid properties with the reasons. Usually used together with valid?
77
77
  # @return Array for valid properties with the reasons
78
78
  def list_invalid_properties
79
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
79
80
  invalid_properties = Array.new
80
81
  invalid_properties
81
82
  end
@@ -83,6 +84,7 @@ module DealMakerAPI
83
84
  # Check to see if the all the properties in the model are valid
84
85
  # @return true if the model is valid
85
86
  def valid?
87
+ warn '[DEPRECATED] the `valid?` method is obsolete'
86
88
  true
87
89
  end
88
90
 
@@ -111,37 +113,30 @@ module DealMakerAPI
111
113
  # @param [Hash] attributes Model attributes in the form of hash
112
114
  # @return [Object] Returns the model itself
113
115
  def self.build_from_hash(attributes)
114
- new.build_from_hash(attributes)
115
- end
116
-
117
- # Builds the object from hash
118
- # @param [Hash] attributes Model attributes in the form of hash
119
- # @return [Object] Returns the model itself
120
- def build_from_hash(attributes)
121
116
  return nil unless attributes.is_a?(Hash)
122
117
  attributes = attributes.transform_keys(&:to_sym)
123
- self.class.openapi_types.each_pair do |key, type|
124
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
125
- self.send("#{key}=", nil)
118
+ transformed_hash = {}
119
+ openapi_types.each_pair do |key, type|
120
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
121
+ transformed_hash["#{key}"] = nil
126
122
  elsif type =~ /\AArray<(.*)>/i
127
123
  # check to ensure the input is an array given that the attribute
128
124
  # is documented as an array but the input is not
129
- if attributes[self.class.attribute_map[key]].is_a?(Array)
130
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
125
+ if attributes[attribute_map[key]].is_a?(Array)
126
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
131
127
  end
132
- elsif !attributes[self.class.attribute_map[key]].nil?
133
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
128
+ elsif !attributes[attribute_map[key]].nil?
129
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
134
130
  end
135
131
  end
136
-
137
- self
132
+ new(transformed_hash)
138
133
  end
139
134
 
140
135
  # Deserializes the data based on type
141
136
  # @param string type Data type
142
137
  # @param string value Value to be deserialized
143
138
  # @return [Object] Deserialized data
144
- def _deserialize(type, value)
139
+ def self._deserialize(type, value)
145
140
  case type.to_sym
146
141
  when :Time
147
142
  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)
@@ -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)