mx-platform-ruby 0.22.0 → 0.23.0
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 +12 -26
- data/docs/SpendingPlansResponseBody.md +2 -2
- 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 +22 -26
- 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 +4 -4
- 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
|
|
|
@@ -73,6 +73,7 @@ module MxPlatformRuby
|
|
|
73
73
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
74
74
|
# @return Array for valid properties with the reasons
|
|
75
75
|
def list_invalid_properties
|
|
76
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
76
77
|
invalid_properties = Array.new
|
|
77
78
|
invalid_properties
|
|
78
79
|
end
|
|
@@ -80,6 +81,7 @@ module MxPlatformRuby
|
|
|
80
81
|
# Check to see if the all the properties in the model are valid
|
|
81
82
|
# @return true if the model is valid
|
|
82
83
|
def valid?
|
|
84
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
83
85
|
true
|
|
84
86
|
end
|
|
85
87
|
|
|
@@ -108,36 +110,30 @@ module MxPlatformRuby
|
|
|
108
110
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
109
111
|
# @return [Object] Returns the model itself
|
|
110
112
|
def self.build_from_hash(attributes)
|
|
111
|
-
new.build_from_hash(attributes)
|
|
112
|
-
end
|
|
113
|
-
|
|
114
|
-
# Builds the object from hash
|
|
115
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
116
|
-
# @return [Object] Returns the model itself
|
|
117
|
-
def build_from_hash(attributes)
|
|
118
113
|
return nil unless attributes.is_a?(Hash)
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
114
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
115
|
+
transformed_hash = {}
|
|
116
|
+
openapi_types.each_pair do |key, type|
|
|
117
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
118
|
+
transformed_hash["#{key}"] = nil
|
|
122
119
|
elsif type =~ /\AArray<(.*)>/i
|
|
123
120
|
# check to ensure the input is an array given that the attribute
|
|
124
121
|
# is documented as an array but the input is not
|
|
125
|
-
if attributes[
|
|
126
|
-
|
|
122
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
123
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
127
124
|
end
|
|
128
|
-
elsif !attributes[
|
|
129
|
-
|
|
125
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
126
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
130
127
|
end
|
|
131
128
|
end
|
|
132
|
-
|
|
133
|
-
self
|
|
129
|
+
new(transformed_hash)
|
|
134
130
|
end
|
|
135
131
|
|
|
136
132
|
# Deserializes the data based on type
|
|
137
133
|
# @param string type Data type
|
|
138
134
|
# @param string value Value to be deserialized
|
|
139
135
|
# @return [Object] Deserialized data
|
|
140
|
-
def _deserialize(type, value)
|
|
136
|
+
def self._deserialize(type, value)
|
|
141
137
|
case type.to_sym
|
|
142
138
|
when :Time
|
|
143
139
|
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
|
|
|
@@ -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
|
|
|
@@ -264,6 +264,7 @@ module MxPlatformRuby
|
|
|
264
264
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
265
265
|
# @return Array for valid properties with the reasons
|
|
266
266
|
def list_invalid_properties
|
|
267
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
267
268
|
invalid_properties = Array.new
|
|
268
269
|
invalid_properties
|
|
269
270
|
end
|
|
@@ -271,6 +272,7 @@ module MxPlatformRuby
|
|
|
271
272
|
# Check to see if the all the properties in the model are valid
|
|
272
273
|
# @return true if the model is valid
|
|
273
274
|
def valid?
|
|
275
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
274
276
|
true
|
|
275
277
|
end
|
|
276
278
|
|
|
@@ -320,36 +322,30 @@ module MxPlatformRuby
|
|
|
320
322
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
321
323
|
# @return [Object] Returns the model itself
|
|
322
324
|
def self.build_from_hash(attributes)
|
|
323
|
-
new.build_from_hash(attributes)
|
|
324
|
-
end
|
|
325
|
-
|
|
326
|
-
# Builds the object from hash
|
|
327
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
328
|
-
# @return [Object] Returns the model itself
|
|
329
|
-
def build_from_hash(attributes)
|
|
330
325
|
return nil unless attributes.is_a?(Hash)
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
326
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
327
|
+
transformed_hash = {}
|
|
328
|
+
openapi_types.each_pair do |key, type|
|
|
329
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
330
|
+
transformed_hash["#{key}"] = nil
|
|
334
331
|
elsif type =~ /\AArray<(.*)>/i
|
|
335
332
|
# check to ensure the input is an array given that the attribute
|
|
336
333
|
# is documented as an array but the input is not
|
|
337
|
-
if attributes[
|
|
338
|
-
|
|
334
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
335
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
339
336
|
end
|
|
340
|
-
elsif !attributes[
|
|
341
|
-
|
|
337
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
338
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
342
339
|
end
|
|
343
340
|
end
|
|
344
|
-
|
|
345
|
-
self
|
|
341
|
+
new(transformed_hash)
|
|
346
342
|
end
|
|
347
343
|
|
|
348
344
|
# Deserializes the data based on type
|
|
349
345
|
# @param string type Data type
|
|
350
346
|
# @param string value Value to be deserialized
|
|
351
347
|
# @return [Object] Deserialized data
|
|
352
|
-
def _deserialize(type, value)
|
|
348
|
+
def self._deserialize(type, value)
|
|
353
349
|
case type.to_sym
|
|
354
350
|
when :Time
|
|
355
351
|
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
|
|
|
@@ -87,6 +87,8 @@ module MxPlatformRuby
|
|
|
87
87
|
|
|
88
88
|
if attributes.key?(:'description')
|
|
89
89
|
self.description = attributes[:'description']
|
|
90
|
+
else
|
|
91
|
+
self.description = nil
|
|
90
92
|
end
|
|
91
93
|
|
|
92
94
|
if attributes.key?(:'extended_transaction_type')
|
|
@@ -95,6 +97,8 @@ module MxPlatformRuby
|
|
|
95
97
|
|
|
96
98
|
if attributes.key?(:'id')
|
|
97
99
|
self.id = attributes[:'id']
|
|
100
|
+
else
|
|
101
|
+
self.id = nil
|
|
98
102
|
end
|
|
99
103
|
|
|
100
104
|
if attributes.key?(:'memo')
|
|
@@ -113,6 +117,7 @@ module MxPlatformRuby
|
|
|
113
117
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
114
118
|
# @return Array for valid properties with the reasons
|
|
115
119
|
def list_invalid_properties
|
|
120
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
116
121
|
invalid_properties = Array.new
|
|
117
122
|
if @description.nil?
|
|
118
123
|
invalid_properties.push('invalid value for "description", description cannot be nil.')
|
|
@@ -128,6 +133,7 @@ module MxPlatformRuby
|
|
|
128
133
|
# Check to see if the all the properties in the model are valid
|
|
129
134
|
# @return true if the model is valid
|
|
130
135
|
def valid?
|
|
136
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
131
137
|
return false if @description.nil?
|
|
132
138
|
return false if @id.nil?
|
|
133
139
|
true
|
|
@@ -163,36 +169,30 @@ module MxPlatformRuby
|
|
|
163
169
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
164
170
|
# @return [Object] Returns the model itself
|
|
165
171
|
def self.build_from_hash(attributes)
|
|
166
|
-
new.build_from_hash(attributes)
|
|
167
|
-
end
|
|
168
|
-
|
|
169
|
-
# Builds the object from hash
|
|
170
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
171
|
-
# @return [Object] Returns the model itself
|
|
172
|
-
def build_from_hash(attributes)
|
|
173
172
|
return nil unless attributes.is_a?(Hash)
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
173
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
174
|
+
transformed_hash = {}
|
|
175
|
+
openapi_types.each_pair do |key, type|
|
|
176
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
177
|
+
transformed_hash["#{key}"] = nil
|
|
177
178
|
elsif type =~ /\AArray<(.*)>/i
|
|
178
179
|
# check to ensure the input is an array given that the attribute
|
|
179
180
|
# is documented as an array but the input is not
|
|
180
|
-
if attributes[
|
|
181
|
-
|
|
181
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
182
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
182
183
|
end
|
|
183
|
-
elsif !attributes[
|
|
184
|
-
|
|
184
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
185
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
185
186
|
end
|
|
186
187
|
end
|
|
187
|
-
|
|
188
|
-
self
|
|
188
|
+
new(transformed_hash)
|
|
189
189
|
end
|
|
190
190
|
|
|
191
191
|
# Deserializes the data based on type
|
|
192
192
|
# @param string type Data type
|
|
193
193
|
# @param string value Value to be deserialized
|
|
194
194
|
# @return [Object] Deserialized data
|
|
195
|
-
def _deserialize(type, value)
|
|
195
|
+
def self._deserialize(type, value)
|
|
196
196
|
case type.to_sym
|
|
197
197
|
when :Time
|
|
198
198
|
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
|
|
|
@@ -67,6 +67,7 @@ module MxPlatformRuby
|
|
|
67
67
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
68
68
|
# @return Array for valid properties with the reasons
|
|
69
69
|
def list_invalid_properties
|
|
70
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
70
71
|
invalid_properties = Array.new
|
|
71
72
|
invalid_properties
|
|
72
73
|
end
|
|
@@ -74,6 +75,7 @@ module MxPlatformRuby
|
|
|
74
75
|
# Check to see if the all the properties in the model are valid
|
|
75
76
|
# @return true if the model is valid
|
|
76
77
|
def valid?
|
|
78
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
77
79
|
true
|
|
78
80
|
end
|
|
79
81
|
|
|
@@ -101,36 +103,30 @@ module MxPlatformRuby
|
|
|
101
103
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
102
104
|
# @return [Object] Returns the model itself
|
|
103
105
|
def self.build_from_hash(attributes)
|
|
104
|
-
new.build_from_hash(attributes)
|
|
105
|
-
end
|
|
106
|
-
|
|
107
|
-
# Builds the object from hash
|
|
108
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
109
|
-
# @return [Object] Returns the model itself
|
|
110
|
-
def build_from_hash(attributes)
|
|
111
106
|
return nil unless attributes.is_a?(Hash)
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
107
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
108
|
+
transformed_hash = {}
|
|
109
|
+
openapi_types.each_pair do |key, type|
|
|
110
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
111
|
+
transformed_hash["#{key}"] = nil
|
|
115
112
|
elsif type =~ /\AArray<(.*)>/i
|
|
116
113
|
# check to ensure the input is an array given that the attribute
|
|
117
114
|
# is documented as an array but the input is not
|
|
118
|
-
if attributes[
|
|
119
|
-
|
|
115
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
116
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
120
117
|
end
|
|
121
|
-
elsif !attributes[
|
|
122
|
-
|
|
118
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
119
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
123
120
|
end
|
|
124
121
|
end
|
|
125
|
-
|
|
126
|
-
self
|
|
122
|
+
new(transformed_hash)
|
|
127
123
|
end
|
|
128
124
|
|
|
129
125
|
# Deserializes the data based on type
|
|
130
126
|
# @param string type Data type
|
|
131
127
|
# @param string value Value to be deserialized
|
|
132
128
|
# @return [Object] Deserialized data
|
|
133
|
-
def _deserialize(type, value)
|
|
129
|
+
def self._deserialize(type, value)
|
|
134
130
|
case type.to_sym
|
|
135
131
|
when :Time
|
|
136
132
|
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
|
|
|
@@ -67,6 +67,7 @@ module MxPlatformRuby
|
|
|
67
67
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
68
68
|
# @return Array for valid properties with the reasons
|
|
69
69
|
def list_invalid_properties
|
|
70
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
70
71
|
invalid_properties = Array.new
|
|
71
72
|
invalid_properties
|
|
72
73
|
end
|
|
@@ -74,6 +75,7 @@ module MxPlatformRuby
|
|
|
74
75
|
# Check to see if the all the properties in the model are valid
|
|
75
76
|
# @return true if the model is valid
|
|
76
77
|
def valid?
|
|
78
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
77
79
|
true
|
|
78
80
|
end
|
|
79
81
|
|
|
@@ -101,36 +103,30 @@ module MxPlatformRuby
|
|
|
101
103
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
102
104
|
# @return [Object] Returns the model itself
|
|
103
105
|
def self.build_from_hash(attributes)
|
|
104
|
-
new.build_from_hash(attributes)
|
|
105
|
-
end
|
|
106
|
-
|
|
107
|
-
# Builds the object from hash
|
|
108
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
109
|
-
# @return [Object] Returns the model itself
|
|
110
|
-
def build_from_hash(attributes)
|
|
111
106
|
return nil unless attributes.is_a?(Hash)
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
107
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
108
|
+
transformed_hash = {}
|
|
109
|
+
openapi_types.each_pair do |key, type|
|
|
110
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
111
|
+
transformed_hash["#{key}"] = nil
|
|
115
112
|
elsif type =~ /\AArray<(.*)>/i
|
|
116
113
|
# check to ensure the input is an array given that the attribute
|
|
117
114
|
# is documented as an array but the input is not
|
|
118
|
-
if attributes[
|
|
119
|
-
|
|
115
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
116
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
120
117
|
end
|
|
121
|
-
elsif !attributes[
|
|
122
|
-
|
|
118
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
119
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
123
120
|
end
|
|
124
121
|
end
|
|
125
|
-
|
|
126
|
-
self
|
|
122
|
+
new(transformed_hash)
|
|
127
123
|
end
|
|
128
124
|
|
|
129
125
|
# Deserializes the data based on type
|
|
130
126
|
# @param string type Data type
|
|
131
127
|
# @param string value Value to be deserialized
|
|
132
128
|
# @return [Object] Deserialized data
|
|
133
|
-
def _deserialize(type, value)
|
|
129
|
+
def self._deserialize(type, value)
|
|
134
130
|
case type.to_sym
|
|
135
131
|
when :Time
|
|
136
132
|
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
|
|
|
@@ -228,6 +228,7 @@ module MxPlatformRuby
|
|
|
228
228
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
229
229
|
# @return Array for valid properties with the reasons
|
|
230
230
|
def list_invalid_properties
|
|
231
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
231
232
|
invalid_properties = Array.new
|
|
232
233
|
invalid_properties
|
|
233
234
|
end
|
|
@@ -235,6 +236,7 @@ module MxPlatformRuby
|
|
|
235
236
|
# Check to see if the all the properties in the model are valid
|
|
236
237
|
# @return true if the model is valid
|
|
237
238
|
def valid?
|
|
239
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
238
240
|
true
|
|
239
241
|
end
|
|
240
242
|
|
|
@@ -280,36 +282,30 @@ module MxPlatformRuby
|
|
|
280
282
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
281
283
|
# @return [Object] Returns the model itself
|
|
282
284
|
def self.build_from_hash(attributes)
|
|
283
|
-
new.build_from_hash(attributes)
|
|
284
|
-
end
|
|
285
|
-
|
|
286
|
-
# Builds the object from hash
|
|
287
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
288
|
-
# @return [Object] Returns the model itself
|
|
289
|
-
def build_from_hash(attributes)
|
|
290
285
|
return nil unless attributes.is_a?(Hash)
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
286
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
287
|
+
transformed_hash = {}
|
|
288
|
+
openapi_types.each_pair do |key, type|
|
|
289
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
290
|
+
transformed_hash["#{key}"] = nil
|
|
294
291
|
elsif type =~ /\AArray<(.*)>/i
|
|
295
292
|
# check to ensure the input is an array given that the attribute
|
|
296
293
|
# is documented as an array but the input is not
|
|
297
|
-
if attributes[
|
|
298
|
-
|
|
294
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
295
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
299
296
|
end
|
|
300
|
-
elsif !attributes[
|
|
301
|
-
|
|
297
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
298
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
302
299
|
end
|
|
303
300
|
end
|
|
304
|
-
|
|
305
|
-
self
|
|
301
|
+
new(transformed_hash)
|
|
306
302
|
end
|
|
307
303
|
|
|
308
304
|
# Deserializes the data based on type
|
|
309
305
|
# @param string type Data type
|
|
310
306
|
# @param string value Value to be deserialized
|
|
311
307
|
# @return [Object] Deserialized data
|
|
312
|
-
def _deserialize(type, value)
|
|
308
|
+
def self._deserialize(type, value)
|
|
313
309
|
case type.to_sym
|
|
314
310
|
when :Time
|
|
315
311
|
Time.parse(value)
|