apimatic-mx-apis-sdk 0.0.1

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 (287) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +28 -0
  3. data/README.md +207 -0
  4. data/bin/console +15 -0
  5. data/lib/mx_platform_api/api_helper.rb +10 -0
  6. data/lib/mx_platform_api/apis/accounts_api.rb +619 -0
  7. data/lib/mx_platform_api/apis/ach_return_api.rb +115 -0
  8. data/lib/mx_platform_api/apis/base_api.rb +67 -0
  9. data/lib/mx_platform_api/apis/budgets_api.rb +212 -0
  10. data/lib/mx_platform_api/apis/categories_api.rb +377 -0
  11. data/lib/mx_platform_api/apis/goals_api.rb +223 -0
  12. data/lib/mx_platform_api/apis/insights_api.rb +415 -0
  13. data/lib/mx_platform_api/apis/institutions_api.rb +159 -0
  14. data/lib/mx_platform_api/apis/investment_holdings_api.rb +191 -0
  15. data/lib/mx_platform_api/apis/jobs_api.rb +48 -0
  16. data/lib/mx_platform_api/apis/managed_data_deprecated_api.rb +773 -0
  17. data/lib/mx_platform_api/apis/members_api.rb +639 -0
  18. data/lib/mx_platform_api/apis/merchants_api.rb +98 -0
  19. data/lib/mx_platform_api/apis/microdeposits_api.rb +219 -0
  20. data/lib/mx_platform_api/apis/monthly_cash_flow_profile_api.rb +75 -0
  21. data/lib/mx_platform_api/apis/notifications_api.rb +115 -0
  22. data/lib/mx_platform_api/apis/processor_token_api.rb +141 -0
  23. data/lib/mx_platform_api/apis/rewards_api.rb +149 -0
  24. data/lib/mx_platform_api/apis/spending_plan_api.rb +621 -0
  25. data/lib/mx_platform_api/apis/statements_api.rb +165 -0
  26. data/lib/mx_platform_api/apis/taggings_api.rb +184 -0
  27. data/lib/mx_platform_api/apis/tags_api.rb +185 -0
  28. data/lib/mx_platform_api/apis/transaction_rules_api.rb +163 -0
  29. data/lib/mx_platform_api/apis/transactions_api.rb +1223 -0
  30. data/lib/mx_platform_api/apis/users_api.rb +188 -0
  31. data/lib/mx_platform_api/apis/verifiable_credentials_api.rb +114 -0
  32. data/lib/mx_platform_api/apis/widgets_api.rb +135 -0
  33. data/lib/mx_platform_api/client.rb +225 -0
  34. data/lib/mx_platform_api/configuration.rb +182 -0
  35. data/lib/mx_platform_api/exceptions/api_exception.rb +21 -0
  36. data/lib/mx_platform_api/http/api_response.rb +19 -0
  37. data/lib/mx_platform_api/http/auth/basic_auth.rb +62 -0
  38. data/lib/mx_platform_api/http/auth/bearer_auth.rb +53 -0
  39. data/lib/mx_platform_api/http/http_call_back.rb +10 -0
  40. data/lib/mx_platform_api/http/http_method_enum.rb +10 -0
  41. data/lib/mx_platform_api/http/http_request.rb +10 -0
  42. data/lib/mx_platform_api/http/http_response.rb +10 -0
  43. data/lib/mx_platform_api/http/proxy_settings.rb +22 -0
  44. data/lib/mx_platform_api/logging/configuration/api_logging_configuration.rb +186 -0
  45. data/lib/mx_platform_api/logging/sdk_logger.rb +17 -0
  46. data/lib/mx_platform_api/models/account_create_request.rb +309 -0
  47. data/lib/mx_platform_api/models/account_create_request_body.rb +75 -0
  48. data/lib/mx_platform_api/models/account_number.rb +199 -0
  49. data/lib/mx_platform_api/models/account_number_response.rb +215 -0
  50. data/lib/mx_platform_api/models/account_numbers_response_body.rb +95 -0
  51. data/lib/mx_platform_api/models/account_owner.rb +186 -0
  52. data/lib/mx_platform_api/models/account_owner_response.rb +219 -0
  53. data/lib/mx_platform_api/models/account_owners_response_body.rb +95 -0
  54. data/lib/mx_platform_api/models/account_ownership.rb +45 -0
  55. data/lib/mx_platform_api/models/account_response.rb +814 -0
  56. data/lib/mx_platform_api/models/account_response_body.rb +75 -0
  57. data/lib/mx_platform_api/models/account_type.rb +80 -0
  58. data/lib/mx_platform_api/models/account_type1.rb +80 -0
  59. data/lib/mx_platform_api/models/account_update_request.rb +301 -0
  60. data/lib/mx_platform_api/models/account_update_request_body.rb +75 -0
  61. data/lib/mx_platform_api/models/accounts_merge_request.rb +75 -0
  62. data/lib/mx_platform_api/models/accounts_merge_request_body.rb +75 -0
  63. data/lib/mx_platform_api/models/accounts_response_body.rb +94 -0
  64. data/lib/mx_platform_api/models/ach_response.rb +424 -0
  65. data/lib/mx_platform_api/models/ach_return_create_request.rb +256 -0
  66. data/lib/mx_platform_api/models/ach_return_create_request_body.rb +76 -0
  67. data/lib/mx_platform_api/models/ach_return_response_body.rb +76 -0
  68. data/lib/mx_platform_api/models/ach_returns_response_body.rb +95 -0
  69. data/lib/mx_platform_api/models/authorization_code_request.rb +77 -0
  70. data/lib/mx_platform_api/models/authorization_code_request_body.rb +77 -0
  71. data/lib/mx_platform_api/models/authorization_code_response.rb +76 -0
  72. data/lib/mx_platform_api/models/authorization_code_response_body.rb +77 -0
  73. data/lib/mx_platform_api/models/base_model.rb +110 -0
  74. data/lib/mx_platform_api/models/budget_create_request.rb +115 -0
  75. data/lib/mx_platform_api/models/budget_create_request_body.rb +75 -0
  76. data/lib/mx_platform_api/models/budget_response.rb +246 -0
  77. data/lib/mx_platform_api/models/budget_response_body.rb +75 -0
  78. data/lib/mx_platform_api/models/budget_update_request.rb +96 -0
  79. data/lib/mx_platform_api/models/budget_update_request_body.rb +75 -0
  80. data/lib/mx_platform_api/models/categories_response_body.rb +95 -0
  81. data/lib/mx_platform_api/models/category_create_request.rb +93 -0
  82. data/lib/mx_platform_api/models/category_create_request_body.rb +75 -0
  83. data/lib/mx_platform_api/models/category_response.rb +160 -0
  84. data/lib/mx_platform_api/models/category_response_body.rb +75 -0
  85. data/lib/mx_platform_api/models/category_update_request.rb +85 -0
  86. data/lib/mx_platform_api/models/category_update_request_body.rb +75 -0
  87. data/lib/mx_platform_api/models/challenge_response.rb +159 -0
  88. data/lib/mx_platform_api/models/challenges_response_body.rb +95 -0
  89. data/lib/mx_platform_api/models/channel.rb +47 -0
  90. data/lib/mx_platform_api/models/classification.rb +85 -0
  91. data/lib/mx_platform_api/models/color_scheme.rb +43 -0
  92. data/lib/mx_platform_api/models/connection_status.rb +118 -0
  93. data/lib/mx_platform_api/models/credential_request.rb +85 -0
  94. data/lib/mx_platform_api/models/credential_response.rb +133 -0
  95. data/lib/mx_platform_api/models/credentials_response_body.rb +95 -0
  96. data/lib/mx_platform_api/models/credit_card_product.rb +276 -0
  97. data/lib/mx_platform_api/models/credit_card_product_response.rb +77 -0
  98. data/lib/mx_platform_api/models/data_request.rb +76 -0
  99. data/lib/mx_platform_api/models/date_range.rb +87 -0
  100. data/lib/mx_platform_api/models/date_range_category_totals_response.rb +115 -0
  101. data/lib/mx_platform_api/models/date_range_category_totals_response_body.rb +88 -0
  102. data/lib/mx_platform_api/models/deep_link_params.rb +131 -0
  103. data/lib/mx_platform_api/models/enhance_transaction_response.rb +371 -0
  104. data/lib/mx_platform_api/models/enhance_transactions_request.rb +143 -0
  105. data/lib/mx_platform_api/models/enhance_transactions_request_body.rb +85 -0
  106. data/lib/mx_platform_api/models/enhance_transactions_response_body.rb +85 -0
  107. data/lib/mx_platform_api/models/error.rb +106 -0
  108. data/lib/mx_platform_api/models/federal_insurance_status.rb +42 -0
  109. data/lib/mx_platform_api/models/geolocation.rb +108 -0
  110. data/lib/mx_platform_api/models/goal_request.rb +179 -0
  111. data/lib/mx_platform_api/models/goal_request_body.rb +74 -0
  112. data/lib/mx_platform_api/models/goal_response.rb +241 -0
  113. data/lib/mx_platform_api/models/goal_response_body.rb +74 -0
  114. data/lib/mx_platform_api/models/goal_type_name.rb +36 -0
  115. data/lib/mx_platform_api/models/goals_response.rb +241 -0
  116. data/lib/mx_platform_api/models/goals_response_body.rb +94 -0
  117. data/lib/mx_platform_api/models/image_option_response.rb +110 -0
  118. data/lib/mx_platform_api/models/insight_response.rb +338 -0
  119. data/lib/mx_platform_api/models/insight_response_body.rb +75 -0
  120. data/lib/mx_platform_api/models/insight_update_request.rb +87 -0
  121. data/lib/mx_platform_api/models/insight_update_request_body.rb +75 -0
  122. data/lib/mx_platform_api/models/insights_response_body.rb +94 -0
  123. data/lib/mx_platform_api/models/institution_response.rb +290 -0
  124. data/lib/mx_platform_api/models/institution_response_body.rb +76 -0
  125. data/lib/mx_platform_api/models/institutions_response_body.rb +95 -0
  126. data/lib/mx_platform_api/models/investment_holding_response.rb +513 -0
  127. data/lib/mx_platform_api/models/investment_holding_response_body.rb +77 -0
  128. data/lib/mx_platform_api/models/investment_holdings_deactivation.rb +85 -0
  129. data/lib/mx_platform_api/models/investment_holdings_response_body.rb +95 -0
  130. data/lib/mx_platform_api/models/iso_country_code.rb +36 -0
  131. data/lib/mx_platform_api/models/item_type.rb +52 -0
  132. data/lib/mx_platform_api/models/job_response.rb +203 -0
  133. data/lib/mx_platform_api/models/job_response_body.rb +74 -0
  134. data/lib/mx_platform_api/models/managed_account_create_request.rb +422 -0
  135. data/lib/mx_platform_api/models/managed_account_create_request_body.rb +75 -0
  136. data/lib/mx_platform_api/models/managed_account_update_request.rb +428 -0
  137. data/lib/mx_platform_api/models/managed_account_update_request_body.rb +75 -0
  138. data/lib/mx_platform_api/models/managed_member_create_request.rb +105 -0
  139. data/lib/mx_platform_api/models/managed_member_create_request_body.rb +75 -0
  140. data/lib/mx_platform_api/models/managed_member_update_request.rb +95 -0
  141. data/lib/mx_platform_api/models/managed_member_update_request_body.rb +75 -0
  142. data/lib/mx_platform_api/models/managed_transaction_create_request.rb +282 -0
  143. data/lib/mx_platform_api/models/managed_transaction_create_request_body.rb +77 -0
  144. data/lib/mx_platform_api/models/managed_transaction_update_request.rb +289 -0
  145. data/lib/mx_platform_api/models/managed_transaction_update_request_body.rb +77 -0
  146. data/lib/mx_platform_api/models/member_create_request.rb +154 -0
  147. data/lib/mx_platform_api/models/member_create_request_body.rb +152 -0
  148. data/lib/mx_platform_api/models/member_elements.rb +96 -0
  149. data/lib/mx_platform_api/models/member_response.rb +406 -0
  150. data/lib/mx_platform_api/models/member_response_body.rb +75 -0
  151. data/lib/mx_platform_api/models/member_response_with_job_error.rb +406 -0
  152. data/lib/mx_platform_api/models/member_response_with_job_error_body.rb +75 -0
  153. data/lib/mx_platform_api/models/member_resume_request.rb +85 -0
  154. data/lib/mx_platform_api/models/member_resume_request_body.rb +75 -0
  155. data/lib/mx_platform_api/models/member_status_response.rb +236 -0
  156. data/lib/mx_platform_api/models/member_status_response_body.rb +75 -0
  157. data/lib/mx_platform_api/models/member_update_request.rb +133 -0
  158. data/lib/mx_platform_api/models/member_update_request_body.rb +75 -0
  159. data/lib/mx_platform_api/models/members_response_body.rb +94 -0
  160. data/lib/mx_platform_api/models/merchant.rb +105 -0
  161. data/lib/mx_platform_api/models/merchant_location_response.rb +208 -0
  162. data/lib/mx_platform_api/models/merchant_location_response_body.rb +77 -0
  163. data/lib/mx_platform_api/models/merchant_response.rb +136 -0
  164. data/lib/mx_platform_api/models/merchant_response_body.rb +75 -0
  165. data/lib/mx_platform_api/models/merchants_response_body.rb +95 -0
  166. data/lib/mx_platform_api/models/micro_deposit.rb +223 -0
  167. data/lib/mx_platform_api/models/microdeposit_elements.rb +141 -0
  168. data/lib/mx_platform_api/models/microdeposit_request_body.rb +77 -0
  169. data/lib/mx_platform_api/models/microdeposit_response.rb +149 -0
  170. data/lib/mx_platform_api/models/microdeposit_response_body.rb +85 -0
  171. data/lib/mx_platform_api/models/microdeposit_verify_request.rb +88 -0
  172. data/lib/mx_platform_api/models/microdeposit_verify_request_body.rb +77 -0
  173. data/lib/mx_platform_api/models/microdeposits_response_body.rb +95 -0
  174. data/lib/mx_platform_api/models/monthly_account_balance.rb +123 -0
  175. data/lib/mx_platform_api/models/monthly_account_balances_response_body.rb +85 -0
  176. data/lib/mx_platform_api/models/monthly_cash_flow_profile_request.rb +95 -0
  177. data/lib/mx_platform_api/models/monthly_cash_flow_profile_request_body.rb +81 -0
  178. data/lib/mx_platform_api/models/monthly_cash_flow_response.rb +157 -0
  179. data/lib/mx_platform_api/models/monthly_cash_flow_response_body.rb +81 -0
  180. data/lib/mx_platform_api/models/notification_request.rb +83 -0
  181. data/lib/mx_platform_api/models/notification_request_body.rb +76 -0
  182. data/lib/mx_platform_api/models/notification_response.rb +204 -0
  183. data/lib/mx_platform_api/models/notification_response_body.rb +76 -0
  184. data/lib/mx_platform_api/models/notifications_response_body.rb +85 -0
  185. data/lib/mx_platform_api/models/oauth_window_response.rb +91 -0
  186. data/lib/mx_platform_api/models/oauth_window_response_body.rb +75 -0
  187. data/lib/mx_platform_api/models/option_response.rb +99 -0
  188. data/lib/mx_platform_api/models/pagination_response.rb +106 -0
  189. data/lib/mx_platform_api/models/parent_class.rb +84 -0
  190. data/lib/mx_platform_api/models/payment_account.rb +183 -0
  191. data/lib/mx_platform_api/models/payment_account1.rb +213 -0
  192. data/lib/mx_platform_api/models/payment_account_body.rb +77 -0
  193. data/lib/mx_platform_api/models/processor_account_number.rb +168 -0
  194. data/lib/mx_platform_api/models/processor_account_number_body.rb +85 -0
  195. data/lib/mx_platform_api/models/processor_owner.rb +155 -0
  196. data/lib/mx_platform_api/models/processor_owner_body.rb +95 -0
  197. data/lib/mx_platform_api/models/property_type.rb +69 -0
  198. data/lib/mx_platform_api/models/recurrence_type.rb +26 -0
  199. data/lib/mx_platform_api/models/repeating_transaction.rb +102 -0
  200. data/lib/mx_platform_api/models/repeating_transaction_response.rb +203 -0
  201. data/lib/mx_platform_api/models/repeating_transaction_type.rb +44 -0
  202. data/lib/mx_platform_api/models/repeating_transactions_response_body.rb +85 -0
  203. data/lib/mx_platform_api/models/reposition_request.rb +82 -0
  204. data/lib/mx_platform_api/models/reposition_request_body.rb +84 -0
  205. data/lib/mx_platform_api/models/reposition_response_body.rb +84 -0
  206. data/lib/mx_platform_api/models/reward.rb +187 -0
  207. data/lib/mx_platform_api/models/reward_elements.rb +156 -0
  208. data/lib/mx_platform_api/models/reward_response_body.rb +75 -0
  209. data/lib/mx_platform_api/models/rewards_response_body.rb +94 -0
  210. data/lib/mx_platform_api/models/scheduled_payment_response.rb +208 -0
  211. data/lib/mx_platform_api/models/scheduled_payments_response_body.rb +95 -0
  212. data/lib/mx_platform_api/models/spending_plan_account_response.rb +142 -0
  213. data/lib/mx_platform_api/models/spending_plan_accounts_response.rb +95 -0
  214. data/lib/mx_platform_api/models/spending_plan_iteration_item_create_request_body.rb +124 -0
  215. data/lib/mx_platform_api/models/spending_plan_iteration_item_response.rb +224 -0
  216. data/lib/mx_platform_api/models/spending_plan_iteration_items_response_body.rb +95 -0
  217. data/lib/mx_platform_api/models/spending_plan_iteration_response.rb +162 -0
  218. data/lib/mx_platform_api/models/spending_plan_iterations_response.rb +95 -0
  219. data/lib/mx_platform_api/models/spending_plan_response.rb +129 -0
  220. data/lib/mx_platform_api/models/spending_plans_response_body.rb +95 -0
  221. data/lib/mx_platform_api/models/split_transaction_request.rb +106 -0
  222. data/lib/mx_platform_api/models/split_transaction_request_body.rb +75 -0
  223. data/lib/mx_platform_api/models/split_transactions_response_body.rb +85 -0
  224. data/lib/mx_platform_api/models/statement_response.rb +157 -0
  225. data/lib/mx_platform_api/models/statement_response_body.rb +76 -0
  226. data/lib/mx_platform_api/models/statements_response_body.rb +95 -0
  227. data/lib/mx_platform_api/models/status.rb +36 -0
  228. data/lib/mx_platform_api/models/style.rb +74 -0
  229. data/lib/mx_platform_api/models/supported_product.rb +56 -0
  230. data/lib/mx_platform_api/models/supported_product1.rb +52 -0
  231. data/lib/mx_platform_api/models/tag_create_request.rb +72 -0
  232. data/lib/mx_platform_api/models/tag_create_request_body.rb +74 -0
  233. data/lib/mx_platform_api/models/tag_response.rb +99 -0
  234. data/lib/mx_platform_api/models/tag_response_body.rb +74 -0
  235. data/lib/mx_platform_api/models/tag_update_request.rb +72 -0
  236. data/lib/mx_platform_api/models/tag_update_request_body.rb +74 -0
  237. data/lib/mx_platform_api/models/tagging_create_request.rb +83 -0
  238. data/lib/mx_platform_api/models/tagging_create_request_body.rb +75 -0
  239. data/lib/mx_platform_api/models/tagging_response.rb +130 -0
  240. data/lib/mx_platform_api/models/tagging_response_body.rb +75 -0
  241. data/lib/mx_platform_api/models/tagging_update_request.rb +73 -0
  242. data/lib/mx_platform_api/models/tagging_update_request_body.rb +75 -0
  243. data/lib/mx_platform_api/models/taggings_response_body.rb +94 -0
  244. data/lib/mx_platform_api/models/tags_response_body.rb +94 -0
  245. data/lib/mx_platform_api/models/token_request_body.rb +75 -0
  246. data/lib/mx_platform_api/models/token_response.rb +114 -0
  247. data/lib/mx_platform_api/models/token_response_body.rb +84 -0
  248. data/lib/mx_platform_api/models/track_type_name.rb +44 -0
  249. data/lib/mx_platform_api/models/transaction_create_request.rb +192 -0
  250. data/lib/mx_platform_api/models/transaction_create_request_body.rb +76 -0
  251. data/lib/mx_platform_api/models/transaction_create_response_body.rb +595 -0
  252. data/lib/mx_platform_api/models/transaction_includes_response.rb +643 -0
  253. data/lib/mx_platform_api/models/transaction_response.rb +597 -0
  254. data/lib/mx_platform_api/models/transaction_response_body.rb +76 -0
  255. data/lib/mx_platform_api/models/transaction_rule_create_request.rb +98 -0
  256. data/lib/mx_platform_api/models/transaction_rule_create_request_body.rb +77 -0
  257. data/lib/mx_platform_api/models/transaction_rule_response.rb +152 -0
  258. data/lib/mx_platform_api/models/transaction_rule_response_body.rb +77 -0
  259. data/lib/mx_platform_api/models/transaction_rule_update_request.rb +103 -0
  260. data/lib/mx_platform_api/models/transaction_rule_update_request_body.rb +77 -0
  261. data/lib/mx_platform_api/models/transaction_rules_response_body.rb +95 -0
  262. data/lib/mx_platform_api/models/transaction_type.rb +36 -0
  263. data/lib/mx_platform_api/models/transaction_update_request.rb +74 -0
  264. data/lib/mx_platform_api/models/transaction_update_request_body.rb +76 -0
  265. data/lib/mx_platform_api/models/transactions_response_body.rb +95 -0
  266. data/lib/mx_platform_api/models/transactions_response_body_includes.rb +95 -0
  267. data/lib/mx_platform_api/models/type.rb +36 -0
  268. data/lib/mx_platform_api/models/update_goal_request.rb +185 -0
  269. data/lib/mx_platform_api/models/update_goal_request_body.rb +74 -0
  270. data/lib/mx_platform_api/models/use_case.rb +36 -0
  271. data/lib/mx_platform_api/models/user_create_request.rb +105 -0
  272. data/lib/mx_platform_api/models/user_create_request_body.rb +74 -0
  273. data/lib/mx_platform_api/models/user_response.rb +119 -0
  274. data/lib/mx_platform_api/models/user_response_body.rb +74 -0
  275. data/lib/mx_platform_api/models/user_update_request.rb +105 -0
  276. data/lib/mx_platform_api/models/user_update_request_body.rb +74 -0
  277. data/lib/mx_platform_api/models/users_response_body.rb +94 -0
  278. data/lib/mx_platform_api/models/users_widget_urls_request.rb +76 -0
  279. data/lib/mx_platform_api/models/vc_response.rb +77 -0
  280. data/lib/mx_platform_api/models/widget_request.rb +466 -0
  281. data/lib/mx_platform_api/models/widget_response.rb +100 -0
  282. data/lib/mx_platform_api/models/widget_response_body.rb +76 -0
  283. data/lib/mx_platform_api/models/widget_type.rb +149 -0
  284. data/lib/mx_platform_api/utilities/date_time_helper.rb +11 -0
  285. data/lib/mx_platform_api/utilities/file_wrapper.rb +28 -0
  286. data/lib/mx_platform_api.rb +313 -0
  287. metadata +370 -0
