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.
Files changed (277) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +12 -26
  3. data/docs/SpendingPlansResponseBody.md +2 -2
  4. data/lib/mx-platform-ruby/api/mx_platform_api.rb +1 -1
  5. data/lib/mx-platform-ruby/api_client.rb +90 -55
  6. data/lib/mx-platform-ruby/api_error.rb +2 -1
  7. data/lib/mx-platform-ruby/configuration.rb +102 -26
  8. data/lib/mx-platform-ruby/models/account_create_request.rb +18 -18
  9. data/lib/mx-platform-ruby/models/account_create_request_body.rb +14 -18
  10. data/lib/mx-platform-ruby/models/account_number_response.rb +14 -18
  11. data/lib/mx-platform-ruby/models/account_numbers_response_body.rb +14 -18
  12. data/lib/mx-platform-ruby/models/account_owner_response.rb +14 -18
  13. data/lib/mx-platform-ruby/models/account_owners_response_body.rb +14 -18
  14. data/lib/mx-platform-ruby/models/account_response.rb +14 -18
  15. data/lib/mx-platform-ruby/models/account_response_body.rb +14 -18
  16. data/lib/mx-platform-ruby/models/account_update_request.rb +14 -18
  17. data/lib/mx-platform-ruby/models/account_update_request_body.rb +14 -18
  18. data/lib/mx-platform-ruby/models/accounts_response_body.rb +14 -18
  19. data/lib/mx-platform-ruby/models/authorization_code_request.rb +14 -18
  20. data/lib/mx-platform-ruby/models/authorization_code_request_body.rb +14 -18
  21. data/lib/mx-platform-ruby/models/authorization_code_response.rb +14 -18
  22. data/lib/mx-platform-ruby/models/authorization_code_response_body.rb +14 -18
  23. data/lib/mx-platform-ruby/models/categories_response_body.rb +14 -18
  24. data/lib/mx-platform-ruby/models/category_create_request.rb +16 -18
  25. data/lib/mx-platform-ruby/models/category_create_request_body.rb +14 -18
  26. data/lib/mx-platform-ruby/models/category_response.rb +14 -18
  27. data/lib/mx-platform-ruby/models/category_response_body.rb +14 -18
  28. data/lib/mx-platform-ruby/models/category_update_request.rb +14 -18
  29. data/lib/mx-platform-ruby/models/category_update_request_body.rb +14 -18
  30. data/lib/mx-platform-ruby/models/challenge_response.rb +14 -18
  31. data/lib/mx-platform-ruby/models/challenges_response_body.rb +14 -18
  32. data/lib/mx-platform-ruby/models/connect_widget_request.rb +14 -18
  33. data/lib/mx-platform-ruby/models/connect_widget_request_body.rb +14 -18
  34. data/lib/mx-platform-ruby/models/connect_widget_response.rb +14 -18
  35. data/lib/mx-platform-ruby/models/connect_widget_response_body.rb +14 -18
  36. data/lib/mx-platform-ruby/models/credential_request.rb +14 -18
  37. data/lib/mx-platform-ruby/models/credential_response.rb +14 -18
  38. data/lib/mx-platform-ruby/models/credentials_response_body.rb +14 -18
  39. data/lib/mx-platform-ruby/models/enhance_transaction_response.rb +14 -18
  40. data/lib/mx-platform-ruby/models/enhance_transactions_request.rb +18 -18
  41. data/lib/mx-platform-ruby/models/enhance_transactions_request_body.rb +14 -18
  42. data/lib/mx-platform-ruby/models/enhance_transactions_response_body.rb +14 -18
  43. data/lib/mx-platform-ruby/models/holding_response.rb +14 -18
  44. data/lib/mx-platform-ruby/models/holding_response_body.rb +14 -18
  45. data/lib/mx-platform-ruby/models/holdings_response_body.rb +14 -18
  46. data/lib/mx-platform-ruby/models/image_option_response.rb +14 -18
  47. data/lib/mx-platform-ruby/models/institution_response.rb +14 -18
  48. data/lib/mx-platform-ruby/models/institution_response_body.rb +14 -18
  49. data/lib/mx-platform-ruby/models/institutions_response_body.rb +14 -18
  50. data/lib/mx-platform-ruby/models/managed_account_create_request.rb +20 -18
  51. data/lib/mx-platform-ruby/models/managed_account_create_request_body.rb +14 -18
  52. data/lib/mx-platform-ruby/models/managed_account_update_request.rb +14 -18
  53. data/lib/mx-platform-ruby/models/managed_account_update_request_body.rb +14 -18
  54. data/lib/mx-platform-ruby/models/managed_member_create_request.rb +16 -18
  55. data/lib/mx-platform-ruby/models/managed_member_create_request_body.rb +14 -18
  56. data/lib/mx-platform-ruby/models/managed_member_update_request.rb +14 -18
  57. data/lib/mx-platform-ruby/models/managed_member_update_request_body.rb +14 -18
  58. data/lib/mx-platform-ruby/models/managed_transaction_create_request.rb +24 -18
  59. data/lib/mx-platform-ruby/models/managed_transaction_create_request_body.rb +14 -18
  60. data/lib/mx-platform-ruby/models/managed_transaction_update_request.rb +14 -18
  61. data/lib/mx-platform-ruby/models/managed_transaction_update_request_body.rb +14 -18
  62. data/lib/mx-platform-ruby/models/member_create_request.rb +18 -18
  63. data/lib/mx-platform-ruby/models/member_create_request_body.rb +14 -18
  64. data/lib/mx-platform-ruby/models/member_response.rb +14 -18
  65. data/lib/mx-platform-ruby/models/member_response_body.rb +14 -18
  66. data/lib/mx-platform-ruby/models/member_resume_request.rb +14 -18
  67. data/lib/mx-platform-ruby/models/member_resume_request_body.rb +14 -18
  68. data/lib/mx-platform-ruby/models/member_status_response.rb +14 -18
  69. data/lib/mx-platform-ruby/models/member_status_response_body.rb +14 -18
  70. data/lib/mx-platform-ruby/models/member_update_request.rb +14 -18
  71. data/lib/mx-platform-ruby/models/member_update_request_body.rb +14 -18
  72. data/lib/mx-platform-ruby/models/members_response_body.rb +14 -18
  73. data/lib/mx-platform-ruby/models/merchant_location_response.rb +14 -18
  74. data/lib/mx-platform-ruby/models/merchant_location_response_body.rb +14 -18
  75. data/lib/mx-platform-ruby/models/merchant_response.rb +14 -18
  76. data/lib/mx-platform-ruby/models/merchant_response_body.rb +14 -18
  77. data/lib/mx-platform-ruby/models/merchants_response_body.rb +14 -18
  78. data/lib/mx-platform-ruby/models/o_auth_window_response.rb +14 -18
  79. data/lib/mx-platform-ruby/models/o_auth_window_response_body.rb +14 -18
  80. data/lib/mx-platform-ruby/models/option_response.rb +14 -18
  81. data/lib/mx-platform-ruby/models/pagination_response.rb +14 -18
  82. data/lib/mx-platform-ruby/models/payment_processor_authorization_code_request.rb +14 -18
  83. data/lib/mx-platform-ruby/models/payment_processor_authorization_code_request_body.rb +14 -18
  84. data/lib/mx-platform-ruby/models/payment_processor_authorization_code_response.rb +14 -18
  85. data/lib/mx-platform-ruby/models/payment_processor_authorization_code_response_body.rb +14 -18
  86. data/lib/mx-platform-ruby/models/spending_plan_account_response.rb +14 -18
  87. data/lib/mx-platform-ruby/models/spending_plan_accounts_response.rb +14 -18
  88. data/lib/mx-platform-ruby/models/spending_plan_iteration_item_create_request_body.rb +16 -18
  89. data/lib/mx-platform-ruby/models/spending_plan_iteration_item_response.rb +14 -18
  90. data/lib/mx-platform-ruby/models/spending_plan_iteration_items_response_body.rb +14 -18
  91. data/lib/mx-platform-ruby/models/spending_plan_iteration_response.rb +14 -18
  92. data/lib/mx-platform-ruby/models/spending_plan_iterations_response.rb +14 -18
  93. data/lib/mx-platform-ruby/models/spending_plan_response.rb +14 -18
  94. data/lib/mx-platform-ruby/models/spending_plans_response_body.rb +22 -26
  95. data/lib/mx-platform-ruby/models/statement_response.rb +14 -18
  96. data/lib/mx-platform-ruby/models/statement_response_body.rb +14 -18
  97. data/lib/mx-platform-ruby/models/statements_response_body.rb +14 -18
  98. data/lib/mx-platform-ruby/models/tag_create_request.rb +16 -18
  99. data/lib/mx-platform-ruby/models/tag_create_request_body.rb +14 -18
  100. data/lib/mx-platform-ruby/models/tag_response.rb +14 -18
  101. data/lib/mx-platform-ruby/models/tag_response_body.rb +14 -18
  102. data/lib/mx-platform-ruby/models/tag_update_request.rb +16 -18
  103. data/lib/mx-platform-ruby/models/tag_update_request_body.rb +14 -18
  104. data/lib/mx-platform-ruby/models/tagging_create_request.rb +18 -18
  105. data/lib/mx-platform-ruby/models/tagging_create_request_body.rb +14 -18
  106. data/lib/mx-platform-ruby/models/tagging_response.rb +14 -18
  107. data/lib/mx-platform-ruby/models/tagging_response_body.rb +14 -18
  108. data/lib/mx-platform-ruby/models/tagging_update_request.rb +16 -18
  109. data/lib/mx-platform-ruby/models/tagging_update_request_body.rb +14 -18
  110. data/lib/mx-platform-ruby/models/taggings_response_body.rb +14 -18
  111. data/lib/mx-platform-ruby/models/tags_response_body.rb +14 -18
  112. data/lib/mx-platform-ruby/models/tax_document_response.rb +14 -18
  113. data/lib/mx-platform-ruby/models/tax_document_response_body.rb +14 -18
  114. data/lib/mx-platform-ruby/models/tax_documents_response_body.rb +14 -18
  115. data/lib/mx-platform-ruby/models/transaction_response.rb +14 -18
  116. data/lib/mx-platform-ruby/models/transaction_response_body.rb +14 -18
  117. data/lib/mx-platform-ruby/models/transaction_rule_create_request.rb +18 -18
  118. data/lib/mx-platform-ruby/models/transaction_rule_create_request_body.rb +14 -18
  119. data/lib/mx-platform-ruby/models/transaction_rule_response.rb +14 -18
  120. data/lib/mx-platform-ruby/models/transaction_rule_response_body.rb +14 -18
  121. data/lib/mx-platform-ruby/models/transaction_rule_update_request.rb +14 -18
  122. data/lib/mx-platform-ruby/models/transaction_rule_update_request_body.rb +14 -18
  123. data/lib/mx-platform-ruby/models/transaction_rules_response_body.rb +14 -18
  124. data/lib/mx-platform-ruby/models/transaction_update_request.rb +16 -18
  125. data/lib/mx-platform-ruby/models/transaction_update_request_body.rb +14 -18
  126. data/lib/mx-platform-ruby/models/transactions_response_body.rb +14 -18
  127. data/lib/mx-platform-ruby/models/user_create_request.rb +14 -18
  128. data/lib/mx-platform-ruby/models/user_create_request_body.rb +14 -18
  129. data/lib/mx-platform-ruby/models/user_response.rb +14 -18
  130. data/lib/mx-platform-ruby/models/user_response_body.rb +14 -18
  131. data/lib/mx-platform-ruby/models/user_update_request.rb +14 -18
  132. data/lib/mx-platform-ruby/models/user_update_request_body.rb +14 -18
  133. data/lib/mx-platform-ruby/models/users_response_body.rb +14 -18
  134. data/lib/mx-platform-ruby/models/widget_request.rb +16 -18
  135. data/lib/mx-platform-ruby/models/widget_request_body.rb +14 -18
  136. data/lib/mx-platform-ruby/models/widget_response.rb +14 -18
  137. data/lib/mx-platform-ruby/models/widget_response_body.rb +14 -18
  138. data/lib/mx-platform-ruby/version.rb +2 -2
  139. data/lib/mx-platform-ruby.rb +1 -1
  140. data/mx-platform-ruby.gemspec +3 -2
  141. data/openapi/config.yml +1 -1
  142. data/openapitools.json +1 -1
  143. data/spec/api/mx_platform_api_spec.rb +114 -114
  144. data/spec/api_client_spec.rb +36 -1
  145. data/spec/configuration_spec.rb +41 -1
  146. data/spec/models/account_create_request_body_spec.rb +2 -2
  147. data/spec/models/account_create_request_spec.rb +22 -22
  148. data/spec/models/account_number_response_spec.rb +10 -10
  149. data/spec/models/account_numbers_response_body_spec.rb +3 -3
  150. data/spec/models/account_owner_response_spec.rb +15 -15
  151. data/spec/models/account_owners_response_body_spec.rb +3 -3
  152. data/spec/models/account_response_body_spec.rb +2 -2
  153. data/spec/models/account_response_spec.rb +57 -57
  154. data/spec/models/account_update_request_body_spec.rb +2 -2
  155. data/spec/models/account_update_request_spec.rb +22 -22
  156. data/spec/models/accounts_response_body_spec.rb +3 -3
  157. data/spec/models/authorization_code_request_body_spec.rb +2 -2
  158. data/spec/models/authorization_code_request_spec.rb +2 -2
  159. data/spec/models/authorization_code_response_body_spec.rb +2 -2
  160. data/spec/models/authorization_code_response_spec.rb +2 -2
  161. data/spec/models/categories_response_body_spec.rb +3 -3
  162. data/spec/models/category_create_request_body_spec.rb +2 -2
  163. data/spec/models/category_create_request_spec.rb +4 -4
  164. data/spec/models/category_response_body_spec.rb +2 -2
  165. data/spec/models/category_response_spec.rb +9 -9
  166. data/spec/models/category_update_request_body_spec.rb +2 -2
  167. data/spec/models/category_update_request_spec.rb +3 -3
  168. data/spec/models/challenge_response_spec.rb +8 -8
  169. data/spec/models/challenges_response_body_spec.rb +3 -3
  170. data/spec/models/connect_widget_request_body_spec.rb +2 -2
  171. data/spec/models/connect_widget_request_spec.rb +15 -15
  172. data/spec/models/connect_widget_response_body_spec.rb +2 -2
  173. data/spec/models/connect_widget_response_spec.rb +3 -3
  174. data/spec/models/credential_request_spec.rb +3 -3
  175. data/spec/models/credential_response_spec.rb +7 -7
  176. data/spec/models/credentials_response_body_spec.rb +3 -3
  177. data/spec/models/enhance_transaction_response_spec.rb +24 -24
  178. data/spec/models/enhance_transactions_request_body_spec.rb +2 -2
  179. data/spec/models/enhance_transactions_request_spec.rb +8 -8
  180. data/spec/models/enhance_transactions_response_body_spec.rb +2 -2
  181. data/spec/models/holding_response_body_spec.rb +2 -2
  182. data/spec/models/holding_response_spec.rb +20 -20
  183. data/spec/models/holdings_response_body_spec.rb +3 -3
  184. data/spec/models/image_option_response_spec.rb +4 -4
  185. data/spec/models/institution_response_body_spec.rb +2 -2
  186. data/spec/models/institution_response_spec.rb +15 -15
  187. data/spec/models/institutions_response_body_spec.rb +3 -3
  188. data/spec/models/managed_account_create_request_body_spec.rb +2 -2
  189. data/spec/models/managed_account_create_request_spec.rb +32 -32
  190. data/spec/models/managed_account_update_request_body_spec.rb +2 -2
  191. data/spec/models/managed_account_update_request_spec.rb +32 -32
  192. data/spec/models/managed_member_create_request_body_spec.rb +2 -2
  193. data/spec/models/managed_member_create_request_spec.rb +5 -5
  194. data/spec/models/managed_member_update_request_body_spec.rb +2 -2
  195. data/spec/models/managed_member_update_request_spec.rb +4 -4
  196. data/spec/models/managed_transaction_create_request_body_spec.rb +2 -2
  197. data/spec/models/managed_transaction_create_request_spec.rb +21 -21
  198. data/spec/models/managed_transaction_update_request_body_spec.rb +2 -2
  199. data/spec/models/managed_transaction_update_request_spec.rb +21 -21
  200. data/spec/models/member_create_request_body_spec.rb +6 -6
  201. data/spec/models/member_create_request_spec.rb +8 -8
  202. data/spec/models/member_response_body_spec.rb +2 -2
  203. data/spec/models/member_response_spec.rb +16 -16
  204. data/spec/models/member_resume_request_body_spec.rb +2 -2
  205. data/spec/models/member_resume_request_spec.rb +2 -2
  206. data/spec/models/member_status_response_body_spec.rb +2 -2
  207. data/spec/models/member_status_response_spec.rb +10 -10
  208. data/spec/models/member_update_request_body_spec.rb +2 -2
  209. data/spec/models/member_update_request_spec.rb +6 -6
  210. data/spec/models/members_response_body_spec.rb +3 -3
  211. data/spec/models/merchant_location_response_body_spec.rb +2 -2
  212. data/spec/models/merchant_location_response_spec.rb +13 -13
  213. data/spec/models/merchant_response_body_spec.rb +2 -2
  214. data/spec/models/merchant_response_spec.rb +7 -7
  215. data/spec/models/merchants_response_body_spec.rb +3 -3
  216. data/spec/models/o_auth_window_response_body_spec.rb +2 -2
  217. data/spec/models/o_auth_window_response_spec.rb +3 -3
  218. data/spec/models/option_response_spec.rb +3 -3
  219. data/spec/models/pagination_response_spec.rb +5 -5
  220. data/spec/models/payment_processor_authorization_code_request_body_spec.rb +2 -2
  221. data/spec/models/payment_processor_authorization_code_request_spec.rb +4 -4
  222. data/spec/models/payment_processor_authorization_code_response_body_spec.rb +2 -2
  223. data/spec/models/payment_processor_authorization_code_response_spec.rb +2 -2
  224. data/spec/models/spending_plan_account_response_spec.rb +8 -8
  225. data/spec/models/spending_plan_accounts_response_spec.rb +3 -3
  226. data/spec/models/spending_plan_iteration_item_create_request_body_spec.rb +6 -6
  227. data/spec/models/spending_plan_iteration_item_response_spec.rb +13 -13
  228. data/spec/models/spending_plan_iteration_items_response_body_spec.rb +3 -3
  229. data/spec/models/spending_plan_iteration_response_spec.rb +9 -9
  230. data/spec/models/spending_plan_iterations_response_spec.rb +3 -3
  231. data/spec/models/spending_plan_response_spec.rb +6 -6
  232. data/spec/models/spending_plans_response_body_spec.rb +4 -4
  233. data/spec/models/statement_response_body_spec.rb +2 -2
  234. data/spec/models/statement_response_spec.rb +9 -9
  235. data/spec/models/statements_response_body_spec.rb +3 -3
  236. data/spec/models/tag_create_request_body_spec.rb +2 -2
  237. data/spec/models/tag_create_request_spec.rb +2 -2
  238. data/spec/models/tag_response_body_spec.rb +2 -2
  239. data/spec/models/tag_response_spec.rb +4 -4
  240. data/spec/models/tag_update_request_body_spec.rb +2 -2
  241. data/spec/models/tag_update_request_spec.rb +2 -2
  242. data/spec/models/tagging_create_request_body_spec.rb +2 -2
  243. data/spec/models/tagging_create_request_spec.rb +3 -3
  244. data/spec/models/tagging_response_body_spec.rb +2 -2
  245. data/spec/models/tagging_response_spec.rb +6 -6
  246. data/spec/models/tagging_update_request_body_spec.rb +2 -2
  247. data/spec/models/tagging_update_request_spec.rb +2 -2
  248. data/spec/models/taggings_response_body_spec.rb +3 -3
  249. data/spec/models/tags_response_body_spec.rb +3 -3
  250. data/spec/models/tax_document_response_body_spec.rb +2 -2
  251. data/spec/models/tax_document_response_spec.rb +11 -11
  252. data/spec/models/tax_documents_response_body_spec.rb +3 -3
  253. data/spec/models/transaction_response_body_spec.rb +2 -2
  254. data/spec/models/transaction_response_spec.rb +44 -44
  255. data/spec/models/transaction_rule_create_request_body_spec.rb +2 -2
  256. data/spec/models/transaction_rule_create_request_spec.rb +4 -4
  257. data/spec/models/transaction_rule_response_body_spec.rb +2 -2
  258. data/spec/models/transaction_rule_response_spec.rb +8 -8
  259. data/spec/models/transaction_rule_update_request_body_spec.rb +2 -2
  260. data/spec/models/transaction_rule_update_request_spec.rb +4 -4
  261. data/spec/models/transaction_rules_response_body_spec.rb +3 -3
  262. data/spec/models/transaction_update_request_body_spec.rb +2 -2
  263. data/spec/models/transaction_update_request_spec.rb +2 -2
  264. data/spec/models/transactions_response_body_spec.rb +3 -3
  265. data/spec/models/user_create_request_body_spec.rb +2 -2
  266. data/spec/models/user_create_request_spec.rb +5 -5
  267. data/spec/models/user_response_body_spec.rb +2 -2
  268. data/spec/models/user_response_spec.rb +6 -6
  269. data/spec/models/user_update_request_body_spec.rb +2 -2
  270. data/spec/models/user_update_request_spec.rb +5 -5
  271. data/spec/models/users_response_body_spec.rb +3 -3
  272. data/spec/models/widget_request_body_spec.rb +2 -2
  273. data/spec/models/widget_request_spec.rb +17 -17
  274. data/spec/models/widget_response_body_spec.rb +2 -2
  275. data/spec/models/widget_response_spec.rb +4 -4
  276. data/spec/spec_helper.rb +1 -1
  277. 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: 5.4.0
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
- self.class.openapi_types.each_pair do |key, type|
111
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
112
- self.send("#{key}=", nil)
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[self.class.attribute_map[key]].is_a?(Array)
117
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
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[self.class.attribute_map[key]].nil?
120
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
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: 5.4.0
9
+ OpenAPI Generator version: 7.0.1
10
10
 
