DealMakerAPI 0.82.1 → 0.83.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +12 -5
- data/docs/Add506cDocumentRequest.md +20 -0
- data/docs/CompanyApi.md +72 -1
- data/docs/CreateBulkUploadDetailRequest.md +22 -0
- data/docs/CreateBulkUploadRequest.md +0 -2
- data/docs/InvestorApi.md +139 -0
- data/docs/UpdateInvestorRequest.md +3 -1
- data/docs/UploadApi.md +9 -8
- data/docs/V1EntitiesBulkUploadDetail.md +30 -0
- data/docs/V1EntitiesPresignedUrlResult.md +20 -0
- data/lib/DealMakerAPI/api/company_api.rb +80 -0
- data/lib/DealMakerAPI/api/investor_api.rb +147 -0
- data/lib/DealMakerAPI/api/upload_api.rb +9 -7
- data/lib/DealMakerAPI/models/add506c_document_request.rb +232 -0
- data/lib/DealMakerAPI/models/add_document_request.rb +14 -17
- data/lib/DealMakerAPI/models/create_bulk_upload_detail_request.rb +249 -0
- data/lib/DealMakerAPI/models/create_bulk_upload_request.rb +17 -33
- 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 +26 -21
- 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 +276 -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 +226 -0
- 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 +4 -0
- data/spec/api/company_api_spec.rb +14 -0
- data/spec/api/investor_api_spec.rb +27 -0
- data/spec/api/upload_api_spec.rb +2 -2
- data/spec/models/add506c_document_request_spec.rb +40 -0
- data/spec/models/create_bulk_upload_detail_request_spec.rb +46 -0
- data/spec/models/create_bulk_upload_request_spec.rb +0 -6
- data/spec/models/update_investor_request_spec.rb +6 -0
- data/spec/models/v1_entities_bulk_upload_detail_spec.rb +70 -0
- data/spec/models/v1_entities_presigned_url_result_spec.rb +40 -0
- metadata +18 -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
|
-
|
112
|
-
|
113
|
-
|
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[
|
118
|
-
|
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[
|
121
|
-
|
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
|
-
|
276
|
-
|
277
|
-
|
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[
|
282
|
-
|
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[
|
285
|
-
|
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
|
-
|
123
|
-
|
124
|
-
|
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[
|
129
|
-
|
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[
|
132
|
-
|
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
|
-
|
183
|
-
|
184
|
-
|
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[
|
189
|
-
|
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[
|
192
|
-
|
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
|
-
|
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)
|
@@ -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
|
-
|
123
|
-
|
124
|
-
|
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[
|
129
|
-
|
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[
|
132
|
-
|
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
|
-
|
193
|
-
|
194
|
-
|
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[
|
199
|
-
|
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[
|
202
|
-
|
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
|
-
|
123
|
-
|
124
|
-
|
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[
|
129
|
-
|
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[
|
132
|
-
|
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
|
-
|
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)
|
@@ -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
|
-
|
184
|
-
|
185
|
-
|
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[
|
190
|
-
|
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[
|
193
|
-
|
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)
|