mx-platform-ruby 0.21.0 → 0.22.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (286) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +78 -0
  3. data/docs/MxPlatformApi.md +1586 -507
  4. data/docs/SpendingPlanAccountResponse.md +30 -0
  5. data/docs/SpendingPlanAccountsResponse.md +20 -0
  6. data/docs/SpendingPlanIterationItemCreateRequestBody.md +26 -0
  7. data/docs/SpendingPlanIterationItemResponse.md +40 -0
  8. data/docs/SpendingPlanIterationItemsResponseBody.md +20 -0
  9. data/docs/SpendingPlanIterationResponse.md +32 -0
  10. data/docs/SpendingPlanIterationsResponse.md +20 -0
  11. data/docs/SpendingPlanResponse.md +26 -0
  12. data/docs/SpendingPlansResponseBody.md +20 -0
  13. data/lib/mx-platform-ruby/api/mx_platform_api.rb +1063 -9
  14. data/lib/mx-platform-ruby/api_client.rb +90 -55
  15. data/lib/mx-platform-ruby/api_error.rb +2 -1
  16. data/lib/mx-platform-ruby/configuration.rb +102 -26
  17. data/lib/mx-platform-ruby/models/account_create_request.rb +18 -18
  18. data/lib/mx-platform-ruby/models/account_create_request_body.rb +14 -18
  19. data/lib/mx-platform-ruby/models/account_number_response.rb +14 -18
  20. data/lib/mx-platform-ruby/models/account_numbers_response_body.rb +14 -18
  21. data/lib/mx-platform-ruby/models/account_owner_response.rb +14 -18
  22. data/lib/mx-platform-ruby/models/account_owners_response_body.rb +14 -18
  23. data/lib/mx-platform-ruby/models/account_response.rb +14 -18
  24. data/lib/mx-platform-ruby/models/account_response_body.rb +14 -18
  25. data/lib/mx-platform-ruby/models/account_update_request.rb +14 -18
  26. data/lib/mx-platform-ruby/models/account_update_request_body.rb +14 -18
  27. data/lib/mx-platform-ruby/models/accounts_response_body.rb +14 -18
  28. data/lib/mx-platform-ruby/models/authorization_code_request.rb +14 -18
  29. data/lib/mx-platform-ruby/models/authorization_code_request_body.rb +14 -18
  30. data/lib/mx-platform-ruby/models/authorization_code_response.rb +14 -18
  31. data/lib/mx-platform-ruby/models/authorization_code_response_body.rb +14 -18
  32. data/lib/mx-platform-ruby/models/categories_response_body.rb +14 -18
  33. data/lib/mx-platform-ruby/models/category_create_request.rb +16 -18
  34. data/lib/mx-platform-ruby/models/category_create_request_body.rb +14 -18
  35. data/lib/mx-platform-ruby/models/category_response.rb +14 -18
  36. data/lib/mx-platform-ruby/models/category_response_body.rb +14 -18
  37. data/lib/mx-platform-ruby/models/category_update_request.rb +14 -18
  38. data/lib/mx-platform-ruby/models/category_update_request_body.rb +14 -18
  39. data/lib/mx-platform-ruby/models/challenge_response.rb +14 -18
  40. data/lib/mx-platform-ruby/models/challenges_response_body.rb +14 -18
  41. data/lib/mx-platform-ruby/models/connect_widget_request.rb +14 -18
  42. data/lib/mx-platform-ruby/models/connect_widget_request_body.rb +14 -18
  43. data/lib/mx-platform-ruby/models/connect_widget_response.rb +14 -18
  44. data/lib/mx-platform-ruby/models/connect_widget_response_body.rb +14 -18
  45. data/lib/mx-platform-ruby/models/credential_request.rb +14 -18
  46. data/lib/mx-platform-ruby/models/credential_response.rb +14 -18
  47. data/lib/mx-platform-ruby/models/credentials_response_body.rb +14 -18
  48. data/lib/mx-platform-ruby/models/enhance_transaction_response.rb +14 -18
  49. data/lib/mx-platform-ruby/models/enhance_transactions_request.rb +18 -18
  50. data/lib/mx-platform-ruby/models/enhance_transactions_request_body.rb +14 -18
  51. data/lib/mx-platform-ruby/models/enhance_transactions_response_body.rb +14 -18
  52. data/lib/mx-platform-ruby/models/holding_response.rb +14 -18
  53. data/lib/mx-platform-ruby/models/holding_response_body.rb +14 -18
  54. data/lib/mx-platform-ruby/models/holdings_response_body.rb +14 -18
  55. data/lib/mx-platform-ruby/models/image_option_response.rb +14 -18
  56. data/lib/mx-platform-ruby/models/institution_response.rb +14 -18
  57. data/lib/mx-platform-ruby/models/institution_response_body.rb +14 -18
  58. data/lib/mx-platform-ruby/models/institutions_response_body.rb +14 -18
  59. data/lib/mx-platform-ruby/models/managed_account_create_request.rb +20 -18
  60. data/lib/mx-platform-ruby/models/managed_account_create_request_body.rb +14 -18
  61. data/lib/mx-platform-ruby/models/managed_account_update_request.rb +14 -18
  62. data/lib/mx-platform-ruby/models/managed_account_update_request_body.rb +14 -18
  63. data/lib/mx-platform-ruby/models/managed_member_create_request.rb +16 -18
  64. data/lib/mx-platform-ruby/models/managed_member_create_request_body.rb +14 -18
  65. data/lib/mx-platform-ruby/models/managed_member_update_request.rb +14 -18
  66. data/lib/mx-platform-ruby/models/managed_member_update_request_body.rb +14 -18
  67. data/lib/mx-platform-ruby/models/managed_transaction_create_request.rb +24 -18
  68. data/lib/mx-platform-ruby/models/managed_transaction_create_request_body.rb +14 -18
  69. data/lib/mx-platform-ruby/models/managed_transaction_update_request.rb +14 -18
  70. data/lib/mx-platform-ruby/models/managed_transaction_update_request_body.rb +14 -18
  71. data/lib/mx-platform-ruby/models/member_create_request.rb +18 -18
  72. data/lib/mx-platform-ruby/models/member_create_request_body.rb +14 -18
  73. data/lib/mx-platform-ruby/models/member_response.rb +14 -18
  74. data/lib/mx-platform-ruby/models/member_response_body.rb +14 -18
  75. data/lib/mx-platform-ruby/models/member_resume_request.rb +14 -18
  76. data/lib/mx-platform-ruby/models/member_resume_request_body.rb +14 -18
  77. data/lib/mx-platform-ruby/models/member_status_response.rb +14 -18
  78. data/lib/mx-platform-ruby/models/member_status_response_body.rb +14 -18
  79. data/lib/mx-platform-ruby/models/member_update_request.rb +14 -18
  80. data/lib/mx-platform-ruby/models/member_update_request_body.rb +14 -18
  81. data/lib/mx-platform-ruby/models/members_response_body.rb +14 -18
  82. data/lib/mx-platform-ruby/models/merchant_location_response.rb +14 -18
  83. data/lib/mx-platform-ruby/models/merchant_location_response_body.rb +14 -18
  84. data/lib/mx-platform-ruby/models/merchant_response.rb +14 -18
  85. data/lib/mx-platform-ruby/models/merchant_response_body.rb +14 -18
  86. data/lib/mx-platform-ruby/models/merchants_response_body.rb +14 -18
  87. data/lib/mx-platform-ruby/models/o_auth_window_response.rb +14 -18
  88. data/lib/mx-platform-ruby/models/o_auth_window_response_body.rb +14 -18
  89. data/lib/mx-platform-ruby/models/option_response.rb +14 -18
  90. data/lib/mx-platform-ruby/models/pagination_response.rb +14 -18
  91. data/lib/mx-platform-ruby/models/payment_processor_authorization_code_request.rb +14 -18
  92. data/lib/mx-platform-ruby/models/payment_processor_authorization_code_request_body.rb +14 -18
  93. data/lib/mx-platform-ruby/models/payment_processor_authorization_code_response.rb +14 -18
  94. data/lib/mx-platform-ruby/models/payment_processor_authorization_code_response_body.rb +14 -18
  95. data/lib/mx-platform-ruby/models/spending_plan_account_response.rb +268 -0
  96. data/lib/mx-platform-ruby/models/spending_plan_accounts_response.rb +225 -0
  97. data/lib/mx-platform-ruby/models/spending_plan_iteration_item_create_request_body.rb +257 -0
  98. data/lib/mx-platform-ruby/models/spending_plan_iteration_item_response.rb +326 -0
  99. data/lib/mx-platform-ruby/models/spending_plan_iteration_items_response_body.rb +225 -0
  100. data/lib/mx-platform-ruby/models/spending_plan_iteration_response.rb +285 -0
  101. data/lib/mx-platform-ruby/models/spending_plan_iterations_response.rb +225 -0
  102. data/lib/mx-platform-ruby/models/spending_plan_response.rb +255 -0
  103. data/lib/mx-platform-ruby/models/spending_plans_response_body.rb +225 -0
  104. data/lib/mx-platform-ruby/models/statement_response.rb +14 -18
  105. data/lib/mx-platform-ruby/models/statement_response_body.rb +14 -18
  106. data/lib/mx-platform-ruby/models/statements_response_body.rb +14 -18
  107. data/lib/mx-platform-ruby/models/tag_create_request.rb +16 -18
  108. data/lib/mx-platform-ruby/models/tag_create_request_body.rb +14 -18
  109. data/lib/mx-platform-ruby/models/tag_response.rb +14 -18
  110. data/lib/mx-platform-ruby/models/tag_response_body.rb +14 -18
  111. data/lib/mx-platform-ruby/models/tag_update_request.rb +16 -18
  112. data/lib/mx-platform-ruby/models/tag_update_request_body.rb +14 -18
  113. data/lib/mx-platform-ruby/models/tagging_create_request.rb +18 -18
  114. data/lib/mx-platform-ruby/models/tagging_create_request_body.rb +14 -18
  115. data/lib/mx-platform-ruby/models/tagging_response.rb +14 -18
  116. data/lib/mx-platform-ruby/models/tagging_response_body.rb +14 -18
  117. data/lib/mx-platform-ruby/models/tagging_update_request.rb +16 -18
  118. data/lib/mx-platform-ruby/models/tagging_update_request_body.rb +14 -18
  119. data/lib/mx-platform-ruby/models/taggings_response_body.rb +14 -18
  120. data/lib/mx-platform-ruby/models/tags_response_body.rb +14 -18
  121. data/lib/mx-platform-ruby/models/tax_document_response.rb +14 -18
  122. data/lib/mx-platform-ruby/models/tax_document_response_body.rb +14 -18
  123. data/lib/mx-platform-ruby/models/tax_documents_response_body.rb +14 -18
  124. data/lib/mx-platform-ruby/models/transaction_response.rb +14 -18
  125. data/lib/mx-platform-ruby/models/transaction_response_body.rb +14 -18
  126. data/lib/mx-platform-ruby/models/transaction_rule_create_request.rb +18 -18
  127. data/lib/mx-platform-ruby/models/transaction_rule_create_request_body.rb +14 -18
  128. data/lib/mx-platform-ruby/models/transaction_rule_response.rb +14 -18
  129. data/lib/mx-platform-ruby/models/transaction_rule_response_body.rb +14 -18
  130. data/lib/mx-platform-ruby/models/transaction_rule_update_request.rb +14 -18
  131. data/lib/mx-platform-ruby/models/transaction_rule_update_request_body.rb +14 -18
  132. data/lib/mx-platform-ruby/models/transaction_rules_response_body.rb +14 -18
  133. data/lib/mx-platform-ruby/models/transaction_update_request.rb +16 -18
  134. data/lib/mx-platform-ruby/models/transaction_update_request_body.rb +14 -18
  135. data/lib/mx-platform-ruby/models/transactions_response_body.rb +14 -18
  136. data/lib/mx-platform-ruby/models/user_create_request.rb +14 -18
  137. data/lib/mx-platform-ruby/models/user_create_request_body.rb +14 -18
  138. data/lib/mx-platform-ruby/models/user_response.rb +14 -18
  139. data/lib/mx-platform-ruby/models/user_response_body.rb +14 -18
  140. data/lib/mx-platform-ruby/models/user_update_request.rb +14 -18
  141. data/lib/mx-platform-ruby/models/user_update_request_body.rb +14 -18
  142. data/lib/mx-platform-ruby/models/users_response_body.rb +14 -18
  143. data/lib/mx-platform-ruby/models/widget_request.rb +16 -18
  144. data/lib/mx-platform-ruby/models/widget_request_body.rb +14 -18
  145. data/lib/mx-platform-ruby/models/widget_response.rb +14 -18
  146. data/lib/mx-platform-ruby/models/widget_response_body.rb +14 -18
  147. data/lib/mx-platform-ruby/version.rb +2 -2
  148. data/lib/mx-platform-ruby.rb +10 -1
  149. data/mx-platform-ruby.gemspec +3 -2
  150. data/openapi/config.yml +1 -1
  151. data/openapitools.json +1 -1
  152. data/spec/api/mx_platform_api_spec.rb +304 -100
  153. data/spec/api_client_spec.rb +36 -1
  154. data/spec/configuration_spec.rb +41 -1
  155. data/spec/models/account_create_request_body_spec.rb +2 -2
  156. data/spec/models/account_create_request_spec.rb +22 -22
  157. data/spec/models/account_number_response_spec.rb +10 -10
  158. data/spec/models/account_numbers_response_body_spec.rb +3 -3
  159. data/spec/models/account_owner_response_spec.rb +15 -15
  160. data/spec/models/account_owners_response_body_spec.rb +3 -3
  161. data/spec/models/account_response_body_spec.rb +2 -2
  162. data/spec/models/account_response_spec.rb +57 -57
  163. data/spec/models/account_update_request_body_spec.rb +2 -2
  164. data/spec/models/account_update_request_spec.rb +22 -22
  165. data/spec/models/accounts_response_body_spec.rb +3 -3
  166. data/spec/models/authorization_code_request_body_spec.rb +2 -2
  167. data/spec/models/authorization_code_request_spec.rb +2 -2
  168. data/spec/models/authorization_code_response_body_spec.rb +2 -2
  169. data/spec/models/authorization_code_response_spec.rb +2 -2
  170. data/spec/models/categories_response_body_spec.rb +3 -3
  171. data/spec/models/category_create_request_body_spec.rb +2 -2
  172. data/spec/models/category_create_request_spec.rb +4 -4
  173. data/spec/models/category_response_body_spec.rb +2 -2
  174. data/spec/models/category_response_spec.rb +9 -9
  175. data/spec/models/category_update_request_body_spec.rb +2 -2
  176. data/spec/models/category_update_request_spec.rb +3 -3
  177. data/spec/models/challenge_response_spec.rb +8 -8
  178. data/spec/models/challenges_response_body_spec.rb +3 -3
  179. data/spec/models/connect_widget_request_body_spec.rb +2 -2
  180. data/spec/models/connect_widget_request_spec.rb +15 -15
  181. data/spec/models/connect_widget_response_body_spec.rb +2 -2
  182. data/spec/models/connect_widget_response_spec.rb +3 -3
  183. data/spec/models/credential_request_spec.rb +3 -3
  184. data/spec/models/credential_response_spec.rb +7 -7
  185. data/spec/models/credentials_response_body_spec.rb +3 -3
  186. data/spec/models/enhance_transaction_response_spec.rb +24 -24
  187. data/spec/models/enhance_transactions_request_body_spec.rb +2 -2
  188. data/spec/models/enhance_transactions_request_spec.rb +8 -8
  189. data/spec/models/enhance_transactions_response_body_spec.rb +2 -2
  190. data/spec/models/holding_response_body_spec.rb +2 -2
  191. data/spec/models/holding_response_spec.rb +20 -20
  192. data/spec/models/holdings_response_body_spec.rb +3 -3
  193. data/spec/models/image_option_response_spec.rb +4 -4
  194. data/spec/models/institution_response_body_spec.rb +2 -2
  195. data/spec/models/institution_response_spec.rb +15 -15
  196. data/spec/models/institutions_response_body_spec.rb +3 -3
  197. data/spec/models/managed_account_create_request_body_spec.rb +2 -2
  198. data/spec/models/managed_account_create_request_spec.rb +32 -32
  199. data/spec/models/managed_account_update_request_body_spec.rb +2 -2
  200. data/spec/models/managed_account_update_request_spec.rb +32 -32
  201. data/spec/models/managed_member_create_request_body_spec.rb +2 -2
  202. data/spec/models/managed_member_create_request_spec.rb +5 -5
  203. data/spec/models/managed_member_update_request_body_spec.rb +2 -2
  204. data/spec/models/managed_member_update_request_spec.rb +4 -4
  205. data/spec/models/managed_transaction_create_request_body_spec.rb +2 -2
  206. data/spec/models/managed_transaction_create_request_spec.rb +21 -21
  207. data/spec/models/managed_transaction_update_request_body_spec.rb +2 -2
  208. data/spec/models/managed_transaction_update_request_spec.rb +21 -21
  209. data/spec/models/member_create_request_body_spec.rb +6 -6
  210. data/spec/models/member_create_request_spec.rb +8 -8
  211. data/spec/models/member_response_body_spec.rb +2 -2
  212. data/spec/models/member_response_spec.rb +16 -16
  213. data/spec/models/member_resume_request_body_spec.rb +2 -2
  214. data/spec/models/member_resume_request_spec.rb +2 -2
  215. data/spec/models/member_status_response_body_spec.rb +2 -2
  216. data/spec/models/member_status_response_spec.rb +10 -10
  217. data/spec/models/member_update_request_body_spec.rb +2 -2
  218. data/spec/models/member_update_request_spec.rb +6 -6
  219. data/spec/models/members_response_body_spec.rb +3 -3
  220. data/spec/models/merchant_location_response_body_spec.rb +2 -2
  221. data/spec/models/merchant_location_response_spec.rb +13 -13
  222. data/spec/models/merchant_response_body_spec.rb +2 -2
  223. data/spec/models/merchant_response_spec.rb +7 -7
  224. data/spec/models/merchants_response_body_spec.rb +3 -3
  225. data/spec/models/o_auth_window_response_body_spec.rb +2 -2
  226. data/spec/models/o_auth_window_response_spec.rb +3 -3
  227. data/spec/models/option_response_spec.rb +3 -3
  228. data/spec/models/pagination_response_spec.rb +5 -5
  229. data/spec/models/payment_processor_authorization_code_request_body_spec.rb +2 -2
  230. data/spec/models/payment_processor_authorization_code_request_spec.rb +4 -4
  231. data/spec/models/payment_processor_authorization_code_response_body_spec.rb +2 -2
  232. data/spec/models/payment_processor_authorization_code_response_spec.rb +2 -2
  233. data/spec/models/spending_plan_account_response_spec.rb +70 -0
  234. data/spec/models/spending_plan_accounts_response_spec.rb +40 -0
  235. data/spec/models/spending_plan_iteration_item_create_request_body_spec.rb +58 -0
  236. data/spec/models/spending_plan_iteration_item_response_spec.rb +100 -0
  237. data/spec/models/spending_plan_iteration_items_response_body_spec.rb +40 -0
  238. data/spec/models/spending_plan_iteration_response_spec.rb +76 -0
  239. data/spec/models/spending_plan_iterations_response_spec.rb +40 -0
  240. data/spec/models/spending_plan_response_spec.rb +58 -0
  241. data/spec/models/spending_plans_response_body_spec.rb +40 -0
  242. data/spec/models/statement_response_body_spec.rb +2 -2
  243. data/spec/models/statement_response_spec.rb +9 -9
  244. data/spec/models/statements_response_body_spec.rb +3 -3
  245. data/spec/models/tag_create_request_body_spec.rb +2 -2
  246. data/spec/models/tag_create_request_spec.rb +2 -2
  247. data/spec/models/tag_response_body_spec.rb +2 -2
  248. data/spec/models/tag_response_spec.rb +4 -4
  249. data/spec/models/tag_update_request_body_spec.rb +2 -2
  250. data/spec/models/tag_update_request_spec.rb +2 -2
  251. data/spec/models/tagging_create_request_body_spec.rb +2 -2
  252. data/spec/models/tagging_create_request_spec.rb +3 -3
  253. data/spec/models/tagging_response_body_spec.rb +2 -2
  254. data/spec/models/tagging_response_spec.rb +6 -6
  255. data/spec/models/tagging_update_request_body_spec.rb +2 -2
  256. data/spec/models/tagging_update_request_spec.rb +2 -2
  257. data/spec/models/taggings_response_body_spec.rb +3 -3
  258. data/spec/models/tags_response_body_spec.rb +3 -3
  259. data/spec/models/tax_document_response_body_spec.rb +2 -2
  260. data/spec/models/tax_document_response_spec.rb +11 -11
  261. data/spec/models/tax_documents_response_body_spec.rb +3 -3
  262. data/spec/models/transaction_response_body_spec.rb +2 -2
  263. data/spec/models/transaction_response_spec.rb +44 -44
  264. data/spec/models/transaction_rule_create_request_body_spec.rb +2 -2
  265. data/spec/models/transaction_rule_create_request_spec.rb +4 -4
  266. data/spec/models/transaction_rule_response_body_spec.rb +2 -2
  267. data/spec/models/transaction_rule_response_spec.rb +8 -8
  268. data/spec/models/transaction_rule_update_request_body_spec.rb +2 -2
  269. data/spec/models/transaction_rule_update_request_spec.rb +4 -4
  270. data/spec/models/transaction_rules_response_body_spec.rb +3 -3
  271. data/spec/models/transaction_update_request_body_spec.rb +2 -2
  272. data/spec/models/transaction_update_request_spec.rb +2 -2
  273. data/spec/models/transactions_response_body_spec.rb +3 -3
  274. data/spec/models/user_create_request_body_spec.rb +2 -2
  275. data/spec/models/user_create_request_spec.rb +5 -5
  276. data/spec/models/user_response_body_spec.rb +2 -2
  277. data/spec/models/user_response_spec.rb +6 -6
  278. data/spec/models/user_update_request_body_spec.rb +2 -2
  279. data/spec/models/user_update_request_spec.rb +5 -5
  280. data/spec/models/users_response_body_spec.rb +3 -3
  281. data/spec/models/widget_request_body_spec.rb +2 -2
  282. data/spec/models/widget_request_spec.rb +17 -17
  283. data/spec/models/widget_response_body_spec.rb +2 -2
  284. data/spec/models/widget_response_spec.rb +4 -4
  285. data/spec/spec_helper.rb +1 -1
  286. metadata +170 -119