11
11
  =end
12
12
 
@@ -138,6 +138,7 @@ module MxPlatformRuby
138
138
  # Show invalid properties with the reasons. Usually used together with valid?
139
139
  # @return Array for valid properties with the reasons
140
140
  def list_invalid_properties
141
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
141
142
  invalid_properties = Array.new
142
143
  invalid_properties
143
144
  end
@@ -145,6 +146,7 @@ module MxPlatformRuby
145
146
  # Check to see if the all the properties in the model are valid
146
147
  # @return true if the model is valid
147
148
  def valid?
149
+ warn '[DEPRECATED] the `valid?` method is obsolete'
148
150
  true
149
151
  end
150
152
 
@@ -180,36 +182,30 @@ module MxPlatformRuby
180
182
  # @param [Hash] attributes Model attributes in the form of hash
181
183
  # @return [Object] Returns the model itself
182
184
  def self.build_from_hash(attributes)
183
- new.build_from_hash(attributes)
184
- end
185
-
186
- # Builds the object from hash
187
- # @param [Hash] attributes Model attributes in the form of hash
188
- # @return [Object] Returns the model itself
189
- def build_from_hash(attributes)
190
185
  return nil unless attributes.is_a?(Hash)
191
- self.class.openapi_types.each_pair do |key, type|
192
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
193
- self.send("#{key}=", nil)
186
+ attributes = attributes.transform_keys(&:to_sym)
187
+ transformed_hash = {}
188
+ openapi_types.each_pair do |key, type|
189
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
190
+ transformed_hash["#{key}"] = nil
194
191
  elsif type =~ /\AArray<(.*)>/i
