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.
- 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
|
@@ -80,10 +80,14 @@ module DealMakerAPI
|
|
|
80
80
|
|
|
81
81
|
if attributes.key?(:'name')
|
|
82
82
|
self.name = attributes[:'name']
|
|
83
|
+
else
|
|
84
|
+
self.name = nil
|
|
83
85
|
end
|
|
84
86
|
|
|
85
87
|
if attributes.key?(:'enabled')
|
|
86
88
|
self.enabled = attributes[:'enabled']
|
|
89
|
+
else
|
|
90
|
+
self.enabled = nil
|
|
87
91
|
end
|
|
88
92
|
|
|
89
93
|
if attributes.key?(:'url')
|
|
@@ -98,12 +102,15 @@ module DealMakerAPI
|
|
|
98
102
|
if (value = attributes[:'webhook_subscription_deals_deal_id']).is_a?(Array)
|
|
99
103
|
self.webhook_subscription_deals_deal_id = value
|
|
100
104
|
end
|
|
105
|
+
else
|
|
106
|
+
self.webhook_subscription_deals_deal_id = nil
|
|
101
107
|
end
|
|
102
108
|
end
|
|
103
109
|
|
|
104
110
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
105
111
|
# @return Array for valid properties with the reasons
|
|
106
112
|
def list_invalid_properties
|
|
113
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
107
114
|
invalid_properties = Array.new
|
|
108
115
|
if @name.nil?
|
|
109
116
|
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
|
@@ -123,6 +130,7 @@ module DealMakerAPI
|
|
|
123
130
|
# Check to see if the all the properties in the model are valid
|
|
124
131
|
# @return true if the model is valid
|
|
125
132
|
def valid?
|
|
133
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
126
134
|
return false if @name.nil?
|
|
127
135
|
return false if @enabled.nil?
|
|
128
136
|
return false if @webhook_subscription_deals_deal_id.nil?
|
|
@@ -157,37 +165,30 @@ module DealMakerAPI
|
|
|
157
165
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
158
166
|
# @return [Object] Returns the model itself
|
|
159
167
|
def self.build_from_hash(attributes)
|
|
160
|
-
new.build_from_hash(attributes)
|
|
161
|
-
end
|
|
162
|
-
|
|
163
|
-
# Builds the object from hash
|
|
164
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
165
|
-
# @return [Object] Returns the model itself
|
|
166
|
-
def build_from_hash(attributes)
|
|
167
168
|
return nil unless attributes.is_a?(Hash)
|
|
168
169
|
attributes = attributes.transform_keys(&:to_sym)
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
170
|
+
transformed_hash = {}
|
|
171
|
+
openapi_types.each_pair do |key, type|
|
|
172
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
173
|
+
transformed_hash["#{key}"] = nil
|
|
172
174
|
elsif type =~ /\AArray<(.*)>/i
|
|
173
175
|
# check to ensure the input is an array given that the attribute
|
|
174
176
|
# is documented as an array but the input is not
|
|
175
|
-
if attributes[
|
|
176
|
-
|
|
177
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
178
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
177
179
|
end
|
|
178
|
-
elsif !attributes[
|
|
179
|
-
|
|
180
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
181
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
180
182
|
end
|
|
181
183
|
end
|
|
182
|
-
|
|
183
|
-
self
|
|
184
|
+
new(transformed_hash)
|
|
184
185
|
end
|
|
185
186
|
|
|
186
187
|
# Deserializes the data based on type
|
|
187
188
|
# @param string type Data type
|
|
188
189
|
# @param string value Value to be deserialized
|
|
189
190
|
# @return [Object] Deserialized data
|
|
190
|
-
def _deserialize(type, value)
|
|
191
|
+
def self._deserialize(type, value)
|
|
191
192
|
case type.to_sym
|
|
192
193
|
when :Time
|
|
193
194
|
Time.parse(value)
|
|
@@ -126,6 +126,7 @@ module DealMakerAPI
|
|
|
126
126
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
127
127
|
# @return Array for valid properties with the reasons
|
|
128
128
|
def list_invalid_properties
|
|
129
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
129
130
|
invalid_properties = Array.new
|
|
130
131
|
invalid_properties
|
|
131
132
|
end
|
|
@@ -133,6 +134,7 @@ module DealMakerAPI
|
|
|
133
134
|
# Check to see if the all the properties in the model are valid
|
|
134
135
|
# @return true if the model is valid
|
|
135
136
|
def valid?
|
|
137
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
136
138
|
true
|
|
137
139
|
end
|
|
138
140
|
|
|
@@ -166,37 +168,30 @@ module DealMakerAPI
|
|
|
166
168
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
167
169
|
# @return [Object] Returns the model itself
|
|
168
170
|
def self.build_from_hash(attributes)
|
|
169
|
-
new.build_from_hash(attributes)
|
|
170
|
-
end
|
|
171
|
-
|
|
172
|
-
# Builds the object from hash
|
|
173
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
174
|
-
# @return [Object] Returns the model itself
|
|
175
|
-
def build_from_hash(attributes)
|
|
176
171
|
return nil unless attributes.is_a?(Hash)
|
|
177
172
|
attributes = attributes.transform_keys(&:to_sym)
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
173
|
+
transformed_hash = {}
|
|
174
|
+
openapi_types.each_pair do |key, type|
|
|
175
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
176
|
+
transformed_hash["#{key}"] = nil
|
|
181
177
|
elsif type =~ /\AArray<(.*)>/i
|
|
182
178
|
# check to ensure the input is an array given that the attribute
|
|
183
179
|
# is documented as an array but the input is not
|
|
184
|
-
if attributes[
|
|
185
|
-
|
|
180
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
181
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
186
182
|
end
|
|
187
|
-
elsif !attributes[
|
|
188
|
-
|
|
183
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
184
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
189
185
|
end
|
|
190
186
|
end
|
|
191
|
-
|
|
192
|
-
self
|
|
187
|
+
new(transformed_hash)
|
|
193
188
|
end
|
|
194
189
|
|
|
195
190
|
# Deserializes the data based on type
|
|
196
191
|
# @param string type Data type
|
|
197
192
|
# @param string value Value to be deserialized
|
|
198
193
|
# @return [Object] Deserialized data
|
|
199
|
-
def _deserialize(type, value)
|
|
194
|
+
def self._deserialize(type, value)
|
|
200
195
|
case type.to_sym
|
|
201
196
|
when :Time
|
|
202
197
|
Time.parse(value)
|
|
@@ -135,6 +135,7 @@ module DealMakerAPI
|
|
|
135
135
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
136
136
|
# @return Array for valid properties with the reasons
|
|
137
137
|
def list_invalid_properties
|
|
138
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
138
139
|
invalid_properties = Array.new
|
|
139
140
|
invalid_properties
|
|
140
141
|
end
|
|
@@ -142,6 +143,7 @@ module DealMakerAPI
|
|
|
142
143
|
# Check to see if the all the properties in the model are valid
|
|
143
144
|
# @return true if the model is valid
|
|
144
145
|
def valid?
|
|
146
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
145
147
|
allocation_unit_validator = EnumAttributeValidator.new('String', ["securities", "amount"])
|
|
146
148
|
return false unless allocation_unit_validator.valid?(@allocation_unit)
|
|
147
149
|
true
|
|
@@ -186,37 +188,30 @@ module DealMakerAPI
|
|
|
186
188
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
187
189
|
# @return [Object] Returns the model itself
|
|
188
190
|
def self.build_from_hash(attributes)
|
|
189
|
-
new.build_from_hash(attributes)
|
|
190
|
-
end
|
|
191
|
-
|
|
192
|
-
# Builds the object from hash
|
|
193
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
194
|
-
# @return [Object] Returns the model itself
|
|
195
|
-
def build_from_hash(attributes)
|
|
196
191
|
return nil unless attributes.is_a?(Hash)
|
|
197
192
|
attributes = attributes.transform_keys(&:to_sym)
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
193
|
+
transformed_hash = {}
|
|
194
|
+
openapi_types.each_pair do |key, type|
|
|
195
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
196
|
+
transformed_hash["#{key}"] = nil
|
|
201
197
|
elsif type =~ /\AArray<(.*)>/i
|
|
202
198
|
# check to ensure the input is an array given that the attribute
|
|
203
199
|
# is documented as an array but the input is not
|
|
204
|
-
if attributes[
|
|
205
|
-
|
|
200
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
201
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
206
202
|
end
|
|
207
|
-
elsif !attributes[
|
|
208
|
-
|
|
203
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
204
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
209
205
|
end
|
|
210
206
|
end
|
|
211
|
-
|
|
212
|
-
self
|
|
207
|
+
new(transformed_hash)
|
|
213
208
|
end
|
|
214
209
|
|
|
215
210
|
# Deserializes the data based on type
|
|
216
211
|
# @param string type Data type
|
|
217
212
|
# @param string value Value to be deserialized
|
|
218
213
|
# @return [Object] Deserialized data
|
|
219
|
-
def _deserialize(type, value)
|
|
214
|
+
def self._deserialize(type, value)
|
|
220
215
|
case type.to_sym
|
|
221
216
|
when :Time
|
|
222
217
|
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)
|
|
@@ -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)
|
|
@@ -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
|
-
|
|
133
|
-
|
|
134
|
-
|
|
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[
|
|
139
|
-
|
|
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[
|
|
142
|
-
|
|
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)
|
|
@@ -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
|
-
|
|
133
|
-
|
|
134
|
-
|
|
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[
|
|
139
|
-
|
|
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[
|
|
142
|
-
|
|
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)
|
|
@@ -121,6 +121,7 @@ module DealMakerAPI
|
|
|
121
121
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
122
122
|
# @return Array for valid properties with the reasons
|
|
123
123
|
def list_invalid_properties
|
|
124
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
124
125
|
invalid_properties = Array.new
|
|
125
126
|
invalid_properties
|
|
126
127
|
end
|
|
@@ -128,6 +129,7 @@ module DealMakerAPI
|
|
|
128
129
|
# Check to see if the all the properties in the model are valid
|
|
129
130
|
# @return true if the model is valid
|
|
130
131
|
def valid?
|
|
132
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
131
133
|
true
|
|
132
134
|
end
|
|
133
135
|
|
|
@@ -161,37 +163,30 @@ module DealMakerAPI
|
|
|
161
163
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
162
164
|
# @return [Object] Returns the model itself
|
|
163
165
|
def self.build_from_hash(attributes)
|
|
164
|
-
new.build_from_hash(attributes)
|
|
165
|
-
end
|
|
166
|
-
|
|
167
|
-
# Builds the object from hash
|
|
168
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
169
|
-
# @return [Object] Returns the model itself
|
|
170
|
-
def build_from_hash(attributes)
|
|
171
166
|
return nil unless attributes.is_a?(Hash)
|
|
172
167
|
attributes = attributes.transform_keys(&:to_sym)
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
168
|
+
transformed_hash = {}
|
|
169
|
+
openapi_types.each_pair do |key, type|
|
|
170
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
171
|
+
transformed_hash["#{key}"] = nil
|
|
176
172
|
elsif type =~ /\AArray<(.*)>/i
|
|
177
173
|
# check to ensure the input is an array given that the attribute
|
|
178
174
|
# is documented as an array but the input is not
|
|
179
|
-
if attributes[
|
|
180
|
-
|
|
175
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
176
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
181
177
|
end
|
|
182
|
-
elsif !attributes[
|
|
183
|
-
|
|
178
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
179
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
184
180
|
end
|
|
185
181
|
end
|
|
186
|
-
|
|
187
|
-
self
|
|
182
|
+
new(transformed_hash)
|
|
188
183
|
end
|
|
189
184
|
|
|
190
185
|
# Deserializes the data based on type
|
|
191
186
|
# @param string type Data type
|
|
192
187
|
# @param string value Value to be deserialized
|
|
193
188
|
# @return [Object] Deserialized data
|
|
194
|
-
def _deserialize(type, value)
|
|
189
|
+
def self._deserialize(type, value)
|
|
195
190
|
case type.to_sym
|
|
196
191
|
when :Time
|
|
197
192
|
Time.parse(value)
|
|
@@ -121,6 +121,7 @@ module DealMakerAPI
|
|
|
121
121
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
122
122
|
# @return Array for valid properties with the reasons
|
|
123
123
|
def list_invalid_properties
|
|
124
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
124
125
|
invalid_properties = Array.new
|
|
125
126
|
invalid_properties
|
|
126
127
|
end
|
|
@@ -128,6 +129,7 @@ module DealMakerAPI
|
|
|
128
129
|
# Check to see if the all the properties in the model are valid
|
|
129
130
|
# @return true if the model is valid
|
|
130
131
|
def valid?
|
|
132
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
131
133
|
true
|
|
132
134
|
end
|
|
133
135
|
|
|
@@ -161,37 +163,30 @@ module DealMakerAPI
|
|
|
161
163
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
162
164
|
# @return [Object] Returns the model itself
|
|
163
165
|
def self.build_from_hash(attributes)
|
|
164
|
-
new.build_from_hash(attributes)
|
|
165
|
-
end
|
|
166
|
-
|
|
167
|
-
# Builds the object from hash
|
|
168
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
169
|
-
# @return [Object] Returns the model itself
|
|
170
|
-
def build_from_hash(attributes)
|
|
171
166
|
return nil unless attributes.is_a?(Hash)
|
|
172
167
|
attributes = attributes.transform_keys(&:to_sym)
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
168
|
+
transformed_hash = {}
|
|
169
|
+
openapi_types.each_pair do |key, type|
|
|
170
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
171
|
+
transformed_hash["#{key}"] = nil
|
|
176
172
|
elsif type =~ /\AArray<(.*)>/i
|
|
177
173
|
# check to ensure the input is an array given that the attribute
|
|
178
174
|
# is documented as an array but the input is not
|
|
179
|
-
if attributes[
|
|
180
|
-
|
|
175
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
176
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
181
177
|
end
|
|
182
|
-
elsif !attributes[
|
|
183
|
-
|
|
178
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
179
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
184
180
|
end
|
|
185
181
|
end
|
|
186
|
-
|
|
187
|
-
self
|
|
182
|
+
new(transformed_hash)
|
|
188
183
|
end
|
|
189
184
|
|
|
190
185
|
# Deserializes the data based on type
|
|
191
186
|
# @param string type Data type
|
|
192
187
|
# @param string value Value to be deserialized
|
|
193
188
|
# @return [Object] Deserialized data
|
|
194
|
-
def _deserialize(type, value)
|
|
189
|
+
def self._deserialize(type, value)
|
|
195
190
|
case type.to_sym
|
|
196
191
|
when :Time
|
|
197
192
|
Time.parse(value)
|