@@ -0,0 +1,115 @@
1
+ # mx_platform_api
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module MxPlatformApi
7
+ # AchReturnApi
8
+ class AchReturnApi < BaseApi
9
+ # :::warning
10
+ # The features documented here are in a beta state, and this documentation
11
+ # is considered draft material subject to frequent change.
12
+ # :::
13
+ # Use this endpoint to get an ACH return by its `guid` or `id`.
14
+ # @param [String] ach_return_guid Required parameter: The unique identifier
15
+ # (`guid`) for the ACH return. Defined by MX.
16
+ # @return [ApiResponse] Complete http response with raw body and status code.
17
+ def read_ach_retrun(ach_return_guid)
18
+ @api_call
19
+ .request(new_request_builder(HttpMethodEnum::GET,
20
+ '/ach_returns/{ach_return_guid}',
21
+ Server::DEFAULT)
22
+ .template_param(new_parameter(ach_return_guid, key: 'ach_return_guid')
23
+ .is_required(true)
24
+ .should_encode(true))
25
+ .header_param(new_parameter('application/json', key: 'accept'))
26
+ .auth(Single.new('basicAuth')))
27
+ .response(new_response_handler
28
+ .deserializer(APIHelper.method(:custom_type_deserializer))
29
+ .deserialize_into(AchReturnResponseBody.method(:from_hash))
30
+ .is_api_response(true))
31
+ .execute
32
+ end
33
+
34
+ # :::warning
35
+ # The features documented here are in a beta state, and this documentation
36
+ # is considered draft material subject to frequent change.
37
+ # :::
38
+ # Use this endpoint to get all ACH returns.
39
+ # @param [String] institution_guid Optional parameter: The identifier for
40
+ # the institution associated with the ACH return. Defined by MX.
41
+ # @param [String] returned_at Optional parameter: The date and time when the
42
+ # return was reported by the Receiving Financial Depository Institution
43
+ # (RDFI) in ISO 8601 format without timestamp.
44
+ # @param [String] resolved_status_at Optional parameter: The date and time
45
+ # when the return was resolved by the Receiving Financial Depository
46
+ # Institution (RDFI) in ISO 8601 format without timestamp
47
+ # @param [String] return_code Optional parameter: The associated ACH return
48
+ # code and notice of change code. See [Return
49
+ # Codes](/api-reference/platform-api/reference/ach-return-fields/#return-cod
50
+ # es) for a complete list.
51
+ # @param [String] return_status Optional parameter: The status of the
52
+ # return. See [Return
53
+ # Statuses](/api-reference/platform-api/reference/ach-return-fields/#return-
54
+ # status) for a complete list.
55
+ # @param [Integer] page Optional parameter: Results are paginated. Specify
56
+ # current page.
57
+ # @param [Integer] records_per_page Optional parameter: This specifies the
58
+ # number of records to be returned on each page. Defaults to `25`. The valid
59
+ # range is from `10` to `100`. If the value exceeds `100`, the default value
60
+ # of `25` will be used instead.
61
+ # @return [ApiResponse] Complete http response with raw body and status code.
62
+ def list_ach_retruns(institution_guid: nil,
63
+ returned_at: nil,
64
+ resolved_status_at: nil,
65
+ return_code: nil,
66
+ return_status: nil,
67
+ page: nil,
68
+ records_per_page: nil)
69
+ @api_call
70
+ .request(new_request_builder(HttpMethodEnum::GET,
71
+ '/ach_returns',
72
+ Server::DEFAULT)
73
+ .query_param(new_parameter(institution_guid, key: 'institution_guid'))
74
+ .query_param(new_parameter(returned_at, key: 'returned_at'))
75
+ .query_param(new_parameter(resolved_status_at, key: 'resolved_status_at'))
76
+ .query_param(new_parameter(return_code, key: 'return_code'))
77
+ .query_param(new_parameter(return_status, key: 'return_status'))
78
+ .query_param(new_parameter(page, key: 'page'))
79
+ .query_param(new_parameter(records_per_page, key: 'records_per_page'))
80
+ .header_param(new_parameter('application/json', key: 'accept'))
81
+ .auth(Single.new('basicAuth')))
82
+ .response(new_response_handler
83
+ .deserializer(APIHelper.method(:custom_type_deserializer))
84
+ .deserialize_into(AchReturnsResponseBody.method(:from_hash))
85
+ .is_api_response(true))
86
+ .execute
87
+ end
88
+
89
+ # :::warning
90
+ # The features documented here are in a beta state, and this documentation
91
+ # is considered draft material subject to frequent change.
92
+ # :::
93
+ # Use this endpoint to create an ACH return in our system.
94
+ # @param [AchReturnCreateRequestBody] body Required parameter: ACH return
95
+ # object to be created.
96
+ # @return [ApiResponse] Complete http response with raw body and status code.
97
+ def create_ach_return(body)
98
+ @api_call
99
+ .request(new_request_builder(HttpMethodEnum::POST,
100
+ '/ach_returns',
101
+ Server::DEFAULT)
102
+ .header_param(new_parameter('application/json', key: 'Content-Type'))
103
+ .body_param(new_parameter(body)
104
+ .is_required(true))
105
+ .header_param(new_parameter('application/json', key: 'accept'))
106
+ .body_serializer(proc do |param| param.to_json unless param.nil? end)
107
+ .auth(Single.new('basicAuth')))
108
+ .response(new_response_handler
109
+ .deserializer(APIHelper.method(:custom_type_deserializer))
110
+ .deserialize_into(AchReturnResponseBody.method(:from_hash))
111
+ .is_api_response(true))
112
+ .execute
113
+ end
114
+ end
115
+ end
@@ -0,0 +1,67 @@
1
+ # mx_platform_api
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module MxPlatformApi
7
+ # BaseApi.
8
+ class BaseApi
9
+ include CoreLibrary
10
+ attr_accessor :config, :http_call_back
11
+
12
+ def self.user_agent
13
+ 'Ruby-SDK/0.0.1 (OS: {os-info}, Engine: {engine}/{engine-version})'
14
+ end
15
+
16
+ def self.user_agent_parameters
17
+ {
18
+ '{engine}' => { 'value' => RUBY_ENGINE, 'encode' => false },
19
+ '{engine-version}' => { 'value' => RUBY_ENGINE_VERSION, 'encode' => false },
20
+ '{os-info}' => { 'value' => RUBY_PLATFORM, 'encode' => false }
21
+ }
22
+ end
23
+
24
+ GLOBAL_ERRORS = {
25
+ 'default' => ErrorCase.new
26
+ .error_message('HTTP response not OK.')
27
+ .exception_type(APIException)
28
+ }.freeze
29
+
30
+ # Initialization constructor.
31
+ # @param [GlobalConfiguration] global_configuration The instance of GlobalConfiguration.
32
+ def initialize(global_configuration)
33
+ @global_configuration = global_configuration
34
+ @config = @global_configuration.client_configuration
35
+ @http_call_back = @config.http_callback
36
+ @api_call = ApiCall.new(@global_configuration)
37
+ end
38
+
39
+ # Creates a new instance of the request builder.
40
+ # @param [String] http_method The HTTP method to use in the request.
41
+ # @param [String] path The endpoint path to use in the request.
42
+ # @param [String] server The server to extract the base uri for the request.
43
+ # @return [RequestBuilder] The instance of RequestBuilder.
44
+ def new_request_builder(http_method, path, server)
45
+ RequestBuilder.new
46
+ .http_method(http_method)
47
+ .path(path)
48
+ .server(server)
49
+ end
50
+
51
+ # Creates a new instance of the response handler.
52
+ # @return [ResponseHandler] The instance of ResponseHandler.
53
+ def new_response_handler
54
+ ResponseHandler.new
55
+ end
56
+
57
+ # Creates a new instance of the parameter.
58
+ # @param [String|optional] key The key of the parameter.
59
+ # @param [Object] value The value of the parameter.
60
+ # @return [Parameter] The instance of Parameter.
61
+ def new_parameter(value, key: nil)
62
+ Parameter.new
63
+ .key(key)
64
+ .value(value)
65
+ end
66
+ end
67
+ end
@@ -0,0 +1,212 @@
1
+ # mx_platform_api
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module MxPlatformApi
7
+ # BudgetsApi
8
+ class BudgetsApi < BaseApi
9
+ # This endpoint will automatically create budgets for several categories
10
+ # based on existing transactions; these budgets are returned as an array.
11
+ # Specifically, budgets will only be generated if the `user` has at least
12
+ # one `transaction` in a given category during each of the two previous
13
+ # calendar months. For example, if the request is made on March 6, and there
14
+ # is at least one "Bills & Utilities" `transaction` in both January and
15
+ # February, a budget will be generated for "Bills & Utilities." If there are
16
+ # two "Bills & Utilities" transactions in February but none in January, no
17
+ # budget will be generated for that category. If budgets already exist for
18
+ # particular categories, new budgets will be generated and returned based on
19
+ # the available transactions. If one or more budgets remain unchanged, they
20
+ # will nevertheless be returned in the response. If no transaction data for
21
+ # the `user` meet the above criteria, a `422 Unprocessable Entity` error
22
+ # will be returned with status code 4221 along with the message, `There
23
+ # aren't enough transactions to automatically create any budgets`.
24
+ # @param [String] accept_version Required parameter: MX Platform API
25
+ # version.
26
+ # @param [String] user_guid Required parameter: The unique identifier for a
27
+ # `user`, beginning with the prefix `USR-`.
28
+ # @return [ApiResponse] Complete http response with raw body and status code.
29
+ def auto_generate_budgets(accept_version,
30
+ user_guid)
31
+ @api_call
32
+ .request(new_request_builder(HttpMethodEnum::POST,
33
+ '/users/{user_guid}/budgets/generate',
34
+ Server::DEFAULT)
35
+ .header_param(new_parameter(accept_version, key: 'Accept-Version')
36
+ .is_required(true))
37
+ .template_param(new_parameter(user_guid, key: 'user_guid')
38
+ .is_required(true)
39
+ .should_encode(true))
40
+ .header_param(new_parameter('application/json', key: 'accept'))
41
+ .auth(Single.new('basicAuth')))
42
+ .response(new_response_handler
43
+ .deserializer(APIHelper.method(:custom_type_deserializer))
44
+ .deserialize_into(BudgetResponseBody.method(:from_hash))
45
+ .is_api_response(true))
46
+ .execute
47
+ end
48
+
49
+ # Create a budget. This endpoint accepts the optional `MX-Skip-Webhook`
50
+ # header and `skip_webhook` parameter. You cannot create a duplicate budget.
51
+ # For example, if you attempt to create a budget for "Gas", but that budget
52
+ # already exist, the request will fail. You can retrieve a list of all
53
+ # existing categories by using the List Categories endpoint.
54
+ # @param [String] accept_version Required parameter: MX Platform API
55
+ # version.
56
+ # @param [String] user_guid Required parameter: The unique identifier for a
57
+ # `user`, beginning with the prefix `USR-`.
58
+ # @param [BudgetCreateRequestBody] body Required parameter: TODO: type
59
+ # description here
60
+ # @return [ApiResponse] Complete http response with raw body and status code.
61
+ def create_budget(accept_version,
62
+ user_guid,
63
+ body)
64
+ @api_call
65
+ .request(new_request_builder(HttpMethodEnum::POST,
66
+ '/users/{user_guid}/budgets',
67
+ Server::DEFAULT)
68
+ .header_param(new_parameter(accept_version, key: 'Accept-Version')
69
+ .is_required(true))
70
+ .template_param(new_parameter(user_guid, key: 'user_guid')
71
+ .is_required(true)
72
+ .should_encode(true))
73
+ .header_param(new_parameter('application/json', key: 'Content-Type'))
74
+ .body_param(new_parameter(body)
75
+ .is_required(true))
76
+ .header_param(new_parameter('application/json', key: 'accept'))
77
+ .body_serializer(proc do |param| param.to_json unless param.nil? end)
78
+ .auth(Single.new('basicAuth')))
79
+ .response(new_response_handler
80
+ .deserializer(APIHelper.method(:custom_type_deserializer))
81
+ .deserialize_into(BudgetResponseBody.method(:from_hash))
82
+ .is_api_response(true))
83
+ .execute
84
+ end
85
+
86
+ # List all budgets
87
+ # @param [String] accept_version Required parameter: MX Platform API
88
+ # version.
89
+ # @param [String] user_guid Required parameter: The unique identifier for a
90
+ # `user`, beginning with the prefix `USR-`.
91
+ # @return [ApiResponse] Complete http response with raw body and status code.
92
+ def list_all_budgets(accept_version,
93
+ user_guid)
94
+ @api_call
95
+ .request(new_request_builder(HttpMethodEnum::GET,
96
+ '/users/{user_guid}/budgets',
97
+ Server::DEFAULT)
98
+ .header_param(new_parameter(accept_version, key: 'Accept-Version')
99
+ .is_required(true))
100
+ .template_param(new_parameter(user_guid, key: 'user_guid')
101
+ .is_required(true)
102
+ .should_encode(true))
103
+ .header_param(new_parameter('application/json', key: 'accept'))
104
+ .auth(Single.new('basicAuth')))
105
+ .response(new_response_handler
106
+ .deserializer(APIHelper.method(:custom_type_deserializer))
107
+ .deserialize_into(BudgetResponseBody.method(:from_hash))
108
+ .is_api_response(true))
109
+ .execute
110
+ end
111
+
112
+ # Read a specific budget.
113
+ # @param [String] accept_version Required parameter: MX Platform API
114
+ # version.
115
+ # @param [String] user_guid Required parameter: The unique identifier for a
116
+ # `user`, beginning with the prefix `USR-`.
117
+ # @param [String] budget_guid Required parameter: The unique identifier for
118
+ # the budget. Defined by MX.
119
+ # @return [ApiResponse] Complete http response with raw body and status code.
120
+ def read_specific_budget(accept_version,
121
+ user_guid,
122
+ budget_guid)
123
+ @api_call
124
+ .request(new_request_builder(HttpMethodEnum::GET,
125
+ '/users/{user_guid}/budgets/{budget_guid}',
126
+ Server::DEFAULT)
127
+ .header_param(new_parameter(accept_version, key: 'Accept-Version')
128
+ .is_required(true))
129
+ .template_param(new_parameter(user_guid, key: 'user_guid')
130
+ .is_required(true)
131
+ .should_encode(true))
132
+ .template_param(new_parameter(budget_guid, key: 'budget_guid')
133
+ .is_required(true)
134
+ .should_encode(true))
135
+ .header_param(new_parameter('application/json', key: 'accept'))
136
+ .auth(Single.new('basicAuth')))
137
+ .response(new_response_handler
138
+ .deserializer(APIHelper.method(:custom_type_deserializer))
139
+ .deserialize_into(BudgetResponseBody.method(:from_hash))
140
+ .is_api_response(true))
141
+ .execute
142
+ end
143
+
144
+ # Update a specific budget.
145
+ # @param [String] accept_version Required parameter: MX Platform API
146
+ # version.
147
+ # @param [String] user_guid Required parameter: The unique identifier for a
148
+ # `user`, beginning with the prefix `USR-`.
149
+ # @param [String] budget_guid Required parameter: The unique identifier for
150
+ # the budget. Defined by MX.
151
+ # @param [BudgetUpdateRequestBody] body Optional parameter: TODO: type
152
+ # description here
153
+ # @return [ApiResponse] Complete http response with raw body and status code.
154
+ def update_specific_budget(accept_version,
155
+ user_guid,
156
+ budget_guid,
157
+ body: nil)
158
+ @api_call
159
+ .request(new_request_builder(HttpMethodEnum::PUT,
160
+ '/users/{user_guid}/budgets/{budget_guid}',
161
+ Server::DEFAULT)
162
+ .header_param(new_parameter(accept_version, key: 'Accept-Version')
163
+ .is_required(true))
164
+ .template_param(new_parameter(user_guid, key: 'user_guid')
165
+ .is_required(true)
166
+ .should_encode(true))
167
+ .template_param(new_parameter(budget_guid, key: 'budget_guid')
168
+ .is_required(true)
169
+ .should_encode(true))
170
+ .header_param(new_parameter('application/json', key: 'Content-Type'))
171
+ .body_param(new_parameter(body))
172
+ .header_param(new_parameter('application/json', key: 'accept'))
173
+ .body_serializer(proc do |param| param.to_json unless param.nil? end)
174
+ .auth(Single.new('basicAuth')))
175
+ .response(new_response_handler
176
+ .deserializer(APIHelper.method(:custom_type_deserializer))
177
+ .deserialize_into(BudgetResponseBody.method(:from_hash))
178
+ .is_api_response(true))
179
+ .execute
180
+ end
181
+
182
+ # Delete a budget.
183
+ # @param [String] accept_version Required parameter: MX Platform API
184
+ # version.
185
+ # @param [String] user_guid Required parameter: The unique identifier for a
186
+ # `user`, beginning with the prefix `USR-`.
187
+ # @param [String] budget_guid Required parameter: The unique identifier for
188
+ # the budget. Defined by MX.
189
+ # @return [ApiResponse] Complete http response with raw body and status code.
190
+ def delete_budget(accept_version,
191
+ user_guid,
192
+ budget_guid)
193
+ @api_call
194
+ .request(new_request_builder(HttpMethodEnum::DELETE,
195
+ '/users/{user_guid}/budgets/{budget_guid}',
196
+ Server::DEFAULT)
197
+ .header_param(new_parameter(accept_version, key: 'Accept-Version')
198
+ .is_required(true))
199
+ .template_param(new_parameter(user_guid, key: 'user_guid')
200
+ .is_required(true)
201
+ .should_encode(true))
202
+ .template_param(new_parameter(budget_guid, key: 'budget_guid')
203
+ .is_required(true)
204
+ .should_encode(true))
205
+ .auth(Single.new('basicAuth')))
206
+ .response(new_response_handler
207
+ .is_response_void(true)
208
+ .is_api_response(true))
209
+ .execute
210
+ end
211
+ end
212
+ end