195
192
  # check to ensure the input is an array given that the attribute
196
193
  # is documented as an array but the input is not
197
- if attributes[self.class.attribute_map[key]].is_a?(Array)
198
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
194
+ if attributes[attribute_map[key]].is_a?(Array)
195
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
199
196
  end
200
- elsif !attributes[self.class.attribute_map[key]].nil?
201
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
197
+ elsif !attributes[attribute_map[key]].nil?
198
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
202
199
  end
203
200
  end
204
-
205
- self
201
+ new(transformed_hash)
206
202
  end
207
203
 
208
204
  # Deserializes the data based on type
209
205
  # @param string type Data type
210
206
  # @param string value Value to be deserialized
211
207
  # @return [Object] Deserialized data
212
- def _deserialize(type, value)
208
+ def self._deserialize(type, value)
213
209
  case type.to_sym
214
210
  when :Time
215
211
  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: 5.4.0
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
- self.class.openapi_types.each_pair do |key, type|
122
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
123
- self.send("#{key}=", nil)
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[self.class.attribute_map[key]].is_a?(Array)
128
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
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[self.class.attribute_map[key]].nil?
131
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
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: 5.4.0
9
+ OpenAPI Generator version: 7.0.1
10
10
 
11
11
  =end
12
12
 
@@ -183,6 +183,7 @@ module MxPlatformRuby
183
183
  # Show invalid properties with the reasons. Usually used together with valid?
