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