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
|
|
|
@@ -113,6 +113,7 @@ module MxPlatformRuby
|
|
|
113
113
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
114
114
|
# @return Array for valid properties with the reasons
|
|
115
115
|
def list_invalid_properties
|
|
116
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
116
117
|
invalid_properties = Array.new
|
|
117
118
|
invalid_properties
|
|
118
119
|
end
|
|
@@ -120,6 +121,7 @@ module MxPlatformRuby
|
|
|
120
121
|
# Check to see if the all the properties in the model are valid
|
|
121
122
|
# @return true if the model is valid
|
|
122
123
|
def valid?
|
|
124
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
123
125
|
true
|
|
124
126
|
end
|
|
125
127
|
|
|
@@ -153,36 +155,30 @@ module MxPlatformRuby
|
|
|
153
155
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
154
156
|
# @return [Object] Returns the model itself
|
|
155
157
|
def self.build_from_hash(attributes)
|
|
156
|
-
new.build_from_hash(attributes)
|
|
157
|
-
end
|
|
158
|
-
|
|
159
|
-
# Builds the object from hash
|
|
160
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
161
|
-
# @return [Object] Returns the model itself
|
|
162
|
-
def build_from_hash(attributes)
|
|
163
158
|
return nil unless attributes.is_a?(Hash)
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
159
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
160
|
+
transformed_hash = {}
|
|
161
|
+
openapi_types.each_pair do |key, type|
|
|
162
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
163
|
+
transformed_hash["#{key}"] = nil
|
|
167
164
|
elsif type =~ /\AArray<(.*)>/i
|
|
168
165
|
# check to ensure the input is an array given that the attribute
|
|
169
166
|
# is documented as an array but the input is not
|
|
170
|
-
if attributes[
|
|
171
|
-
|
|
167
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
168
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
172
169
|
end
|
|
173
|
-
elsif !attributes[
|
|
174
|
-
|
|
170
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
171
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
175
172
|
end
|
|
176
173
|
end
|
|
177
|
-
|
|
178
|
-
self
|
|
174
|
+
new(transformed_hash)
|
|
179
175
|
end
|
|
180
176
|
|
|
181
177
|
# Deserializes the data based on type
|
|
182
178
|
# @param string type Data type
|
|
183
179
|
# @param string value Value to be deserialized
|
|
184
180
|
# @return [Object] Deserialized data
|
|
185
|
-
def _deserialize(type, value)
|
|
181
|
+
def self._deserialize(type, value)
|
|
186
182
|
case type.to_sym
|
|
187
183
|
when :Time
|
|
188
184
|
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
|
|
|
@@ -83,6 +83,8 @@ module MxPlatformRuby
|
|
|
83
83
|
|
|
84
84
|
if attributes.key?(:'planned_amount')
|
|
85
85
|
self.planned_amount = attributes[:'planned_amount']
|
|
86
|
+
else
|
|
87
|
+
self.planned_amount = nil
|
|
86
88
|
end
|
|
87
89
|
|
|
88
90
|
if attributes.key?(:'scheduled_payment_guid')
|
|
@@ -97,6 +99,7 @@ module MxPlatformRuby
|
|
|
97
99
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
98
100
|
# @return Array for valid properties with the reasons
|
|
99
101
|
def list_invalid_properties
|
|
102
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
100
103
|
invalid_properties = Array.new
|
|
101
104
|
if @planned_amount.nil?
|
|
102
105
|
invalid_properties.push('invalid value for "planned_amount", planned_amount cannot be nil.')
|
|
@@ -108,6 +111,7 @@ module MxPlatformRuby
|
|
|
108
111
|
# Check to see if the all the properties in the model are valid
|
|
109
112
|
# @return true if the model is valid
|
|
110
113
|
def valid?
|
|
114
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
111
115
|
return false if @planned_amount.nil?
|
|
112
116
|
true
|
|
113
117
|
end
|
|
@@ -140,36 +144,30 @@ module MxPlatformRuby
|
|
|
140
144
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
141
145
|
# @return [Object] Returns the model itself
|
|
142
146
|
def self.build_from_hash(attributes)
|
|
143
|
-
new.build_from_hash(attributes)
|
|
144
|
-
end
|
|
145
|
-
|
|
146
|
-
# Builds the object from hash
|
|
147
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
148
|
-
# @return [Object] Returns the model itself
|
|
149
|
-
def build_from_hash(attributes)
|
|
150
147
|
return nil unless attributes.is_a?(Hash)
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
148
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
149
|
+
transformed_hash = {}
|
|
150
|
+
openapi_types.each_pair do |key, type|
|
|
151
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
152
|
+
transformed_hash["#{key}"] = nil
|
|
154
153
|
elsif type =~ /\AArray<(.*)>/i
|
|
155
154
|
# check to ensure the input is an array given that the attribute
|
|
156
155
|
# is documented as an array but the input is not
|
|
157
|
-
if attributes[
|
|
158
|
-
|
|
156
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
157
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
159
158
|
end
|
|
160
|
-
elsif !attributes[
|
|
161
|
-
|
|
159
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
160
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
162
161
|
end
|
|
163
162
|
end
|
|
164
|
-
|
|
165
|
-
self
|
|
163
|
+
new(transformed_hash)
|
|
166
164
|
end
|
|
167
165
|
|
|
168
166
|
# Deserializes the data based on type
|
|
169
167
|
# @param string type Data type
|
|
170
168
|
# @param string value Value to be deserialized
|
|
171
169
|
# @return [Object] Deserialized data
|
|
172
|
-
def _deserialize(type, value)
|
|
170
|
+
def self._deserialize(type, value)
|
|
173
171
|
case type.to_sym
|
|
174
172
|
when :Time
|
|
175
173
|
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
|
|
|
@@ -166,6 +166,7 @@ module MxPlatformRuby
|
|
|
166
166
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
167
167
|
# @return Array for valid properties with the reasons
|
|
168
168
|
def list_invalid_properties
|
|
169
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
169
170
|
invalid_properties = Array.new
|
|
170
171
|
invalid_properties
|
|
171
172
|
end
|
|
@@ -173,6 +174,7 @@ module MxPlatformRuby
|
|
|
173
174
|
# Check to see if the all the properties in the model are valid
|
|
174
175
|
# @return true if the model is valid
|
|
175
176
|
def valid?
|
|
177
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
176
178
|
true
|
|
177
179
|
end
|
|
178
180
|
|
|
@@ -211,36 +213,30 @@ module MxPlatformRuby
|
|
|
211
213
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
212
214
|
# @return [Object] Returns the model itself
|
|
213
215
|
def self.build_from_hash(attributes)
|
|
214
|
-
new.build_from_hash(attributes)
|
|
215
|
-
end
|
|
216
|
-
|
|
217
|
-
# Builds the object from hash
|
|
218
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
219
|
-
# @return [Object] Returns the model itself
|
|
220
|
-
def build_from_hash(attributes)
|
|
221
216
|
return nil unless attributes.is_a?(Hash)
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
217
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
218
|
+
transformed_hash = {}
|
|
219
|
+
openapi_types.each_pair do |key, type|
|
|
220
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
221
|
+
transformed_hash["#{key}"] = nil
|
|
225
222
|
elsif type =~ /\AArray<(.*)>/i
|
|
226
223
|
# check to ensure the input is an array given that the attribute
|
|
227
224
|
# is documented as an array but the input is not
|
|
228
|
-
if attributes[
|
|
229
|
-
|
|
225
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
226
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
230
227
|
end
|
|
231
|
-
elsif !attributes[
|
|
232
|
-
|
|
228
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
229
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
233
230
|
end
|
|
234
231
|
end
|
|
235
|
-
|
|
236
|
-
self
|
|
232
|
+
new(transformed_hash)
|
|
237
233
|
end
|
|
238
234
|
|
|
239
235
|
# Deserializes the data based on type
|
|
240
236
|
# @param string type Data type
|
|
241
237
|
# @param string value Value to be deserialized
|
|
242
238
|
# @return [Object] Deserialized data
|
|
243
|
-
def _deserialize(type, value)
|
|
239
|
+
def self._deserialize(type, value)
|
|
244
240
|
case type.to_sym
|
|
245
241
|
when :Time
|
|
246
242
|
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
|
|
|
@@ -129,6 +129,7 @@ module MxPlatformRuby
|
|
|
129
129
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
130
130
|
# @return Array for valid properties with the reasons
|
|
131
131
|
def list_invalid_properties
|
|
132
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
132
133
|
invalid_properties = Array.new
|
|
133
134
|
invalid_properties
|
|
134
135
|
end
|
|
@@ -136,6 +137,7 @@ module MxPlatformRuby
|
|
|
136
137
|
# Check to see if the all the properties in the model are valid
|
|
137
138
|
# @return true if the model is valid
|
|
138
139
|
def valid?
|
|
140
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
139
141
|
true
|
|
140
142
|
end
|
|
141
143
|
|
|
@@ -170,36 +172,30 @@ module MxPlatformRuby
|
|
|
170
172
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
171
173
|
# @return [Object] Returns the model itself
|
|
172
174
|
def self.build_from_hash(attributes)
|
|
173
|
-
new.build_from_hash(attributes)
|
|
174
|
-
end
|
|
175
|
-
|
|
176
|
-
# Builds the object from hash
|
|
177
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
178
|
-
# @return [Object] Returns the model itself
|
|
179
|
-
def build_from_hash(attributes)
|
|
180
175
|
return nil unless attributes.is_a?(Hash)
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
176
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
177
|
+
transformed_hash = {}
|
|
178
|
+
openapi_types.each_pair do |key, type|
|
|
179
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
180
|
+
transformed_hash["#{key}"] = nil
|
|
184
181
|
elsif type =~ /\AArray<(.*)>/i
|
|
185
182
|
# check to ensure the input is an array given that the attribute
|
|
186
183
|
# is documented as an array but the input is not
|
|
187
|
-
if attributes[
|
|
188
|
-
|
|
184
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
185
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
189
186
|
end
|
|
190
|
-
elsif !attributes[
|
|
191
|
-
|
|
187
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
188
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
192
189
|
end
|
|
193
190
|
end
|
|
194
|
-
|
|
195
|
-
self
|
|
191
|
+
new(transformed_hash)
|
|
196
192
|
end
|
|
197
193
|
|
|
198
194
|
# Deserializes the data based on type
|
|
199
195
|
# @param string type Data type
|
|
200
196
|
# @param string value Value to be deserialized
|
|
201
197
|
# @return [Object] Deserialized data
|
|
202
|
-
def _deserialize(type, value)
|
|
198
|
+
def self._deserialize(type, value)
|
|
203
199
|
case type.to_sym
|
|
204
200
|
when :Time
|
|
205
201
|
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
|
|
|
@@ -102,6 +102,7 @@ module MxPlatformRuby
|
|
|
102
102
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
103
103
|
# @return Array for valid properties with the reasons
|
|
104
104
|
def list_invalid_properties
|
|
105
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
105
106
|
invalid_properties = Array.new
|
|
106
107
|
invalid_properties
|
|
107
108
|
end
|
|
@@ -109,6 +110,7 @@ module MxPlatformRuby
|
|
|
109
110
|
# Check to see if the all the properties in the model are valid
|
|
110
111
|
# @return true if the model is valid
|
|
111
112
|
def valid?
|
|
113
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
112
114
|
true
|
|
113
115
|
end
|
|
114
116
|
|
|
@@ -140,36 +142,30 @@ module MxPlatformRuby
|
|
|
140
142
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
141
143
|
# @return [Object] Returns the model itself
|
|
142
144
|
def self.build_from_hash(attributes)
|
|
143
|
-
new.build_from_hash(attributes)
|
|
144
|
-
end
|
|
145
|
-
|
|
146
|
-
# Builds the object from hash
|
|
147
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
148
|
-
# @return [Object] Returns the model itself
|
|
149
|
-
def build_from_hash(attributes)
|
|
150
145
|
return nil unless attributes.is_a?(Hash)
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
146
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
147
|
+
transformed_hash = {}
|
|
148
|
+
openapi_types.each_pair do |key, type|
|
|
149
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
150
|
+
transformed_hash["#{key}"] = nil
|
|
154
151
|
elsif type =~ /\AArray<(.*)>/i
|
|
155
152
|
# check to ensure the input is an array given that the attribute
|
|
156
153
|
# is documented as an array but the input is not
|
|
157
|
-
if attributes[
|
|
158
|
-
|
|
154
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
155
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
159
156
|
end
|
|
160
|
-
elsif !attributes[
|
|
161
|
-
|
|
157
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
158
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
162
159
|
end
|
|
163
160
|
end
|
|
164
|
-
|
|
165
|
-
self
|
|
161
|
+
new(transformed_hash)
|
|
166
162
|
end
|
|
167
163
|
|
|
168
164
|
# Deserializes the data based on type
|
|
169
165
|
# @param string type Data type
|
|
170
166
|
# @param string value Value to be deserialized
|
|
171
167
|
# @return [Object] Deserialized data
|
|
172
|
-
def _deserialize(type, value)
|
|
168
|
+
def self._deserialize(type, value)
|
|
173
169
|
case type.to_sym
|
|
174
170
|
when :Time
|
|
175
171
|
Time.parse(value)
|