184
184
  # @return Array for valid properties with the reasons
185
185
  def list_invalid_properties
186
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
186
187
  invalid_properties = Array.new
187
188
  invalid_properties
188
189
  end
@@ -190,6 +191,7 @@ module MxPlatformRuby
190
191
  # Check to see if the all the properties in the model are valid
191
192
  # @return true if the model is valid
192
193
  def valid?
194
+ warn '[DEPRECATED] the `valid?` method is obsolete'
193
195
  true
194
196
  end
195
197
 
@@ -230,36 +232,30 @@ module MxPlatformRuby
230
232
  # @param [Hash] attributes Model attributes in the form of hash
231
233
  # @return [Object] Returns the model itself
232
234
  def self.build_from_hash(attributes)
233
- new.build_from_hash(attributes)
234
- end
235
-
236
- # Builds the object from hash
237
- # @param [Hash] attributes Model attributes in the form of hash
238
- # @return [Object] Returns the model itself
239
- def build_from_hash(attributes)
240
235
  return nil unless attributes.is_a?(Hash)
241
- self.class.openapi_types.each_pair do |key, type|
242
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
243
- self.send("#{key}=", nil)
236
+ attributes = attributes.transform_keys(&:to_sym)
237
+ transformed_hash = {}
238
+ openapi_types.each_pair do |key, type|
239
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
240
+ transformed_hash["#{key}"] = nil
244
241
  elsif type =~ /\AArray<(.*)>/i
