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
|
|
@@ -305,6 +305,7 @@ module MxPlatformRuby
|
|
305
305
|
# Show invalid properties with the reasons. Usually used together with valid?
|
306
306
|
# @return Array for valid properties with the reasons
|
307
307
|
def list_invalid_properties
|
308
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
308
309
|
invalid_properties = Array.new
|
309
310
|
invalid_properties
|
310
311
|
end
|
@@ -312,6 +313,7 @@ module MxPlatformRuby
|
|
312
313
|
# Check to see if the all the properties in the model are valid
|
313
314
|
# @return true if the model is valid
|
314
315
|
def valid?
|
316
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
315
317
|
true
|
316
318
|
end
|
317
319
|
|
@@ -369,36 +371,30 @@ module MxPlatformRuby
|
|
369
371
|
# @param [Hash] attributes Model attributes in the form of hash
|
370
372
|
# @return [Object] Returns the model itself
|
371
373
|
def self.build_from_hash(attributes)
|
372
|
-
new.build_from_hash(attributes)
|
373
|
-
end
|
374
|
-
|
375
|
-
# Builds the object from hash
|
376
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
377
|
-
# @return [Object] Returns the model itself
|
378
|
-
def build_from_hash(attributes)
|
379
374
|
return nil unless attributes.is_a?(Hash)
|
380
|
-
|
381
|
-
|
382
|
-
|
375
|
+
attributes = attributes.transform_keys(&:to_sym)
|
376
|
+
transformed_hash = {}
|
377
|
+
openapi_types.each_pair do |key, type|
|
378
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
379
|
+
transformed_hash["#{key}"] = nil
|
383
380
|
elsif type =~ /\AArray<(.*)>/i
|
384
381
|
# check to ensure the input is an array given that the attribute
|
385
382
|
# is documented as an array but the input is not
|
386
|
-
if attributes[
|
387
|
-
|
383
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
384
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
388
385
|
end
|
389
|
-
elsif !attributes[
|
390
|
-
|
386
|
+
elsif !attributes[attribute_map[key]].nil?
|
387
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
391
388
|
end
|
392
389
|
end
|
393
|
-
|
394
|
-
self
|
390
|
+
new(transformed_hash)
|
395
391
|
end
|
396
392
|
|
397
393
|
# Deserializes the data based on type
|
398
394
|
# @param string type Data type
|
399
395
|
# @param string value Value to be deserialized
|
400
396
|
# @return [Object] Deserialized data
|
401
|
-
def _deserialize(type, value)
|
397
|
+
def self._deserialize(type, value)
|
402
398
|
case type.to_sym
|
403
399
|
when :Time
|
404
400
|
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,8 @@ module MxPlatformRuby
|
|
75
75
|
|
76
76
|
if attributes.key?(:'institution_code')
|
77
77
|
self.institution_code = attributes[:'institution_code']
|
78
|
+
else
|
79
|
+
self.institution_code = nil
|
78
80
|
end
|
79
81
|
|
80
82
|
if attributes.key?(:'metadata')
|
@@ -89,6 +91,7 @@ module MxPlatformRuby
|
|
89
91
|
# Show invalid properties with the reasons. Usually used together with valid?
|
90
92
|
# @return Array for valid properties with the reasons
|
91
93
|
def list_invalid_properties
|
94
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
92
95
|
invalid_properties = Array.new
|
93
96
|
if @institution_code.nil?
|
94
97
|
invalid_properties.push('invalid value for "institution_code", institution_code cannot be nil.')
|
@@ -100,6 +103,7 @@ module MxPlatformRuby
|
|
100
103
|
# Check to see if the all the properties in the model are valid
|
101
104
|
# @return true if the model is valid
|
102
105
|
def valid?
|
106
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
103
107
|
return false if @institution_code.nil?
|
104
108
|
true
|
105
109
|
end
|
@@ -131,36 +135,30 @@ module MxPlatformRuby
|
|
131
135
|
# @param [Hash] attributes Model attributes in the form of hash
|
132
136
|
# @return [Object] Returns the model itself
|
133
137
|
def self.build_from_hash(attributes)
|
134
|
-
new.build_from_hash(attributes)
|
135
|
-
end
|
136
|
-
|
137
|
-
# Builds the object from hash
|
138
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
139
|
-
# @return [Object] Returns the model itself
|
140
|
-
def build_from_hash(attributes)
|
141
138
|
return nil unless attributes.is_a?(Hash)
|
142
|
-
|
143
|
-
|
144
|
-
|
139
|
+
attributes = attributes.transform_keys(&:to_sym)
|
140
|
+
transformed_hash = {}
|
141
|
+
openapi_types.each_pair do |key, type|
|
142
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
143
|
+
transformed_hash["#{key}"] = nil
|
145
144
|
elsif type =~ /\AArray<(.*)>/i
|
146
145
|
# check to ensure the input is an array given that the attribute
|
147
146
|
# is documented as an array but the input is not
|
148
|
-
if attributes[
|
149
|
-
|
147
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
148
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
150
149
|
end
|
151
|
-
elsif !attributes[
|
152
|
-
|
150
|
+
elsif !attributes[attribute_map[key]].nil?
|
151
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
153
152
|
end
|
154
153
|
end
|
155
|
-
|
156
|
-
self
|
154
|
+
new(transformed_hash)
|
157
155
|
end
|
158
156
|
|
159
157
|
# Deserializes the data based on type
|
160
158
|
# @param string type Data type
|
161
159
|
# @param string value Value to be deserialized
|
162
160
|
# @return [Object] Deserialized data
|
163
|
-
def _deserialize(type, value)
|
161
|
+
def self._deserialize(type, value)
|
164
162
|
case type.to_sym
|
165
163
|
when :Time
|
166
164
|
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
|
|
@@ -81,6 +81,7 @@ module MxPlatformRuby
|
|
81
81
|
# Show invalid properties with the reasons. Usually used together with valid?
|
82
82
|
# @return Array for valid properties with the reasons
|
83
83
|
def list_invalid_properties
|
84
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
84
85
|
invalid_properties = Array.new
|
85
86
|
invalid_properties
|
86
87
|
end
|
@@ -88,6 +89,7 @@ module MxPlatformRuby
|
|
88
89
|
# Check to see if the all the properties in the model are valid
|
89
90
|
# @return true if the model is valid
|
90
91
|
def valid?
|
92
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
91
93
|
true
|
92
94
|
end
|
93
95
|
|
@@ -117,36 +119,30 @@ module MxPlatformRuby
|
|
117
119
|
# @param [Hash] attributes Model attributes in the form of hash
|
118
120
|
# @return [Object] Returns the model itself
|
119
121
|
def self.build_from_hash(attributes)
|
120
|
-
new.build_from_hash(attributes)
|
121
|
-
end
|
122
|
-
|
123
|
-
# Builds the object from hash
|
124
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
125
|
-
# @return [Object] Returns the model itself
|
126
|
-
def build_from_hash(attributes)
|
127
122
|
return nil unless attributes.is_a?(Hash)
|
128
|
-
|
129
|
-
|
130
|
-
|
123
|
+
attributes = attributes.transform_keys(&:to_sym)
|
124
|
+
transformed_hash = {}
|
125
|
+
openapi_types.each_pair do |key, type|
|
126
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
127
|
+
transformed_hash["#{key}"] = nil
|
131
128
|
elsif type =~ /\AArray<(.*)>/i
|
132
129
|
# check to ensure the input is an array given that the attribute
|
133
130
|
# is documented as an array but the input is not
|
134
|
-
if attributes[
|
135
|
-
|
131
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
132
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
136
133
|
end
|
137
|
-
elsif !attributes[
|
138
|
-
|
134
|
+
elsif !attributes[attribute_map[key]].nil?
|
135
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
139
136
|
end
|
140
137
|
end
|
141
|
-
|
142
|
-
self
|
138
|
+
new(transformed_hash)
|
143
139
|
end
|
144
140
|
|
145
141
|
# Deserializes the data based on type
|
146
142
|
# @param string type Data type
|
147
143
|
# @param string value Value to be deserialized
|
148
144
|
# @return [Object] Deserialized data
|
149
|
-
def _deserialize(type, value)
|
145
|
+
def self._deserialize(type, value)
|
150
146
|
case type.to_sym
|
151
147
|
when :Time
|
152
148
|
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
|
|
@@ -135,6 +135,8 @@ module MxPlatformRuby
|
|
135
135
|
|
136
136
|
if attributes.key?(:'amount')
|
137
137
|
self.amount = attributes[:'amount']
|
138
|
+
else
|
139
|
+
self.amount = nil
|
138
140
|
end
|
139
141
|
|
140
142
|
if attributes.key?(:'category')
|
@@ -151,6 +153,8 @@ module MxPlatformRuby
|
|
151
153
|
|
152
154
|
if attributes.key?(:'description')
|
153
155
|
self.description = attributes[:'description']
|
156
|
+
else
|
157
|
+
self.description = nil
|
154
158
|
end
|
155
159
|
|
156
160
|
if attributes.key?(:'id')
|
@@ -203,20 +207,27 @@ module MxPlatformRuby
|
|
203
207
|
|
204
208
|
if attributes.key?(:'status')
|
205
209
|
self.status = attributes[:'status']
|
210
|
+
else
|
211
|
+
self.status = nil
|
206
212
|
end
|
207
213
|
|
208
214
|
if attributes.key?(:'transacted_at')
|
209
215
|
self.transacted_at = attributes[:'transacted_at']
|
216
|
+
else
|
217
|
+
self.transacted_at = nil
|
210
218
|
end
|
211
219
|
|
212
220
|
if attributes.key?(:'type')
|
213
221
|
self.type = attributes[:'type']
|
222
|
+
else
|
223
|
+
self.type = nil
|
214
224
|
end
|
215
225
|
end
|
216
226
|
|
217
227
|
# Show invalid properties with the reasons. Usually used together with valid?
|
218
228
|
# @return Array for valid properties with the reasons
|
219
229
|
def list_invalid_properties
|
230
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
220
231
|
invalid_properties = Array.new
|
221
232
|
if @amount.nil?
|
222
233
|
invalid_properties.push('invalid value for "amount", amount cannot be nil.')
|
@@ -244,6 +255,7 @@ module MxPlatformRuby
|
|
244
255
|
# Check to see if the all the properties in the model are valid
|
245
256
|
# @return true if the model is valid
|
246
257
|
def valid?
|
258
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
247
259
|
return false if @amount.nil?
|
248
260
|
return false if @description.nil?
|
249
261
|
return false if @status.nil?
|
@@ -295,36 +307,30 @@ module MxPlatformRuby
|
|
295
307
|
# @param [Hash] attributes Model attributes in the form of hash
|
296
308
|
# @return [Object] Returns the model itself
|
297
309
|
def self.build_from_hash(attributes)
|
298
|
-
new.build_from_hash(attributes)
|
299
|
-
end
|
300
|
-
|
301
|
-
# Builds the object from hash
|
302
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
303
|
-
# @return [Object] Returns the model itself
|
304
|
-
def build_from_hash(attributes)
|
305
310
|
return nil unless attributes.is_a?(Hash)
|
306
|
-
|
307
|
-
|
308
|
-
|
311
|
+
attributes = attributes.transform_keys(&:to_sym)
|
312
|
+
transformed_hash = {}
|
313
|
+
openapi_types.each_pair do |key, type|
|
314
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
315
|
+
transformed_hash["#{key}"] = nil
|
309
316
|
elsif type =~ /\AArray<(.*)>/i
|
310
317
|
# check to ensure the input is an array given that the attribute
|
311
318
|
# is documented as an array but the input is not
|
312
|
-
if attributes[
|
313
|
-
|
319
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
320
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
314
321
|
end
|
315
|
-
elsif !attributes[
|
316
|
-
|
322
|
+
elsif !attributes[attribute_map[key]].nil?
|
323
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
317
324
|
end
|
318
325
|
end
|
319
|
-
|
320
|
-
self
|
326
|
+
new(transformed_hash)
|
321
327
|
end
|
322
328
|
|
323
329
|
# Deserializes the data based on type
|
324
330
|
# @param string type Data type
|
325
331
|
# @param string value Value to be deserialized
|
326
332
|
# @return [Object] Deserialized data
|
327
|
-
def _deserialize(type, value)
|
333
|
+
def self._deserialize(type, value)
|
328
334
|
case type.to_sym
|
329
335
|
when :Time
|
330
336
|
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)
|