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,1223 @@
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
+ # TransactionsApi
8
+ class TransactionsApi < BaseApi
9
+ # Use this endpoint to categorize, cleanse, and classify transactions. These
10
+ # transactions are not persisted or stored on the MX platform. <br /><br
11
+ # />For more information on returned data, please see the [Enhanced
12
+ # Transactions fields
13
+ # guide](/api-reference/platform-api/reference/transactions-overview#enhance
14
+ # d-transactions).
15
+ # @param [String] accept_version Required parameter: MX Platform API
16
+ # version.
17
+ # @param [EnhanceTransactionsRequestBody] body Required parameter:
18
+ # Transaction object to be enhanced
19
+ # @return [ApiResponse] Complete http response with raw body and status code.
20
+ def enhance_transactions(accept_version,
21
+ body)
22
+ @api_call
23
+ .request(new_request_builder(HttpMethodEnum::POST,
24
+ '/transactions/enhance',
25
+ Server::DEFAULT)
26
+ .header_param(new_parameter(accept_version, key: 'Accept-Version')
27
+ .is_required(true))
28
+ .header_param(new_parameter('application/json', key: 'Content-Type'))
29
+ .body_param(new_parameter(body)
30
+ .is_required(true))
31
+ .header_param(new_parameter('application/json', key: 'accept'))
32
+ .body_serializer(proc do |param| param.to_json unless param.nil? end)
33
+ .auth(Single.new('basicAuth')))
34
+ .response(new_response_handler
35
+ .deserializer(APIHelper.method(:custom_type_deserializer))
36
+ .deserialize_into(EnhanceTransactionsResponseBody.method(:from_hash))
37
+ .is_api_response(true))
38
+ .execute
39
+ end
40
+
41
+ # This endpoint can only be used to create manual transactions that are
42
+ # under a manual account. This endpoint accepts the optional MX-Skip-Webhook
43
+ # header and `skip_webhook` parameter.
44
+ # @param [String] accept_version Required parameter: MX Platform API
45
+ # version.
46
+ # @param [String] user_guid Required parameter: The unique identifier for a
47
+ # `user`, beginning with the prefix `USR-`.
48
+ # @param [String] account_guid Required parameter: The unique id for an
49
+ # `account`.
50
+ # @param [TransactionCreateRequestBody] body Required parameter: TODO: type
51
+ # description here
52
+ # @return [ApiResponse] Complete http response with raw body and status code.
53
+ def create_manual_transaction(accept_version,
54
+ user_guid,
55
+ account_guid,
56
+ body)
57
+ @api_call
58
+ .request(new_request_builder(HttpMethodEnum::POST,
59
+ '/users/{user_guid}/accounts/{account_guid}/transactions',
60
+ Server::DEFAULT)
61
+ .header_param(new_parameter(accept_version, key: 'Accept-Version')
62
+ .is_required(true))
63
+ .template_param(new_parameter(user_guid, key: 'user_guid')
64
+ .is_required(true)
65
+ .should_encode(true))
66
+ .template_param(new_parameter(account_guid, key: 'account_guid')
67
+ .is_required(true)
68
+ .should_encode(true))
69
+ .header_param(new_parameter('application/json', key: 'Content-Type'))
70
+ .body_param(new_parameter(body)
71
+ .is_required(true))
72
+ .header_param(new_parameter('application/json', key: 'accept'))
73
+ .body_serializer(proc do |param| param.to_json unless param.nil? end)
74
+ .auth(Single.new('basicAuth')))
75
+ .response(new_response_handler
76
+ .deserializer(APIHelper.method(:custom_type_deserializer))
77
+ .deserialize_into(TransactionCreateResponseBody.method(:from_hash))
78
+ .is_api_response(true))
79
+ .execute
80
+ end
81
+
82
+ # Requests to this endpoint return a list of transactions associated with
83
+ # the specified account. <br /><br /> Enhanced transaction data may be
84
+ # requested using the `includes` parameter. To use this optional parameter,
85
+ # the value should include the optional metadata requested such as
86
+ # `repeating_transactions`, `merchants`, `classifications`, `geolocations`.
87
+ # For more information, see the [Optional Enhancement Query Parameter
88
+ # guide](/api-reference/platform-api/reference/transactions-overview#enhance
89
+ # d-transactions#optional-enhancement-query-parameter).
90
+ # @param [String] accept_version Required parameter: MX Platform API
91
+ # version.
92
+ # @param [String] user_guid Required parameter: The unique identifier for a
93
+ # `user`, beginning with the prefix `USR-`.
94
+ # @param [String] account_guid Required parameter: The unique id for an
95
+ # `account`.
96
+ # @param [Integer] page Optional parameter: Results are paginated. Specify
97
+ # current page.
98
+ # @param [Integer] records_per_page Optional parameter: This specifies the
99
+ # number of records to be returned on each page. Defaults to `25`. The valid
100
+ # range is from `10` to `1000`. If the value exceeds `1000`, the default
101
+ # value of `25` will be used instead.
102
+ # @param [String] from_date Optional parameter: Filter transactions from
103
+ # this date. This only supports unix timestamp format. Defaults to 120 days
104
+ # ago if not provided.
105
+ # @param [String] to_date Optional parameter: Filter transactions to this
106
+ # date (at midnight). This only supports unix timestamp format. Defaults to
107
+ # 5 days forward from the day the request is made to capture pending
108
+ # transactions.
109
+ # @param [String] from_created_at Optional parameter: Filter transactions
110
+ # from the date the transaction was created. This only supports unix
111
+ # timestamp format.
112
+ # @param [String] to_created_at Optional parameter: Filter transaction to
113
+ # the date in which the transaction was created. This only supports unix
114
+ # timestamp format.
115
+ # @param [String] from_updated_at Optional parameter: Filter transactions
116
+ # from the date in which the transaction was updated. This only supports
117
+ # unix timestamp format.
118
+ # @param [String] to_updated_at Optional parameter: Filter transactions to
119
+ # the date in which the transaction was updated. This only supports unix
120
+ # timestamp format.
121
+ # @param [String] includes Optional parameter: Options for enhanced
122
+ # transactions. This query parameter is optional. Possible additional
123
+ # metadata: `repeating_transactions`, `merchants`, `classifications`,
124
+ # `geolocations`. The query value is format sensitive. To retrieve all
125
+ # available enhancements, append:
126
+ # `?includes=repeating_transactions,merchants,classifications,geolocations`.
127
+ # The query options may be combined to specific enhancements. For
128
+ # example, to request Repeating Transactions and Geolocation data, use:
129
+ # `?includes=repeating_transactions,geolocations`. - Repeating
130
+ # Transactions: Identifies transactions with predictable recurrence patterns
131
+ # (e.g., Bill, Income, Subscription). - Merchants: Enriches transactions
132
+ # with merchant name. - Classifications: Provides more insight into the type
133
+ # of money movement that is occurring on the transaction, whether it be
134
+ # retail or investments. - Geolocation: Provides geographic metadata.
135
+ # @return [ApiResponse] Complete http response with raw body and status code.
136
+ def list_transactions_by_account(accept_version,
137
+ user_guid,
138
+ account_guid,
139
+ page: nil,
140
+ records_per_page: nil,
141
+ from_date: nil,
142
+ to_date: nil,
143
+ from_created_at: nil,
144
+ to_created_at: nil,
145
+ from_updated_at: nil,
146
+ to_updated_at: nil,
147
+ includes: nil)
148
+ @api_call
149
+ .request(new_request_builder(HttpMethodEnum::GET,
150
+ '/users/{user_guid}/accounts/{account_guid}/transactions',
151
+ Server::DEFAULT)
152
+ .header_param(new_parameter(accept_version, key: 'Accept-Version')
153
+ .is_required(true))
154
+ .template_param(new_parameter(user_guid, key: 'user_guid')
155
+ .is_required(true)
156
+ .should_encode(true))
157
+ .template_param(new_parameter(account_guid, key: 'account_guid')
158
+ .is_required(true)
159
+ .should_encode(true))
160
+ .query_param(new_parameter(page, key: 'page'))
161
+ .query_param(new_parameter(records_per_page, key: 'records_per_page'))
162
+ .query_param(new_parameter(from_date, key: 'from_date'))
163
+ .query_param(new_parameter(to_date, key: 'to_date'))
164
+ .query_param(new_parameter(from_created_at, key: 'from_created_at'))
165
+ .query_param(new_parameter(to_created_at, key: 'to_created_at'))
166
+ .query_param(new_parameter(from_updated_at, key: 'from_updated_at'))
167
+ .query_param(new_parameter(to_updated_at, key: 'to_updated_at'))
168
+ .query_param(new_parameter(includes, key: 'includes'))
169
+ .header_param(new_parameter('application/json', key: 'accept'))
170
+ .auth(Single.new('basicAuth')))
171
+ .response(new_response_handler
172
+ .deserializer(APIHelper.method(:custom_type_deserializer))
173
+ .deserialize_into(TransactionsResponseBodyIncludes.method(:from_hash))
174
+ .is_api_response(true))
175
+ .execute
176
+ end
177
+
178
+ # Requests to this endpoint return a list of transactions associated with
179
+ # the specified account. <br /><br /> Enhanced transaction data may be
180
+ # requested using the `includes` parameter. To use this optional parameter,
181
+ # the value should include the optional metadata requested such as
182
+ # `repeating_transactions`, `merchants`, `classifications`, `geolocations`.
183
+ # For more information, see the [Optional Enhancement Query Parameter
184
+ # guide](/api-reference/platform-api/reference/transactions-overview#enhance
185
+ # d-transactions#optional-enhancement-query-parameter).
186
+ # @param [String] accept_version Required parameter: MX Platform API
187
+ # version.
188
+ # @param [String] user_identifier Required parameter: Use either the user
189
+ # `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs
190
+ # IDs Defined by
191
+ # You​](/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-d
192
+ # efined-by-you).
193
+ # @param [String] account_identifier Required parameter: Use either the
194
+ # account `id` you defined or the MX-defined account `guid`. See [MX-Defined
195
+ # GUIDs vs IDs Defined by
196
+ # You](/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-de
197
+ # fined-by-you).
198
+ # @param [String] member_identifier Required parameter: Use either the
199
+ # member `id` you defined or the MX-defined member `guid`. See [MX-Defined
200
+ # GUIDs vs IDs Defined by
201
+ # You](/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-de
202
+ # fined-by-you).
203
+ # @param [Integer] page Optional parameter: Results are paginated. Specify
204
+ # current page.
205
+ # @param [Integer] records_per_page Optional parameter: This specifies the
206
+ # number of records to be returned on each page. Defaults to `25`. The valid
207
+ # range is from `10` to `1000`. If the value exceeds `1000`, the default
208
+ # value of `25` will be used instead.
209
+ # @param [String] from_date Optional parameter: Filter transactions from
210
+ # this date. This only supports unix timestamp format. Defaults to 120 days
211
+ # ago if not provided.
212
+ # @param [String] to_date Optional parameter: Filter transactions to this
213
+ # date (at midnight). This only supports unix timestamp format. Defaults to
214
+ # 5 days forward from the day the request is made to capture pending
215
+ # transactions.
216
+ # @param [String] from_created_at Optional parameter: Filter transactions
217
+ # from the date the transaction was created. This only supports unix
218
+ # timestamp format.
219
+ # @param [String] to_created_at Optional parameter: Filter transaction to
220
+ # the date in which the transaction was created. This only supports unix
221
+ # timestamp format.
222
+ # @param [String] from_updated_at Optional parameter: Filter transactions
223
+ # from the date in which the transaction was updated. This only supports
224
+ # unix timestamp format.
225
+ # @param [String] to_updated_at Optional parameter: Filter transactions to
226
+ # the date in which the transaction was updated. This only supports unix
227
+ # timestamp format.
228
+ # @param [String] includes Optional parameter: Options for enhanced
229
+ # transactions. This query parameter is optional. Possible additional
230
+ # metadata: `repeating_transactions`, `merchants`, `classifications`,
231
+ # `geolocations`. The query value is format sensitive. To retrieve all
232
+ # available enhancements, append:
233
+ # `?includes=repeating_transactions,merchants,classifications,geolocations`.
234
+ # The query options may be combined to specific enhancements. For
235
+ # example, to request Repeating Transactions and Geolocation data, use:
236
+ # `?includes=repeating_transactions,geolocations`. - Repeating
237
+ # Transactions: Identifies transactions with predictable recurrence patterns
238
+ # (e.g., Bill, Income, Subscription). - Merchants: Enriches transactions
239
+ # with merchant name. - Classifications: Provides more insight into the type
240
+ # of money movement that is occurring on the transaction, whether it be
241
+ # retail or investments. - Geolocation: Provides geographic metadata.
242
+ # @return [ApiResponse] Complete http response with raw body and status code.
243
+ def list_transactions_by_account_per_member(accept_version,
244
+ user_identifier,
245
+ account_identifier,
246
+ member_identifier,
247
+ page: nil,
248
+ records_per_page: nil,
249
+ from_date: nil,
250
+ to_date: nil,
251
+ from_created_at: nil,
252
+ to_created_at: nil,
253
+ from_updated_at: nil,
254
+ to_updated_at: nil,
255
+ includes: nil)
256
+ @api_call
257
+ .request(new_request_builder(HttpMethodEnum::GET,
258
+ '/users/{user_identifier}/members/{member_identifier}/accounts/{account_identifier}/transactions',
259
+ Server::DEFAULT)
260
+ .header_param(new_parameter(accept_version, key: 'Accept-Version')
261
+ .is_required(true))
262
+ .template_param(new_parameter(user_identifier, key: 'user_identifier')
263
+ .is_required(true)
264
+ .should_encode(true))
265
+ .template_param(new_parameter(account_identifier, key: 'account_identifier')
266
+ .is_required(true)
267
+ .should_encode(true))
268
+ .template_param(new_parameter(member_identifier, key: 'member_identifier')
269
+ .is_required(true)
270
+ .should_encode(true))
271
+ .query_param(new_parameter(page, key: 'page'))
272
+ .query_param(new_parameter(records_per_page, key: 'records_per_page'))
273
+ .query_param(new_parameter(from_date, key: 'from_date'))
274
+ .query_param(new_parameter(to_date, key: 'to_date'))
275
+ .query_param(new_parameter(from_created_at, key: 'from_created_at'))
276
+ .query_param(new_parameter(to_created_at, key: 'to_created_at'))
277
+ .query_param(new_parameter(from_updated_at, key: 'from_updated_at'))
278
+ .query_param(new_parameter(to_updated_at, key: 'to_updated_at'))
279
+ .query_param(new_parameter(includes, key: 'includes'))
280
+ .header_param(new_parameter('application/json', key: 'accept'))
281
+ .auth(Single.new('basicAuth')))
282
+ .response(new_response_handler
283
+ .deserializer(APIHelper.method(:custom_type_deserializer))
284
+ .deserialize_into(TransactionsResponseBodyIncludes.method(:from_hash))
285
+ .is_api_response(true))
286
+ .execute
287
+ end
288
+
289
+ # Some institutions allow developers to access an extended transaction
290
+ # history with up to 24 months of data associated with a particular member.
291
+ # The process for fetching and then reading this extended transaction
292
+ # history is much like standard aggregation, and it may trigger multi-factor
293
+ # authentication.
294
+ # @param [String] accept_version Required parameter: MX Platform API
295
+ # version.
296
+ # @param [String] member_identifier Required parameter: Use either the
297
+ # member `id` you defined or the MX-defined member `guid`. See [MX-Defined
298
+ # GUIDs vs IDs Defined by
299
+ # You](/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-de
300
+ # fined-by-you).
301
+ # @param [String] user_identifier Required parameter: Use either the user
302
+ # `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs
303
+ # IDs Defined by
304
+ # You​](/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-d
305
+ # efined-by-you).
306
+ # @return [ApiResponse] Complete http response with raw body and status code.
307
+ def extend_history(accept_version,
308
+ member_identifier,
309
+ user_identifier)
310
+ @api_call
311
+ .request(new_request_builder(HttpMethodEnum::POST,
312
+ '/users/{user_identifier}/members/{member_identifier}/extend_history',
313
+ Server::DEFAULT)
314
+ .header_param(new_parameter(accept_version, key: 'Accept-Version')
315
+ .is_required(true))
316
+ .template_param(new_parameter(member_identifier, key: 'member_identifier')
317
+ .is_required(true)
318
+ .should_encode(true))
319
+ .template_param(new_parameter(user_identifier, key: 'user_identifier')
320
+ .is_required(true)
321
+ .should_encode(true))
322
+ .header_param(new_parameter('application/json', key: 'accept'))
323
+ .auth(Single.new('basicAuth')))
324
+ .response(new_response_handler
325
+ .deserializer(APIHelper.method(:custom_type_deserializer))
326
+ .deserialize_into(MemberResponseBody.method(:from_hash))
327
+ .is_api_response(true))
328
+ .execute
329
+ end
330
+
331
+ # Requests to this endpoint return a list of transactions associated with
332
+ # the specified `member`, across all accounts associated with that
333
+ # `member`. <br /><br />Enhanced transaction data may be requested using
334
+ # the `includes` parameter. To use this optional parameter, the value should
335
+ # include the optional metadata requested such as `repeating_transactions`,
336
+ # `merchants`, `classifications`, `geolocations`. For more information, see
337
+ # the [Optional Enhancement Query Parameter
338
+ # guide](/api-reference/platform-api/reference/transactions-overview#enhance
339
+ # d-transactions#optional-enhancement-query-parameter).
340
+ # @param [String] accept_version Required parameter: MX Platform API
341
+ # version.
342
+ # @param [String] user_identifier Required parameter: Use either the user
343
+ # `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs
344
+ # IDs Defined by
345
+ # You​](/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-d
346
+ # efined-by-you).
347
+ # @param [String] member_identifier Required parameter: Use either the
348
+ # member `id` you defined or the MX-defined member `guid`. See [MX-Defined
349
+ # GUIDs vs IDs Defined by
350
+ # You](/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-de
351
+ # fined-by-you).
352
+ # @param [Integer] page Optional parameter: Results are paginated. Specify
353
+ # current page.
354
+ # @param [Integer] records_per_page Optional parameter: This specifies the
355
+ # number of records to be returned on each page. Defaults to `25`. The valid
356
+ # range is from `10` to `1000`. If the value exceeds `1000`, the default
357
+ # value of `25` will be used instead.
358
+ # @param [String] from_date Optional parameter: Filter transactions from
359
+ # this date. This only supports unix timestamp format. Defaults to 120 days
360
+ # ago if not provided.
361
+ # @param [String] to_date Optional parameter: Filter transactions to this
362
+ # date (at midnight). This only supports unix timestamp format. Defaults to
363
+ # 5 days forward from the day the request is made to capture pending
364
+ # transactions.
365
+ # @param [String] from_created_at Optional parameter: Filter transactions
366
+ # from the date the transaction was created. This only supports unix
367
+ # timestamp format.
368
+ # @param [String] to_created_at Optional parameter: Filter transaction to
369
+ # the date in which the transaction was created. This only supports unix
370
+ # timestamp format.
371
+ # @param [String] from_timestamp Optional parameter: Filter transactions
372
+ # from the date the transaction was created. This only supports unix
373
+ # timestamp format.
374
+ # @param [String] to_timestamp Optional parameter: Filter transaction to the
375
+ # date in which the transaction was created. This only supports unix
376
+ # timestamp format.
377
+ # @param [String] from_updated_at Optional parameter: Filter transactions
378
+ # from the date in which the transaction was updated. This only supports
379
+ # unix timestamp format.
380
+ # @param [String] to_updated_at Optional parameter: Filter transactions to
381
+ # the date in which the transaction was updated. This only supports unix
382
+ # timestamp format.
383
+ # @param [String] includes Optional parameter: Options for enhanced
384
+ # transactions. This query parameter is optional. Possible additional
385
+ # metadata: `repeating_transactions`, `merchants`, `classifications`,
386
+ # `geolocations`. The query value is format sensitive. To retrieve all
387
+ # available enhancements, append:
388
+ # `?includes=repeating_transactions,merchants,classifications,geolocations`.
389
+ # The query options may be combined to specific enhancements. For
390
+ # example, to request Repeating Transactions and Geolocation data, use:
391
+ # `?includes=repeating_transactions,geolocations`. - Repeating
392
+ # Transactions: Identifies transactions with predictable recurrence patterns
393
+ # (e.g., Bill, Income, Subscription). - Merchants: Enriches transactions
394
+ # with merchant name. - Classifications: Provides more insight into the type
395
+ # of money movement that is occurring on the transaction, whether it be
396
+ # retail or investments. - Geolocation: Provides geographic metadata.
397
+ # @return [ApiResponse] Complete http response with raw body and status code.
398
+ def list_transactions_by_member(accept_version,
399
+ user_identifier,
400
+ member_identifier,
401
+ page: nil,
402
+ records_per_page: nil,
403
+ from_date: nil,
404
+ to_date: nil,
405
+ from_created_at: nil,
406
+ to_created_at: nil,
407
+ from_timestamp: nil,
408
+ to_timestamp: nil,
409
+ from_updated_at: nil,
410
+ to_updated_at: nil,
411
+ includes: nil)
412
+ @api_call
413
+ .request(new_request_builder(HttpMethodEnum::GET,
414
+ '/users/{user_identifier}/members/{member_identifier}/transactions',
415
+ Server::DEFAULT)
416
+ .header_param(new_parameter(accept_version, key: 'Accept-Version')
417
+ .is_required(true))
418
+ .template_param(new_parameter(user_identifier, key: 'user_identifier')
419
+ .is_required(true)
420
+ .should_encode(true))
421
+ .template_param(new_parameter(member_identifier, key: 'member_identifier')
422
+ .is_required(true)
423
+ .should_encode(true))
424
+ .query_param(new_parameter(page, key: 'page'))
425
+ .query_param(new_parameter(records_per_page, key: 'records_per_page'))
426
+ .query_param(new_parameter(from_date, key: 'from_date'))
427
+ .query_param(new_parameter(to_date, key: 'to_date'))
428
+ .query_param(new_parameter(from_created_at, key: 'from_created_at'))
429
+ .query_param(new_parameter(to_created_at, key: 'to_created_at'))
430
+ .query_param(new_parameter(from_timestamp, key: 'from_timestamp'))
431
+ .query_param(new_parameter(to_timestamp, key: 'to_timestamp'))
432
+ .query_param(new_parameter(from_updated_at, key: 'from_updated_at'))
433
+ .query_param(new_parameter(to_updated_at, key: 'to_updated_at'))
434
+ .query_param(new_parameter(includes, key: 'includes'))
435
+ .header_param(new_parameter('application/json', key: 'accept'))
436
+ .auth(Single.new('basicAuth')))
437
+ .response(new_response_handler
438
+ .deserializer(APIHelper.method(:custom_type_deserializer))
439
+ .deserialize_into(TransactionsResponseBodyIncludes.method(:from_hash))
440
+ .is_api_response(true))
441
+ .execute
442
+ end
443
+
444
+ # Use this endpoint to get a list of all transactions associated with a
445
+ # particular tag according to the tag's unique GUID. This lists all
446
+ # transactions that have been assigned to a particular tag using the create
447
+ # tagging endpoint. <br /><br />Enhanced transaction data may be requested
448
+ # using the `includes` parameter. To use this optional parameter, the value
449
+ # should include the optional metadata requested such as
450
+ # `repeating_transactions`, `merchants`, `classifications`, `geolocations`.
451
+ # For more information, see the [Optional Enhancement Query Parameter
452
+ # guide](/api-reference/platform-api/reference/transactions-overview#enhance
453
+ # d-transactions#optional-enhancement-query-parameter).
454
+ # @param [String] accept_version Required parameter: MX Platform API
455
+ # version.
456
+ # @param [String] user_identifier Required parameter: Use either the user
457
+ # `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs
458
+ # IDs Defined by
459
+ # You​](/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-d
460
+ # efined-by-you).
461
+ # @param [String] tag_guid Required parameter: The unique id for a `tag`.
462
+ # @param [Integer] page Optional parameter: Results are paginated. Specify
463
+ # current page.
464
+ # @param [Integer] records_per_page Optional parameter: This specifies the
465
+ # number of records to be returned on each page. Defaults to `25`. The valid
466
+ # range is from `10` to `1000`. If the value exceeds `1000`, the default
467
+ # value of `25` will be used instead.
468
+ # @param [String] from_date Optional parameter: Filter transactions from
469
+ # this date. This only supports unix timestamp format. Defaults to 120 days
470
+ # ago if not provided.
471
+ # @param [String] to_date Optional parameter: Filter transactions to this
472
+ # date (at midnight). This only supports unix timestamp format. Defaults to
473
+ # 5 days forward from the day the request is made to capture pending
474
+ # transactions.
475
+ # @param [String] from_created_at Optional parameter: Filter transactions
476
+ # from the date the transaction was created. This only supports unix
477
+ # timestamp format.
478
+ # @param [String] to_created_at Optional parameter: Filter transaction to
479
+ # the date in which the transaction was created. This only supports unix
480
+ # timestamp format.
481
+ # @param [String] from_updated_at Optional parameter: Filter transactions
482
+ # from the date in which the transaction was updated. This only supports
483
+ # unix timestamp format.
484
+ # @param [String] to_updated_at Optional parameter: Filter transactions to
485
+ # the date in which the transaction was updated. This only supports unix
486
+ # timestamp format.
487
+ # @param [String] includes Optional parameter: Options for enhanced
488
+ # transactions. This query parameter is optional. Possible additional
489
+ # metadata: `repeating_transactions`, `merchants`, `classifications`,
490
+ # `geolocations`. The query value is format sensitive. To retrieve all
491
+ # available enhancements, append:
492
+ # `?includes=repeating_transactions,merchants,classifications,geolocations`.
493
+ # The query options may be combined to specific enhancements. For
494
+ # example, to request Repeating Transactions and Geolocation data, use:
495
+ # `?includes=repeating_transactions,geolocations`. - Repeating
496
+ # Transactions: Identifies transactions with predictable recurrence patterns
497
+ # (e.g., Bill, Income, Subscription). - Merchants: Enriches transactions
498
+ # with merchant name. - Classifications: Provides more insight into the type
499
+ # of money movement that is occurring on the transaction, whether it be
500
+ # retail or investments. - Geolocation: Provides geographic metadata.
501
+ # @return [ApiResponse] Complete http response with raw body and status code.
502
+ def list_transactions_by_tag(accept_version,
503
+ user_identifier,
504
+ tag_guid,
505
+ page: nil,
506
+ records_per_page: nil,
507
+ from_date: nil,
508
+ to_date: nil,
509
+ from_created_at: nil,
510
+ to_created_at: nil,
511
+ from_updated_at: nil,
512
+ to_updated_at: nil,
513
+ includes: nil)
514
+ @api_call
515
+ .request(new_request_builder(HttpMethodEnum::GET,
516
+ '/users/{user_identifier}/tags/{tag_guid}/transactions',
517
+ Server::DEFAULT)
518
+ .header_param(new_parameter(accept_version, key: 'Accept-Version')
519
+ .is_required(true))
520
+ .template_param(new_parameter(user_identifier, key: 'user_identifier')
521
+ .is_required(true)
522
+ .should_encode(true))
523
+ .template_param(new_parameter(tag_guid, key: 'tag_guid')
524
+ .is_required(true)
525
+ .should_encode(true))
526
+ .query_param(new_parameter(page, key: 'page'))
527
+ .query_param(new_parameter(records_per_page, key: 'records_per_page'))
528
+ .query_param(new_parameter(from_date, key: 'from_date'))
529
+ .query_param(new_parameter(to_date, key: 'to_date'))
530
+ .query_param(new_parameter(from_created_at, key: 'from_created_at'))
531
+ .query_param(new_parameter(to_created_at, key: 'to_created_at'))
532
+ .query_param(new_parameter(from_updated_at, key: 'from_updated_at'))
533
+ .query_param(new_parameter(to_updated_at, key: 'to_updated_at'))
534
+ .query_param(new_parameter(includes, key: 'includes'))
535
+ .header_param(new_parameter('application/json', key: 'accept'))
536
+ .auth(Single.new('basicAuth')))
537
+ .response(new_response_handler
538
+ .deserializer(APIHelper.method(:custom_type_deserializer))
539
+ .deserialize_into(TransactionsResponseBodyIncludes.method(:from_hash))
540
+ .is_api_response(true))
541
+ .execute
542
+ end
543
+
544
+ # Use this endpoint to permanently delete a transaction rule based on its
545
+ # unique GUID.
546
+ # @param [String] accept_version Required parameter: MX Platform API
547
+ # version.
548
+ # @param [String] transaction_rule_guid Required parameter: The unique id
549
+ # for a `transaction_rule`.
550
+ # @param [String] user_guid Required parameter: The unique identifier for a
551
+ # `user`, beginning with the prefix `USR-`.
552
+ # @return [ApiResponse] Complete http response with raw body and status code.
553
+ def delete_transaction_rule(accept_version,
554
+ transaction_rule_guid,
555
+ user_guid)
556
+ @api_call
557
+ .request(new_request_builder(HttpMethodEnum::DELETE,
558
+ '/users/{user_guid}/transaction_rules/{transaction_rule_guid}',
559
+ Server::DEFAULT)
560
+ .header_param(new_parameter(accept_version, key: 'Accept-Version')
561
+ .is_required(true))
562
+ .template_param(new_parameter(transaction_rule_guid, key: 'transaction_rule_guid')
563
+ .is_required(true)
564
+ .should_encode(true))
565
+ .template_param(new_parameter(user_guid, key: 'user_guid')
566
+ .is_required(true)
567
+ .should_encode(true))
568
+ .auth(Single.new('basicAuth')))
569
+ .response(new_response_handler
570
+ .is_response_void(true)
571
+ .is_api_response(true))
572
+ .execute
573
+ end
574
+
575
+ # Requests to this endpoint return a list of transactions associated with
576
+ # the specified `user`, across all members and accounts associated with
577
+ # that `user`. <br /><br />Enhanced transaction data may be requested using
578
+ # the `includes` parameter. To use this optional parameter, the value should
579
+ # include the optional metadata requested such as `repeating_transactions`,
580
+ # `merchants`, `classifications`, `geolocations`. For more information, see
581
+ # the [Optional Enhancement Query Parameter
582
+ # guide](/api-reference/platform-api/reference/transactions-overview#enhance
583
+ # d-transactions#optional-enhancement-query-parameter).
584
+ # @param [String] accept_version Required parameter: MX Platform API
585
+ # version.
586
+ # @param [String] user_identifier Required parameter: Use either the user
587
+ # `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs
588
+ # IDs Defined by
589
+ # You​](/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-d
590
+ # efined-by-you).
591
+ # @param [Integer] page Optional parameter: Results are paginated. Specify
592
+ # current page.
593
+ # @param [Integer] records_per_page Optional parameter: This specifies the
594
+ # number of records to be returned on each page. Defaults to `25`. The valid
595
+ # range is from `10` to `1000`. If the value exceeds `1000`, the default
596
+ # value of `25` will be used instead.
597
+ # @param [String] from_date Optional parameter: Filter transactions from
598
+ # this date. This only supports unix timestamp format. Defaults to 120 days
599
+ # ago if not provided.
600
+ # @param [String] to_date Optional parameter: Filter transactions to this
601
+ # date (at midnight). This only supports unix timestamp format. Defaults to
602
+ # 5 days forward from the day the request is made to capture pending
603
+ # transactions.
604
+ # @param [String] from_created_at Optional parameter: Filter transactions
605
+ # from the date the transaction was created. This only supports unix
606
+ # timestamp format.
607
+ # @param [String] to_created_at Optional parameter: Filter transaction to
608
+ # the date in which the transaction was created. This only supports unix
609
+ # timestamp format.
610
+ # @param [String] from_updated_at Optional parameter: Filter transactions
611
+ # from the date in which the transaction was updated. This only supports
612
+ # unix timestamp format.
613
+ # @param [String] to_updated_at Optional parameter: Filter transactions to
614
+ # the date in which the transaction was updated. This only supports unix
615
+ # timestamp format.
616
+ # @param [String] use_case Optional parameter: The use case associated with
617
+ # the member. Valid values are `PFM` and `MONEY_MOVEMENT`. For example, you
618
+ # can append either `?use_case=PFM` or `?use_case=MONEY_MOVEMENT`.
619
+ # @param [String] includes Optional parameter: Options for enhanced
620
+ # transactions. This query parameter is optional. Possible additional
621
+ # metadata: `repeating_transactions`, `merchants`, `classifications`,
622
+ # `geolocations`. The query value is format sensitive. To retrieve all
623
+ # available enhancements, append:
624
+ # `?includes=repeating_transactions,merchants,classifications,geolocations`.
625
+ # The query options may be combined to specific enhancements. For
626
+ # example, to request Repeating Transactions and Geolocation data, use:
627
+ # `?includes=repeating_transactions,geolocations`. - Repeating
628
+ # Transactions: Identifies transactions with predictable recurrence patterns
629
+ # (e.g., Bill, Income, Subscription). - Merchants: Enriches transactions
630
+ # with merchant name. - Classifications: Provides more insight into the type
631
+ # of money movement that is occurring on the transaction, whether it be
632
+ # retail or investments. - Geolocation: Provides geographic metadata.
633
+ # @return [ApiResponse] Complete http response with raw body and status code.
634
+ def list_transactions(accept_version,
635
+ user_identifier,
636
+ page: nil,
637
+ records_per_page: nil,
638
+ from_date: nil,
639
+ to_date: nil,
640
+ from_created_at: nil,
641
+ to_created_at: nil,
642
+ from_updated_at: nil,
643
+ to_updated_at: nil,
644
+ use_case: nil,
645
+ includes: nil)
646
+ @api_call
647
+ .request(new_request_builder(HttpMethodEnum::GET,
648
+ '/users/{user_identifier}/transactions',
649
+ Server::DEFAULT)
650
+ .header_param(new_parameter(accept_version, key: 'Accept-Version')
651
+ .is_required(true))
652
+ .template_param(new_parameter(user_identifier, key: 'user_identifier')
653
+ .is_required(true)
654
+ .should_encode(true))
655
+ .query_param(new_parameter(page, key: 'page'))
656
+ .query_param(new_parameter(records_per_page, key: 'records_per_page'))
657
+ .query_param(new_parameter(from_date, key: 'from_date'))
658
+ .query_param(new_parameter(to_date, key: 'to_date'))
659
+ .query_param(new_parameter(from_created_at, key: 'from_created_at'))
660
+ .query_param(new_parameter(to_created_at, key: 'to_created_at'))
661
+ .query_param(new_parameter(from_updated_at, key: 'from_updated_at'))
662
+ .query_param(new_parameter(to_updated_at, key: 'to_updated_at'))
663
+ .query_param(new_parameter(use_case, key: 'use_case'))
664
+ .query_param(new_parameter(includes, key: 'includes'))
665
+ .header_param(new_parameter('application/json', key: 'accept'))
666
+ .auth(Single.new('basicAuth')))
667
+ .response(new_response_handler
668
+ .deserializer(APIHelper.method(:custom_type_deserializer))
669
+ .deserialize_into(TransactionsResponseBodyIncludes.method(:from_hash))
670
+ .is_api_response(true))
671
+ .execute
672
+ end
673
+
674
+ # Requests to this endpoint will return the attributes of the specified
675
+ # `transaction`. To read a manual transaction, use the manual transaction
676
+ # guid in the path as the `transactionGuid`. <br /><br /> Enhanced
677
+ # transaction data may be requested using the `includes` parameter. To use
678
+ # this optional parameter, the value should include the optional metadata
679
+ # requested such as `repeating_transactions`, `merchants`,
680
+ # `classifications`, `geolocations`. For more information, see the [Optional
681
+ # Enhancement Query Parameter
682
+ # guide](/api-reference/platform-api/reference/transactions-overview#enhance
683
+ # d-transactions#optional-enhancement-query-parameter).
684
+ # @param [String] user_guid Required parameter: The unique identifier for a
685
+ # `user`, beginning with the prefix `USR-`.
686
+ # @param [String] transaction_guid Required parameter: The unique id for a
687
+ # `transaction`.
688
+ # @param [String] accept_version Required parameter: MX Platform API
689
+ # version.
690
+ # @param [String] includes Optional parameter: Options for enhanced
691
+ # transactions. This query parameter is optional. Possible additional
692
+ # metadata: `repeating_transactions`, `merchants`, `classifications`,
693
+ # `geolocations`. The query value is format sensitive. To retrieve all
694
+ # available enhancements, append:
695
+ # `?includes=repeating_transactions,merchants,classifications,geolocations`.
696
+ # The query options may be combined to specific enhancements. For
697
+ # example, to request Repeating Transactions and Geolocation data, use:
698
+ # `?includes=repeating_transactions,geolocations`. - Repeating
699
+ # Transactions: Identifies transactions with predictable recurrence patterns
700
+ # (e.g., Bill, Income, Subscription). - Merchants: Enriches transactions
701
+ # with merchant name. - Classifications: Provides more insight into the type
702
+ # of money movement that is occurring on the transaction, whether it be
703
+ # retail or investments. - Geolocation: Provides geographic metadata.
704
+ # @return [ApiResponse] Complete http response with raw body and status code.
705
+ def read_transaction(user_guid,
706
+ transaction_guid,
707
+ accept_version,
708
+ includes: nil)
709
+ @api_call
710
+ .request(new_request_builder(HttpMethodEnum::GET,
711
+ '/users/{user_guid}/transactions/{transaction_guid}',
712
+ Server::DEFAULT)
713
+ .template_param(new_parameter(user_guid, key: 'user_guid')
714
+ .is_required(true)
715
+ .should_encode(true))
716
+ .template_param(new_parameter(transaction_guid, key: 'transaction_guid')
717
+ .is_required(true)
718
+ .should_encode(true))
719
+ .header_param(new_parameter(accept_version, key: 'Accept-Version')
720
+ .is_required(true))
721
+ .query_param(new_parameter(includes, key: 'includes'))
722
+ .header_param(new_parameter('application/json', key: 'accept'))
723
+ .auth(Single.new('basicAuth')))
724
+ .response(new_response_handler
725
+ .deserializer(APIHelper.method(:custom_type_deserializer))
726
+ .deserialize_into(TransactionsResponseBodyIncludes.method(:from_hash))
727
+ .is_api_response(true))
728
+ .execute
729
+ end
730
+
731
+ # Use this endpoint to update the `description` of a specific transaction
732
+ # according to its unique GUID.
733
+ # @param [String] user_guid Required parameter: The unique identifier for a
734
+ # `user`, beginning with the prefix `USR-`.
735
+ # @param [String] transaction_guid Required parameter: The unique id for a
736
+ # `transaction`.
737
+ # @param [String] accept_version Required parameter: MX Platform API
738
+ # version.
739
+ # @param [TransactionUpdateRequestBody] body Required parameter: Transaction
740
+ # object to be updated with a new description
741
+ # @return [ApiResponse] Complete http response with raw body and status code.
742
+ def update_transaction(user_guid,
743
+ transaction_guid,
744
+ accept_version,
745
+ body)
746
+ @api_call
747
+ .request(new_request_builder(HttpMethodEnum::PUT,
748
+ '/users/{user_guid}/transactions/{transaction_guid}',
749
+ Server::DEFAULT)
750
+ .template_param(new_parameter(user_guid, key: 'user_guid')
751
+ .is_required(true)
752
+ .should_encode(true))
753
+ .template_param(new_parameter(transaction_guid, key: 'transaction_guid')
754
+ .is_required(true)
755
+ .should_encode(true))
756
+ .header_param(new_parameter(accept_version, key: 'Accept-Version')
757
+ .is_required(true))
758
+ .header_param(new_parameter('application/json', key: 'Content-Type'))
759
+ .body_param(new_parameter(body)
760
+ .is_required(true))
761
+ .header_param(new_parameter('application/json', key: 'accept'))
762
+ .body_serializer(proc do |param| param.to_json unless param.nil? end)
763
+ .auth(Single.new('basicAuth')))
764
+ .response(new_response_handler
765
+ .deserializer(APIHelper.method(:custom_type_deserializer))
766
+ .deserialize_into(TransactionResponseBody.method(:from_hash))
767
+ .is_api_response(true))
768
+ .execute
769
+ end
770
+
771
+ # Delete a manual transaction. In the path, use the manual transaction guid
772
+ # as the `transaction_guid`, such as
773
+ # `MAN-810828b0-5210-4878-9bd3-f4ce514f90c4`.
774
+ # @param [String] user_guid Required parameter: The unique identifier for a
775
+ # `user`, beginning with the prefix `USR-`.
776
+ # @param [String] transaction_guid Required parameter: The unique id for a
777
+ # `transaction`.
778
+ # @param [String] accept_version Required parameter: MX Platform API
779
+ # version.
780
+ # @return [ApiResponse] Complete http response with raw body and status code.
781
+ def delete_manual_transactions(user_guid,
782
+ transaction_guid,
783
+ accept_version)
784
+ @api_call
785
+ .request(new_request_builder(HttpMethodEnum::DELETE,
786
+ '/users/{user_guid}/transactions/{transaction_guid}',
787
+ Server::DEFAULT)
788
+ .template_param(new_parameter(user_guid, key: 'user_guid')
789
+ .is_required(true)
790
+ .should_encode(true))
791
+ .template_param(new_parameter(transaction_guid, key: 'transaction_guid')
792
+ .is_required(true)
793
+ .should_encode(true))
794
+ .header_param(new_parameter(accept_version, key: 'Accept-Version')
795
+ .is_required(true))
796
+ .auth(Single.new('basicAuth')))
797
+ .response(new_response_handler
798
+ .is_response_void(true)
799
+ .is_api_response(true))
800
+ .execute
801
+ end
802
+
803
+ # Requests to this endpoint will return the attributes of the specified
804
+ # `transaction`. To read a manual transaction, use the manual transaction
805
+ # guid in the path as the `transactionGuid`. <br /><br /> Enhanced
806
+ # transaction data may be requested using the `includes` parameter. To use
807
+ # this optional parameter, the value should include the optional metadata
808
+ # requested such as `repeating_transactions`, `merchants`,
809
+ # `classifications`, `geolocations`. For more information, see the [Optional
810
+ # Enhancement Query Parameter
811
+ # guide](/api-reference/platform-api/reference/transactions-overview#enhance
812
+ # d-transactions#optional-enhancement-query-parameter).
813
+ # @param [String] user_identifier Required parameter: Use either the user
814
+ # `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs
815
+ # IDs Defined by
816
+ # You​](/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-d
817
+ # efined-by-you).
818
+ # @param [String] member_identifier Required parameter: Use either the
819
+ # member `id` you defined or the MX-defined member `guid`. See [MX-Defined
820
+ # GUIDs vs IDs Defined by
821
+ # You](/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-de
822
+ # fined-by-you).
823
+ # @param [String] account_identifier Required parameter: Use either the
824
+ # account `id` you defined or the MX-defined account `guid`. See [MX-Defined
825
+ # GUIDs vs IDs Defined by
826
+ # You](/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-de
827
+ # fined-by-you).
828
+ # @param [String] transaction_identifier Required parameter: Use either the
829
+ # transaction `id` you defined or the MX-defined transaction `guid`. See
830
+ # [MX-Defined GUIDs vs IDs Defined by
831
+ # You​](/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-d
832
+ # efined-by-you).
833
+ # @param [String] accept_version Required parameter: MX Platform API
834
+ # version.
835
+ # @param [String] includes Optional parameter: Options for enhanced
836
+ # transactions. This query parameter is optional. Possible additional
837
+ # metadata: `repeating_transactions`, `merchants`, `classifications`,
838
+ # `geolocations`. The query value is format sensitive. To retrieve all
839
+ # available enhancements, append:
840
+ # `?includes=repeating_transactions,merchants,classifications,geolocations`.
841
+ # The query options may be combined to specific enhancements. For
842
+ # example, to request Repeating Transactions and Geolocation data, use:
843
+ # `?includes=repeating_transactions,geolocations`. - Repeating
844
+ # Transactions: Identifies transactions with predictable recurrence patterns
845
+ # (e.g., Bill, Income, Subscription). - Merchants: Enriches transactions
846
+ # with merchant name. - Classifications: Provides more insight into the type
847
+ # of money movement that is occurring on the transaction, whether it be
848
+ # retail or investments. - Geolocation: Provides geographic metadata.
849
+ # @return [ApiResponse] Complete http response with raw body and status code.
850
+ def read_transaction_by_account(user_identifier,
851
+ member_identifier,
852
+ account_identifier,
853
+ transaction_identifier,
854
+ accept_version,
855
+ includes: nil)
856
+ @api_call
857
+ .request(new_request_builder(HttpMethodEnum::GET,
858
+ '/users/{user_identifier}/members/{member_identifier}/accounts/{account_identifier}/transactions/{transaction_identifier}',
859
+ Server::DEFAULT)
860
+ .template_param(new_parameter(user_identifier, key: 'user_identifier')
861
+ .is_required(true)
862
+ .should_encode(true))
863
+ .template_param(new_parameter(member_identifier, key: 'member_identifier')
864
+ .is_required(true)
865
+ .should_encode(true))
866
+ .template_param(new_parameter(account_identifier, key: 'account_identifier')
867
+ .is_required(true)
868
+ .should_encode(true))
869
+ .template_param(new_parameter(transaction_identifier, key: 'transaction_identifier')
870
+ .is_required(true)
871
+ .should_encode(true))
872
+ .header_param(new_parameter(accept_version, key: 'Accept-Version')
873
+ .is_required(true))
874
+ .query_param(new_parameter(includes, key: 'includes'))
875
+ .header_param(new_parameter('application/json', key: 'accept'))
876
+ .auth(Single.new('basicAuth')))
877
+ .response(new_response_handler
878
+ .deserializer(APIHelper.method(:custom_type_deserializer))
879
+ .deserialize_into(TransactionsResponseBodyIncludes.method(:from_hash))
880
+ .is_api_response(true))
881
+ .execute
882
+ end
883
+
884
+ # Use this endpoint to update the `description` of a specific transaction
885
+ # according to its unique GUID.
886
+ # @param [String] user_identifier Required parameter: Use either the user
887
+ # `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs
888
+ # IDs Defined by
889
+ # You​](/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-d
890
+ # efined-by-you).
891
+ # @param [String] member_identifier Required parameter: Use either the
892
+ # member `id` you defined or the MX-defined member `guid`. See [MX-Defined
893
+ # GUIDs vs IDs Defined by
894
+ # You](/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-de
895
+ # fined-by-you).
896
+ # @param [String] account_identifier Required parameter: Use either the
897
+ # account `id` you defined or the MX-defined account `guid`. See [MX-Defined
898
+ # GUIDs vs IDs Defined by
899
+ # You](/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-de
900
+ # fined-by-you).
901
+ # @param [String] transaction_identifier Required parameter: Use either the
902
+ # transaction `id` you defined or the MX-defined transaction `guid`. See
903
+ # [MX-Defined GUIDs vs IDs Defined by
904
+ # You​](/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-d
905
+ # efined-by-you).
906
+ # @param [String] accept_version Required parameter: MX Platform API
907
+ # version.
908
+ # @param [TransactionUpdateRequestBody] body Required parameter: Transaction
909
+ # object to be updated with a new description
910
+ # @return [ApiResponse] Complete http response with raw body and status code.
911
+ def update_transaction_by_account(user_identifier,
912
+ member_identifier,
913
+ account_identifier,
914
+ transaction_identifier,
915
+ accept_version,
916
+ body)
917
+ @api_call
918
+ .request(new_request_builder(HttpMethodEnum::PUT,
919
+ '/users/{user_identifier}/members/{member_identifier}/accounts/{account_identifier}/transactions/{transaction_identifier}',
920
+ Server::DEFAULT)
921
+ .template_param(new_parameter(user_identifier, key: 'user_identifier')
922
+ .is_required(true)
923
+ .should_encode(true))
924
+ .template_param(new_parameter(member_identifier, key: 'member_identifier')
925
+ .is_required(true)
926
+ .should_encode(true))
927
+ .template_param(new_parameter(account_identifier, key: 'account_identifier')
928
+ .is_required(true)
929
+ .should_encode(true))
930
+ .template_param(new_parameter(transaction_identifier, key: 'transaction_identifier')
931
+ .is_required(true)
932
+ .should_encode(true))
933
+ .header_param(new_parameter(accept_version, key: 'Accept-Version')
934
+ .is_required(true))
935
+ .header_param(new_parameter('application/json', key: 'Content-Type'))
936
+ .body_param(new_parameter(body)
937
+ .is_required(true))
938
+ .header_param(new_parameter('application/json', key: 'accept'))
939
+ .body_serializer(proc do |param| param.to_json unless param.nil? end)
940
+ .auth(Single.new('basicAuth')))
941
+ .response(new_response_handler
942
+ .deserializer(APIHelper.method(:custom_type_deserializer))
943
+ .deserialize_into(TransactionResponseBody.method(:from_hash))
944
+ .is_api_response(true))
945
+ .execute
946
+ end
947
+
948
+ # Retrieve a list of all recurring transactions for a user. <br /><br />For
949
+ # more see the [Repeating Transactions
950
+ # guide](/api-reference/platform-api/reference/transactions-overview#repeati
951
+ # ng-transactions).
952
+ # @param [String] accept_version Required parameter: MX Platform API
953
+ # version.
954
+ # @param [String] user_guid Required parameter: The unique identifier for a
955
+ # `user`, beginning with the prefix `USR-`.
956
+ # @return [ApiResponse] Complete http response with raw body and status code.
957
+ def repeating_transactions(accept_version,
958
+ user_guid)
959
+ @api_call
960
+ .request(new_request_builder(HttpMethodEnum::GET,
961
+ '/users/{user_guid}/repeating_transactions',
962
+ Server::DEFAULT)
963
+ .header_param(new_parameter(accept_version, key: 'Accept-Version')
964
+ .is_required(true))
965
+ .template_param(new_parameter(user_guid, key: 'user_guid')
966
+ .is_required(true)
967
+ .should_encode(true))
968
+ .header_param(new_parameter('application/json', key: 'accept'))
969
+ .auth(Single.new('basicAuth')))
970
+ .response(new_response_handler
971
+ .deserializer(APIHelper.method(:custom_type_deserializer))
972
+ .deserialize_into(RepeatingTransactionsResponseBody.method(:from_hash))
973
+ .is_api_response(true))
974
+ .execute
975
+ end
976
+
977
+ # Get a Specific Repeating Transaction.
978
+ # @param [String] accept_version Required parameter: MX Platform API
979
+ # version.
980
+ # @param [String] user_guid Required parameter: The unique identifier for a
981
+ # `user`, beginning with the prefix `USR-`.
982
+ # @param [String] repeating_transaction_guid Required parameter: The unique
983
+ # id for a recurring transaction.
984
+ # @return [ApiResponse] Complete http response with raw body and status code.
985
+ def specific_repeating_transaction(accept_version,
986
+ user_guid,
987
+ repeating_transaction_guid)
988
+ @api_call
989
+ .request(new_request_builder(HttpMethodEnum::GET,
990
+ '/users/{user_guid}/repeating_transactions/{repeating_transaction_guid}',
991
+ Server::DEFAULT)
992
+ .header_param(new_parameter(accept_version, key: 'Accept-Version')
993
+ .is_required(true))
994
+ .template_param(new_parameter(user_guid, key: 'user_guid')
995
+ .is_required(true)
996
+ .should_encode(true))
997
+ .template_param(new_parameter(repeating_transaction_guid, key: 'repeating_transaction_guid')
998
+ .is_required(true)
999
+ .should_encode(true))
1000
+ .header_param(new_parameter('application/json', key: 'accept'))
1001
+ .auth(Single.new('basicAuth')))
1002
+ .response(new_response_handler
1003
+ .deserializer(APIHelper.method(:custom_type_deserializer))
1004
+ .deserialize_into(RepeatingTransactionsResponseBody.method(:from_hash))
1005
+ .is_api_response(true))
1006
+ .execute
1007
+ end
1008
+
1009
+ # This endpoint deletes all split transactions linked to a parent
1010
+ # transaction, but it leaves the parent transaction active. This request
1011
+ # will also update the parent transaction's has_been_split field to false.
1012
+ # This endpoint accepts the optional MX-Skip-Webhook header.
1013
+ # @param [String] transaction_guid Required parameter: The unique id for a
1014
+ # `transaction`.
1015
+ # @param [String] user_guid Required parameter: The unique identifier for a
1016
+ # `user`, beginning with the prefix `USR-`.
1017
+ # @param [String] accept_version Required parameter: MX Platform API
1018
+ # version.
1019
+ # @return [ApiResponse] Complete http response with raw body and status code.
1020
+ def delete_split_transactions(transaction_guid,
1021
+ user_guid,
1022
+ accept_version)
1023
+ @api_call
1024
+ .request(new_request_builder(HttpMethodEnum::DELETE,
1025
+ '/users/{user_guid}/transactions/{transaction_guid}/split',
1026
+ Server::DEFAULT)
1027
+ .template_param(new_parameter(transaction_guid, key: 'transaction_guid')
1028
+ .is_required(true)
1029
+ .should_encode(true))
1030
+ .template_param(new_parameter(user_guid, key: 'user_guid')
1031
+ .is_required(true)
1032
+ .should_encode(true))
1033
+ .header_param(new_parameter(accept_version, key: 'Accept-Version')
1034
+ .is_required(true))
1035
+ .auth(Single.new('basicAuth')))
1036
+ .response(new_response_handler
1037
+ .is_response_void(true)
1038
+ .is_api_response(true))
1039
+ .execute
1040
+ end
1041
+
1042
+ # This endpoint creates two or more child transactions that are branched
1043
+ # from a previous transaction. This endpoint allows you to link multiple
1044
+ # categories, descriptions, and amounts to a parent transaction. When a
1045
+ # split transaction is created, the parent transaction's `has_been_split`
1046
+ # field will automatically be updated to true and the child transactions'
1047
+ # `parent_guid` will have the transaction guid of the parent. The total
1048
+ # amount of the child transactions must equal the amount of the parent
1049
+ # transaction. Once a transaction has been split it can't be split again.
1050
+ # In order to re-split a transaction, it must first be un-split. This can be
1051
+ # done by calling the Delete Split Transactions endpoint. Calling this
1052
+ # endpoint will delete the existing child transactions and update the parent
1053
+ # transaction's `has_been_split` field to false. You can then re-split the
1054
+ # parent transaction by calling Create Split Transaction again.
1055
+ # @param [String] transaction_guid Required parameter: The unique id for a
1056
+ # `transaction`.
1057
+ # @param [String] user_guid Required parameter: The unique identifier for a
1058
+ # `user`, beginning with the prefix `USR-`.
1059
+ # @param [String] accept_version Required parameter: MX Platform API
1060
+ # version.
1061
+ # @param [SplitTransactionRequestBody] body Optional parameter: TODO: type
1062
+ # description here
1063
+ # @return [ApiResponse] Complete http response with raw body and status code.
1064
+ def create_split_transactions(transaction_guid,
1065
+ user_guid,
1066
+ accept_version,
1067
+ body: nil)
1068
+ @api_call
1069
+ .request(new_request_builder(HttpMethodEnum::POST,
1070
+ '/users/{user_guid}/transactions/{transaction_guid}/split',
1071
+ Server::DEFAULT)
1072
+ .template_param(new_parameter(transaction_guid, key: 'transaction_guid')
1073
+ .is_required(true)
1074
+ .should_encode(true))
1075
+ .template_param(new_parameter(user_guid, key: 'user_guid')
1076
+ .is_required(true)
1077
+ .should_encode(true))
1078
+ .header_param(new_parameter(accept_version, key: 'Accept-Version')
1079
+ .is_required(true))
1080
+ .header_param(new_parameter('application/json', key: 'Content-Type'))
1081
+ .body_param(new_parameter(body))
1082
+ .header_param(new_parameter('application/json', key: 'accept'))
1083
+ .body_serializer(proc do |param| param.to_json unless param.nil? end)
1084
+ .auth(Single.new('basicAuth')))
1085
+ .response(new_response_handler
1086
+ .deserializer(APIHelper.method(:custom_type_deserializer))
1087
+ .deserialize_into(SplitTransactionsResponseBody.method(:from_hash))
1088
+ .is_api_response(true))
1089
+ .execute
1090
+ end
1091
+
1092
+ # This endpoint deletes all split transactions linked to a parent
1093
+ # transaction, but it leaves the parent transaction active. This request
1094
+ # will also update the parent transaction's has_been_split field to false.
1095
+ # This endpoint accepts the optional MX-Skip-Webhook header.
1096
+ # @param [String] user_identifier Required parameter: Use either the user
1097
+ # `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs
1098
+ # IDs Defined by
1099
+ # You​](/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-d
1100
+ # efined-by-you).
1101
+ # @param [String] member_identifier Required parameter: Use either the
1102
+ # member `id` you defined or the MX-defined member `guid`. See [MX-Defined
1103
+ # GUIDs vs IDs Defined by
1104
+ # You](/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-de
1105
+ # fined-by-you).
1106
+ # @param [String] account_identifier Required parameter: Use either the
1107
+ # account `id` you defined or the MX-defined account `guid`. See [MX-Defined
1108
+ # GUIDs vs IDs Defined by
1109
+ # You](/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-de
1110
+ # fined-by-you).
1111
+ # @param [String] transaction_identifier Required parameter: Use either the
1112
+ # transaction `id` you defined or the MX-defined transaction `guid`. See
1113
+ # [MX-Defined GUIDs vs IDs Defined by
1114
+ # You​](/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-d
1115
+ # efined-by-you).
1116
+ # @param [String] accept_version Required parameter: MX Platform API
1117
+ # version.
1118
+ # @return [ApiResponse] Complete http response with raw body and status code.
1119
+ def delete_split_transactionsby_account(user_identifier,
1120
+ member_identifier,
1121
+ account_identifier,
1122
+ transaction_identifier,
1123
+ accept_version)
1124
+ @api_call
1125
+ .request(new_request_builder(HttpMethodEnum::DELETE,
1126
+ '/users/{user_identifier}/members/{member_identifier}/accounts/{account_identifier}/transactions/{transaction_identifier}/split',
1127
+ Server::DEFAULT)
1128
+ .template_param(new_parameter(user_identifier, key: 'user_identifier')
1129
+ .is_required(true)
1130
+ .should_encode(true))
1131
+ .template_param(new_parameter(member_identifier, key: 'member_identifier')
1132
+ .is_required(true)
1133
+ .should_encode(true))
1134
+ .template_param(new_parameter(account_identifier, key: 'account_identifier')
1135
+ .is_required(true)
1136
+ .should_encode(true))
1137
+ .template_param(new_parameter(transaction_identifier, key: 'transaction_identifier')
1138
+ .is_required(true)
1139
+ .should_encode(true))
1140
+ .header_param(new_parameter(accept_version, key: 'Accept-Version')
1141
+ .is_required(true))
1142
+ .auth(Single.new('basicAuth')))
1143
+ .response(new_response_handler
1144
+ .is_response_void(true)
1145
+ .is_api_response(true))
1146
+ .execute
1147
+ end
1148
+
1149
+ # This endpoint creates two or more child transactions that are branched
1150
+ # from a previous transaction. This endpoint allows you to link multiple
1151
+ # categories, descriptions, and amounts to a parent transaction. When a
1152
+ # split transaction is created, the parent transaction's `has_been_split`
1153
+ # field will automatically be updated to true and the child transactions'
1154
+ # `parent_guid` will have the transaction guid of the parent. The total
1155
+ # amount of the child transactions must equal the amount of the parent
1156
+ # transaction. Once a transaction has been split it can't be split again.
1157
+ # In order to re-split a transaction, it must first be un-split. This can be
1158
+ # done by calling the Delete Split Transactions endpoint. Calling this
1159
+ # endpoint will delete the existing child transactions and update the parent
1160
+ # transaction's `has_been_split` field to false. You can then re-split the
1161
+ # parent transaction by calling Create Split Transaction again.
1162
+ # @param [String] user_identifier Required parameter: Use either the user
1163
+ # `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs
1164
+ # IDs Defined by
1165
+ # You​](/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-d
1166
+ # efined-by-you).
1167
+ # @param [String] member_identifier Required parameter: Use either the
1168
+ # member `id` you defined or the MX-defined member `guid`. See [MX-Defined
1169
+ # GUIDs vs IDs Defined by
1170
+ # You](/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-de
1171
+ # fined-by-you).
1172
+ # @param [String] account_identifier Required parameter: Use either the
1173
+ # account `id` you defined or the MX-defined account `guid`. See [MX-Defined
1174
+ # GUIDs vs IDs Defined by
1175
+ # You](/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-de
1176
+ # fined-by-you).
1177
+ # @param [String] transaction_identifier Required parameter: Use either the
1178
+ # transaction `id` you defined or the MX-defined transaction `guid`. See
1179
+ # [MX-Defined GUIDs vs IDs Defined by
1180
+ # You​](/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-d
1181
+ # efined-by-you).
1182
+ # @param [String] accept_version Required parameter: MX Platform API
1183
+ # version.
1184
+ # @param [SplitTransactionRequestBody] body Optional parameter: TODO: type
1185
+ # description here
1186
+ # @return [ApiResponse] Complete http response with raw body and status code.
1187
+ def create_split_transactionsby_account(user_identifier,
1188
+ member_identifier,
1189
+ account_identifier,
1190
+ transaction_identifier,
1191
+ accept_version,
1192
+ body: nil)
1193
+ @api_call
1194
+ .request(new_request_builder(HttpMethodEnum::POST,
1195
+ '/users/{user_identifier}/members/{member_identifier}/accounts/{account_identifier}/transactions/{transaction_identifier}/split',
1196
+ Server::DEFAULT)
1197
+ .template_param(new_parameter(user_identifier, key: 'user_identifier')
1198
+ .is_required(true)
1199
+ .should_encode(true))
1200
+ .template_param(new_parameter(member_identifier, key: 'member_identifier')
1201
+ .is_required(true)
1202
+ .should_encode(true))
1203
+ .template_param(new_parameter(account_identifier, key: 'account_identifier')
1204
+ .is_required(true)
1205
+ .should_encode(true))
1206
+ .template_param(new_parameter(transaction_identifier, key: 'transaction_identifier')
1207
+ .is_required(true)
1208
+ .should_encode(true))
1209
+ .header_param(new_parameter(accept_version, key: 'Accept-Version')
1210
+ .is_required(true))
1211
+ .header_param(new_parameter('application/json', key: 'Content-Type'))
1212
+ .body_param(new_parameter(body))
1213
+ .header_param(new_parameter('application/json', key: 'accept'))
1214
+ .body_serializer(proc do |param| param.to_json unless param.nil? end)
1215
+ .auth(Single.new('basicAuth')))
1216
+ .response(new_response_handler
1217
+ .deserializer(APIHelper.method(:custom_type_deserializer))
1218
+ .deserialize_into(SplitTransactionsResponseBody.method(:from_hash))
1219
+ .is_api_response(true))
1220
+ .execute
1221
+ end
1222
+ end
1223
+ end