DealMakerAPI 0.83.0 → 0.83.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +9 -4
- data/docs/CompanyApi.md +213 -0
- data/docs/V1EntitiesBulkUploadDetails.md +18 -0
- data/docs/V1EntitiesBulkUploads.md +18 -0
- data/lib/DealMakerAPI/api/company_api.rb +210 -0
- data/lib/DealMakerAPI/configuration.rb +9 -7
- data/lib/DealMakerAPI/models/add506c_document_request.rb +14 -17
- data/lib/DealMakerAPI/models/add_document_request.rb +14 -17
- data/lib/DealMakerAPI/models/create_bulk_upload_detail_request.rb +16 -17
- data/lib/DealMakerAPI/models/create_bulk_upload_request.rb +16 -17
- data/lib/DealMakerAPI/models/create_company_request.rb +24 -17
- data/lib/DealMakerAPI/models/create_corporation_profile_request.rb +14 -17
- data/lib/DealMakerAPI/models/create_deal_setup_request.rb +18 -17
- data/lib/DealMakerAPI/models/create_individual_profile_request.rb +14 -17
- data/lib/DealMakerAPI/models/create_investor_request.rb +14 -17
- data/lib/DealMakerAPI/models/create_joint_profile_request.rb +14 -17
- data/lib/DealMakerAPI/models/create_trust_profile_request.rb +14 -17
- data/lib/DealMakerAPI/models/edit_investor_tags_request.rb +14 -17
- data/lib/DealMakerAPI/models/generate_url_request.rb +14 -17
- data/lib/DealMakerAPI/models/patch_corporation_profile_request.rb +12 -17
- data/lib/DealMakerAPI/models/patch_individual_profile_request.rb +12 -17
- data/lib/DealMakerAPI/models/patch_investor_request.rb +14 -17
- data/lib/DealMakerAPI/models/patch_joint_profile_request.rb +12 -17
- data/lib/DealMakerAPI/models/patch_trust_profile_request.rb +12 -17
- data/lib/DealMakerAPI/models/post_webhooks_request.rb +18 -17
- data/lib/DealMakerAPI/models/put_webhooks_id_request.rb +12 -17
- data/lib/DealMakerAPI/models/update_investor_request.rb +12 -17
- data/lib/DealMakerAPI/models/v1_entities_address.rb +12 -17
- data/lib/DealMakerAPI/models/v1_entities_addresses.rb +12 -17
- data/lib/DealMakerAPI/models/v1_entities_attachment.rb +12 -17
- data/lib/DealMakerAPI/models/v1_entities_background_check_search.rb +12 -17
- data/lib/DealMakerAPI/models/v1_entities_bulk_upload.rb +12 -17
- data/lib/DealMakerAPI/models/v1_entities_bulk_upload_detail.rb +12 -17
- data/lib/DealMakerAPI/models/v1_entities_bulk_upload_details.rb +215 -0
- data/lib/DealMakerAPI/models/v1_entities_bulk_uploads.rb +215 -0
- data/lib/DealMakerAPI/models/v1_entities_company.rb +12 -17
- data/lib/DealMakerAPI/models/v1_entities_company_deal.rb +12 -17
- data/lib/DealMakerAPI/models/v1_entities_company_deals.rb +12 -17
- data/lib/DealMakerAPI/models/v1_entities_deal.rb +12 -17
- data/lib/DealMakerAPI/models/v1_entities_deal_enterprise.rb +12 -17
- data/lib/DealMakerAPI/models/v1_entities_deal_funding_metrics.rb +12 -17
- data/lib/DealMakerAPI/models/v1_entities_deal_investor_metrics.rb +12 -17
- data/lib/DealMakerAPI/models/v1_entities_deal_issuer.rb +12 -17
- data/lib/DealMakerAPI/models/v1_entities_deal_setup.rb +12 -17
- data/lib/DealMakerAPI/models/v1_entities_deal_setup_user.rb +12 -17
- data/lib/DealMakerAPI/models/v1_entities_deals.rb +12 -17
- data/lib/DealMakerAPI/models/v1_entities_express_wire_instruction.rb +12 -17
- data/lib/DealMakerAPI/models/v1_entities_express_wire_instructions.rb +12 -17
- data/lib/DealMakerAPI/models/v1_entities_investor.rb +12 -17
- data/lib/DealMakerAPI/models/v1_entities_investor_otp_access_link.rb +12 -17
- data/lib/DealMakerAPI/models/v1_entities_investor_profile_address.rb +12 -17
- data/lib/DealMakerAPI/models/v1_entities_investor_profile_corporation.rb +12 -17
- data/lib/DealMakerAPI/models/v1_entities_investor_profile_fields_account_holder.rb +12 -17
- data/lib/DealMakerAPI/models/v1_entities_investor_profile_fields_corporation.rb +12 -17
- data/lib/DealMakerAPI/models/v1_entities_investor_profile_fields_primary_holder.rb +12 -17
- data/lib/DealMakerAPI/models/v1_entities_investor_profile_fields_trust.rb +12 -17
- data/lib/DealMakerAPI/models/v1_entities_investor_profile_individual.rb +12 -17
- data/lib/DealMakerAPI/models/v1_entities_investor_profile_item.rb +12 -17
- data/lib/DealMakerAPI/models/v1_entities_investor_profile_joint.rb +12 -17
- data/lib/DealMakerAPI/models/v1_entities_investor_profile_owner.rb +12 -17
- data/lib/DealMakerAPI/models/v1_entities_investor_profile_trust.rb +12 -17
- data/lib/DealMakerAPI/models/v1_entities_investor_profiles.rb +12 -17
- data/lib/DealMakerAPI/models/v1_entities_investor_user.rb +12 -17
- data/lib/DealMakerAPI/models/v1_entities_investors.rb +12 -17
- data/lib/DealMakerAPI/models/v1_entities_presigned_url_result.rb +12 -17
- data/lib/DealMakerAPI/models/v1_entities_shareholder.rb +12 -17
- data/lib/DealMakerAPI/models/v1_entities_shareholders.rb +12 -17
- data/lib/DealMakerAPI/models/v1_entities_shareholders_tags.rb +12 -17
- data/lib/DealMakerAPI/models/v1_entities_subscription_agreement.rb +12 -17
- data/lib/DealMakerAPI/models/v1_entities_webhooks_deal.rb +12 -17
- data/lib/DealMakerAPI/models/v1_entities_webhooks_security_token.rb +12 -17
- data/lib/DealMakerAPI/models/v1_entities_webhooks_subscription.rb +12 -17
- data/lib/DealMakerAPI/models/v1_entities_webhooks_subscription_deal.rb +12 -17
- data/lib/DealMakerAPI/models/v1_entities_webhooks_subscription_deals.rb +12 -17
- data/lib/DealMakerAPI/version.rb +1 -1
- data/lib/DealMakerAPI.rb +2 -0
- data/spec/api/company_api_spec.rb +41 -0
- data/spec/models/v1_entities_bulk_upload_details_spec.rb +34 -0
- data/spec/models/v1_entities_bulk_uploads_spec.rb +34 -0
- 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
|
-
|
113
|
-
|
114
|
-
|
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[
|
119
|
-
|
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[
|
122
|
-
|
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)
|
@@ -318,6 +318,7 @@ module DealMakerAPI
|
|
318
318
|
# Show invalid properties with the reasons. Usually used together with valid?
|
319
319
|
# @return Array for valid properties with the reasons
|
320
320
|
def list_invalid_properties
|
321
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
321
322
|
invalid_properties = Array.new
|
322
323
|
invalid_properties
|
323
324
|
end
|
@@ -325,6 +326,7 @@ module DealMakerAPI
|
|
325
326
|
# Check to see if the all the properties in the model are valid
|
326
327
|
# @return true if the model is valid
|
327
328
|
def valid?
|
329
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
328
330
|
allocation_unit_validator = EnumAttributeValidator.new('String', ["securities", "amount"])
|
329
331
|
return false unless allocation_unit_validator.valid?(@allocation_unit)
|
330
332
|
state_validator = EnumAttributeValidator.new('String', ["draft", "invited", "cosigning", "signed", "waiting", "accepted", "inactive"])
|
@@ -426,37 +428,30 @@ module DealMakerAPI
|
|
426
428
|
# @param [Hash] attributes Model attributes in the form of hash
|
427
429
|
# @return [Object] Returns the model itself
|
428
430
|
def self.build_from_hash(attributes)
|
429
|
-
new.build_from_hash(attributes)
|
430
|
-
end
|
431
|
-
|
432
|
-
# Builds the object from hash
|
433
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
434
|
-
# @return [Object] Returns the model itself
|
435
|
-
def build_from_hash(attributes)
|
436
431
|
return nil unless attributes.is_a?(Hash)
|
437
432
|
attributes = attributes.transform_keys(&:to_sym)
|
438
|
-
|
439
|
-
|
440
|
-
|
433
|
+
transformed_hash = {}
|
434
|
+
openapi_types.each_pair do |key, type|
|
435
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
436
|
+
transformed_hash["#{key}"] = nil
|
441
437
|
elsif type =~ /\AArray<(.*)>/i
|
442
438
|
# check to ensure the input is an array given that the attribute
|
443
439
|
# is documented as an array but the input is not
|
444
|
-
if attributes[
|
445
|
-
|
440
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
441
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
446
442
|
end
|
447
|
-
elsif !attributes[
|
448
|
-
|
443
|
+
elsif !attributes[attribute_map[key]].nil?
|
444
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
449
445
|
end
|
450
446
|
end
|
451
|
-
|
452
|
-
self
|
447
|
+
new(transformed_hash)
|
453
448
|
end
|
454
449
|
|
455
450
|
# Deserializes the data based on type
|
456
451
|
# @param string type Data type
|
457
452
|
# @param string value Value to be deserialized
|
458
453
|
# @return [Object] Deserialized data
|
459
|
-
def _deserialize(type, value)
|
454
|
+
def self._deserialize(type, value)
|
460
455
|
case type.to_sym
|
461
456
|
when :Time
|
462
457
|
Time.parse(value)
|
@@ -67,6 +67,7 @@ module DealMakerAPI
|
|
67
67
|
# Show invalid properties with the reasons. Usually used together with valid?
|
68
68
|
# @return Array for valid properties with the reasons
|
69
69
|
def list_invalid_properties
|
70
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
70
71
|
invalid_properties = Array.new
|
71
72
|
invalid_properties
|
72
73
|
end
|
@@ -74,6 +75,7 @@ module DealMakerAPI
|
|
74
75
|
# Check to see if the all the properties in the model are valid
|
75
76
|
# @return true if the model is valid
|
76
77
|
def valid?
|
78
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
77
79
|
true
|
78
80
|
end
|
79
81
|
|
@@ -101,37 +103,30 @@ module DealMakerAPI
|
|
101
103
|
# @param [Hash] attributes Model attributes in the form of hash
|
102
104
|
# @return [Object] Returns the model itself
|
103
105
|
def self.build_from_hash(attributes)
|
104
|
-
new.build_from_hash(attributes)
|
105
|
-
end
|
106
|
-
|
107
|
-
# Builds the object from hash
|
108
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
109
|
-
# @return [Object] Returns the model itself
|
110
|
-
def build_from_hash(attributes)
|
111
106
|
return nil unless attributes.is_a?(Hash)
|
112
107
|
attributes = attributes.transform_keys(&:to_sym)
|
113
|
-
|
114
|
-
|
115
|
-
|
108
|
+
transformed_hash = {}
|
109
|
+
openapi_types.each_pair do |key, type|
|
110
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
111
|
+
transformed_hash["#{key}"] = nil
|
116
112
|
elsif type =~ /\AArray<(.*)>/i
|
117
113
|
# check to ensure the input is an array given that the attribute
|
118
114
|
# is documented as an array but the input is not
|
119
|
-
if attributes[
|
120
|
-
|
115
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
116
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
121
117
|
end
|
122
|
-
elsif !attributes[
|
123
|
-
|
118
|
+
elsif !attributes[attribute_map[key]].nil?
|
119
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
124
120
|
end
|
125
121
|
end
|
126
|
-
|
127
|
-
self
|
122
|
+
new(transformed_hash)
|
128
123
|
end
|
129
124
|
|
130
125
|
# Deserializes the data based on type
|
131
126
|
# @param string type Data type
|
132
127
|
# @param string value Value to be deserialized
|
133
128
|
# @return [Object] Deserialized data
|
134
|
-
def _deserialize(type, value)
|
129
|
+
def self._deserialize(type, value)
|
135
130
|
case type.to_sym
|
136
131
|
when :Time
|
137
132
|
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
|
-
|
163
|
-
|
164
|
-
|
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[
|
169
|
-
|
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[
|
172
|
-
|
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)
|
@@ -184,6 +184,7 @@ module DealMakerAPI
|
|
184
184
|
# Show invalid properties with the reasons. Usually used together with valid?
|
185
185
|
# @return Array for valid properties with the reasons
|
186
186
|
def list_invalid_properties
|
187
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
187
188
|
invalid_properties = Array.new
|
188
189
|
invalid_properties
|
189
190
|
end
|
@@ -191,6 +192,7 @@ module DealMakerAPI
|
|
191
192
|
# Check to see if the all the properties in the model are valid
|
192
193
|
# @return true if the model is valid
|
193
194
|
def valid?
|
195
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
194
196
|
type_validator = EnumAttributeValidator.new('String', ["individual", "joint", "corporation", "trust"])
|
195
197
|
return false unless type_validator.valid?(@type)
|
196
198
|
true
|
@@ -241,37 +243,30 @@ module DealMakerAPI
|
|
241
243
|
# @param [Hash] attributes Model attributes in the form of hash
|
242
244
|
# @return [Object] Returns the model itself
|
243
245
|
def self.build_from_hash(attributes)
|
244
|
-
new.build_from_hash(attributes)
|
245
|
-
end
|
246
|
-
|
247
|
-
# Builds the object from hash
|
248
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
249
|
-
# @return [Object] Returns the model itself
|
250
|
-
def build_from_hash(attributes)
|
251
246
|
return nil unless attributes.is_a?(Hash)
|
252
247
|
attributes = attributes.transform_keys(&:to_sym)
|
253
|
-
|
254
|
-
|
255
|
-
|
248
|
+
transformed_hash = {}
|
249
|
+
openapi_types.each_pair do |key, type|
|
250
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
251
|
+
transformed_hash["#{key}"] = nil
|
256
252
|
elsif type =~ /\AArray<(.*)>/i
|
257
253
|
# check to ensure the input is an array given that the attribute
|
258
254
|
# is documented as an array but the input is not
|
259
|
-
if attributes[
|
260
|
-
|
255
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
256
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
261
257
|
end
|
262
|
-
elsif !attributes[
|
263
|
-
|
258
|
+
elsif !attributes[attribute_map[key]].nil?
|
259
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
264
260
|
end
|
265
261
|
end
|
266
|
-
|
267
|
-
self
|
262
|
+
new(transformed_hash)
|
268
263
|
end
|
269
264
|
|
270
265
|
# Deserializes the data based on type
|
271
266
|
# @param string type Data type
|
272
267
|
# @param string value Value to be deserialized
|
273
268
|
# @return [Object] Deserialized data
|
274
|
-
def _deserialize(type, value)
|
269
|
+
def self._deserialize(type, value)
|
275
270
|
case type.to_sym
|
276
271
|
when :Time
|
277
272
|
Time.parse(value)
|
@@ -110,6 +110,7 @@ module DealMakerAPI
|
|
110
110
|
# Show invalid properties with the reasons. Usually used together with valid?
|
111
111
|
# @return Array for valid properties with the reasons
|
112
112
|
def list_invalid_properties
|
113
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
113
114
|
invalid_properties = Array.new
|
114
115
|
invalid_properties
|
115
116
|
end
|
@@ -117,6 +118,7 @@ module DealMakerAPI
|
|
117
118
|
# Check to see if the all the properties in the model are valid
|
118
119
|
# @return true if the model is valid
|
119
120
|
def valid?
|
121
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
120
122
|
true
|
121
123
|
end
|
122
124
|
|
@@ -149,37 +151,30 @@ module DealMakerAPI
|
|
149
151
|
# @param [Hash] attributes Model attributes in the form of hash
|
150
152
|
# @return [Object] Returns the model itself
|
151
153
|
def self.build_from_hash(attributes)
|
152
|
-
new.build_from_hash(attributes)
|
153
|
-
end
|
154
|
-
|
155
|
-
# Builds the object from hash
|
156
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
157
|
-
# @return [Object] Returns the model itself
|
158
|
-
def build_from_hash(attributes)
|
159
154
|
return nil unless attributes.is_a?(Hash)
|
160
155
|
attributes = attributes.transform_keys(&:to_sym)
|
161
|
-
|
162
|
-
|
163
|
-
|
156
|
+
transformed_hash = {}
|
157
|
+
openapi_types.each_pair do |key, type|
|
158
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
159
|
+
transformed_hash["#{key}"] = nil
|
164
160
|
elsif type =~ /\AArray<(.*)>/i
|
165
161
|
# check to ensure the input is an array given that the attribute
|
166
162
|
# is documented as an array but the input is not
|
167
|
-
if attributes[
|
168
|
-
|
163
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
164
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
169
165
|
end
|
170
|
-
elsif !attributes[
|
171
|
-
|
166
|
+
elsif !attributes[attribute_map[key]].nil?
|
167
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
172
168
|
end
|
173
169
|
end
|
174
|
-
|
175
|
-
self
|
170
|
+
new(transformed_hash)
|
176
171
|
end
|
177
172
|
|
178
173
|
# Deserializes the data based on type
|
179
174
|
# @param string type Data type
|
180
175
|
# @param string value Value to be deserialized
|
181
176
|
# @return [Object] Deserialized data
|
182
|
-
def _deserialize(type, value)
|
177
|
+
def self._deserialize(type, value)
|
183
178
|
case type.to_sym
|
184
179
|
when :Time
|
185
180
|
Time.parse(value)
|
@@ -119,6 +119,7 @@ module DealMakerAPI
|
|
119
119
|
# Show invalid properties with the reasons. Usually used together with valid?
|
120
120
|
# @return Array for valid properties with the reasons
|
121
121
|
def list_invalid_properties
|
122
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
122
123
|
invalid_properties = Array.new
|
123
124
|
invalid_properties
|
124
125
|
end
|
@@ -126,6 +127,7 @@ module DealMakerAPI
|
|
126
127
|
# Check to see if the all the properties in the model are valid
|
127
128
|
# @return true if the model is valid
|
128
129
|
def valid?
|
130
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
129
131
|
true
|
130
132
|
end
|
131
133
|
|
@@ -159,37 +161,30 @@ module DealMakerAPI
|
|
159
161
|
# @param [Hash] attributes Model attributes in the form of hash
|
160
162
|
# @return [Object] Returns the model itself
|
161
163
|
def self.build_from_hash(attributes)
|
162
|
-
new.build_from_hash(attributes)
|
163
|
-
end
|
164
|
-
|
165
|
-
# Builds the object from hash
|
166
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
167
|
-
# @return [Object] Returns the model itself
|
168
|
-
def build_from_hash(attributes)
|
169
164
|
return nil unless attributes.is_a?(Hash)
|
170
165
|
attributes = attributes.transform_keys(&:to_sym)
|
171
|
-
|
172
|
-
|
173
|
-
|
166
|
+
transformed_hash = {}
|
167
|
+
openapi_types.each_pair do |key, type|
|
168
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
169
|
+
transformed_hash["#{key}"] = nil
|
174
170
|
elsif type =~ /\AArray<(.*)>/i
|
175
171
|
# check to ensure the input is an array given that the attribute
|
176
172
|
# is documented as an array but the input is not
|
177
|
-
if attributes[
|
178
|
-
|
173
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
174
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
179
175
|
end
|
180
|
-
elsif !attributes[
|
181
|
-
|
176
|
+
elsif !attributes[attribute_map[key]].nil?
|
177
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
182
178
|
end
|
183
179
|
end
|
184
|
-
|
185
|
-
self
|
180
|
+
new(transformed_hash)
|
186
181
|
end
|
187
182
|
|
188
183
|
# Deserializes the data based on type
|
189
184
|
# @param string type Data type
|
190
185
|
# @param string value Value to be deserialized
|
191
186
|
# @return [Object] Deserialized data
|
192
|
-
def _deserialize(type, value)
|
187
|
+
def self._deserialize(type, value)
|
193
188
|
case type.to_sym
|
194
189
|
when :Time
|
195
190
|
Time.parse(value)
|
@@ -146,6 +146,7 @@ module DealMakerAPI
|
|
146
146
|
# Show invalid properties with the reasons. Usually used together with valid?
|
147
147
|
# @return Array for valid properties with the reasons
|
148
148
|
def list_invalid_properties
|
149
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
149
150
|
invalid_properties = Array.new
|
150
151
|
invalid_properties
|
151
152
|
end
|
@@ -153,6 +154,7 @@ module DealMakerAPI
|
|
153
154
|
# Check to see if the all the properties in the model are valid
|
154
155
|
# @return true if the model is valid
|
155
156
|
def valid?
|
157
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
156
158
|
true
|
157
159
|
end
|
158
160
|
|
@@ -189,37 +191,30 @@ module DealMakerAPI
|
|
189
191
|
# @param [Hash] attributes Model attributes in the form of hash
|
190
192
|
# @return [Object] Returns the model itself
|
191
193
|
def self.build_from_hash(attributes)
|
192
|
-
new.build_from_hash(attributes)
|
193
|
-
end
|
194
|
-
|
195
|
-
# Builds the object from hash
|
196
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
197
|
-
# @return [Object] Returns the model itself
|
198
|
-
def build_from_hash(attributes)
|
199
194
|
return nil unless attributes.is_a?(Hash)
|
200
195
|
attributes = attributes.transform_keys(&:to_sym)
|
201
|
-
|
202
|
-
|
203
|
-
|
196
|
+
transformed_hash = {}
|
197
|
+
openapi_types.each_pair do |key, type|
|
198
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
199
|
+
transformed_hash["#{key}"] = nil
|
204
200
|
elsif type =~ /\AArray<(.*)>/i
|
205
201
|
# check to ensure the input is an array given that the attribute
|
206
202
|
# is documented as an array but the input is not
|
207
|
-
if attributes[
|
208
|
-
|
203
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
204
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
209
205
|
end
|
210
|
-
elsif !attributes[
|
211
|
-
|
206
|
+
elsif !attributes[attribute_map[key]].nil?
|
207
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
212
208
|
end
|
213
209
|
end
|
214
|
-
|
215
|
-
self
|
210
|
+
new(transformed_hash)
|
216
211
|
end
|
217
212
|
|
218
213
|
# Deserializes the data based on type
|
219
214
|
# @param string type Data type
|
220
215
|
# @param string value Value to be deserialized
|
221
216
|
# @return [Object] Deserialized data
|
222
|
-
def _deserialize(type, value)
|
217
|
+
def self._deserialize(type, value)
|
223
218
|
case type.to_sym
|
224
219
|
when :Time
|
225
220
|
Time.parse(value)
|
@@ -119,6 +119,7 @@ module DealMakerAPI
|
|
119
119
|
# Show invalid properties with the reasons. Usually used together with valid?
|
120
120
|
# @return Array for valid properties with the reasons
|
121
121
|
def list_invalid_properties
|
122
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
122
123
|
invalid_properties = Array.new
|
123
124
|
invalid_properties
|
124
125
|
end
|
@@ -126,6 +127,7 @@ module DealMakerAPI
|
|
126
127
|
# Check to see if the all the properties in the model are valid
|
127
128
|
# @return true if the model is valid
|
128
129
|
def valid?
|
130
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
129
131
|
true
|
130
132
|
end
|
131
133
|
|
@@ -159,37 +161,30 @@ module DealMakerAPI
|
|
159
161
|
# @param [Hash] attributes Model attributes in the form of hash
|
160
162
|
# @return [Object] Returns the model itself
|
161
163
|
def self.build_from_hash(attributes)
|
162
|
-
new.build_from_hash(attributes)
|
163
|
-
end
|
164
|
-
|
165
|
-
# Builds the object from hash
|
166
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
167
|
-
# @return [Object] Returns the model itself
|
168
|
-
def build_from_hash(attributes)
|
169
164
|
return nil unless attributes.is_a?(Hash)
|
170
165
|
attributes = attributes.transform_keys(&:to_sym)
|
171
|
-
|
172
|
-
|
173
|
-
|
166
|
+
transformed_hash = {}
|
167
|
+
openapi_types.each_pair do |key, type|
|
168
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
169
|
+
transformed_hash["#{key}"] = nil
|
174
170
|
elsif type =~ /\AArray<(.*)>/i
|
175
171
|
# check to ensure the input is an array given that the attribute
|
176
172
|
# is documented as an array but the input is not
|
177
|
-
if attributes[
|
178
|
-
|
173
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
174
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
179
175
|
end
|
180
|
-
elsif !attributes[
|
181
|
-
|
176
|
+
elsif !attributes[attribute_map[key]].nil?
|
177
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
182
178
|
end
|
183
179
|
end
|
184
|
-
|
185
|
-
self
|
180
|
+
new(transformed_hash)
|
186
181
|
end
|
187
182
|
|
188
183
|
# Deserializes the data based on type
|
189
184
|
# @param string type Data type
|
190
185
|
# @param string value Value to be deserialized
|
191
186
|
# @return [Object] Deserialized data
|
192
|
-
def _deserialize(type, value)
|
187
|
+
def self._deserialize(type, value)
|
193
188
|
case type.to_sym
|
194
189
|
when :Time
|
195
190
|
Time.parse(value)
|
@@ -168,6 +168,7 @@ module DealMakerAPI
|
|
168
168
|
# Show invalid properties with the reasons. Usually used together with valid?
|
169
169
|
# @return Array for valid properties with the reasons
|
170
170
|
def list_invalid_properties
|
171
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
171
172
|
invalid_properties = Array.new
|
172
173
|
invalid_properties
|
173
174
|
end
|
@@ -175,6 +176,7 @@ module DealMakerAPI
|
|
175
176
|
# Check to see if the all the properties in the model are valid
|
176
177
|
# @return true if the model is valid
|
177
178
|
def valid?
|
179
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
178
180
|
type_validator = EnumAttributeValidator.new('String', ["individual", "joint", "corporation", "trust"])
|
179
181
|
return false unless type_validator.valid?(@type)
|
180
182
|
true
|
@@ -223,37 +225,30 @@ module DealMakerAPI
|
|
223
225
|
# @param [Hash] attributes Model attributes in the form of hash
|
224
226
|
# @return [Object] Returns the model itself
|
225
227
|
def self.build_from_hash(attributes)
|
226
|
-
new.build_from_hash(attributes)
|
227
|
-
end
|
228
|
-
|
229
|
-
# Builds the object from hash
|
230
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
231
|
-
# @return [Object] Returns the model itself
|
232
|
-
def build_from_hash(attributes)
|
233
228
|
return nil unless attributes.is_a?(Hash)
|
234
229
|
attributes = attributes.transform_keys(&:to_sym)
|
235
|
-
|
236
|
-
|
237
|
-
|
230
|
+
transformed_hash = {}
|
231
|
+
openapi_types.each_pair do |key, type|
|
232
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
233
|
+
transformed_hash["#{key}"] = nil
|
238
234
|
elsif type =~ /\AArray<(.*)>/i
|
239
235
|
# check to ensure the input is an array given that the attribute
|
240
236
|
# is documented as an array but the input is not
|
241
|
-
if attributes[
|
242
|
-
|
237
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
238
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
243
239
|
end
|
244
|
-
elsif !attributes[
|
245
|
-
|
240
|
+
elsif !attributes[attribute_map[key]].nil?
|
241
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
246
242
|
end
|
247
243
|
end
|
248
|
-
|
249
|
-
self
|
244
|
+
new(transformed_hash)
|
250
245
|
end
|
251
246
|
|
252
247
|
# Deserializes the data based on type
|
253
248
|
# @param string type Data type
|
254
249
|
# @param string value Value to be deserialized
|
255
250
|
# @return [Object] Deserialized data
|
256
|
-
def _deserialize(type, value)
|
251
|
+
def self._deserialize(type, value)
|
257
252
|
case type.to_sym
|
258
253
|
when :Time
|
259
254
|
Time.parse(value)
|