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,188 @@
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
+ # UsersApi
8
+ class UsersApi < BaseApi
9
+ # Use this endpoint to list every user you've created in the MX Platform
10
+ # API.
11
+ # @param [String] accept_version Required parameter: MX Platform API
12
+ # version.
13
+ # @param [Integer] page Optional parameter: Results are paginated. Specify
14
+ # current page.
15
+ # @param [Integer] records_per_page Optional parameter: This specifies the
16
+ # number of records to be returned on each page. Defaults to `25`. The valid
17
+ # range is from `10` to `1000`. If the value exceeds `1000`, the default
18
+ # value of `25` will be used instead.
19
+ # @param [String] id Optional parameter: The user `id` to search for.
20
+ # @param [String] email Optional parameter: The user `email` to search
21
+ # for.
22
+ # @param [TrueClass | FalseClass] is_disabled Optional parameter: Search for
23
+ # users that are diabled.
24
+ # @return [ApiResponse] Complete http response with raw body and status code.
25
+ def list_users(accept_version,
26
+ page: nil,
27
+ records_per_page: nil,
28
+ id: nil,
29
+ email: nil,
30
+ is_disabled: nil)
31
+ @api_call
32
+ .request(new_request_builder(HttpMethodEnum::GET,
33
+ '/users',
34
+ Server::DEFAULT)
35
+ .header_param(new_parameter(accept_version, key: 'Accept-Version')
36
+ .is_required(true))
37
+ .query_param(new_parameter(page, key: 'page'))
38
+ .query_param(new_parameter(records_per_page, key: 'records_per_page'))
39
+ .query_param(new_parameter(id, key: 'id'))
40
+ .query_param(new_parameter(email, key: 'email'))
41
+ .query_param(new_parameter(is_disabled, key: 'is_disabled'))
42
+ .header_param(new_parameter('application/json', key: 'accept'))
43
+ .auth(Single.new('basicAuth')))
44
+ .response(new_response_handler
45
+ .deserializer(APIHelper.method(:custom_type_deserializer))
46
+ .deserialize_into(UsersResponseBody.method(:from_hash))
47
+ .is_api_response(true))
48
+ .execute
49
+ end
50
+
51
+ # Use this endpoint to create a new user. The API will respond with the
52
+ # newly-created user object if successful, containing a `guid` that you'll
53
+ # set as the `user_guid` in other requests when required. Disabling a user
54
+ # means that accounts and transactions associated with it will not be
55
+ # updated in the background by MX. It will also restrict access to that
56
+ # user’s data until they are no longer disabled.
57
+ # @param [String] accept_version Required parameter: MX Platform API
58
+ # version.
59
+ # @param [UserCreateRequestBody] body Required parameter: User object to be
60
+ # created. (None of these parameters are required, but the user object
61
+ # cannot be empty)
62
+ # @return [ApiResponse] Complete http response with raw body and status code.
63
+ def create_user(accept_version,
64
+ body)
65
+ @api_call
66
+ .request(new_request_builder(HttpMethodEnum::POST,
67
+ '/users',
68
+ Server::DEFAULT)
69
+ .header_param(new_parameter(accept_version, key: 'Accept-Version')
70
+ .is_required(true))
71
+ .header_param(new_parameter('application/json', key: 'Content-Type'))
72
+ .body_param(new_parameter(body)
73
+ .is_required(true))
74
+ .header_param(new_parameter('application/json', key: 'accept'))
75
+ .body_serializer(proc do |param| param.to_json unless param.nil? end)
76
+ .auth(Single.new('basicAuth')))
77
+ .response(new_response_handler
78
+ .deserializer(APIHelper.method(:custom_type_deserializer))
79
+ .deserialize_into(UserResponseBody.method(:from_hash))
80
+ .is_api_response(true))
81
+ .execute
82
+ end
83
+
84
+ # Use this endpoint to delete the specified `user`. The response will have a
85
+ # status of `204 No Content` without an object.
86
+ # :::warning
87
+ # Deleting a user is permanent. Deleted users can never be restored. For
88
+ # more info, see [Deleting
89
+ # Objects](/api-reference/platform-api/overview/deleting-objects).
90
+ # :::
91
+ # @param [String] accept_version Required parameter: MX Platform API
92
+ # version.
93
+ # @param [String] accept Required parameter: Specifies the media type
94
+ # expected in the response.
95
+ # @param [String] user_identifier Required parameter: Use either the user
96
+ # `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs
97
+ # IDs Defined by
98
+ # You​](/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-d
99
+ # efined-by-you).
100
+ # @return [ApiResponse] Complete http response with raw body and status code.
101
+ def delete_user(accept_version,
102
+ accept,
103
+ user_identifier)
104
+ @api_call
105
+ .request(new_request_builder(HttpMethodEnum::DELETE,
106
+ '/users/{user_identifier}',
107
+ Server::DEFAULT)
108
+ .header_param(new_parameter(accept_version, key: 'Accept-Version')
109
+ .is_required(true))
110
+ .header_param(new_parameter(accept, key: 'Accept')
111
+ .is_required(true))
112
+ .template_param(new_parameter(user_identifier, key: 'user_identifier')
113
+ .is_required(true)
114
+ .should_encode(true))
115
+ .auth(Single.new('basicAuth')))
116
+ .response(new_response_handler
117
+ .is_response_void(true)
118
+ .is_api_response(true))
119
+ .execute
120
+ end
121
+
122
+ # Use this endpoint to read the attributes of a specific user.
123
+ # @param [String] accept_version Required parameter: MX Platform API
124
+ # version.
125
+ # @param [String] user_identifier Required parameter: Use either the user
126
+ # `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs
127
+ # IDs Defined by
128
+ # You​](/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-d
129
+ # efined-by-you).
130
+ # @return [ApiResponse] Complete http response with raw body and status code.
131
+ def read_user(accept_version,
132
+ user_identifier)
133
+ @api_call
134
+ .request(new_request_builder(HttpMethodEnum::GET,
135
+ '/users/{user_identifier}',
136
+ Server::DEFAULT)
137
+ .header_param(new_parameter(accept_version, key: 'Accept-Version')
138
+ .is_required(true))
139
+ .template_param(new_parameter(user_identifier, key: 'user_identifier')
140
+ .is_required(true)
141
+ .should_encode(true))
142
+ .header_param(new_parameter('application/json', key: 'accept'))
143
+ .auth(Single.new('basicAuth')))
144
+ .response(new_response_handler
145
+ .deserializer(APIHelper.method(:custom_type_deserializer))
146
+ .deserialize_into(UserResponseBody.method(:from_hash))
147
+ .is_api_response(true))
148
+ .execute
149
+ end
150
+
151
+ # Use this endpoint to update the attributes of the specified user.
152
+ # @param [String] accept_version Required parameter: MX Platform API
153
+ # version.
154
+ # @param [String] user_identifier Required parameter: Use either the user
155
+ # `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs
156
+ # IDs Defined by
157
+ # You​](/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-d
158
+ # efined-by-you).
159
+ # @param [UserUpdateRequestBody] body Required parameter: User object to be
160
+ # updated (None of these parameters are required, but the user object cannot
161
+ # be empty.)
162
+ # @return [ApiResponse] Complete http response with raw body and status code.
163
+ def update_user(accept_version,
164
+ user_identifier,
165
+ body)
166
+ @api_call
167
+ .request(new_request_builder(HttpMethodEnum::PUT,
168
+ '/users/{user_identifier}',
169
+ Server::DEFAULT)
170
+ .header_param(new_parameter(accept_version, key: 'Accept-Version')
171
+ .is_required(true))
172
+ .template_param(new_parameter(user_identifier, key: 'user_identifier')
173
+ .is_required(true)
174
+ .should_encode(true))
175
+ .header_param(new_parameter('application/json', key: 'Content-Type'))
176
+ .body_param(new_parameter(body)
177
+ .is_required(true))
178
+ .header_param(new_parameter('application/json', key: 'accept'))
179
+ .body_serializer(proc do |param| param.to_json unless param.nil? end)
180
+ .auth(Single.new('basicAuth')))
181
+ .response(new_response_handler
182
+ .deserializer(APIHelper.method(:custom_type_deserializer))
183
+ .deserialize_into(UserResponseBody.method(:from_hash))
184
+ .is_api_response(true))
185
+ .execute
186
+ end
187
+ end
188
+ end
@@ -0,0 +1,114 @@
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
+ # VerifiableCredentialsApi
8
+ class VerifiableCredentialsApi < BaseApi
9
+ # Get an MX-issued verifiable credential of a user's identity data.
10
+ # @param [String] accept_version Required parameter: MX Platform API
11
+ # version.
12
+ # @param [String] user_guid Required parameter: The unique identifier for a
13
+ # `user`, beginning with the prefix `USR-`.
14
+ # @param [String] member_guid Required parameter: The unique id for a
15
+ # `member`.
16
+ # @return [ApiResponse] Complete http response with raw body and status code.
17
+ def get_identity_data(accept_version,
18
+ user_guid,
19
+ member_guid)
20
+ @api_call
21
+ .request(new_request_builder(HttpMethodEnum::GET,
22
+ '/vc/users/{user_guid}/members/{member_guid}/customers',
23
+ Server::DEFAULT)
24
+ .header_param(new_parameter(accept_version, key: 'Accept-Version')
25
+ .is_required(true))
26
+ .template_param(new_parameter(user_guid, key: 'user_guid')
27
+ .is_required(true)
28
+ .should_encode(true))
29
+ .template_param(new_parameter(member_guid, key: 'member_guid')
30
+ .is_required(true)
31
+ .should_encode(true))
32
+ .header_param(new_parameter('application/json', key: 'accept'))
33
+ .auth(Single.new('basicAuth')))
34
+ .response(new_response_handler
35
+ .deserializer(APIHelper.method(:custom_type_deserializer))
36
+ .deserialize_into(VcResponse.method(:from_hash))
37
+ .is_api_response(true))
38
+ .execute
39
+ end
40
+
41
+ # Get an MX-issued verifiable credential of a user's accounts data.
42
+ # @param [String] accept_version Required parameter: MX Platform API
43
+ # version.
44
+ # @param [String] user_guid Required parameter: The unique identifier for a
45
+ # `user`, beginning with the prefix `USR-`.
46
+ # @param [String] member_guid Required parameter: The unique id for a
47
+ # `member`.
48
+ # @return [ApiResponse] Complete http response with raw body and status code.
49
+ def get_accounts_data(accept_version,
50
+ user_guid,
51
+ member_guid)
52
+ @api_call
53
+ .request(new_request_builder(HttpMethodEnum::GET,
54
+ '/vc/users/{user_guid}/members/{member_guid}/accounts',
55
+ Server::DEFAULT)
56
+ .header_param(new_parameter(accept_version, key: 'Accept-Version')
57
+ .is_required(true))
58
+ .template_param(new_parameter(user_guid, key: 'user_guid')
59
+ .is_required(true)
60
+ .should_encode(true))
61
+ .template_param(new_parameter(member_guid, key: 'member_guid')
62
+ .is_required(true)
63
+ .should_encode(true))
64
+ .header_param(new_parameter('application/json', key: 'accept'))
65
+ .auth(Single.new('basicAuth')))
66
+ .response(new_response_handler
67
+ .deserializer(APIHelper.method(:custom_type_deserializer))
68
+ .deserialize_into(VcResponse.method(:from_hash))
69
+ .is_api_response(true))
70
+ .execute
71
+ end
72
+
73
+ # Get an MX-issued verifiable credential of a user's transaction data.
74
+ # @param [String] accept_version Required parameter: MX Platform API
75
+ # version.
76
+ # @param [String] user_guid Required parameter: The unique identifier for a
77
+ # `user`, beginning with the prefix `USR-`.
78
+ # @param [String] account_guid Required parameter: The unique id for an
79
+ # `account`.
80
+ # @param [String] start_time Optional parameter: Filter transactions from
81
+ # this date. Must be in the format YYYY-MM-DD. The range is limited to 1
82
+ # year.
83
+ # @param [String] end_time Optional parameter: Filter transactions to this
84
+ # date. Must be in the format YYYY-MM-DD. The range is limited to 1 year.
85
+ # @return [ApiResponse] Complete http response with raw body and status code.
86
+ def get_transactions_data(accept_version,
87
+ user_guid,
88
+ account_guid,
89
+ start_time: nil,
90
+ end_time: nil)
91
+ @api_call
92
+ .request(new_request_builder(HttpMethodEnum::GET,
93
+ '/vc/users/{user_guid}/accounts/{account_guid}/transactions',
94
+ Server::DEFAULT)
95
+ .header_param(new_parameter(accept_version, key: 'Accept-Version')
96
+ .is_required(true))
97
+ .template_param(new_parameter(user_guid, key: 'user_guid')
98
+ .is_required(true)
99
+ .should_encode(true))
100
+ .template_param(new_parameter(account_guid, key: 'account_guid')
101
+ .is_required(true)
102
+ .should_encode(true))
103
+ .query_param(new_parameter(start_time, key: 'startTime'))
104
+ .query_param(new_parameter(end_time, key: 'endTime'))
105
+ .header_param(new_parameter('application/json', key: 'accept'))
106
+ .auth(Single.new('basicAuth')))
107
+ .response(new_response_handler
108
+ .deserializer(APIHelper.method(:custom_type_deserializer))
109
+ .deserialize_into(VcResponse.method(:from_hash))
110
+ .is_api_response(true))
111
+ .execute
112
+ end
113
+ end
114
+ end
@@ -0,0 +1,135 @@
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
+ # WidgetsApi
8
+ class WidgetsApi < BaseApi
9
+ # This endpoint will generate an `oauth_window_uri` for the specified
10
+ # `member`.
11
+ # @param [String] accept_version Required parameter: MX Platform API
12
+ # version.
13
+ # @param [String] member_identifier Required parameter: Use either the
14
+ # member `id` you defined or the MX-defined member `guid`. See [MX-Defined
15
+ # GUIDs vs IDs Defined by
16
+ # You](/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-de
17
+ # fined-by-you).
18
+ # @param [String] user_identifier Required parameter: Use either the user
19
+ # `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs
20
+ # IDs Defined by
21
+ # You​](/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-d
22
+ # efined-by-you).
23
+ # @param [String] client_redirect_url Optional parameter: A URL that MX will
24
+ # redirect to at the end of OAuth with additional query parameters. Only
25
+ # available with `referral_source=APP`.
26
+ # @param [String] enable_app2app Optional parameter: This indicates whether
27
+ # OAuth app2app behavior is enabled for institutions that support it.
28
+ # Defaults to `true`. When set to `false`, any `oauth_window_uri` generated
29
+ # will **not** direct the end user to the institution's mobile application.
30
+ # This setting is not persistent. This setting currently only affects Chase
31
+ # institutions.
32
+ # @param [String] referral_source Optional parameter: Must be either
33
+ # `BROWSER` or `APP` depending on the implementation. Defaults to
34
+ # `BROWSER`.
35
+ # @param [TrueClass | FalseClass] skip_aggregation Optional parameter:
36
+ # Setting this parameter to `true` will prevent the member from
37
+ # automatically aggregating after being redirected from the authorization
38
+ # page.
39
+ # @param [String] ui_message_webview_url_scheme Optional parameter: A scheme
40
+ # for routing the user back to the application state they were previously
41
+ # in. Only available with `referral_source=APP`.
42
+ # @return [ApiResponse] Complete http response with raw body and status code.
43
+ def request_oauth_window_uri(accept_version,
44
+ member_identifier,
45
+ user_identifier,
46
+ client_redirect_url: nil,
47
+ enable_app2app: nil,
48
+ referral_source: nil,
49
+ skip_aggregation: nil,
50
+ ui_message_webview_url_scheme: nil)
51
+ @api_call
52
+ .request(new_request_builder(HttpMethodEnum::GET,
53
+ '/users/{user_identifier}/members/{member_identifier}/oauth_window_uri',
54
+ Server::DEFAULT)
55
+ .header_param(new_parameter(accept_version, key: 'Accept-Version')
56
+ .is_required(true))
57
+ .template_param(new_parameter(member_identifier, key: 'member_identifier')
58
+ .is_required(true)
59
+ .should_encode(true))
60
+ .template_param(new_parameter(user_identifier, key: 'user_identifier')
61
+ .is_required(true)
62
+ .should_encode(true))
63
+ .query_param(new_parameter(client_redirect_url, key: 'client_redirect_url'))
64
+ .query_param(new_parameter(enable_app2app, key: 'enable_app2app'))
65
+ .query_param(new_parameter(referral_source, key: 'referral_source'))
66
+ .query_param(new_parameter(skip_aggregation, key: 'skip_aggregation'))
67
+ .query_param(new_parameter(ui_message_webview_url_scheme, key: 'ui_message_webview_url_scheme'))
68
+ .header_param(new_parameter('application/json', key: 'accept'))
69
+ .auth(Single.new('basicAuth')))
70
+ .response(new_response_handler
71
+ .deserializer(APIHelper.method(:custom_type_deserializer))
72
+ .deserialize_into(OauthWindowResponseBody.method(:from_hash))
73
+ .is_api_response(true))
74
+ .execute
75
+ end
76
+
77
+ # Get an embeddable URL for integrating a widget into your website or app.
78
+ # The URL expires after ten minutes or upon first use, whichever occurs
79
+ # first. You'll need to obtain a new URL each time the page loads or
80
+ # reloads.
81
+ # Include the `widget_type` in the request body to specify which widget you
82
+ # want to embed—the Connect Widget, a Personal Financial Management widget,
83
+ # or an Insights widget. Some request parameters are specific to certain
84
+ # widget types.
85
+ # To embed the Connect Widget, set `widget_type` to `connect_widget`.
86
+ # For a full list of available widget types, see [Widget
87
+ # Types](/api-reference/platform-api/reference/widgets#widget-types).
88
+ # @param [String] accept_version Required parameter: MX Platform API
89
+ # version.
90
+ # @param [String] user_identifier Required parameter: Use either the user
91
+ # `id` you defined or the MX-defined user `guid`. See [MX-Defined GUIDs vs
92
+ # IDs Defined by
93
+ # You​](/products/connectivity/overview/held-data/#mx-defined-guids-vs-ids-d
94
+ # efined-by-you).
95
+ # @param [UsersWidgetUrlsRequest] body Required parameter: The widget_url
96
+ # configuration options.
97
+ # @param [String] accept_language Optional parameter: The desired language
98
+ # of the widget.
99
+ # @param [String] x_callback_payload Optional parameter: The base64 encoded
100
+ # string defined in this header will be returned in the
101
+ # [Member](/resources/webhooks/member/) and [Member Data
102
+ # Updated](/resources/webhooks/member/#member-data-updated) webhooks. This
103
+ # allows you to trace user interactions and workflows initiated externally
104
+ # and internally in the MX Platform. Max 1024 characters.
105
+ # @return [ApiResponse] Complete http response with raw body and status code.
106
+ def request_widget_url(accept_version,
107
+ user_identifier,
108
+ body,
109
+ accept_language: nil,
110
+ x_callback_payload: nil)
111
+ @api_call
112
+ .request(new_request_builder(HttpMethodEnum::POST,
113
+ '/users/{user_identifier}/widget_urls',
114
+ Server::DEFAULT)
115
+ .header_param(new_parameter(accept_version, key: 'Accept-Version')
116
+ .is_required(true))
117
+ .template_param(new_parameter(user_identifier, key: 'user_identifier')
118
+ .is_required(true)
119
+ .should_encode(true))
120
+ .header_param(new_parameter('application/json', key: 'Content-Type'))
121
+ .body_param(new_parameter(body)
122
+ .is_required(true))
123
+ .header_param(new_parameter(accept_language, key: 'Accept-Language'))
124
+ .header_param(new_parameter(x_callback_payload, key: 'X-CALLBACK-PAYLOAD'))
125
+ .header_param(new_parameter('application/json', key: 'accept'))
126
+ .body_serializer(proc do |param| param.to_json unless param.nil? end)
127
+ .auth(Single.new('basicAuth')))
128
+ .response(new_response_handler
129
+ .deserializer(APIHelper.method(:custom_type_deserializer))
130
+ .deserialize_into(WidgetResponseBody.method(:from_hash))
131
+ .is_api_response(true))
132
+ .execute
133
+ end
134
+ end
135
+ end
@@ -0,0 +1,225 @@
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
+ # mx_platform_api client class.
8
+ class Client
9
+ include CoreLibrary
10
+ attr_reader :config, :auth_managers
11
+
12
+ def user_agent_detail
13
+ config.user_agent_detail
14
+ end
15
+
16
+ # Access to accounts controller.
17
+ # @return [AccountsApi] Returns the controller instance.
18
+ def accounts
19
+ @accounts ||= AccountsApi.new @global_configuration
20
+ end
21
+
22
+ # Access to ach_return controller.
23
+ # @return [AchReturnApi] Returns the controller instance.
24
+ def ach_return
25
+ @ach_return ||= AchReturnApi.new @global_configuration
26
+ end
27
+
28
+ # Access to budgets controller.
29
+ # @return [BudgetsApi] Returns the controller instance.
30
+ def budgets
31
+ @budgets ||= BudgetsApi.new @global_configuration
32
+ end
33
+
34
+ # Access to categories controller.
35
+ # @return [CategoriesApi] Returns the controller instance.
36
+ def categories
37
+ @categories ||= CategoriesApi.new @global_configuration
38
+ end
39
+
40
+ # Access to goals controller.
41
+ # @return [GoalsApi] Returns the controller instance.
42
+ def goals
43
+ @goals ||= GoalsApi.new @global_configuration
44
+ end
45
+
46
+ # Access to insights controller.
47
+ # @return [InsightsApi] Returns the controller instance.
48
+ def insights
49
+ @insights ||= InsightsApi.new @global_configuration
50
+ end
51
+
52
+ # Access to institutions controller.
53
+ # @return [InstitutionsApi] Returns the controller instance.
54
+ def institutions
55
+ @institutions ||= InstitutionsApi.new @global_configuration
56
+ end
57
+
58
+ # Access to investment_holdings controller.
59
+ # @return [InvestmentHoldingsApi] Returns the controller instance.
60
+ def investment_holdings
61
+ @investment_holdings ||= InvestmentHoldingsApi.new @global_configuration
62
+ end
63
+
64
+ # Access to members controller.
65
+ # @return [MembersApi] Returns the controller instance.
66
+ def members
67
+ @members ||= MembersApi.new @global_configuration
68
+ end
69
+
70
+ # Access to merchants controller.
71
+ # @return [MerchantsApi] Returns the controller instance.
72
+ def merchants
73
+ @merchants ||= MerchantsApi.new @global_configuration
74
+ end
75
+
76
+ # Access to microdeposits controller.
77
+ # @return [MicrodepositsApi] Returns the controller instance.
78
+ def microdeposits
79
+ @microdeposits ||= MicrodepositsApi.new @global_configuration
80
+ end
81
+
82
+ # Access to monthly_cash_flow_profile controller.
83
+ # @return [MonthlyCashFlowProfileApi] Returns the controller instance.
84
+ def monthly_cash_flow_profile
85
+ @monthly_cash_flow_profile ||= MonthlyCashFlowProfileApi.new @global_configuration
86
+ end
87
+
88
+ # Access to notifications controller.
89
+ # @return [NotificationsApi] Returns the controller instance.
90
+ def notifications
91
+ @notifications ||= NotificationsApi.new @global_configuration
92
+ end
93
+
94
+ # Access to processor_token controller.
95
+ # @return [ProcessorTokenApi] Returns the controller instance.
96
+ def processor_token
97
+ @processor_token ||= ProcessorTokenApi.new @global_configuration
98
+ end
99
+
100
+ # Access to rewards controller.
101
+ # @return [RewardsApi] Returns the controller instance.
102
+ def rewards
103
+ @rewards ||= RewardsApi.new @global_configuration
104
+ end
105
+
106
+ # Access to spending_plan controller.
107
+ # @return [SpendingPlanApi] Returns the controller instance.
108
+ def spending_plan
109
+ @spending_plan ||= SpendingPlanApi.new @global_configuration
110
+ end
111
+
112
+ # Access to statements controller.
113
+ # @return [StatementsApi] Returns the controller instance.
114
+ def statements
115
+ @statements ||= StatementsApi.new @global_configuration
116
+ end
117
+
118
+ # Access to taggings controller.
119
+ # @return [TaggingsApi] Returns the controller instance.
120
+ def taggings
121
+ @taggings ||= TaggingsApi.new @global_configuration
122
+ end
123
+
124
+ # Access to tags controller.
125
+ # @return [TagsApi] Returns the controller instance.
126
+ def tags
127
+ @tags ||= TagsApi.new @global_configuration
128
+ end
129
+
130
+ # Access to transaction_rules controller.
131
+ # @return [TransactionRulesApi] Returns the controller instance.
132
+ def transaction_rules
133
+ @transaction_rules ||= TransactionRulesApi.new @global_configuration
134
+ end
135
+
136
+ # Access to transactions controller.
137
+ # @return [TransactionsApi] Returns the controller instance.
138
+ def transactions
139
+ @transactions ||= TransactionsApi.new @global_configuration
140
+ end
141
+
142
+ # Access to users controller.
143
+ # @return [UsersApi] Returns the controller instance.
144
+ def users
145
+ @users ||= UsersApi.new @global_configuration
146
+ end
147
+
148
+ # Access to verifiable_credentials controller.
149
+ # @return [VerifiableCredentialsApi] Returns the controller instance.
150
+ def verifiable_credentials
151
+ @verifiable_credentials ||= VerifiableCredentialsApi.new @global_configuration
152
+ end
153
+
154
+ # Access to widgets controller.
155
+ # @return [WidgetsApi] Returns the controller instance.
156
+ def widgets
157
+ @widgets ||= WidgetsApi.new @global_configuration
158
+ end
159
+
160
+ # Access to managed_data_deprecated controller.
161
+ # @return [ManagedDataDeprecatedApi] Returns the controller instance.
162
+ def managed_data_deprecated
163
+ @managed_data_deprecated ||= ManagedDataDeprecatedApi.new @global_configuration
164
+ end
165
+
166
+ # Access to jobs controller.
167
+ # @return [JobsApi] Returns the controller instance.
168
+ def jobs
169
+ @jobs ||= JobsApi.new @global_configuration
170
+ end
171
+
172
+ def initialize(
173
+ connection: nil, adapter: :net_http_persistent, timeout: 30,
174
+ max_retries: 0, retry_interval: 1, backoff_factor: 2,
175
+ retry_statuses: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524],
176
+ retry_methods: %i[get put], http_callback: nil, proxy_settings: nil,
177
+ logging_configuration: nil, environment: Environment::PRODUCTION,
178
+ basic_auth_credentials: nil, bearer_auth_credentials: nil, config: nil
179
+ )
180
+ @config = if config.nil?
181
+ Configuration.new(
182
+ connection: connection, adapter: adapter, timeout: timeout,
183
+ max_retries: max_retries, retry_interval: retry_interval,
184
+ backoff_factor: backoff_factor,
185
+ retry_statuses: retry_statuses,
186
+ retry_methods: retry_methods, http_callback: http_callback,
187
+ proxy_settings: proxy_settings,
188
+ logging_configuration: logging_configuration,
189
+ environment: environment,
190
+ basic_auth_credentials: basic_auth_credentials,
191
+ bearer_auth_credentials: bearer_auth_credentials
192
+ )
193
+ else
194
+ config
195
+ end
196
+ user_agent_params = BaseApi.user_agent_parameters
197
+
198
+ @global_configuration = GlobalConfiguration.new(client_configuration: @config)
199
+ .base_uri_executor(@config.method(:get_base_uri))
200
+ .global_errors(BaseApi::GLOBAL_ERRORS)
201
+ .user_agent(BaseApi.user_agent,
202
+ agent_parameters: user_agent_params)
203
+
204
+ initialize_auth_managers(@global_configuration)
205
+ @global_configuration = @global_configuration.auth_managers(@auth_managers)
206
+ end
207
+
208
+ # Initializes the auth managers hash used for authenticating API calls.
209
+ # @param [GlobalConfiguration] global_config The global configuration of the SDK)
210
+ def initialize_auth_managers(global_config)
211
+ @auth_managers = {}
212
+ http_client_config = global_config.client_configuration
213
+ %w[basicAuth bearerAuth].each { |auth| @auth_managers[auth] = nil }
214
+ @auth_managers['basicAuth'] = BasicAuth.new(http_client_config.basic_auth_credentials)
215
+ @auth_managers['bearerAuth'] = BearerAuth.new(http_client_config.bearer_auth_credentials)
216
+ end
217
+
218
+ # Creates a client directly from environment variables.
219
+ def self.from_env(**overrides)
220
+ default_config = Configuration.build_default_config_from_env
221
+ new_config = default_config.clone_with(**overrides)
222
+ new(config: new_config)
223
+ end
224
+ end
225
+ end