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,98 @@
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
+ # MerchantsApi
8
+ class MerchantsApi < BaseApi
9
+ # This endpoint returns the specified `merchant_location` resource. The
10
+ # `merchant_location_guid` can be found on `transaction` objects.
11
+ # @param [String] accept_version Required parameter: MX Platform API
12
+ # version.
13
+ # @param [String] merchant_location_guid Required parameter: The unique id
14
+ # for a `merchant_location`.
15
+ # @return [ApiResponse] Complete http response with raw body and status code.
16
+ def read_merchant_location(accept_version,
17
+ merchant_location_guid)
18
+ @api_call
19
+ .request(new_request_builder(HttpMethodEnum::GET,
20
+ '/merchant_locations/{merchant_location_guid}',
21
+ Server::DEFAULT)
22
+ .header_param(new_parameter(accept_version, key: 'Accept-Version')
23
+ .is_required(true))
24
+ .template_param(new_parameter(merchant_location_guid, key: 'merchant_location_guid')
25
+ .is_required(true)
26
+ .should_encode(true))
27
+ .header_param(new_parameter('application/json', key: 'accept'))
28
+ .auth(Single.new('basicAuth')))
29
+ .response(new_response_handler
30
+ .deserializer(APIHelper.method(:custom_type_deserializer))
31
+ .deserialize_into(MerchantLocationResponseBody.method(:from_hash))
32
+ .is_api_response(true))
33
+ .execute
34
+ end
35
+
36
+ # This endpoint returns a paginated list of all the merchants in the MX
37
+ # system.
38
+ # @param [String] accept_version Required parameter: MX Platform API
39
+ # version.
40
+ # @param [String] name Optional parameter: This will list only merchants in
41
+ # which the appended string appears.
42
+ # @param [Integer] page Optional parameter: Results are paginated. Specify
43
+ # current page.
44
+ # @param [Integer] records_per_page Optional parameter: This specifies the
45
+ # number of records to be returned on each page. Defaults to `25`. The valid
46
+ # range is from `10` to `1000`. If the value exceeds `1000`, the default
47
+ # value of `25` will be used instead.
48
+ # @return [ApiResponse] Complete http response with raw body and status code.
49
+ def list_merchants(accept_version,
50
+ name: nil,
51
+ page: nil,
52
+ records_per_page: nil)
53
+ @api_call
54
+ .request(new_request_builder(HttpMethodEnum::GET,
55
+ '/merchants',
56
+ Server::DEFAULT)
57
+ .header_param(new_parameter(accept_version, key: 'Accept-Version')
58
+ .is_required(true))
59
+ .query_param(new_parameter(name, key: 'name'))
60
+ .query_param(new_parameter(page, key: 'page'))
61
+ .query_param(new_parameter(records_per_page, key: 'records_per_page'))
62
+ .header_param(new_parameter('application/json', key: 'accept'))
63
+ .auth(Single.new('basicAuth')))
64
+ .response(new_response_handler
65
+ .deserializer(APIHelper.method(:custom_type_deserializer))
66
+ .deserialize_into(MerchantsResponseBody.method(:from_hash))
67
+ .is_api_response(true))
68
+ .execute
69
+ end
70
+
71
+ # Returns information about a particular merchant, such as a logo, name, and
72
+ # website.
73
+ # @param [String] accept_version Required parameter: MX Platform API
74
+ # version.
75
+ # @param [String] merchant_guid Required parameter: The unique id for a
76
+ # `merchant`.
77
+ # @return [ApiResponse] Complete http response with raw body and status code.
78
+ def read_merchant(accept_version,
79
+ merchant_guid)
80
+ @api_call
81
+ .request(new_request_builder(HttpMethodEnum::GET,
82
+ '/merchants/{merchant_guid}',
83
+ Server::DEFAULT)
84
+ .header_param(new_parameter(accept_version, key: 'Accept-Version')
85
+ .is_required(true))
86
+ .template_param(new_parameter(merchant_guid, key: 'merchant_guid')
87
+ .is_required(true)
88
+ .should_encode(true))
89
+ .header_param(new_parameter('application/json', key: 'accept'))
90
+ .auth(Single.new('basicAuth')))
91
+ .response(new_response_handler
92
+ .deserializer(APIHelper.method(:custom_type_deserializer))
93
+ .deserialize_into(MerchantResponseBody.method(:from_hash))
94
+ .is_api_response(true))
95
+ .execute
96
+ end
97
+ end
98
+ end
@@ -0,0 +1,219 @@
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
+ # MicrodepositsApi
8
+ class MicrodepositsApi < BaseApi
9
+ # Use this endpoint to read the attributes of a specific microdeposit
10
+ # according to its unique GUID.
11
+ # @param [String] accept_version Required parameter: MX Platform API
12
+ # version.
13
+ # @param [String] user_guid Required parameter: The unique identifier for a
14
+ # `user`, beginning with the prefix `USR-`.
15
+ # @return [ApiResponse] Complete http response with raw body and status code.
16
+ def list_user_microdeposits(accept_version,
17
+ user_guid)
18
+ @api_call
19
+ .request(new_request_builder(HttpMethodEnum::GET,
20
+ '/users/{user_guid}/micro_deposits',
21
+ Server::DEFAULT)
22
+ .header_param(new_parameter(accept_version, key: 'Accept-Version')
23
+ .is_required(true))
24
+ .template_param(new_parameter(user_guid, key: 'user_guid')
25
+ .is_required(true)
26
+ .should_encode(true))
27
+ .header_param(new_parameter('application/json', key: 'accept'))
28
+ .auth(Single.new('basicAuth')))
29
+ .response(new_response_handler
30
+ .deserializer(APIHelper.method(:custom_type_deserializer))
31
+ .deserialize_into(MicrodepositsResponseBody.method(:from_hash))
32
+ .is_api_response(true))
33
+ .execute
34
+ end
35
+
36
+ # Use this endpoint to create or pre-initiate a microdeposit. The response
37
+ # will include the new microdeposit record with a status of `INITIATED` or
38
+ # `PREINITIATED` respectively.
39
+ # To pre-initiate a microdeposit, you only need to set `email` (string),
40
+ # `first_name` (string), and `last_name` (string) in the request body.
41
+ # Pre-initiating a microdeposit allows you to pass the end user's first
42
+ # name, last name, and email if this data has already been collected. If the
43
+ # end user selects an institution which requires the microdeposit flow, the
44
+ # pre-initiated `micro_deposit` will be used and the Connect Widget step
45
+ # that normally requests this info from the end user will be skipped.
46
+ # However, if the end user selects an institution which supports IAV, the
47
+ # pre-initiated `micro_deposit` will be deleted and IAV will be used
48
+ # instead. When requesting a Connect Widget URL after pre-initiating, make
49
+ # sure to set the `current_microdeposit_guid` to the resulting
50
+ # microdeposit's `guid` and set `data_request.products` to include
51
+ # `account_verification`. If you use this enhanced flow, a `micro_deposit`
52
+ # should be pre-initiated for all connect sessions in verification mode.
53
+ # After pre-initiating a microdeposit, pass the GUID to the config as
54
+ # `current_microdeposit_guid` and set `data_request.products` to include
55
+ # `account_verification` when requesting a Connect URL. Pre-initiating a
56
+ # microdeposit is optional. If you choose to implement this flow, it should
57
+ # be used for all Connect Widget sessions in verification mode.
58
+ # @param [String] accept_version Required parameter: MX Platform API
59
+ # version.
60
+ # @param [String] user_guid Required parameter: The unique identifier for a
61
+ # `user`, beginning with the prefix `USR-`.
62
+ # @param [MicrodepositRequestBody] body Required parameter: TODO: type
63
+ # description here
64
+ # @return [ApiResponse] Complete http response with raw body and status code.
65
+ def create_microdeposit(accept_version,
66
+ user_guid,
67
+ body)
68
+ @api_call
69
+ .request(new_request_builder(HttpMethodEnum::POST,
70
+ '/users/{user_guid}/micro_deposits',
71
+ Server::DEFAULT)
72
+ .header_param(new_parameter(accept_version, key: 'Accept-Version')
73
+ .is_required(true))
74
+ .template_param(new_parameter(user_guid, key: 'user_guid')
75
+ .is_required(true)
76
+ .should_encode(true))
77
+ .header_param(new_parameter('application/json', key: 'Content-Type'))
78
+ .body_param(new_parameter(body)
79
+ .is_required(true))
80
+ .header_param(new_parameter('application/json', key: 'accept'))
81
+ .body_serializer(proc do |param| param.to_json unless param.nil? end)
82
+ .auth(Single.new('basicAuth')))
83
+ .response(new_response_handler
84
+ .deserializer(APIHelper.method(:custom_type_deserializer))
85
+ .deserialize_into(MicrodepositResponseBody.method(:from_hash))
86
+ .is_api_response(true))
87
+ .execute
88
+ end
89
+
90
+ # Use this endpoint to delete the specified microdeposit.
91
+ # @param [String] accept_version Required parameter: MX Platform API
92
+ # version.
93
+ # @param [String] micro_deposit_guid Required parameter: The unique
94
+ # identifier for the microdeposit. Defined by MX.
95
+ # @param [String] user_guid Required parameter: The unique identifier for a
96
+ # `user`, beginning with the prefix `USR-`.
97
+ # @return [ApiResponse] Complete http response with raw body and status code.
98
+ def delete_microdeposit(accept_version,
99
+ micro_deposit_guid,
100
+ user_guid)
101
+ @api_call
102
+ .request(new_request_builder(HttpMethodEnum::DELETE,
103
+ '/users/{user_guid}/micro_deposits/{micro_deposit_guid}',
104
+ Server::DEFAULT)
105
+ .header_param(new_parameter(accept_version, key: 'Accept-Version')
106
+ .is_required(true))
107
+ .template_param(new_parameter(micro_deposit_guid, key: 'micro_deposit_guid')
108
+ .is_required(true)
109
+ .should_encode(true))
110
+ .template_param(new_parameter(user_guid, key: 'user_guid')
111
+ .is_required(true)
112
+ .should_encode(true))
113
+ .auth(Single.new('basicAuth')))
114
+ .response(new_response_handler
115
+ .is_response_void(true)
116
+ .is_api_response(true))
117
+ .execute
118
+ end
119
+
120
+ # Use this endpoint to read the attributes of a specific microdeposit
121
+ # according to its unique GUID. <br></br> Webhooks for microdeposit status
122
+ # changes are triggered when a status changes. The actual status of the
123
+ # microdeposit guid updates every minute. You may force a status update by
124
+ # calling the read microdeposit endpoint.
125
+ # @param [String] accept_version Required parameter: MX Platform API
126
+ # version.
127
+ # @param [String] micro_deposit_guid Required parameter: The unique
128
+ # identifier for the microdeposit. Defined by MX.
129
+ # @param [String] user_guid Required parameter: The unique identifier for a
130
+ # `user`, beginning with the prefix `USR-`.
131
+ # @return [ApiResponse] Complete http response with raw body and status code.
132
+ def read_user_microdeposit(accept_version,
133
+ micro_deposit_guid,
134
+ user_guid)
135
+ @api_call
136
+ .request(new_request_builder(HttpMethodEnum::GET,
137
+ '/users/{user_guid}/micro_deposits/{micro_deposit_guid}',
138
+ Server::DEFAULT)
139
+ .header_param(new_parameter(accept_version, key: 'Accept-Version')
140
+ .is_required(true))
141
+ .template_param(new_parameter(micro_deposit_guid, key: 'micro_deposit_guid')
142
+ .is_required(true)
143
+ .should_encode(true))
144
+ .template_param(new_parameter(user_guid, key: 'user_guid')
145
+ .is_required(true)
146
+ .should_encode(true))
147
+ .header_param(new_parameter('application/json', key: 'accept'))
148
+ .auth(Single.new('basicAuth')))
149
+ .response(new_response_handler
150
+ .deserializer(APIHelper.method(:custom_type_deserializer))
151
+ .deserialize_into(MicrodepositResponseBody.method(:from_hash))
152
+ .is_api_response(true))
153
+ .execute
154
+ end
155
+
156
+ # Use this endpoint to verify the amounts deposited into the account during
157
+ # a microdeposit verification. The verification has not successfully
158
+ # completed until the `status` is `VERIFIED`. Poll the
159
+ # `/users/{user_guid}/micro_deposits/{micro_deposit_guid}` (read
160
+ # microdeposit) endpoint until you see this status or an error state.
161
+ # @param [String] accept_version Required parameter: MX Platform API
162
+ # version.
163
+ # @param [String] micro_deposit_guid Required parameter: The unique
164
+ # identifier for the microdeposit. Defined by MX.
165
+ # @param [MicrodepositVerifyRequestBody] body Optional parameter: TODO: type
166
+ # description here
167
+ # @return [ApiResponse] Complete http response with raw body and status code.
168
+ def verify_microdeposit(accept_version,
169
+ micro_deposit_guid,
170
+ body: nil)
171
+ @api_call
172
+ .request(new_request_builder(HttpMethodEnum::PUT,
173
+ '/micro_deposits/{micro_deposit_guid}/verify',
174
+ Server::DEFAULT)
175
+ .header_param(new_parameter(accept_version, key: 'Accept-Version')
176
+ .is_required(true))
177
+ .template_param(new_parameter(micro_deposit_guid, key: 'micro_deposit_guid')
178
+ .is_required(true)
179
+ .should_encode(true))
180
+ .header_param(new_parameter('application/json', key: 'Content-Type'))
181
+ .body_param(new_parameter(body))
182
+ .header_param(new_parameter('application/json', key: 'accept'))
183
+ .body_serializer(proc do |param| param.to_json unless param.nil? end)
184
+ .auth(Single.new('basicAuth')))
185
+ .response(new_response_handler
186
+ .deserializer(APIHelper.method(:custom_type_deserializer))
187
+ .deserialize_into(MicrodepositResponseBody.method(:from_hash))
188
+ .is_api_response(true))
189
+ .execute
190
+ end
191
+
192
+ # This endpoint returns a list of the account verifications associated with
193
+ # the user, as well as the status of those verifications.
194
+ # @param [String] accept_version Required parameter: MX Platform API
195
+ # version.
196
+ # @param [String] user_guid Required parameter: The unique identifier for a
197
+ # `user`, beginning with the prefix `USR-`.
198
+ # @return [ApiResponse] Complete http response with raw body and status code.
199
+ def list_user_verifications(accept_version,
200
+ user_guid)
201
+ @api_call
202
+ .request(new_request_builder(HttpMethodEnum::GET,
203
+ '/users/{user_guid}/account_verifications',
204
+ Server::DEFAULT)
205
+ .header_param(new_parameter(accept_version, key: 'Accept-Version')
206
+ .is_required(true))
207
+ .template_param(new_parameter(user_guid, key: 'user_guid')
208
+ .is_required(true)
209
+ .should_encode(true))
210
+ .header_param(new_parameter('application/json', key: 'accept'))
211
+ .auth(Single.new('basicAuth')))
212
+ .response(new_response_handler
213
+ .deserializer(APIHelper.method(:custom_type_deserializer))
214
+ .deserialize_into(MicrodepositResponseBody.method(:from_hash))
215
+ .is_api_response(true))
216
+ .execute
217
+ end
218
+ end
219
+ end
@@ -0,0 +1,75 @@
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
+ # MonthlyCashFlowProfileApi
8
+ class MonthlyCashFlowProfileApi < BaseApi
9
+ # Read monthly cash flow profile.
10
+ # @param [String] user_identifier Required parameter: Use either the user
11
+ # `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs
12
+ # IDs Defined by
13
+ # You​](/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-d
14
+ # efined-by-you).
15
+ # @param [String] accept_version Required parameter: MX Platform API
16
+ # version.
17
+ # @return [ApiResponse] Complete http response with raw body and status code.
18
+ def read_monthly_cash_flow_profile(user_identifier,
19
+ accept_version)
20
+ @api_call
21
+ .request(new_request_builder(HttpMethodEnum::GET,
22
+ '/users/{user_identifier}/monthly_cash_flow_profile',
23
+ Server::DEFAULT)
24
+ .template_param(new_parameter(user_identifier, key: 'user_identifier')
25
+ .is_required(true)
26
+ .should_encode(true))
27
+ .header_param(new_parameter(accept_version, key: 'Accept-Version')
28
+ .is_required(true))
29
+ .header_param(new_parameter('application/json', key: 'accept'))
30
+ .auth(Single.new('basicAuth')))
31
+ .response(new_response_handler
32
+ .deserializer(APIHelper.method(:custom_type_deserializer))
33
+ .deserialize_into(MonthlyCashFlowResponseBody.method(:from_hash))
34
+ .is_api_response(true))
35
+ .execute
36
+ end
37
+
38
+ # Use this endpoint to update the attributes of a
39
+ # `monthly_cash_flow_profile`.
40
+ # @param [String] user_identifier Required parameter: Use either the user
41
+ # `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs
42
+ # IDs Defined by
43
+ # You​](/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-d
44
+ # efined-by-you).
45
+ # @param [String] accept_version Required parameter: MX Platform API
46
+ # version.
47
+ # @param [MonthlyCashFlowProfileRequestBody] body Required parameter: TODO:
48
+ # type description here
49
+ # @return [ApiResponse] Complete http response with raw body and status code.
50
+ def update_monthly_cash_flow_profile(user_identifier,
51
+ accept_version,
52
+ body)
53
+ @api_call
54
+ .request(new_request_builder(HttpMethodEnum::PUT,
55
+ '/users/{user_identifier}/monthly_cash_flow_profile',
56
+ Server::DEFAULT)
57
+ .template_param(new_parameter(user_identifier, key: 'user_identifier')
58
+ .is_required(true)
59
+ .should_encode(true))
60
+ .header_param(new_parameter(accept_version, key: 'Accept-Version')
61
+ .is_required(true))
62
+ .header_param(new_parameter('application/json', key: 'Content-Type'))
63
+ .body_param(new_parameter(body)
64
+ .is_required(true))
65
+ .header_param(new_parameter('application/json', key: 'accept'))
66
+ .body_serializer(proc do |param| param.to_json unless param.nil? end)
67
+ .auth(Single.new('basicAuth')))
68
+ .response(new_response_handler
69
+ .deserializer(APIHelper.method(:custom_type_deserializer))
70
+ .deserialize_into(MonthlyCashFlowResponseBody.method(:from_hash))
71
+ .is_api_response(true))
72
+ .execute
73
+ end
74
+ end
75
+ end
@@ -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
+ # NotificationsApi
8
+ class NotificationsApi < BaseApi
9
+ # All notifications created through the API will be of notification type
10
+ # `API_NOTIFICATION`, channel `PUSH`, and will not be associated to an
11
+ # entity. No other channels are supported. This will only have an effect
12
+ # for clients using an MX mobile application.
13
+ # @param [String] user_guid Required parameter: The unique identifier for a
14
+ # `user`, beginning with the prefix `USR-`.
15
+ # @param [String] accept_version Required parameter: MX Platform API
16
+ # version.
17
+ # @param [NotificationRequestBody] body Required parameter: TODO: type
18
+ # description here
19
+ # @return [ApiResponse] Complete http response with raw body and status code.
20
+ def create_notification(user_guid,
21
+ accept_version,
22
+ body)
23
+ @api_call
24
+ .request(new_request_builder(HttpMethodEnum::POST,
25
+ '/users/{user_guid}/notifications',
26
+ Server::DEFAULT)
27
+ .template_param(new_parameter(user_guid, key: 'user_guid')
28
+ .is_required(true)
29
+ .should_encode(true))
30
+ .header_param(new_parameter(accept_version, key: 'Accept-Version')
31
+ .is_required(true))
32
+ .header_param(new_parameter('application/json', key: 'Content-Type'))
33
+ .body_param(new_parameter(body)
34
+ .is_required(true))
35
+ .header_param(new_parameter('application/json', key: 'accept'))
36
+ .body_serializer(proc do |param| param.to_json unless param.nil? end)
37
+ .auth(Single.new('basicAuth')))
38
+ .response(new_response_handler
39
+ .deserializer(APIHelper.method(:custom_type_deserializer))
40
+ .deserialize_into(NotificationResponseBody.method(:from_hash))
41
+ .is_api_response(true))
42
+ .execute
43
+ end
44
+
45
+ # All notifications for the user can be listed, including notifications
46
+ # created by MX for other channels besides `PUSH`.
47
+ # @param [String] accept_version Required parameter: MX Platform API
48
+ # version.
49
+ # @param [String] user_guid Required parameter: The unique identifier for a
50
+ # `user`, beginning with the prefix `USR-`.
51
+ # @param [Integer] page Optional parameter: Results are paginated. Specify
52
+ # current page.
53
+ # @param [Integer] records_per_page Optional parameter: This specifies the
54
+ # number of records to be returned on each page. Defaults to `25`. The valid
55
+ # range is from `10` to `1000`. If the value exceeds `1000`, the default
56
+ # value of `25` will be used instead.
57
+ # @return [ApiResponse] Complete http response with raw body and status code.
58
+ def list_notifications(accept_version,
59
+ user_guid,
60
+ page: nil,
61
+ records_per_page: nil)
62
+ @api_call
63
+ .request(new_request_builder(HttpMethodEnum::GET,
64
+ '/users/{user_guid}/notifications',
65
+ Server::DEFAULT)
66
+ .header_param(new_parameter(accept_version, key: 'Accept-Version')
67
+ .is_required(true))
68
+ .template_param(new_parameter(user_guid, key: 'user_guid')
69
+ .is_required(true)
70
+ .should_encode(true))
71
+ .query_param(new_parameter(page, key: 'page'))
72
+ .query_param(new_parameter(records_per_page, key: 'records_per_page'))
73
+ .header_param(new_parameter('application/json', key: 'accept'))
74
+ .auth(Single.new('basicAuth')))
75
+ .response(new_response_handler
76
+ .deserializer(APIHelper.method(:custom_type_deserializer))
77
+ .deserialize_into(NotificationsResponseBody.method(:from_hash))
78
+ .is_api_response(true))
79
+ .execute
80
+ end
81
+
82
+ # Can pull up any notification associated with the user, including
83
+ # notifications created by MX for other channels besides `PUSH`.
84
+ # @param [String] user_guid Required parameter: The unique identifier for a
85
+ # `user`, beginning with the prefix `USR-`.
86
+ # @param [String] notification_guid Required parameter: The unique
87
+ # identifier for notifications. Defined by MX.
88
+ # @param [String] accept_version Required parameter: MX Platform API
89
+ # version.
90
+ # @return [ApiResponse] Complete http response with raw body and status code.
91
+ def read_notifications(user_guid,
92
+ notification_guid,
93
+ accept_version)
94
+ @api_call
95
+ .request(new_request_builder(HttpMethodEnum::GET,
96
+ '/users/{user_guid}/notifications/{notification_guid}',
97
+ Server::DEFAULT)
98
+ .template_param(new_parameter(user_guid, key: 'user_guid')
99
+ .is_required(true)
100
+ .should_encode(true))
101
+ .template_param(new_parameter(notification_guid, key: 'notification_guid')
102
+ .is_required(true)
103
+ .should_encode(true))
104
+ .header_param(new_parameter(accept_version, key: 'Accept-Version')
105
+ .is_required(true))
106
+ .header_param(new_parameter('application/json', key: 'accept'))
107
+ .auth(Single.new('basicAuth')))
108
+ .response(new_response_handler
109
+ .deserializer(APIHelper.method(:custom_type_deserializer))
110
+ .deserialize_into(NotificationResponseBody.method(:from_hash))
111
+ .is_api_response(true))
112
+ .execute
113
+ end
114
+ end
115
+ end
@@ -0,0 +1,141 @@
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
+ # ProcessorTokenApi
8
+ class ProcessorTokenApi < BaseApi
9
+ # Clients use this endpoint to request an authorization code according to
10
+ # the parameters specified in the scope. Clients then pass this code to
11
+ # processors. Processor access is scoped only to the GUIDs and features
12
+ # specified in this request. Before requesting an authorization code which
13
+ # includes a member in the scope, clients must have verified that member.
14
+ # @param [String] accept_version Required parameter: MX Platform API
15
+ # version.
16
+ # @param [AuthorizationCodeRequestBody] body Required parameter: The scope
17
+ # for the authorization code.
18
+ # @return [ApiResponse] Complete http response with raw body and status code.
19
+ def request_authorization_code(accept_version,
20
+ body)
21
+ @api_call
22
+ .request(new_request_builder(HttpMethodEnum::POST,
23
+ '/authorization_code',
24
+ Server::DEFAULT)
25
+ .header_param(new_parameter(accept_version, key: 'Accept-Version')
26
+ .is_required(true))
27
+ .header_param(new_parameter('application/json', key: 'Content-Type'))
28
+ .body_param(new_parameter(body)
29
+ .is_required(true))
30
+ .header_param(new_parameter('application/json', key: 'accept'))
31
+ .body_serializer(proc do |param| param.to_json unless param.nil? end)
32
+ .auth(Single.new('basicAuth')))
33
+ .response(new_response_handler
34
+ .deserializer(APIHelper.method(:custom_type_deserializer))
35
+ .deserialize_into(AuthorizationCodeResponseBody.method(:from_hash))
36
+ .is_api_response(true))
37
+ .execute
38
+ end
39
+
40
+ # View a list of tokens that exist for a user, member, or account.
41
+ # @param [String] accept_version Required parameter: MX Platform API
42
+ # version.
43
+ # @return [ApiResponse] Complete http response with raw body and status code.
44
+ def list_tokens(accept_version)
45
+ @api_call
46
+ .request(new_request_builder(HttpMethodEnum::GET,
47
+ '/tokens',
48
+ Server::DEFAULT)
49
+ .header_param(new_parameter(accept_version, key: 'Accept-Version')
50
+ .is_required(true))
51
+ .header_param(new_parameter('application/json', key: 'accept'))
52
+ .auth(Single.new('basicAuth')))
53
+ .response(new_response_handler
54
+ .deserializer(APIHelper.method(:custom_type_deserializer))
55
+ .deserialize_into(TokenResponseBody.method(:from_hash))
56
+ .is_api_response(true))
57
+ .execute
58
+ end
59
+
60
+ # Get account information such as routing number and account number, scoped
61
+ # to your access token.
62
+ # @param [String] accept_version Required parameter: MX Platform API
63
+ # version.
64
+ # @return [ApiResponse] Complete http response with raw body and status code.
65
+ def request_account_number(accept_version)
66
+ @api_call
67
+ .request(new_request_builder(HttpMethodEnum::GET,
68
+ '/account/account_numbers',
69
+ Server::DEFAULT)
70
+ .header_param(new_parameter(accept_version, key: 'Accept-Version')
71
+ .is_required(true))
72
+ .header_param(new_parameter('application/json', key: 'accept'))
73
+ .auth(Single.new('bearerAuth')))
74
+ .response(new_response_handler
75
+ .deserializer(APIHelper.method(:custom_type_deserializer))
76
+ .deserialize_into(ProcessorAccountNumberBody.method(:from_hash))
77
+ .is_api_response(true))
78
+ .execute
79
+ end
80
+
81
+ # Check the real-time account balance using your access token.
82
+ # @param [String] accept_version Required parameter: MX Platform API
83
+ # version.
84
+ # @return [ApiResponse] Complete http response with raw body and status code.
85
+ def check_real_time_account_balance(accept_version)
86
+ @api_call
87
+ .request(new_request_builder(HttpMethodEnum::POST,
88
+ '/account/check_balance',
89
+ Server::DEFAULT)
90
+ .header_param(new_parameter(accept_version, key: 'Accept-Version')
91
+ .is_required(true))
92
+ .header_param(new_parameter('application/json', key: 'accept'))
93
+ .auth(Single.new('bearerAuth')))
94
+ .response(new_response_handler
95
+ .deserializer(APIHelper.method(:custom_type_deserializer))
96
+ .deserialize_into(MemberResponseBody.method(:from_hash))
97
+ .is_api_response(true))
98
+ .execute
99
+ end
100
+
101
+ # Read the account balance (Processors Only)
102
+ # @param [String] accept_version Required parameter: MX Platform API
103
+ # version.
104
+ # @return [ApiResponse] Complete http response with raw body and status code.
105
+ def read_account_balance(accept_version)
106
+ @api_call
107
+ .request(new_request_builder(HttpMethodEnum::GET,
108
+ '/payment_account',
109
+ Server::DEFAULT)
110
+ .header_param(new_parameter(accept_version, key: 'Accept-Version')
111
+ .is_required(true))
112
+ .header_param(new_parameter('application/json', key: 'accept'))
113
+ .auth(Single.new('bearerAuth')))
114
+ .response(new_response_handler
115
+ .deserializer(APIHelper.method(:custom_type_deserializer))
116
+ .deserialize_into(PaymentAccountBody.method(:from_hash))
117
+ .is_api_response(true))
118
+ .execute
119
+ end
120
+
121
+ # Get account owner information (Processors Only)
122
+ # @param [String] accept_version Required parameter: MX Platform API
123
+ # version.
124
+ # @return [ApiResponse] Complete http response with raw body and status code.
125
+ def get_account_owner_info(accept_version)
126
+ @api_call
127
+ .request(new_request_builder(HttpMethodEnum::GET,
128
+ '/account/transactions',
129
+ Server::DEFAULT)
130
+ .header_param(new_parameter(accept_version, key: 'Accept-Version')
131
+ .is_required(true))
132
+ .header_param(new_parameter('application/json', key: 'accept'))
133
+ .auth(Single.new('bearerAuth')))
134
+ .response(new_response_handler
135
+ .deserializer(APIHelper.method(:custom_type_deserializer))
136
+ .deserialize_into(ProcessorOwnerBody.method(:from_hash))
137
+ .is_api_response(true))
138
+ .execute
139
+ end
140
+ end
141
+ end