@@ -0,0 +1,268 @@
1
+ =begin
2
+ #MX Platform API
3
+
4
+ #The MX Platform API is a powerful, fully-featured API designed to make aggregating and enhancing financial data easy and reliable. It can seamlessly connect your app or website to tens of thousands of financial institutions.
5
+
6
+ The version of the OpenAPI document: 0.1.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 7.0.1
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module MxPlatformRuby
17
+ class SpendingPlanAccountResponse
18
+ attr_accessor :account_guid
19
+
20
+ attr_accessor :client_guid
21
+
22
+ attr_accessor :created_at
23
+
24
+ attr_accessor :guid
25
+
26
+ attr_accessor :spending_plan_guid
27
+
28
+ attr_accessor :updated_at
29
+
30
+ attr_accessor :user_guid
31
+
32
+ # Attribute mapping from ruby-style variable name to JSON key.
33
+ def self.attribute_map
34
+ {
35
+ :'account_guid' => :'account_guid',
36
+ :'client_guid' => :'client_guid',
37
+ :'created_at' => :'created_at',
38
+ :'guid' => :'guid',
39
+ :'spending_plan_guid' => :'spending_plan_guid',
40
+ :'updated_at' => :'updated_at',
41
+ :'user_guid' => :'user_guid'
42
+ }
43
+ end
44
+
45
+ # Returns all the JSON keys this model knows about
46
+ def self.acceptable_attributes
47
+ attribute_map.values
48
+ end
49
+
50
+ # Attribute type mapping.
51
+ def self.openapi_types
52
+ {
53
+ :'account_guid' => :'String',
54
+ :'client_guid' => :'String',
55
+ :'created_at' => :'String',
56
+ :'guid' => :'String',
57
+ :'spending_plan_guid' => :'String',
58
+ :'updated_at' => :'String',
59
+ :'user_guid' => :'String'
60
+ }
61
+ end
62
+
63
+ # List of attributes with nullable: true
64
+ def self.openapi_nullable
65
+ Set.new([
66
+ ])
67
+ end
68
+
69
+ # Initializes the object
70
+ # @param [Hash] attributes Model attributes in the form of hash
71
+ def initialize(attributes = {})
72
+ if (!attributes.is_a?(Hash))
73
+ fail ArgumentError, "The input argument (attributes) must be a hash in `MxPlatformRuby::SpendingPlanAccountResponse` initialize method"
74
+ end
75
+
76
+ # check to see if the attribute exists and convert string to symbol for hash key
77
+ attributes = attributes.each_with_object({}) { |(k, v), h|
78
+ if (!self.class.attribute_map.key?(k.to_sym))
79
+ fail ArgumentError, "`#{k}` is not a valid attribute in `MxPlatformRuby::SpendingPlanAccountResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
80
+ end
81
+ h[k.to_sym] = v
82
+ }
83
+
84
+ if attributes.key?(:'account_guid')
85
+ self.account_guid = attributes[:'account_guid']
86
+ end
87
+
88
+ if attributes.key?(:'client_guid')
89
+ self.client_guid = attributes[:'client_guid']
90
+ end
91
+
92
+ if attributes.key?(:'created_at')
93
+ self.created_at = attributes[:'created_at']
94
+ end
95
+
96
+ if attributes.key?(:'guid')
97
+ self.guid = attributes[:'guid']
98
+ end
99
+
100
+ if attributes.key?(:'spending_plan_guid')
101
+ self.spending_plan_guid = attributes[:'spending_plan_guid']
102
+ end
103
+
104
+ if attributes.key?(:'updated_at')
105
+ self.updated_at = attributes[:'updated_at']
106
+ end
107
+
108
+ if attributes.key?(:'user_guid')
109
+ self.user_guid = attributes[:'user_guid']
110
+ end
111
+ end
112
+
113
+ # Show invalid properties with the reasons. Usually used together with valid?
114
+ # @return Array for valid properties with the reasons
115
+ def list_invalid_properties
116
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
117
+ invalid_properties = Array.new
118
+ invalid_properties
119
+ end
120
+
121
+ # Check to see if the all the properties in the model are valid
122
+ # @return true if the model is valid
123
+ def valid?
124
+ warn '[DEPRECATED] the `valid?` method is obsolete'
125
+ true
126
+ end
127
+
128
+ # Checks equality by comparing each attribute.
129
+ # @param [Object] Object to be compared
130
+ def ==(o)
131
+ return true if self.equal?(o)
132
+ self.class == o.class &&
133
+ account_guid == o.account_guid &&
134
+ client_guid == o.client_guid &&
135
+ created_at == o.created_at &&
136
+ guid == o.guid &&
137
+ spending_plan_guid == o.spending_plan_guid &&
138
+ updated_at == o.updated_at &&
139
+ user_guid == o.user_guid
140
+ end
141
+
142
+ # @see the `==` method
143
+ # @param [Object] Object to be compared
144
+ def eql?(o)
145
+ self == o
146
+ end
147
+
148
+ # Calculates hash code according to all attributes.
149
+ # @return [Integer] Hash code
150
+ def hash
151
+ [account_guid, client_guid, created_at, guid, spending_plan_guid, updated_at, user_guid].hash
152
+ end
153
+
154
+ # Builds the object from hash
155
+ # @param [Hash] attributes Model attributes in the form of hash
156
+ # @return [Object] Returns the model itself
157
+ def self.build_from_hash(attributes)
158
+ return nil unless attributes.is_a?(Hash)
159
+ attributes = attributes.transform_keys(&:to_sym)
160
+ transformed_hash = {}
161
+ openapi_types.each_pair do |key, type|
162
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
163
+ transformed_hash["#{key}"] = nil
164
+ elsif type =~ /\AArray<(.*)>/i
165
+ # check to ensure the input is an array given that the attribute
166
+ # is documented as an array but the input is not
167
+ if attributes[attribute_map[key]].is_a?(Array)
168
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
169
+ end
170
+ elsif !attributes[attribute_map[key]].nil?
171
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
172
+ end
173
+ end
174
+ new(transformed_hash)
175
+ end
176
+
177
+ # Deserializes the data based on type
178
+ # @param string type Data type
179
+ # @param string value Value to be deserialized
180
+ # @return [Object] Deserialized data
181
+ def self._deserialize(type, value)
182
+ case type.to_sym
183
+ when :Time
184
+ Time.parse(value)
185
+ when :Date
186
+ Date.parse(value)
187
+ when :String
188
+ value.to_s
189
+ when :Integer
190
+ value.to_i
191
+ when :Float
192
+ value.to_f
193
+ when :Boolean
194
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
195
+ true
196
+ else
197
+ false
198
+ end
199
+ when :Object
200
+ # generic object (usually a Hash), return directly
201
+ value
202
+ when /\AArray<(?<inner_type>.+)>\z/
203
+ inner_type = Regexp.last_match[:inner_type]
204
+ value.map { |v| _deserialize(inner_type, v) }
205
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
206
+ k_type = Regexp.last_match[:k_type]
207
+ v_type = Regexp.last_match[:v_type]
208
+ {}.tap do |hash|
209
+ value.each do |k, v|
210
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
211
+ end
212
+ end
213
+ else # model
214
+ # models (e.g. Pet) or oneOf
215
+ klass = MxPlatformRuby.const_get(type)
216
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
217
+ end
218
+ end
219
+
220
+ # Returns the string representation of the object
221
+ # @return [String] String presentation of the object
222
+ def to_s
223
+ to_hash.to_s
224
+ end
225
+
226
+ # to_body is an alias to to_hash (backward compatibility)
227
+ # @return [Hash] Returns the object in the form of hash
228
+ def to_body
229
+ to_hash
230
+ end
231
+
232
+ # Returns the object in the form of hash
233
+ # @return [Hash] Returns the object in the form of hash
234
+ def to_hash
235
+ hash = {}
236
+ self.class.attribute_map.each_pair do |attr, param|
237
+ value = self.send(attr)
238
+ if value.nil?
239
+ is_nullable = self.class.openapi_nullable.include?(attr)
240
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
241
+ end
242
+
243
+ hash[param] = _to_hash(value)
244
+ end
245
+ hash
246
+ end
247
+
248
+ # Outputs non-array value in the form of hash
249
+ # For object, use to_hash. Otherwise, just return the value
250
+ # @param [Object] value Any valid value
251
+ # @return [Hash] Returns the value in the form of hash
252
+ def _to_hash(value)
253
+ if value.is_a?(Array)
254
+ value.compact.map { |v| _to_hash(v) }
255
+ elsif value.is_a?(Hash)
256
+ {}.tap do |hash|
257
+ value.each { |k, v| hash[k] = _to_hash(v) }
258
+ end
259
+ elsif value.respond_to? :to_hash
260
+ value.to_hash
261
+ else
262
+ value
263
+ end
264
+ end
265
+
266
+ end
267
+
268
+ end
@@ -0,0 +1,225 @@
1
+ =begin
2
+ #MX Platform API
3
+
4
+ #The MX Platform API is a powerful, fully-featured API designed to make aggregating and enhancing financial data easy and reliable. It can seamlessly connect your app or website to tens of thousands of financial institutions.
5
+
6
+ The version of the OpenAPI document: 0.1.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 7.0.1
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module MxPlatformRuby
17
+ class SpendingPlanAccountsResponse
18
+ attr_accessor :spending_plan_accounts
19
+
20
+ attr_accessor :pagination
21
+
22
+ # Attribute mapping from ruby-style variable name to JSON key.
23
+ def self.attribute_map
24
+ {
25
+ :'spending_plan_accounts' => :'spending_plan_accounts',
26
+ :'pagination' => :'pagination'
27
+ }
28
+ end
29
+
30
+ # Returns all the JSON keys this model knows about
31
+ def self.acceptable_attributes
32
+ attribute_map.values
33
+ end
34
+
35
+ # Attribute type mapping.
36
+ def self.openapi_types
37
+ {
38
+ :'spending_plan_accounts' => :'Array<SpendingPlanAccountResponse>',
39
+ :'pagination' => :'PaginationResponse'
40
+ }
41
+ end
42
+
43
+ # List of attributes with nullable: true
44
+ def self.openapi_nullable
45
+ Set.new([
46
+ ])
47
+ end
48
+
49
+ # Initializes the object
50
+ # @param [Hash] attributes Model attributes in the form of hash
51
+ def initialize(attributes = {})
52
+ if (!attributes.is_a?(Hash))
53
+ fail ArgumentError, "The input argument (attributes) must be a hash in `MxPlatformRuby::SpendingPlanAccountsResponse` initialize method"
54
+ end
55
+
56
+ # check to see if the attribute exists and convert string to symbol for hash key
57
+ attributes = attributes.each_with_object({}) { |(k, v), h|
58
+ if (!self.class.attribute_map.key?(k.to_sym))
59
+ fail ArgumentError, "`#{k}` is not a valid attribute in `MxPlatformRuby::SpendingPlanAccountsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
60
+ end
61
+ h[k.to_sym] = v
62
+ }
63
+
64
+ if attributes.key?(:'spending_plan_accounts')
65
+ if (value = attributes[:'spending_plan_accounts']).is_a?(Array)
66
+ self.spending_plan_accounts = value
67
+ end
68
+ end
69
+
70
+ if attributes.key?(:'pagination')
71
+ self.pagination = attributes[:'pagination']
72
+ end
73
+ end
74
+
75
+ # Show invalid properties with the reasons. Usually used together with valid?
76
+ # @return Array for valid properties with the reasons
77
+ def list_invalid_properties
78
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
79
+ invalid_properties = Array.new
80
+ invalid_properties
81
+ end
82
+
83
+ # Check to see if the all the properties in the model are valid
84
+ # @return true if the model is valid
85
+ def valid?
86
+ warn '[DEPRECATED] the `valid?` method is obsolete'
87
+ true
88
+ end
89
+
90
+ # Checks equality by comparing each attribute.
91
+ # @param [Object] Object to be compared
92
+ def ==(o)
93
+ return true if self.equal?(o)
94
+ self.class == o.class &&
95
+ spending_plan_accounts == o.spending_plan_accounts &&
96
+ pagination == o.pagination
97
+ end
98
+
99
+ # @see the `==` method
100
+ # @param [Object] Object to be compared
101
+ def eql?(o)
102
+ self == o
103
+ end
104
+
105
+ # Calculates hash code according to all attributes.
106
+ # @return [Integer] Hash code
107
+ def hash
108
+ [spending_plan_accounts, pagination].hash
109
+ end
110
+
111
+ # Builds the object from hash
112
+ # @param [Hash] attributes Model attributes in the form of hash
113
+ # @return [Object] Returns the model itself
114
+ def self.build_from_hash(attributes)
115
+ return nil unless attributes.is_a?(Hash)
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
121
+ elsif type =~ /\AArray<(.*)>/i
122
+ # check to ensure the input is an array given that the attribute
123
+ # is documented as an array but the input is not
124
+ if attributes[attribute_map[key]].is_a?(Array)
125
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
126
+ end
127
+ elsif !attributes[attribute_map[key]].nil?
128
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
129
+ end
130
+ end
131
+ new(transformed_hash)
132
+ end
133
+
134
+ # Deserializes the data based on type
135
+ # @param string type Data type
136
+ # @param string value Value to be deserialized
137
+ # @return [Object] Deserialized data
138
+ def self._deserialize(type, value)
139
+ case type.to_sym
140
+ when :Time
141
+ Time.parse(value)
142
+ when :Date
143
+ Date.parse(value)
144
+ when :String
145
+ value.to_s
146
+ when :Integer
147
+ value.to_i
148
+ when :Float
149
+ value.to_f
150
+ when :Boolean
151
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
152
+ true
153
+ else
154
+ false
155
+ end
156
+ when :Object
157
+ # generic object (usually a Hash), return directly
158
+ value
159
+ when /\AArray<(?<inner_type>.+)>\z/
160
+ inner_type = Regexp.last_match[:inner_type]
161
+ value.map { |v| _deserialize(inner_type, v) }
162
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
163
+ k_type = Regexp.last_match[:k_type]
164
+ v_type = Regexp.last_match[:v_type]
165
+ {}.tap do |hash|
166
+ value.each do |k, v|
167
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
168
+ end
169
+ end
170
+ else # model
171
+ # models (e.g. Pet) or oneOf
172
+ klass = MxPlatformRuby.const_get(type)
173
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
174
+ end
175
+ end
176
+
177
+ # Returns the string representation of the object
178
+ # @return [String] String presentation of the object
179
+ def to_s
180
+ to_hash.to_s
181
+ end
182
+
183
+ # to_body is an alias to to_hash (backward compatibility)
184
+ # @return [Hash] Returns the object in the form of hash
185
+ def to_body
186
+ to_hash
187
+ end
188
+
189
+ # Returns the object in the form of hash
190
+ # @return [Hash] Returns the object in the form of hash
191
+ def to_hash
192
+ hash = {}
193
+ self.class.attribute_map.each_pair do |attr, param|
194
+ value = self.send(attr)
195
+ if value.nil?
196
+ is_nullable = self.class.openapi_nullable.include?(attr)
197
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
198
+ end
199
+
200
+ hash[param] = _to_hash(value)
201
+ end
202
+ hash
203
+ end
204
+
205
+ # Outputs non-array value in the form of hash
206
+ # For object, use to_hash. Otherwise, just return the value
207
+ # @param [Object] value Any valid value
208
+ # @return [Hash] Returns the value in the form of hash
209
+ def _to_hash(value)
210
+ if value.is_a?(Array)
211
+ value.compact.map { |v| _to_hash(v) }
212
+ elsif value.is_a?(Hash)
213
+ {}.tap do |hash|
214
+ value.each { |k, v| hash[k] = _to_hash(v) }
215
+ end
216
+ elsif value.respond_to? :to_hash
217
+ value.to_hash
218
+ else
219
+ value
220
+ end
221
+ end
222
+
223
+ end
224
+
225
+ end