245
242
  # check to ensure the input is an array given that the attribute
246
243
  # is documented as an array but the input is not
247
- if attributes[self.class.attribute_map[key]].is_a?(Array)
248
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
244
+ if attributes[attribute_map[key]].is_a?(Array)
245
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
249
246
  end
250
- elsif !attributes[self.class.attribute_map[key]].nil?
251
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
247
+ elsif !attributes[attribute_map[key]].nil?
248
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
252
249
  end
253
250
  end
254
-
255
- self
251
+ new(transformed_hash)
256
252
  end
257
253
 
258
254
  # Deserializes the data based on type
259
255
  # @param string type Data type
260
256
  # @param string value Value to be deserialized
261
257
  # @return [Object] Deserialized data
262
- def _deserialize(type, value)
258
+ def self._deserialize(type, value)
263
259
  case type.to_sym
264
260
  when :Time
265
261
  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: 5.4.0
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
- self.class.openapi_types.each_pair do |key, type|
122
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
123
- self.send("#{key}=", nil)
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[self.class.attribute_map[key]].is_a?(Array)
128
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
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[self.class.attribute_map[key]].nil?
131
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
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: 5.4.0
9
+ OpenAPI Generator version: 7.0.1
10
10
 
11
11
  =end
12
12
 
@@ -560,6 +560,7 @@ module MxPlatformRuby
560
560
  # Show invalid properties with the reasons. Usually used together with valid?
