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
|
|
|
@@ -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
|
|
|
@@ -66,6 +66,7 @@ module MxPlatformRuby
|
|
|
66
66
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
67
67
|
# @return Array for valid properties with the reasons
|
|
68
68
|
def list_invalid_properties
|
|
69
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
69
70
|
invalid_properties = Array.new
|
|
70
71
|
invalid_properties
|
|
71
72
|
end
|
|
@@ -73,6 +74,7 @@ module MxPlatformRuby
|
|
|
73
74
|
# Check to see if the all the properties in the model are valid
|
|
74
75
|
# @return true if the model is valid
|
|
75
76
|
def valid?
|
|
77
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
76
78
|
true
|
|
77
79
|
end
|
|
78
80
|
|
|
@@ -100,36 +102,30 @@ module MxPlatformRuby
|
|
|
100
102
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
101
103
|
# @return [Object] Returns the model itself
|
|
102
104
|
def self.build_from_hash(attributes)
|
|
103
|
-
new.build_from_hash(attributes)
|
|
104
|
-
end
|
|
105
|
-
|
|
106
|
-
# Builds the object from hash
|
|
107
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
108
|
-
# @return [Object] Returns the model itself
|
|
109
|
-
def build_from_hash(attributes)
|
|
110
105
|
return nil unless attributes.is_a?(Hash)
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
106
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
107
|
+
transformed_hash = {}
|
|
108
|
+
openapi_types.each_pair do |key, type|
|
|
109
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
110
|
+
transformed_hash["#{key}"] = nil
|
|
114
111
|
elsif type =~ /\AArray<(.*)>/i
|
|
115
112
|
# check to ensure the input is an array given that the attribute
|
|
116
113
|
# is documented as an array but the input is not
|
|
117
|
-
if attributes[
|
|
118
|
-
|
|
114
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
115
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
119
116
|
end
|
|
120
|
-
elsif !attributes[
|
|
121
|
-
|
|
117
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
118
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
122
119
|
end
|
|
123
120
|
end
|
|
124
|
-
|
|
125
|
-
self
|
|
121
|
+
new(transformed_hash)
|
|
126
122
|
end
|
|
127
123
|
|
|
128
124
|
# Deserializes the data based on type
|
|
129
125
|
# @param string type Data type
|
|
130
126
|
# @param string value Value to be deserialized
|
|
131
127
|
# @return [Object] Deserialized data
|
|
132
|
-
def _deserialize(type, value)
|
|
128
|
+
def self._deserialize(type, value)
|
|
133
129
|
case type.to_sym
|
|
134
130
|
when :Time
|
|
135
131
|
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
|
|
|
@@ -66,6 +66,7 @@ module MxPlatformRuby
|
|
|
66
66
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
67
67
|
# @return Array for valid properties with the reasons
|
|
68
68
|
def list_invalid_properties
|
|
69
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
69
70
|
invalid_properties = Array.new
|
|
70
71
|
invalid_properties
|
|
71
72
|
end
|
|
@@ -73,6 +74,7 @@ module MxPlatformRuby
|
|
|
73
74
|
# Check to see if the all the properties in the model are valid
|
|
74
75
|
# @return true if the model is valid
|
|
75
76
|
def valid?
|
|
77
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
76
78
|
true
|
|
77
79
|
end
|
|
78
80
|
|
|
@@ -100,36 +102,30 @@ module MxPlatformRuby
|
|
|
100
102
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
101
103
|
# @return [Object] Returns the model itself
|
|
102
104
|
def self.build_from_hash(attributes)
|
|
103
|
-
new.build_from_hash(attributes)
|
|
104
|
-
end
|
|
105
|
-
|
|
106
|
-
# Builds the object from hash
|
|
107
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
108
|
-
# @return [Object] Returns the model itself
|
|
109
|
-
def build_from_hash(attributes)
|
|
110
105
|
return nil unless attributes.is_a?(Hash)
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
106
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
107
|
+
transformed_hash = {}
|
|
108
|
+
openapi_types.each_pair do |key, type|
|
|
109
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
110
|
+
transformed_hash["#{key}"] = nil
|
|
114
111
|
elsif type =~ /\AArray<(.*)>/i
|
|
115
112
|
# check to ensure the input is an array given that the attribute
|
|
116
113
|
# is documented as an array but the input is not
|
|
117
|
-
if attributes[
|
|
118
|
-
|
|
114
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
115
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
119
116
|
end
|
|
120
|
-
elsif !attributes[
|
|
121
|
-
|
|
117
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
118
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
122
119
|
end
|
|
123
120
|
end
|
|
124
|
-
|
|
125
|
-
self
|
|
121
|
+
new(transformed_hash)
|
|
126
122
|
end
|
|
127
123
|
|
|
128
124
|
# Deserializes the data based on type
|
|
129
125
|
# @param string type Data type
|
|
130
126
|
# @param string value Value to be deserialized
|
|
131
127
|
# @return [Object] Deserialized data
|
|
132
|
-
def _deserialize(type, value)
|
|
128
|
+
def self._deserialize(type, value)
|
|
133
129
|
case type.to_sym
|
|
134
130
|
when :Time
|
|
135
131
|
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
|
|
|
@@ -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
|
|
|
@@ -71,6 +71,8 @@ module MxPlatformRuby
|
|
|
71
71
|
|
|
72
72
|
if attributes.key?(:'name')
|
|
73
73
|
self.name = attributes[:'name']
|
|
74
|
+
else
|
|
75
|
+
self.name = nil
|
|
74
76
|
end
|
|
75
77
|
|
|
76
78
|
if attributes.key?(:'parent_guid')
|
|
@@ -81,6 +83,7 @@ module MxPlatformRuby
|
|
|
81
83
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
82
84
|
# @return Array for valid properties with the reasons
|
|
83
85
|
def list_invalid_properties
|
|
86
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
84
87
|
invalid_properties = Array.new
|
|
85
88
|
if @name.nil?
|
|
86
89
|
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
|
@@ -92,6 +95,7 @@ module MxPlatformRuby
|
|
|
92
95
|
# Check to see if the all the properties in the model are valid
|
|
93
96
|
# @return true if the model is valid
|
|
94
97
|
def valid?
|
|
98
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
95
99
|
return false if @name.nil?
|
|
96
100
|
true
|
|
97
101
|
end
|
|
@@ -122,36 +126,30 @@ module MxPlatformRuby
|
|
|
122
126
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
123
127
|
# @return [Object] Returns the model itself
|
|
124
128
|
def self.build_from_hash(attributes)
|
|
125
|
-
new.build_from_hash(attributes)
|
|
126
|
-
end
|
|
127
|
-
|
|
128
|
-
# Builds the object from hash
|
|
129
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
130
|
-
# @return [Object] Returns the model itself
|
|
131
|
-
def build_from_hash(attributes)
|
|
132
129
|
return nil unless attributes.is_a?(Hash)
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
130
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
131
|
+
transformed_hash = {}
|
|
132
|
+
openapi_types.each_pair do |key, type|
|
|
133
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
134
|
+
transformed_hash["#{key}"] = nil
|
|
136
135
|
elsif type =~ /\AArray<(.*)>/i
|
|
137
136
|
# check to ensure the input is an array given that the attribute
|
|
138
137
|
# is documented as an array but the input is not
|
|
139
|
-
if attributes[
|
|
140
|
-
|
|
138
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
139
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
141
140
|
end
|
|
142
|
-
elsif !attributes[
|
|
143
|
-
|
|
141
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
142
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
144
143
|
end
|
|
145
144
|
end
|
|
146
|
-
|
|
147
|
-
self
|
|
145
|
+
new(transformed_hash)
|
|
148
146
|
end
|
|
149
147
|
|
|
150
148
|
# Deserializes the data based on type
|
|
151
149
|
# @param string type Data type
|
|
152
150
|
# @param string value Value to be deserialized
|
|
153
151
|
# @return [Object] Deserialized data
|
|
154
|
-
def _deserialize(type, value)
|
|
152
|
+
def self._deserialize(type, value)
|
|
155
153
|
case type.to_sym
|
|
156
154
|
when :Time
|
|
157
155
|
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
|
|
|
@@ -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)
|