mx-platform-ruby 0.21.0 → 0.22.1
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/Gemfile.lock +78 -0
- data/docs/MxPlatformApi.md +1586 -507
- data/docs/SpendingPlanAccountResponse.md +30 -0
- data/docs/SpendingPlanAccountsResponse.md +20 -0
- data/docs/SpendingPlanIterationItemCreateRequestBody.md +26 -0
- data/docs/SpendingPlanIterationItemResponse.md +40 -0
- data/docs/SpendingPlanIterationItemsResponseBody.md +20 -0
- data/docs/SpendingPlanIterationResponse.md +32 -0
- data/docs/SpendingPlanIterationsResponse.md +20 -0
- data/docs/SpendingPlanResponse.md +26 -0
- data/docs/SpendingPlansResponseBody.md +20 -0
- data/lib/mx-platform-ruby/api/mx_platform_api.rb +1063 -9
- 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 +268 -0
- data/lib/mx-platform-ruby/models/spending_plan_accounts_response.rb +225 -0
- data/lib/mx-platform-ruby/models/spending_plan_iteration_item_create_request_body.rb +257 -0
- data/lib/mx-platform-ruby/models/spending_plan_iteration_item_response.rb +326 -0
- data/lib/mx-platform-ruby/models/spending_plan_iteration_items_response_body.rb +225 -0
- data/lib/mx-platform-ruby/models/spending_plan_iteration_response.rb +285 -0
- data/lib/mx-platform-ruby/models/spending_plan_iterations_response.rb +225 -0
- data/lib/mx-platform-ruby/models/spending_plan_response.rb +255 -0
- data/lib/mx-platform-ruby/models/spending_plans_response_body.rb +225 -0
- 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 +10 -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 +304 -100
- 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 +70 -0
- data/spec/models/spending_plan_accounts_response_spec.rb +40 -0
- data/spec/models/spending_plan_iteration_item_create_request_body_spec.rb +58 -0
- data/spec/models/spending_plan_iteration_item_response_spec.rb +100 -0
- data/spec/models/spending_plan_iteration_items_response_body_spec.rb +40 -0
- data/spec/models/spending_plan_iteration_response_spec.rb +76 -0
- data/spec/models/spending_plan_iterations_response_spec.rb +40 -0
- data/spec/models/spending_plan_response_spec.rb +58 -0
- data/spec/models/spending_plans_response_body_spec.rb +40 -0
- 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 +170 -119
|
@@ -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)
|
|
@@ -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
|
|
|
@@ -217,6 +217,7 @@ module MxPlatformRuby
|
|
|
217
217
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
218
218
|
# @return Array for valid properties with the reasons
|
|
219
219
|
def list_invalid_properties
|
|
220
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
220
221
|
invalid_properties = Array.new
|
|
221
222
|
invalid_properties
|
|
222
223
|
end
|
|
@@ -224,6 +225,7 @@ module MxPlatformRuby
|
|
|
224
225
|
# Check to see if the all the properties in the model are valid
|
|
225
226
|
# @return true if the model is valid
|
|
226
227
|
def valid?
|
|
228
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
227
229
|
true
|
|
228
230
|
end
|
|
229
231
|
|
|
@@ -270,36 +272,30 @@ module MxPlatformRuby
|
|
|
270
272
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
271
273
|
# @return [Object] Returns the model itself
|
|
272
274
|
def self.build_from_hash(attributes)
|
|
273
|
-
new.build_from_hash(attributes)
|
|
274
|
-
end
|
|
275
|
-
|
|
276
|
-
# Builds the object from hash
|
|
277
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
278
|
-
# @return [Object] Returns the model itself
|
|
279
|
-
def build_from_hash(attributes)
|
|
280
275
|
return nil unless attributes.is_a?(Hash)
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
276
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
277
|
+
transformed_hash = {}
|
|
278
|
+
openapi_types.each_pair do |key, type|
|
|
279
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
280
|
+
transformed_hash["#{key}"] = nil
|
|
284
281
|
elsif type =~ /\AArray<(.*)>/i
|
|
285
282
|
# check to ensure the input is an array given that the attribute
|
|
286
283
|
# is documented as an array but the input is not
|
|
287
|
-
if attributes[
|
|
288
|
-
|
|
284
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
285
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
289
286
|
end
|
|
290
|
-
elsif !attributes[
|
|
291
|
-
|
|
287
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
288
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
292
289
|
end
|
|
293
290
|
end
|
|
294
|
-
|
|
295
|
-
self
|
|
291
|
+
new(transformed_hash)
|
|
296
292
|
end
|
|
297
293
|
|
|
298
294
|
# Deserializes the data based on type
|
|
299
295
|
# @param string type Data type
|
|
300
296
|
# @param string value Value to be deserialized
|
|
301
297
|
# @return [Object] Deserialized data
|
|
302
|
-
def _deserialize(type, value)
|
|
298
|
+
def self._deserialize(type, value)
|
|
303
299
|
case type.to_sym
|
|
304
300
|
when :Time
|
|
305
301
|
Time.parse(value)
|