561
561
  # @return Array for valid properties with the reasons
562
562
  def list_invalid_properties
563
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
563
564
  invalid_properties = Array.new
564
565
  invalid_properties
565
566
  end
@@ -567,6 +568,7 @@ module MxPlatformRuby
567
568
  # Check to see if the all the properties in the model are valid
568
569
  # @return true if the model is valid
569
570
  def valid?
571
+ warn '[DEPRECATED] the `valid?` method is obsolete'
570
572
  true
571
573
  end
572
574
 
@@ -649,36 +651,30 @@ module MxPlatformRuby
649
651
  # @param [Hash] attributes Model attributes in the form of hash
650
652
  # @return [Object] Returns the model itself
651
653
  def self.build_from_hash(attributes)
652
- new.build_from_hash(attributes)
653
- end
654
-
655
- # Builds the object from hash
656
- # @param [Hash] attributes Model attributes in the form of hash
657
- # @return [Object] Returns the model itself
658
- def build_from_hash(attributes)
659
654
  return nil unless attributes.is_a?(Hash)
660
- self.class.openapi_types.each_pair do |key, type|
661
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
662
- self.send("#{key}=", nil)
655
+ attributes = attributes.transform_keys(&:to_sym)
656
+ transformed_hash = {}
657
+ openapi_types.each_pair do |key, type|
658
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
659
+ transformed_hash["#{key}"] = nil
663
660
  elsif type =~ /\AArray<(.*)>/i
