mx-platform-ruby 0.22.0 → 0.22.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +11 -25
- data/lib/mx-platform-ruby/api/mx_platform_api.rb +1 -1
- data/lib/mx-platform-ruby/api_client.rb +90 -55
- data/lib/mx-platform-ruby/api_error.rb +2 -1
- data/lib/mx-platform-ruby/configuration.rb +102 -26
- data/lib/mx-platform-ruby/models/account_create_request.rb +18 -18
- data/lib/mx-platform-ruby/models/account_create_request_body.rb +14 -18
- data/lib/mx-platform-ruby/models/account_number_response.rb +14 -18
- data/lib/mx-platform-ruby/models/account_numbers_response_body.rb +14 -18
- data/lib/mx-platform-ruby/models/account_owner_response.rb +14 -18
- data/lib/mx-platform-ruby/models/account_owners_response_body.rb +14 -18
- data/lib/mx-platform-ruby/models/account_response.rb +14 -18
- data/lib/mx-platform-ruby/models/account_response_body.rb +14 -18
- data/lib/mx-platform-ruby/models/account_update_request.rb +14 -18
- data/lib/mx-platform-ruby/models/account_update_request_body.rb +14 -18
- data/lib/mx-platform-ruby/models/accounts_response_body.rb +14 -18
- data/lib/mx-platform-ruby/models/authorization_code_request.rb +14 -18
- data/lib/mx-platform-ruby/models/authorization_code_request_body.rb +14 -18
- data/lib/mx-platform-ruby/models/authorization_code_response.rb +14 -18
- data/lib/mx-platform-ruby/models/authorization_code_response_body.rb +14 -18
- data/lib/mx-platform-ruby/models/categories_response_body.rb +14 -18
- data/lib/mx-platform-ruby/models/category_create_request.rb +16 -18
- data/lib/mx-platform-ruby/models/category_create_request_body.rb +14 -18
- data/lib/mx-platform-ruby/models/category_response.rb +14 -18
- data/lib/mx-platform-ruby/models/category_response_body.rb +14 -18
- data/lib/mx-platform-ruby/models/category_update_request.rb +14 -18
- data/lib/mx-platform-ruby/models/category_update_request_body.rb +14 -18
- data/lib/mx-platform-ruby/models/challenge_response.rb +14 -18
- data/lib/mx-platform-ruby/models/challenges_response_body.rb +14 -18
- data/lib/mx-platform-ruby/models/connect_widget_request.rb +14 -18
- data/lib/mx-platform-ruby/models/connect_widget_request_body.rb +14 -18
- data/lib/mx-platform-ruby/models/connect_widget_response.rb +14 -18
- data/lib/mx-platform-ruby/models/connect_widget_response_body.rb +14 -18
- data/lib/mx-platform-ruby/models/credential_request.rb +14 -18
- data/lib/mx-platform-ruby/models/credential_response.rb +14 -18
- data/lib/mx-platform-ruby/models/credentials_response_body.rb +14 -18
- data/lib/mx-platform-ruby/models/enhance_transaction_response.rb +14 -18
- data/lib/mx-platform-ruby/models/enhance_transactions_request.rb +18 -18
- data/lib/mx-platform-ruby/models/enhance_transactions_request_body.rb +14 -18
- data/lib/mx-platform-ruby/models/enhance_transactions_response_body.rb +14 -18
- data/lib/mx-platform-ruby/models/holding_response.rb +14 -18
- data/lib/mx-platform-ruby/models/holding_response_body.rb +14 -18
- data/lib/mx-platform-ruby/models/holdings_response_body.rb +14 -18
- data/lib/mx-platform-ruby/models/image_option_response.rb +14 -18
- data/lib/mx-platform-ruby/models/institution_response.rb +14 -18
- data/lib/mx-platform-ruby/models/institution_response_body.rb +14 -18
- data/lib/mx-platform-ruby/models/institutions_response_body.rb +14 -18
- data/lib/mx-platform-ruby/models/managed_account_create_request.rb +20 -18
- data/lib/mx-platform-ruby/models/managed_account_create_request_body.rb +14 -18
- data/lib/mx-platform-ruby/models/managed_account_update_request.rb +14 -18
- data/lib/mx-platform-ruby/models/managed_account_update_request_body.rb +14 -18
- data/lib/mx-platform-ruby/models/managed_member_create_request.rb +16 -18
- data/lib/mx-platform-ruby/models/managed_member_create_request_body.rb +14 -18
- data/lib/mx-platform-ruby/models/managed_member_update_request.rb +14 -18
- data/lib/mx-platform-ruby/models/managed_member_update_request_body.rb +14 -18
- data/lib/mx-platform-ruby/models/managed_transaction_create_request.rb +24 -18
- data/lib/mx-platform-ruby/models/managed_transaction_create_request_body.rb +14 -18
- data/lib/mx-platform-ruby/models/managed_transaction_update_request.rb +14 -18
- data/lib/mx-platform-ruby/models/managed_transaction_update_request_body.rb +14 -18
- data/lib/mx-platform-ruby/models/member_create_request.rb +18 -18
- data/lib/mx-platform-ruby/models/member_create_request_body.rb +14 -18
- data/lib/mx-platform-ruby/models/member_response.rb +14 -18
- data/lib/mx-platform-ruby/models/member_response_body.rb +14 -18
- data/lib/mx-platform-ruby/models/member_resume_request.rb +14 -18
- data/lib/mx-platform-ruby/models/member_resume_request_body.rb +14 -18
- data/lib/mx-platform-ruby/models/member_status_response.rb +14 -18
- data/lib/mx-platform-ruby/models/member_status_response_body.rb +14 -18
- data/lib/mx-platform-ruby/models/member_update_request.rb +14 -18
- data/lib/mx-platform-ruby/models/member_update_request_body.rb +14 -18
- data/lib/mx-platform-ruby/models/members_response_body.rb +14 -18
- data/lib/mx-platform-ruby/models/merchant_location_response.rb +14 -18
- data/lib/mx-platform-ruby/models/merchant_location_response_body.rb +14 -18
- data/lib/mx-platform-ruby/models/merchant_response.rb +14 -18
- data/lib/mx-platform-ruby/models/merchant_response_body.rb +14 -18
- data/lib/mx-platform-ruby/models/merchants_response_body.rb +14 -18
- data/lib/mx-platform-ruby/models/o_auth_window_response.rb +14 -18
- data/lib/mx-platform-ruby/models/o_auth_window_response_body.rb +14 -18
- data/lib/mx-platform-ruby/models/option_response.rb +14 -18
- data/lib/mx-platform-ruby/models/pagination_response.rb +14 -18
- data/lib/mx-platform-ruby/models/payment_processor_authorization_code_request.rb +14 -18
- data/lib/mx-platform-ruby/models/payment_processor_authorization_code_request_body.rb +14 -18
- data/lib/mx-platform-ruby/models/payment_processor_authorization_code_response.rb +14 -18
- data/lib/mx-platform-ruby/models/payment_processor_authorization_code_response_body.rb +14 -18
- data/lib/mx-platform-ruby/models/spending_plan_account_response.rb +14 -18
- data/lib/mx-platform-ruby/models/spending_plan_accounts_response.rb +14 -18
- data/lib/mx-platform-ruby/models/spending_plan_iteration_item_create_request_body.rb +16 -18
- data/lib/mx-platform-ruby/models/spending_plan_iteration_item_response.rb +14 -18
- data/lib/mx-platform-ruby/models/spending_plan_iteration_items_response_body.rb +14 -18
- data/lib/mx-platform-ruby/models/spending_plan_iteration_response.rb +14 -18
- data/lib/mx-platform-ruby/models/spending_plan_iterations_response.rb +14 -18
- data/lib/mx-platform-ruby/models/spending_plan_response.rb +14 -18
- data/lib/mx-platform-ruby/models/spending_plans_response_body.rb +14 -18
- data/lib/mx-platform-ruby/models/statement_response.rb +14 -18
- data/lib/mx-platform-ruby/models/statement_response_body.rb +14 -18
- data/lib/mx-platform-ruby/models/statements_response_body.rb +14 -18
- data/lib/mx-platform-ruby/models/tag_create_request.rb +16 -18
- data/lib/mx-platform-ruby/models/tag_create_request_body.rb +14 -18
- data/lib/mx-platform-ruby/models/tag_response.rb +14 -18
- data/lib/mx-platform-ruby/models/tag_response_body.rb +14 -18
- data/lib/mx-platform-ruby/models/tag_update_request.rb +16 -18
- data/lib/mx-platform-ruby/models/tag_update_request_body.rb +14 -18
- data/lib/mx-platform-ruby/models/tagging_create_request.rb +18 -18
- data/lib/mx-platform-ruby/models/tagging_create_request_body.rb +14 -18
- data/lib/mx-platform-ruby/models/tagging_response.rb +14 -18
- data/lib/mx-platform-ruby/models/tagging_response_body.rb +14 -18
- data/lib/mx-platform-ruby/models/tagging_update_request.rb +16 -18
- data/lib/mx-platform-ruby/models/tagging_update_request_body.rb +14 -18
- data/lib/mx-platform-ruby/models/taggings_response_body.rb +14 -18
- data/lib/mx-platform-ruby/models/tags_response_body.rb +14 -18
- data/lib/mx-platform-ruby/models/tax_document_response.rb +14 -18
- data/lib/mx-platform-ruby/models/tax_document_response_body.rb +14 -18
- data/lib/mx-platform-ruby/models/tax_documents_response_body.rb +14 -18
- data/lib/mx-platform-ruby/models/transaction_response.rb +14 -18
- data/lib/mx-platform-ruby/models/transaction_response_body.rb +14 -18
- data/lib/mx-platform-ruby/models/transaction_rule_create_request.rb +18 -18
- data/lib/mx-platform-ruby/models/transaction_rule_create_request_body.rb +14 -18
- data/lib/mx-platform-ruby/models/transaction_rule_response.rb +14 -18
- data/lib/mx-platform-ruby/models/transaction_rule_response_body.rb +14 -18
- data/lib/mx-platform-ruby/models/transaction_rule_update_request.rb +14 -18
- data/lib/mx-platform-ruby/models/transaction_rule_update_request_body.rb +14 -18
- data/lib/mx-platform-ruby/models/transaction_rules_response_body.rb +14 -18
- data/lib/mx-platform-ruby/models/transaction_update_request.rb +16 -18
- data/lib/mx-platform-ruby/models/transaction_update_request_body.rb +14 -18
- data/lib/mx-platform-ruby/models/transactions_response_body.rb +14 -18
- data/lib/mx-platform-ruby/models/user_create_request.rb +14 -18
- data/lib/mx-platform-ruby/models/user_create_request_body.rb +14 -18
- data/lib/mx-platform-ruby/models/user_response.rb +14 -18
- data/lib/mx-platform-ruby/models/user_response_body.rb +14 -18
- data/lib/mx-platform-ruby/models/user_update_request.rb +14 -18
- data/lib/mx-platform-ruby/models/user_update_request_body.rb +14 -18
- data/lib/mx-platform-ruby/models/users_response_body.rb +14 -18
- data/lib/mx-platform-ruby/models/widget_request.rb +16 -18
- data/lib/mx-platform-ruby/models/widget_request_body.rb +14 -18
- data/lib/mx-platform-ruby/models/widget_response.rb +14 -18
- data/lib/mx-platform-ruby/models/widget_response_body.rb +14 -18
- data/lib/mx-platform-ruby/version.rb +2 -2
- data/lib/mx-platform-ruby.rb +1 -1
- data/mx-platform-ruby.gemspec +3 -2
- data/openapi/config.yml +1 -1
- data/openapitools.json +1 -1
- data/spec/api/mx_platform_api_spec.rb +114 -114
- data/spec/api_client_spec.rb +36 -1
- data/spec/configuration_spec.rb +41 -1
- data/spec/models/account_create_request_body_spec.rb +2 -2
- data/spec/models/account_create_request_spec.rb +22 -22
- data/spec/models/account_number_response_spec.rb +10 -10
- data/spec/models/account_numbers_response_body_spec.rb +3 -3
- data/spec/models/account_owner_response_spec.rb +15 -15
- data/spec/models/account_owners_response_body_spec.rb +3 -3
- data/spec/models/account_response_body_spec.rb +2 -2
- data/spec/models/account_response_spec.rb +57 -57
- data/spec/models/account_update_request_body_spec.rb +2 -2
- data/spec/models/account_update_request_spec.rb +22 -22
- data/spec/models/accounts_response_body_spec.rb +3 -3
- data/spec/models/authorization_code_request_body_spec.rb +2 -2
- data/spec/models/authorization_code_request_spec.rb +2 -2
- data/spec/models/authorization_code_response_body_spec.rb +2 -2
- data/spec/models/authorization_code_response_spec.rb +2 -2
- data/spec/models/categories_response_body_spec.rb +3 -3
- data/spec/models/category_create_request_body_spec.rb +2 -2
- data/spec/models/category_create_request_spec.rb +4 -4
- data/spec/models/category_response_body_spec.rb +2 -2
- data/spec/models/category_response_spec.rb +9 -9
- data/spec/models/category_update_request_body_spec.rb +2 -2
- data/spec/models/category_update_request_spec.rb +3 -3
- data/spec/models/challenge_response_spec.rb +8 -8
- data/spec/models/challenges_response_body_spec.rb +3 -3
- data/spec/models/connect_widget_request_body_spec.rb +2 -2
- data/spec/models/connect_widget_request_spec.rb +15 -15
- data/spec/models/connect_widget_response_body_spec.rb +2 -2
- data/spec/models/connect_widget_response_spec.rb +3 -3
- data/spec/models/credential_request_spec.rb +3 -3
- data/spec/models/credential_response_spec.rb +7 -7
- data/spec/models/credentials_response_body_spec.rb +3 -3
- data/spec/models/enhance_transaction_response_spec.rb +24 -24
- data/spec/models/enhance_transactions_request_body_spec.rb +2 -2
- data/spec/models/enhance_transactions_request_spec.rb +8 -8
- data/spec/models/enhance_transactions_response_body_spec.rb +2 -2
- data/spec/models/holding_response_body_spec.rb +2 -2
- data/spec/models/holding_response_spec.rb +20 -20
- data/spec/models/holdings_response_body_spec.rb +3 -3
- data/spec/models/image_option_response_spec.rb +4 -4
- data/spec/models/institution_response_body_spec.rb +2 -2
- data/spec/models/institution_response_spec.rb +15 -15
- data/spec/models/institutions_response_body_spec.rb +3 -3
- data/spec/models/managed_account_create_request_body_spec.rb +2 -2
- data/spec/models/managed_account_create_request_spec.rb +32 -32
- data/spec/models/managed_account_update_request_body_spec.rb +2 -2
- data/spec/models/managed_account_update_request_spec.rb +32 -32
- data/spec/models/managed_member_create_request_body_spec.rb +2 -2
- data/spec/models/managed_member_create_request_spec.rb +5 -5
- data/spec/models/managed_member_update_request_body_spec.rb +2 -2
- data/spec/models/managed_member_update_request_spec.rb +4 -4
- data/spec/models/managed_transaction_create_request_body_spec.rb +2 -2
- data/spec/models/managed_transaction_create_request_spec.rb +21 -21
- data/spec/models/managed_transaction_update_request_body_spec.rb +2 -2
- data/spec/models/managed_transaction_update_request_spec.rb +21 -21
- data/spec/models/member_create_request_body_spec.rb +6 -6
- data/spec/models/member_create_request_spec.rb +8 -8
- data/spec/models/member_response_body_spec.rb +2 -2
- data/spec/models/member_response_spec.rb +16 -16
- data/spec/models/member_resume_request_body_spec.rb +2 -2
- data/spec/models/member_resume_request_spec.rb +2 -2
- data/spec/models/member_status_response_body_spec.rb +2 -2
- data/spec/models/member_status_response_spec.rb +10 -10
- data/spec/models/member_update_request_body_spec.rb +2 -2
- data/spec/models/member_update_request_spec.rb +6 -6
- data/spec/models/members_response_body_spec.rb +3 -3
- data/spec/models/merchant_location_response_body_spec.rb +2 -2
- data/spec/models/merchant_location_response_spec.rb +13 -13
- data/spec/models/merchant_response_body_spec.rb +2 -2
- data/spec/models/merchant_response_spec.rb +7 -7
- data/spec/models/merchants_response_body_spec.rb +3 -3
- data/spec/models/o_auth_window_response_body_spec.rb +2 -2
- data/spec/models/o_auth_window_response_spec.rb +3 -3
- data/spec/models/option_response_spec.rb +3 -3
- data/spec/models/pagination_response_spec.rb +5 -5
- data/spec/models/payment_processor_authorization_code_request_body_spec.rb +2 -2
- data/spec/models/payment_processor_authorization_code_request_spec.rb +4 -4
- data/spec/models/payment_processor_authorization_code_response_body_spec.rb +2 -2
- data/spec/models/payment_processor_authorization_code_response_spec.rb +2 -2
- data/spec/models/spending_plan_account_response_spec.rb +8 -8
- data/spec/models/spending_plan_accounts_response_spec.rb +3 -3
- data/spec/models/spending_plan_iteration_item_create_request_body_spec.rb +6 -6
- data/spec/models/spending_plan_iteration_item_response_spec.rb +13 -13
- data/spec/models/spending_plan_iteration_items_response_body_spec.rb +3 -3
- data/spec/models/spending_plan_iteration_response_spec.rb +9 -9
- data/spec/models/spending_plan_iterations_response_spec.rb +3 -3
- data/spec/models/spending_plan_response_spec.rb +6 -6
- data/spec/models/spending_plans_response_body_spec.rb +3 -3
- data/spec/models/statement_response_body_spec.rb +2 -2
- data/spec/models/statement_response_spec.rb +9 -9
- data/spec/models/statements_response_body_spec.rb +3 -3
- data/spec/models/tag_create_request_body_spec.rb +2 -2
- data/spec/models/tag_create_request_spec.rb +2 -2
- data/spec/models/tag_response_body_spec.rb +2 -2
- data/spec/models/tag_response_spec.rb +4 -4
- data/spec/models/tag_update_request_body_spec.rb +2 -2
- data/spec/models/tag_update_request_spec.rb +2 -2
- data/spec/models/tagging_create_request_body_spec.rb +2 -2
- data/spec/models/tagging_create_request_spec.rb +3 -3
- data/spec/models/tagging_response_body_spec.rb +2 -2
- data/spec/models/tagging_response_spec.rb +6 -6
- data/spec/models/tagging_update_request_body_spec.rb +2 -2
- data/spec/models/tagging_update_request_spec.rb +2 -2
- data/spec/models/taggings_response_body_spec.rb +3 -3
- data/spec/models/tags_response_body_spec.rb +3 -3
- data/spec/models/tax_document_response_body_spec.rb +2 -2
- data/spec/models/tax_document_response_spec.rb +11 -11
- data/spec/models/tax_documents_response_body_spec.rb +3 -3
- data/spec/models/transaction_response_body_spec.rb +2 -2
- data/spec/models/transaction_response_spec.rb +44 -44
- data/spec/models/transaction_rule_create_request_body_spec.rb +2 -2
- data/spec/models/transaction_rule_create_request_spec.rb +4 -4
- data/spec/models/transaction_rule_response_body_spec.rb +2 -2
- data/spec/models/transaction_rule_response_spec.rb +8 -8
- data/spec/models/transaction_rule_update_request_body_spec.rb +2 -2
- data/spec/models/transaction_rule_update_request_spec.rb +4 -4
- data/spec/models/transaction_rules_response_body_spec.rb +3 -3
- data/spec/models/transaction_update_request_body_spec.rb +2 -2
- data/spec/models/transaction_update_request_spec.rb +2 -2
- data/spec/models/transactions_response_body_spec.rb +3 -3
- data/spec/models/user_create_request_body_spec.rb +2 -2
- data/spec/models/user_create_request_spec.rb +5 -5
- data/spec/models/user_response_body_spec.rb +2 -2
- data/spec/models/user_response_spec.rb +6 -6
- data/spec/models/user_update_request_body_spec.rb +2 -2
- data/spec/models/user_update_request_spec.rb +5 -5
- data/spec/models/users_response_body_spec.rb +3 -3
- data/spec/models/widget_request_body_spec.rb +2 -2
- data/spec/models/widget_request_spec.rb +17 -17
- data/spec/models/widget_response_body_spec.rb +2 -2
- data/spec/models/widget_response_spec.rb +4 -4
- data/spec/spec_helper.rb +1 -1
- metadata +132 -118
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 0.1.0
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 7.0.1
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -139,6 +139,7 @@ module MxPlatformRuby
|
|
139
139
|
# Show invalid properties with the reasons. Usually used together with valid?
|
140
140
|
# @return Array for valid properties with the reasons
|
141
141
|
def list_invalid_properties
|
142
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
142
143
|
invalid_properties = Array.new
|
143
144
|
invalid_properties
|
144
145
|
end
|
@@ -146,6 +147,7 @@ module MxPlatformRuby
|
|
146
147
|
# Check to see if the all the properties in the model are valid
|
147
148
|
# @return true if the model is valid
|
148
149
|
def valid?
|
150
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
149
151
|
true
|
150
152
|
end
|
151
153
|
|
@@ -181,36 +183,30 @@ module MxPlatformRuby
|
|
181
183
|
# @param [Hash] attributes Model attributes in the form of hash
|
182
184
|
# @return [Object] Returns the model itself
|
183
185
|
def self.build_from_hash(attributes)
|
184
|
-
new.build_from_hash(attributes)
|
185
|
-
end
|
186
|
-
|
187
|
-
# Builds the object from hash
|
188
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
189
|
-
# @return [Object] Returns the model itself
|
190
|
-
def build_from_hash(attributes)
|
191
186
|
return nil unless attributes.is_a?(Hash)
|
192
|
-
|
193
|
-
|
194
|
-
|
187
|
+
attributes = attributes.transform_keys(&:to_sym)
|
188
|
+
transformed_hash = {}
|
189
|
+
openapi_types.each_pair do |key, type|
|
190
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
191
|
+
transformed_hash["#{key}"] = nil
|
195
192
|
elsif type =~ /\AArray<(.*)>/i
|
196
193
|
# check to ensure the input is an array given that the attribute
|
197
194
|
# is documented as an array but the input is not
|
198
|
-
if attributes[
|
199
|
-
|
195
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
196
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
200
197
|
end
|
201
|
-
elsif !attributes[
|
202
|
-
|
198
|
+
elsif !attributes[attribute_map[key]].nil?
|
199
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
203
200
|
end
|
204
201
|
end
|
205
|
-
|
206
|
-
self
|
202
|
+
new(transformed_hash)
|
207
203
|
end
|
208
204
|
|
209
205
|
# Deserializes the data based on type
|
210
206
|
# @param string type Data type
|
211
207
|
# @param string value Value to be deserialized
|
212
208
|
# @return [Object] Deserialized data
|
213
|
-
def _deserialize(type, value)
|
209
|
+
def self._deserialize(type, value)
|
214
210
|
case type.to_sym
|
215
211
|
when :Time
|
216
212
|
Time.parse(value)
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 0.1.0
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 7.0.1
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -65,6 +65,7 @@ module MxPlatformRuby
|
|
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 MxPlatformRuby
|
|
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,36 +101,30 @@ module MxPlatformRuby
|
|
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
|
-
|
111
|
-
|
112
|
-
|
105
|
+
attributes = attributes.transform_keys(&:to_sym)
|
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
|
113
110
|
elsif type =~ /\AArray<(.*)>/i
|
114
111
|
# check to ensure the input is an array given that the attribute
|
115
112
|
# is documented as an array but the input is not
|
116
|
-
if attributes[
|
117
|
-
|
113
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
114
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
118
115
|
end
|
119
|
-
elsif !attributes[
|
120
|
-
|
116
|
+
elsif !attributes[attribute_map[key]].nil?
|
117
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
121
118
|
end
|
122
119
|
end
|
123
|
-
|
124
|
-
self
|
120
|
+
new(transformed_hash)
|
125
121
|
end
|
126
122
|
|
127
123
|
# Deserializes the data based on type
|
128
124
|
# @param string type Data type
|
129
125
|
# @param string value Value to be deserialized
|
130
126
|
# @return [Object] Deserialized data
|
131
|
-
def _deserialize(type, value)
|
127
|
+
def self._deserialize(type, value)
|
132
128
|
case type.to_sym
|
133
129
|
when :Time
|
134
130
|
Time.parse(value)
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 0.1.0
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 7.0.1
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -99,6 +99,7 @@ module MxPlatformRuby
|
|
99
99
|
# Show invalid properties with the reasons. Usually used together with valid?
|
100
100
|
# @return Array for valid properties with the reasons
|
101
101
|
def list_invalid_properties
|
102
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
102
103
|
invalid_properties = Array.new
|
103
104
|
invalid_properties
|
104
105
|
end
|
@@ -106,6 +107,7 @@ module MxPlatformRuby
|
|
106
107
|
# Check to see if the all the properties in the model are valid
|
107
108
|
# @return true if the model is valid
|
108
109
|
def valid?
|
110
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
109
111
|
true
|
110
112
|
end
|
111
113
|
|
@@ -137,36 +139,30 @@ module MxPlatformRuby
|
|
137
139
|
# @param [Hash] attributes Model attributes in the form of hash
|
138
140
|
# @return [Object] Returns the model itself
|
139
141
|
def self.build_from_hash(attributes)
|
140
|
-
new.build_from_hash(attributes)
|
141
|
-
end
|
142
|
-
|
143
|
-
# Builds the object from hash
|
144
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
145
|
-
# @return [Object] Returns the model itself
|
146
|
-
def build_from_hash(attributes)
|
147
142
|
return nil unless attributes.is_a?(Hash)
|
148
|
-
|
149
|
-
|
150
|
-
|
143
|
+
attributes = attributes.transform_keys(&:to_sym)
|
144
|
+
transformed_hash = {}
|
145
|
+
openapi_types.each_pair do |key, type|
|
146
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
147
|
+
transformed_hash["#{key}"] = nil
|
151
148
|
elsif type =~ /\AArray<(.*)>/i
|
152
149
|
# check to ensure the input is an array given that the attribute
|
153
150
|
# is documented as an array but the input is not
|
154
|
-
if attributes[
|
155
|
-
|
151
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
152
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
156
153
|
end
|
157
|
-
elsif !attributes[
|
158
|
-
|
154
|
+
elsif !attributes[attribute_map[key]].nil?
|
155
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
159
156
|
end
|
160
157
|
end
|
161
|
-
|
162
|
-
self
|
158
|
+
new(transformed_hash)
|
163
159
|
end
|
164
160
|
|
165
161
|
# Deserializes the data based on type
|
166
162
|
# @param string type Data type
|
167
163
|
# @param string value Value to be deserialized
|
168
164
|
# @return [Object] Deserialized data
|
169
|
-
def _deserialize(type, value)
|
165
|
+
def self._deserialize(type, value)
|
170
166
|
case type.to_sym
|
171
167
|
when :Time
|
172
168
|
Time.parse(value)
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 0.1.0
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 7.0.1
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -65,6 +65,7 @@ module MxPlatformRuby
|
|
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 MxPlatformRuby
|
|
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,36 +101,30 @@ module MxPlatformRuby
|
|
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
|
-
|
111
|
-
|
112
|
-
|
105
|
+
attributes = attributes.transform_keys(&:to_sym)
|
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
|
113
110
|
elsif type =~ /\AArray<(.*)>/i
|
114
111
|
# check to ensure the input is an array given that the attribute
|
115
112
|
# is documented as an array but the input is not
|
116
|
-
if attributes[
|
117
|
-
|
113
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
114
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
118
115
|
end
|
119
|
-
elsif !attributes[
|
120
|
-
|
116
|
+
elsif !attributes[attribute_map[key]].nil?
|
117
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
121
118
|
end
|
122
119
|
end
|
123
|
-
|
124
|
-
self
|
120
|
+
new(transformed_hash)
|
125
121
|
end
|
126
122
|
|
127
123
|
# Deserializes the data based on type
|
128
124
|
# @param string type Data type
|
129
125
|
# @param string value Value to be deserialized
|
130
126
|
# @return [Object] Deserialized data
|
131
|
-
def _deserialize(type, value)
|
127
|
+
def self._deserialize(type, value)
|
132
128
|
case type.to_sym
|
133
129
|
when :Time
|
134
130
|
Time.parse(value)
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 0.1.0
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 7.0.1
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -75,6 +75,7 @@ module MxPlatformRuby
|
|
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 MxPlatformRuby
|
|
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,36 +112,30 @@ module MxPlatformRuby
|
|
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
|
-
|
122
|
-
|
123
|
-
|
116
|
+
attributes = attributes.transform_keys(&:to_sym)
|
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
|
124
121
|
elsif type =~ /\AArray<(.*)>/i
|
125
122
|
# check to ensure the input is an array given that the attribute
|
126
123
|
# is documented as an array but the input is not
|
127
|
-
if attributes[
|
128
|
-
|
124
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
125
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
129
126
|
end
|
130
|
-
elsif !attributes[
|
131
|
-
|
127
|
+
elsif !attributes[attribute_map[key]].nil?
|
128
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
132
129
|
end
|
133
130
|
end
|
134
|
-
|
135
|
-
self
|
131
|
+
new(transformed_hash)
|
136
132
|
end
|
137
133
|
|
138
134
|
# Deserializes the data based on type
|
139
135
|
# @param string type Data type
|
140
136
|
# @param string value Value to be deserialized
|
141
137
|
# @return [Object] Deserialized data
|
142
|
-
def _deserialize(type, value)
|
138
|
+
def self._deserialize(type, value)
|
143
139
|
case type.to_sym
|
144
140
|
when :Time
|
145
141
|
Time.parse(value)
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 0.1.0
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 7.0.1
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -165,6 +165,7 @@ module MxPlatformRuby
|
|
165
165
|
# Show invalid properties with the reasons. Usually used together with valid?
|
166
166
|
# @return Array for valid properties with the reasons
|
167
167
|
def list_invalid_properties
|
168
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
168
169
|
invalid_properties = Array.new
|
169
170
|
invalid_properties
|
170
171
|
end
|
@@ -172,6 +173,7 @@ module MxPlatformRuby
|
|
172
173
|
# Check to see if the all the properties in the model are valid
|
173
174
|
# @return true if the model is valid
|
174
175
|
def valid?
|
176
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
175
177
|
true
|
176
178
|
end
|
177
179
|
|
@@ -210,36 +212,30 @@ module MxPlatformRuby
|
|
210
212
|
# @param [Hash] attributes Model attributes in the form of hash
|
211
213
|
# @return [Object] Returns the model itself
|
212
214
|
def self.build_from_hash(attributes)
|
213
|
-
new.build_from_hash(attributes)
|
214
|
-
end
|
215
|
-
|
216
|
-
# Builds the object from hash
|
217
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
218
|
-
# @return [Object] Returns the model itself
|
219
|
-
def build_from_hash(attributes)
|
220
215
|
return nil unless attributes.is_a?(Hash)
|
221
|
-
|
222
|
-
|
223
|
-
|
216
|
+
attributes = attributes.transform_keys(&:to_sym)
|
217
|
+
transformed_hash = {}
|
218
|
+
openapi_types.each_pair do |key, type|
|
219
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
220
|
+
transformed_hash["#{key}"] = nil
|
224
221
|
elsif type =~ /\AArray<(.*)>/i
|
225
222
|
# check to ensure the input is an array given that the attribute
|
226
223
|
# is documented as an array but the input is not
|
227
|
-
if attributes[
|
228
|
-
|
224
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
225
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
229
226
|
end
|
230
|
-
elsif !attributes[
|
231
|
-
|
227
|
+
elsif !attributes[attribute_map[key]].nil?
|
228
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
232
229
|
end
|
233
230
|
end
|
234
|
-
|
235
|
-
self
|
231
|
+
new(transformed_hash)
|
236
232
|
end
|
237
233
|
|
238
234
|
# Deserializes the data based on type
|
239
235
|
# @param string type Data type
|
240
236
|
# @param string value Value to be deserialized
|
241
237
|
# @return [Object] Deserialized data
|
242
|
-
def _deserialize(type, value)
|
238
|
+
def self._deserialize(type, value)
|
243
239
|
case type.to_sym
|
244
240
|
when :Time
|
245
241
|
Time.parse(value)
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 0.1.0
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 7.0.1
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -65,6 +65,7 @@ module MxPlatformRuby
|
|
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 MxPlatformRuby
|
|
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,36 +101,30 @@ module MxPlatformRuby
|
|
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
|
-
|
111
|
-
|
112
|
-
|
105
|
+
attributes = attributes.transform_keys(&:to_sym)
|
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
|
113
110
|
elsif type =~ /\AArray<(.*)>/i
|
114
111
|
# check to ensure the input is an array given that the attribute
|
115
112
|
# is documented as an array but the input is not
|
116
|
-
if attributes[
|
117
|
-
|
113
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
114
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
118
115
|
end
|
119
|
-
elsif !attributes[
|
120
|
-
|
116
|
+
elsif !attributes[attribute_map[key]].nil?
|
117
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
121
118
|
end
|
122
119
|
end
|
123
|
-
|
124
|
-
self
|
120
|
+
new(transformed_hash)
|
125
121
|
end
|
126
122
|
|
127
123
|
# Deserializes the data based on type
|
128
124
|
# @param string type Data type
|
129
125
|
# @param string value Value to be deserialized
|
130
126
|
# @return [Object] Deserialized data
|
131
|
-
def _deserialize(type, value)
|
127
|
+
def self._deserialize(type, value)
|
132
128
|
case type.to_sym
|
133
129
|
when :Time
|
134
130
|
Time.parse(value)
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 0.1.0
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 7.0.1
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -111,6 +111,7 @@ module MxPlatformRuby
|
|
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 MxPlatformRuby
|
|
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,36 +152,30 @@ module MxPlatformRuby
|
|
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
|
-
|
162
|
-
|
163
|
-
|
156
|
+
attributes = attributes.transform_keys(&:to_sym)
|
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
|
164
161
|
elsif type =~ /\AArray<(.*)>/i
|
165
162
|
# check to ensure the input is an array given that the attribute
|
166
163
|
# is documented as an array but the input is not
|
167
|
-
if attributes[
|
168
|
-
|
164
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
165
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
169
166
|
end
|
170
|
-
elsif !attributes[
|
171
|
-
|
167
|
+
elsif !attributes[attribute_map[key]].nil?
|
168
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
172
169
|
end
|
173
170
|
end
|
174
|
-
|
175
|
-
self
|
171
|
+
new(transformed_hash)
|
176
172
|
end
|
177
173
|
|
178
174
|
# Deserializes the data based on type
|
179
175
|
# @param string type Data type
|
180
176
|
# @param string value Value to be deserialized
|
181
177
|
# @return [Object] Deserialized data
|
182
|
-
def _deserialize(type, value)
|
178
|
+
def self._deserialize(type, value)
|
183
179
|
case type.to_sym
|
184
180
|
when :Time
|
185
181
|
Time.parse(value)
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 0.1.0
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 7.0.1
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -65,6 +65,7 @@ module MxPlatformRuby
|
|
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 MxPlatformRuby
|
|
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,36 +101,30 @@ module MxPlatformRuby
|
|
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
|
-
|
111
|
-
|
112
|
-
|
105
|
+
attributes = attributes.transform_keys(&:to_sym)
|
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
|
113
110
|
elsif type =~ /\AArray<(.*)>/i
|
114
111
|
# check to ensure the input is an array given that the attribute
|
115
112
|
# is documented as an array but the input is not
|
116
|
-
if attributes[
|
117
|
-
|
113
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
114
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
118
115
|
end
|
119
|
-
elsif !attributes[
|
120
|
-
|
116
|
+
elsif !attributes[attribute_map[key]].nil?
|
117
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
121
118
|
end
|
122
119
|
end
|
123
|
-
|
124
|
-
self
|
120
|
+
new(transformed_hash)
|
125
121
|
end
|
126
122
|
|
127
123
|
# Deserializes the data based on type
|
128
124
|
# @param string type Data type
|
129
125
|
# @param string value Value to be deserialized
|
130
126
|
# @return [Object] Deserialized data
|
131
|
-
def _deserialize(type, value)
|
127
|
+
def self._deserialize(type, value)
|
132
128
|
case type.to_sym
|
133
129
|
when :Time
|
134
130
|
Time.parse(value)
|