664
661
  # check to ensure the input is an array given that the attribute
665
662
  # is documented as an array but the input is not
666
- if attributes[self.class.attribute_map[key]].is_a?(Array)
667
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
663
+ if attributes[attribute_map[key]].is_a?(Array)
664
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
668
665
  end
669
- elsif !attributes[self.class.attribute_map[key]].nil?
670
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
666
+ elsif !attributes[attribute_map[key]].nil?
667
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
671
668
  end
672
669
  end
673
-
674
- self
670
+ new(transformed_hash)
675
671
  end
676
672
 
677
673
  # Deserializes the data based on type
678
674
  # @param string type Data type
679
675
  # @param string value Value to be deserialized
680
676
  # @return [Object] Deserialized data
681
- def _deserialize(type, value)
677
+ def self._deserialize(type, value)
682
678
  case type.to_sym
683
679
  when :Time
684
680
  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: 5.4.0
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
- self.class.openapi_types.each_pair do |key, type|
111
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
112
- self.send("#{key}=", nil)
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[self.class.attribute_map[key]].is_a?(Array)
117
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
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[self.class.attribute_map[key]].nil?
120
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
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: 5.4.0
9
+ OpenAPI Generator version: 7.0.1
10
10
 
11
11
  =end
12
12
 
@@ -225,6 +225,7 @@ module MxPlatformRuby
225
225
  # Show invalid properties with the reasons. Usually used together with valid?
226
226
  # @return Array for valid properties with the reasons
227
227
  def list_invalid_properties
228
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
228
229
  invalid_properties = Array.new
229
230
  invalid_properties
230
231
  end
@@ -232,6 +233,7 @@ module MxPlatformRuby
232
233
  # Check to see if the all the properties in the model are valid
233
234
  # @return true if the model is valid
234
235
  def valid?
236
+ warn '[DEPRECATED] the `valid?` method is obsolete'
235
237
  true
236
238
  end
237
239
 
@@ -279,36 +281,30 @@ module MxPlatformRuby
279
281
  # @param [Hash] attributes Model attributes in the form of hash
280
282
  # @return [Object] Returns the model itself
281
283
  def self.build_from_hash(attributes)
282
- new.build_from_hash(attributes)
283
- end
284
-
285
- # Builds the object from hash
286
- # @param [Hash] attributes Model attributes in the form of hash
287
- # @return [Object] Returns the model itself
288
- def build_from_hash(attributes)
289
284
  return nil unless attributes.is_a?(Hash)
290
- self.class.openapi_types.each_pair do |key, type|
291
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
292
- self.send("#{key}=", nil)
285
+ attributes = attributes.transform_keys(&:to_sym)
286
+ transformed_hash = {}
287
+ openapi_types.each_pair do |key, type|
288
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
289
+ transformed_hash["#{key}"] = nil
293
290
  elsif type =~ /\AArray<(.*)>/i
294
291
  # check to ensure the input is an array given that the attribute
295
292
  # is documented as an array but the input is not
296
- if attributes[self.class.attribute_map[key]].is_a?(Array)
297
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
293
+ if attributes[attribute_map[key]].is_a?(Array)
294
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
298
295
  end
299
- elsif !attributes[self.class.attribute_map[key]].nil?
300
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
296
+ elsif !attributes[attribute_map[key]].nil?
297
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
301
298
  end
302
299
  end
303
-
304
- self
300
+ new(transformed_hash)
305
301
  end
306
302
 
307
303
  # Deserializes the data based on type
308
304
  # @param string type Data type
309
305
  # @param string value Value to be deserialized
310
306
  # @return [Object] Deserialized data
311
- def _deserialize(type, value)
307
+ def self._deserialize(type, value)
312
308
  case type.to_sym
313
309
  when :Time
314
310
  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: 5.4.0
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
- self.class.openapi_types.each_pair do |key, type|
111
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
112
- self.send("#{key}=", nil)
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[self.class.attribute_map[key]].is_a?(Array)
117
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
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[self.class.attribute_map[key]].nil?
120
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
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)