apimatic-ak-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 (229) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +28 -0
  3. data/README.md +190 -0
  4. data/bin/console +15 -0
  5. data/lib/akoya/api_helper.rb +10 -0
  6. data/lib/akoya/client.rb +117 -0
  7. data/lib/akoya/configuration.rb +195 -0
  8. data/lib/akoya/controllers/account_information_controller.rb +93 -0
  9. data/lib/akoya/controllers/balances_controller.rb +92 -0
  10. data/lib/akoya/controllers/base_controller.rb +65 -0
  11. data/lib/akoya/controllers/customers_controller.rb +112 -0
  12. data/lib/akoya/controllers/investments_controller.rb +95 -0
  13. data/lib/akoya/controllers/payments_controller.rb +70 -0
  14. data/lib/akoya/controllers/statements_controller.rb +158 -0
  15. data/lib/akoya/controllers/tokens_controller.rb +122 -0
  16. data/lib/akoya/controllers/transactions_controller.rb +108 -0
  17. data/lib/akoya/exceptions/api_exception.rb +21 -0
  18. data/lib/akoya/exceptions/error_entity_exception.rb +54 -0
  19. data/lib/akoya/exceptions/error_response_exception.rb +53 -0
  20. data/lib/akoya/http/api_response.rb +19 -0
  21. data/lib/akoya/http/auth/basic_auth.rb +62 -0
  22. data/lib/akoya/http/auth/bearer_auth.rb +53 -0
  23. data/lib/akoya/http/http_call_back.rb +10 -0
  24. data/lib/akoya/http/http_method_enum.rb +10 -0
  25. data/lib/akoya/http/http_request.rb +10 -0
  26. data/lib/akoya/http/http_response.rb +10 -0
  27. data/lib/akoya/http/proxy_settings.rb +22 -0
  28. data/lib/akoya/logging/configuration/api_logging_configuration.rb +186 -0
  29. data/lib/akoya/logging/sdk_logger.rb +17 -0
  30. data/lib/akoya/models/account.rb +86 -0
  31. data/lib/akoya/models/account_category.rb +50 -0
  32. data/lib/akoya/models/account_contact_entity.rb +132 -0
  33. data/lib/akoya/models/account_holder_entity.rb +178 -0
  34. data/lib/akoya/models/account_holder_relationship.rb +110 -0
  35. data/lib/akoya/models/account_holder_relationship_account_holder_entity.rb +110 -0
  36. data/lib/akoya/models/account_information.rb +335 -0
  37. data/lib/akoya/models/action.rb +48 -0
  38. data/lib/akoya/models/address.rb +144 -0
  39. data/lib/akoya/models/akoya_account_info_product.rb +88 -0
  40. data/lib/akoya/models/an_array_of_statements.rb +95 -0
  41. data/lib/akoya/models/an_investment_holding.rb +493 -0
  42. data/lib/akoya/models/annual_increase_type.rb +40 -0
  43. data/lib/akoya/models/annuity_account.rb +370 -0
  44. data/lib/akoya/models/annuity_account_info.rb +86 -0
  45. data/lib/akoya/models/annuity_balance_details.rb +87 -0
  46. data/lib/akoya/models/annuity_balances.rb +477 -0
  47. data/lib/akoya/models/annuity_product_type.rb +36 -0
  48. data/lib/akoya/models/annuity_value_basis.rb +36 -0
  49. data/lib/akoya/models/array_of_account_payment_networks.rb +85 -0
  50. data/lib/akoya/models/asset_class.rb +95 -0
  51. data/lib/akoya/models/asset_class_an_investment_holding.rb +85 -0
  52. data/lib/akoya/models/asset_class_asset_class.rb +56 -0
  53. data/lib/akoya/models/asset_class_citi_bank_investment_holdings.rb +86 -0
  54. data/lib/akoya/models/balance_type.rb +37 -0
  55. data/lib/akoya/models/balance_type_investment_balance_list.rb +36 -0
  56. data/lib/akoya/models/balances.rb +88 -0
  57. data/lib/akoya/models/base_model.rb +110 -0
  58. data/lib/akoya/models/business_customer_entity.rb +127 -0
  59. data/lib/akoya/models/business_customer_entity_account_holder_entity.rb +126 -0
  60. data/lib/akoya/models/business_customer_entity_customer.rb +126 -0
  61. data/lib/akoya/models/call_type.rb +44 -0
  62. data/lib/akoya/models/citi_bank_investment.rb +535 -0
  63. data/lib/akoya/models/citi_bank_investment_details.rb +75 -0
  64. data/lib/akoya/models/citi_bank_investment_holdings.rb +210 -0
  65. data/lib/akoya/models/compounding_period.rb +56 -0
  66. data/lib/akoya/models/contribution_entity.rb +266 -0
  67. data/lib/akoya/models/coupon_mature_frequency.rb +48 -0
  68. data/lib/akoya/models/currency.rb +108 -0
  69. data/lib/akoya/models/currency_citi_bank_investment_holdings.rb +86 -0
  70. data/lib/akoya/models/currency_entity.rb +109 -0
  71. data/lib/akoya/models/current_customer.rb +75 -0
  72. data/lib/akoya/models/customer.rb +164 -0
  73. data/lib/akoya/models/customer_current_customer.rb +164 -0
  74. data/lib/akoya/models/customer_name.rb +127 -0
  75. data/lib/akoya/models/customer_name_account_holder_entity.rb +127 -0
  76. data/lib/akoya/models/customer_name_customer.rb +127 -0
  77. data/lib/akoya/models/debit_credit_memo.rb +37 -0
  78. data/lib/akoya/models/debt_class.rb +44 -0
  79. data/lib/akoya/models/debt_security.rb +137 -0
  80. data/lib/akoya/models/debt_security_entity.rb +216 -0
  81. data/lib/akoya/models/debt_type.rb +36 -0
  82. data/lib/akoya/models/delivery_address.rb +153 -0
  83. data/lib/akoya/models/deposit_account.rb +375 -0
  84. data/lib/akoya/models/deposit_account_info.rb +86 -0
  85. data/lib/akoya/models/deposit_balance_details.rb +87 -0
  86. data/lib/akoya/models/deposit_balances.rb +438 -0
  87. data/lib/akoya/models/deposit_transaction.rb +369 -0
  88. data/lib/akoya/models/deposit_transaction_details.rb +87 -0
  89. data/lib/akoya/models/domicile.rb +85 -0
  90. data/lib/akoya/models/equity_grant.rb +199 -0
  91. data/lib/akoya/models/error_entity_account_information.rb +97 -0
  92. data/lib/akoya/models/error_entity_annuity_account.rb +97 -0
  93. data/lib/akoya/models/error_entity_annuity_balances.rb +97 -0
  94. data/lib/akoya/models/error_entity_citi_bank_investment.rb +97 -0
  95. data/lib/akoya/models/error_entity_deposit_account.rb +97 -0
  96. data/lib/akoya/models/error_entity_deposit_balances.rb +97 -0
  97. data/lib/akoya/models/error_entity_insurance_account.rb +97 -0
  98. data/lib/akoya/models/error_entity_insurance_balances.rb +97 -0
  99. data/lib/akoya/models/error_entity_investment_account.rb +97 -0
  100. data/lib/akoya/models/error_entity_investment_balances.rb +97 -0
  101. data/lib/akoya/models/error_entity_line_of_credit_balances.rb +97 -0
  102. data/lib/akoya/models/error_entity_loan_account.rb +97 -0
  103. data/lib/akoya/models/error_entity_loan_balances.rb +97 -0
  104. data/lib/akoya/models/error_entity_us_bank_investment.rb +97 -0
  105. data/lib/akoya/models/fi_asset_class.rb +95 -0
  106. data/lib/akoya/models/fi_asset_class_an_investment_holding.rb +85 -0
  107. data/lib/akoya/models/fi_attribute.rb +95 -0
  108. data/lib/akoya/models/fi_attribute_entity.rb +95 -0
  109. data/lib/akoya/models/frequency.rb +56 -0
  110. data/lib/akoya/models/hateoas_link.rb +105 -0
  111. data/lib/akoya/models/held_in_account.rb +44 -0
  112. data/lib/akoya/models/holding_sub_type.rb +36 -0
  113. data/lib/akoya/models/holding_type.rb +56 -0
  114. data/lib/akoya/models/income_type.rb +41 -0
  115. data/lib/akoya/models/industry_code.rb +85 -0
  116. data/lib/akoya/models/insurance_account.rb +349 -0
  117. data/lib/akoya/models/insurance_account_info.rb +87 -0
  118. data/lib/akoya/models/insurance_balance_details.rb +87 -0
  119. data/lib/akoya/models/insurance_balances.rb +420 -0
  120. data/lib/akoya/models/insurance_transaction.rb +351 -0
  121. data/lib/akoya/models/insurance_transaction_details.rb +87 -0
  122. data/lib/akoya/models/interest_rate_type.rb +36 -0
  123. data/lib/akoya/models/inv401_k_source.rb +56 -0
  124. data/lib/akoya/models/inv401_k_source_open_order_entity.rb +57 -0
  125. data/lib/akoya/models/inv401_k_surce.rb +56 -0
  126. data/lib/akoya/models/investment_account.rb +411 -0
  127. data/lib/akoya/models/investment_account_annuity_balance.rb +87 -0
  128. data/lib/akoya/models/investment_account_deposit_balance.rb +87 -0
  129. data/lib/akoya/models/investment_account_info.rb +87 -0
  130. data/lib/akoya/models/investment_account_insurance_balance.rb +87 -0
  131. data/lib/akoya/models/investment_account_loan_balance.rb +86 -0
  132. data/lib/akoya/models/investment_account_loc_balance.rb +86 -0
  133. data/lib/akoya/models/investment_balance_details.rb +87 -0
  134. data/lib/akoya/models/investment_balance_list.rb +148 -0
  135. data/lib/akoya/models/investment_balances.rb +525 -0
  136. data/lib/akoya/models/investment_details.rb +88 -0
  137. data/lib/akoya/models/investment_loan_entity.rb +271 -0
  138. data/lib/akoya/models/investment_transaction.rb +783 -0
  139. data/lib/akoya/models/investment_transaction_details.rb +87 -0
  140. data/lib/akoya/models/investments.rb +88 -0
  141. data/lib/akoya/models/line_item.rb +156 -0
  142. data/lib/akoya/models/line_of_credit_balances.rb +601 -0
  143. data/lib/akoya/models/links.rb +95 -0
  144. data/lib/akoya/models/loan_account.rb +417 -0
  145. data/lib/akoya/models/loan_account_info.rb +86 -0
  146. data/lib/akoya/models/loan_balance_details.rb +86 -0
  147. data/lib/akoya/models/loan_balances.rb +556 -0
  148. data/lib/akoya/models/loan_payment_frequency.rb +68 -0
  149. data/lib/akoya/models/loan_transaction.rb +360 -0
  150. data/lib/akoya/models/loan_transaction_details.rb +87 -0
  151. data/lib/akoya/models/loc_account_info.rb +86 -0
  152. data/lib/akoya/models/loc_balance_details.rb +86 -0
  153. data/lib/akoya/models/loc_transaction.rb +372 -0
  154. data/lib/akoya/models/loc_transaction_details.rb +86 -0
  155. data/lib/akoya/models/mnext.rb +84 -0
  156. data/lib/akoya/models/mode.rb +36 -0
  157. data/lib/akoya/models/mutual_fund_security.rb +99 -0
  158. data/lib/akoya/models/mutual_fund_security_entity.rb +150 -0
  159. data/lib/akoya/models/mutual_fund_type.rb +40 -0
  160. data/lib/akoya/models/obtain_tokens.rb +99 -0
  161. data/lib/akoya/models/open_order_entity.rb +228 -0
  162. data/lib/akoya/models/option_security.rb +125 -0
  163. data/lib/akoya/models/option_security_entity.rb +127 -0
  164. data/lib/akoya/models/option_type.rb +36 -0
  165. data/lib/akoya/models/order_duration.rb +40 -0
  166. data/lib/akoya/models/order_type.rb +60 -0
  167. data/lib/akoya/models/other_security_entity.rb +77 -0
  168. data/lib/akoya/models/paginated_array.rb +75 -0
  169. data/lib/akoya/models/payment_details.rb +142 -0
  170. data/lib/akoya/models/payment_frequency.rb +56 -0
  171. data/lib/akoya/models/payment_frequency_annuity_account.rb +44 -0
  172. data/lib/akoya/models/payment_frequency_annuity_balances.rb +44 -0
  173. data/lib/akoya/models/payment_network_supported_by_account.rb +129 -0
  174. data/lib/akoya/models/pension_source_entity.rb +143 -0
  175. data/lib/akoya/models/period_certain_guarantee.rb +48 -0
  176. data/lib/akoya/models/policy_premium_term.rb +36 -0
  177. data/lib/akoya/models/position_type.rb +36 -0
  178. data/lib/akoya/models/postion_type.rb +36 -0
  179. data/lib/akoya/models/prev.rb +84 -0
  180. data/lib/akoya/models/refresh_tokens.rb +103 -0
  181. data/lib/akoya/models/secured.rb +36 -0
  182. data/lib/akoya/models/security_id_type.rb +52 -0
  183. data/lib/akoya/models/security_id_type_investment_transaction.rb +52 -0
  184. data/lib/akoya/models/security_type.rb +56 -0
  185. data/lib/akoya/models/statement_entity.rb +136 -0
  186. data/lib/akoya/models/status.rb +56 -0
  187. data/lib/akoya/models/status_deposit_transaction.rb +44 -0
  188. data/lib/akoya/models/status_insurance_transaction.rb +44 -0
  189. data/lib/akoya/models/status_investment_transaction.rb +44 -0
  190. data/lib/akoya/models/status_loan_transaction.rb +44 -0
  191. data/lib/akoya/models/status_loc_transaction.rb +44 -0
  192. data/lib/akoya/models/status_statement_entity.rb +40 -0
  193. data/lib/akoya/models/status_transaction.rb +44 -0
  194. data/lib/akoya/models/stock_security_entity.rb +137 -0
  195. data/lib/akoya/models/stock_type.rb +56 -0
  196. data/lib/akoya/models/sub_account.rb +44 -0
  197. data/lib/akoya/models/sub_account_fund.rb +44 -0
  198. data/lib/akoya/models/sub_account_sec.rb +44 -0
  199. data/lib/akoya/models/sweep_security_entity.rb +118 -0
  200. data/lib/akoya/models/tax_lot.rb +137 -0
  201. data/lib/akoya/models/tax_lot_an_investment_holding.rb +139 -0
  202. data/lib/akoya/models/telephone.rb +95 -0
  203. data/lib/akoya/models/telephone_number.rb +95 -0
  204. data/lib/akoya/models/token_example_response.rb +101 -0
  205. data/lib/akoya/models/transaction.rb +328 -0
  206. data/lib/akoya/models/transaction_reason.rb +41 -0
  207. data/lib/akoya/models/transaction_type.rb +84 -0
  208. data/lib/akoya/models/transaction_type_insurance_transaction.rb +44 -0
  209. data/lib/akoya/models/transaction_type_investment_transaction.rb +192 -0
  210. data/lib/akoya/models/transaction_type_loan_transaction.rb +44 -0
  211. data/lib/akoya/models/transaction_type_loc_transaction.rb +84 -0
  212. data/lib/akoya/models/transactions_entity.rb +98 -0
  213. data/lib/akoya/models/transfer_action.rb +36 -0
  214. data/lib/akoya/models/type.rb +44 -0
  215. data/lib/akoya/models/type_hateoas_link.rb +52 -0
  216. data/lib/akoya/models/type_telephone_number.rb +44 -0
  217. data/lib/akoya/models/unit_type.rb +36 -0
  218. data/lib/akoya/models/unit_type_open_order_entity.rb +36 -0
  219. data/lib/akoya/models/us_bank_investment.rb +535 -0
  220. data/lib/akoya/models/us_bank_investment_details.rb +75 -0
  221. data/lib/akoya/models/us_bank_investment_holdings.rb +403 -0
  222. data/lib/akoya/models/vesting.rb +135 -0
  223. data/lib/akoya/models/vesting_entity.rb +185 -0
  224. data/lib/akoya/models/x_akoya_interaction_type.rb +36 -0
  225. data/lib/akoya/utilities/date_time_helper.rb +11 -0
  226. data/lib/akoya/utilities/file_wrapper.rb +28 -0
  227. data/lib/akoya/utilities/union_type_lookup.rb +91 -0
  228. data/lib/akoya.rb +250 -0
  229. metadata +312 -0
@@ -0,0 +1,92 @@
1
+ # akoya
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module Akoya
7
+ # BalancesController
8
+ class BalancesController < BaseController
9
+ # Account information that includes balances and rates of bank accounts,
10
+ # credit cards, loans, investments, and more.
11
+ # To view the response schema, select the `200` response below. Then pick an
12
+ # option for annuity, deposit, insurance, investment, loan, and line of
13
+ # credit account types.
14
+ # For an example payload response, see the `200` example response below the
15
+ # `Try it` feature. The example is from a deposit account but all account
16
+ # types are supported by this endpoint.
17
+ # > 🛑
18
+ # >
19
+ # > The *id_token* should be used as the bearer token with this call.
20
+ # Use the `mode` query param to receive FDX-aligned, standardized data
21
+ # values (Beta). For example:
22
+ # `https://sandbox-products.ddp.akoya.com/balances/v2/mikomo?mode=standard`
23
+ # `mode` is available in both sandbox and production.
24
+ # `mode` is supported by a subset of providers. Log into the [Data Recipient
25
+ # Hub](https://recipient.ddp.akoya.com/login) and click
26
+ # [here](https://recipient.ddp.akoya.com/support/article/kA0Uw00000015GzKAI)
27
+ # to view a list of all providers supporting the `mode` parameter.
28
+ # @param [String] version Required parameter: Akoya major version number. Do
29
+ # not use minor version numbers. For instance, use v2 and not v2.2
30
+ # @param [String] provider_id Required parameter: Id of provider
31
+ # @param [String] account_ids Optional parameter: Comma separated list of
32
+ # account ids
33
+ # @param [XAkoyaInteractionType] x_akoya_interaction_type Optional
34
+ # parameter: Optional but recommended header to include with each data
35
+ # request. Allowed values are `user` or `batch`. `user` indicates a
36
+ # request is prompted by an end-user action. `batch` indicates the request
37
+ # is part of a batch process.
38
+ # @param [Mode] mode Optional parameter: BETA. Default is raw. Use standard
39
+ # for FDX-aligned, standardized data values.
40
+ # @return [ApiResponse] Complete http response with raw body and status code.
41
+ def get_balances(version,
42
+ provider_id,
43
+ account_ids: ':accountId',
44
+ x_akoya_interaction_type: nil,
45
+ mode: nil)
46
+ @api_call
47
+ .request(new_request_builder(HttpMethodEnum::GET,
48
+ '/balances/{version}/{providerId}',
49
+ Server::DEFAULT)
50
+ .template_param(new_parameter(version, key: 'version')
51
+ .is_required(true)
52
+ .should_encode(true))
53
+ .template_param(new_parameter(provider_id, key: 'providerId')
54
+ .is_required(true)
55
+ .should_encode(true))
56
+ .query_param(new_parameter(account_ids, key: 'accountIds'))
57
+ .header_param(new_parameter(x_akoya_interaction_type, key: 'x-akoya-interaction-type'))
58
+ .query_param(new_parameter(mode, key: 'mode'))
59
+ .header_param(new_parameter('application/json', key: 'accept'))
60
+ .auth(Single.new('bearerAuth')))
61
+ .response(new_response_handler
62
+ .deserializer(APIHelper.method(:custom_type_deserializer))
63
+ .deserialize_into(Balances.method(:from_hash))
64
+ .is_api_response(true)
65
+ .local_error('400',
66
+ '401 - Invalid input',
67
+ ErrorEntityException)
68
+ .local_error('401',
69
+ '602 - Customer not authorized',
70
+ ErrorEntityException)
71
+ .local_error('404',
72
+ '701 - Account not found',
73
+ ErrorEntityException)
74
+ .local_error('406',
75
+ '1203 - Content Type not Supported',
76
+ ErrorEntityException)
77
+ .local_error('429',
78
+ '1207 - Too many requests',
79
+ ErrorEntityException)
80
+ .local_error('500',
81
+ '500 - Internal server error',
82
+ ErrorEntityException)
83
+ .local_error('501',
84
+ '1106 - Version not supported or not implemented',
85
+ ErrorEntityException)
86
+ .local_error('503',
87
+ '503 - System is down for maintenance',
88
+ ErrorEntityException))
89
+ .execute
90
+ end
91
+ end
92
+ end
@@ -0,0 +1,65 @@
1
+ # akoya
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module Akoya
7
+ # BaseController.
8
+ class BaseController
9
+ include CoreLibrary
10
+ attr_accessor :config, :http_call_back
11
+
12
+ def self.user_agent
13
+ 'Ruby SDK, Version: 0.0.1, on OS {os-info}'
14
+ end
15
+
16
+ def self.user_agent_parameters
17
+ {
18
+ '{os-info}' => { 'value' => RUBY_PLATFORM, 'encode' => false }
19
+ }
20
+ end
21
+
22
+ GLOBAL_ERRORS = {
23
+ 'default' => ErrorCase.new
24
+ .error_message('HTTP response not OK.')
25
+ .exception_type(APIException)
26
+ }.freeze
27
+
28
+ # Initialization constructor.
29
+ # @param [GlobalConfiguration] global_configuration The instance of GlobalConfiguration.
30
+ def initialize(global_configuration)
31
+ @global_configuration = global_configuration
32
+ @config = @global_configuration.client_configuration
33
+ @http_call_back = @config.http_callback
34
+ @api_call = ApiCall.new(@global_configuration)
35
+ end
36
+
37
+ # Creates a new instance of the request builder.
38
+ # @param [String] http_method The HTTP method to use in the request.
39
+ # @param [String] path The endpoint path to use in the request.
40
+ # @param [String] server The server to extract the base uri for the request.
41
+ # @return [RequestBuilder] The instance of RequestBuilder.
42
+ def new_request_builder(http_method, path, server)
43
+ RequestBuilder.new
44
+ .http_method(http_method)
45
+ .path(path)
46
+ .server(server)
47
+ end
48
+
49
+ # Creates a new instance of the response handler.
50
+ # @return [ResponseHandler] The instance of ResponseHandler.
51
+ def new_response_handler
52
+ ResponseHandler.new
53
+ end
54
+
55
+ # Creates a new instance of the parameter.
56
+ # @param [String|optional] key The key of the parameter.
57
+ # @param [Object] value The value of the parameter.
58
+ # @return [Parameter] The instance of Parameter.
59
+ def new_parameter(value, key: nil)
60
+ Parameter.new
61
+ .key(key)
62
+ .value(value)
63
+ end
64
+ end
65
+ end
@@ -0,0 +1,112 @@
1
+ # akoya
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module Akoya
7
+ # CustomersController
8
+ class CustomersController < BaseController
9
+ # This product supports use cases such as payment enablement, account
10
+ # opening, and identity verification. Responses return information about the
11
+ # authorized end-user, the customer associated with the `id_token` used in
12
+ # the call. This information may include, but is not limited to, the
13
+ # customer identifier, name, email, address, and phone number.
14
+ # <br>
15
+ # To see the response schema, select the `200` response below. For an
16
+ # example payload response, see the `200` example response below the *Try
17
+ # it* feature.
18
+ # This product requires consumer consent to share all account holder
19
+ # information.
20
+ # > 🛑 The `id_token` should be used as the bearer token with this call.
21
+ # >
22
+ # @param [String] version Required parameter: Akoya major version number. Do
23
+ # not use minor version numbers. For instance, use v2 and not v2.2
24
+ # @param [String] provider_id Required parameter: Id of provider
25
+ # @param [XAkoyaInteractionType] x_akoya_interaction_type Optional
26
+ # parameter: Optional but recommended header to include with each data
27
+ # request. Allowed values are `user` or `batch`. `user` indicates a
28
+ # request is prompted by an end-user action. `batch` indicates the request
29
+ # is part of a batch process.
30
+ # @return [ApiResponse] Complete http response with raw body and status code.
31
+ def customer_info(version,
32
+ provider_id,
33
+ x_akoya_interaction_type: nil)
34
+ @api_call
35
+ .request(new_request_builder(HttpMethodEnum::GET,
36
+ '/customers/{version}/{providerId}/current',
37
+ Server::DEFAULT)
38
+ .template_param(new_parameter(version, key: 'version')
39
+ .is_required(true)
40
+ .should_encode(true))
41
+ .template_param(new_parameter(provider_id, key: 'providerId')
42
+ .is_required(true)
43
+ .should_encode(true))
44
+ .header_param(new_parameter(x_akoya_interaction_type, key: 'x-akoya-interaction-type'))
45
+ .header_param(new_parameter('application/json', key: 'accept'))
46
+ .auth(Single.new('bearerAuth')))
47
+ .response(new_response_handler
48
+ .deserializer(APIHelper.method(:custom_type_deserializer))
49
+ .deserialize_into(CurrentCustomer.method(:from_hash))
50
+ .is_api_response(true))
51
+ .execute
52
+ end
53
+
54
+ # This product supports use cases such as payment enablement, account
55
+ # opening, identity verification,or lending & credit enhancement. Responses
56
+ # return information about the authorized consumer, the customer associated
57
+ # with the `id_token` used in the call, and the relationship specific to the
58
+ # provided `accountId`.
59
+ # > 📌 Please note!
60
+ # >
61
+ # > This endpoint provides additional information which may not be required
62
+ # for your use case, making it inefficient compared to the [/customer
63
+ # info](https://docs.akoya.com/reference/customer-info) endpoint. Please
64
+ # refer to to the [Customers
65
+ # guide](https://docs.akoya.com/reference/customers) for more information
66
+ # about this endpoint.
67
+ # Get account holder information. Based on FDX 5.2.1.
68
+ # This product requires consumer consent to share all account holder
69
+ # information.
70
+ # > 🛑 The `id_token` should be used as the bearer token with this call.
71
+ # >
72
+ # @param [String] account_id Required parameter: Account Identifier
73
+ # @param [String] version Required parameter: Akoya major version number. Do
74
+ # not use minor version numbers. For instance, use v2 and not v2.2
75
+ # @param [String] provider_id Required parameter: Id of provider
76
+ # @param [XAkoyaInteractionType] x_akoya_interaction_type Optional
77
+ # parameter: Optional but recommended header to include with each data
78
+ # request. Allowed values are `user` or `batch`. `user` indicates a
79
+ # request is prompted by an end-user action. `batch` indicates the request
80
+ # is part of a batch process.
81
+ # @return [ApiResponse] Complete http response with raw body and status code.
82
+ def get_account_holder(account_id,
83
+ version,
84
+ provider_id,
85
+ x_akoya_interaction_type: nil)
86
+ @api_call
87
+ .request(new_request_builder(HttpMethodEnum::GET,
88
+ '/contacts/{version}/{providerId}/{accountId}',
89
+ Server::DEFAULT)
90
+ .template_param(new_parameter(account_id, key: 'accountId')
91
+ .is_required(true)
92
+ .should_encode(true))
93
+ .template_param(new_parameter(version, key: 'version')
94
+ .is_required(true)
95
+ .should_encode(true))
96
+ .template_param(new_parameter(provider_id, key: 'providerId')
97
+ .is_required(true)
98
+ .should_encode(true))
99
+ .header_param(new_parameter(x_akoya_interaction_type, key: 'x-akoya-interaction-type'))
100
+ .header_param(new_parameter('application/json', key: 'accept'))
101
+ .auth(Single.new('bearerAuth')))
102
+ .response(new_response_handler
103
+ .deserializer(APIHelper.method(:custom_type_deserializer))
104
+ .deserialize_into(AccountContactEntity.method(:from_hash))
105
+ .is_api_response(true)
106
+ .local_error('404',
107
+ 'Not Found',
108
+ ErrorEntityException))
109
+ .execute
110
+ end
111
+ end
112
+ end
@@ -0,0 +1,95 @@
1
+ # akoya
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module Akoya
7
+ # InvestmentsController
8
+ class InvestmentsController < BaseController
9
+ # Get detailed account information that includes Akoya products Account Info
10
+ # and Balances for all account types (annunity, deposit, insurance,
11
+ # investments, line of credit, and loan) and adds the Investments product to
12
+ # investment accounts including contributions, holdings, vesting
13
+ # information, and more.
14
+ # To view the response schema, select the `200` response below. Then pick an
15
+ # option for annuity, deposit, insurance, investment, loan, and line of
16
+ # credit account types.
17
+ # For an example payload response, see the `200` example response below the
18
+ # `Try it` feature. The example is from an investment account but all
19
+ # account types are supported and returned by this endpoint.
20
+ # > 🛑
21
+ # >
22
+ # > The *id_token* should be used as the bearer token with this call.
23
+ # Use the `mode` query param to receive FDX-aligned, standardized data
24
+ # values (Beta). For example:
25
+ # `https://sandbox-products.ddp.akoya.com/accounts/v2/mikomo?mode=standard`
26
+ # `mode` is available in both sandbox and production.
27
+ # `mode` is supported by a subset of providers. Log into the [Data Recipient
28
+ # Hub](https://recipient.ddp.akoya.com/login) and click
29
+ # [here](https://recipient.ddp.akoya.com/support/article/kA0Uw00000015GzKAI)
30
+ # to view a list of all providers supporting the `mode` parameter.
31
+ # @param [String] version Required parameter: Akoya major version number. Do
32
+ # not use minor version numbers. For instance, use v2 and not v2.2
33
+ # @param [String] provider_id Required parameter: Id of provider
34
+ # @param [String] account_ids Optional parameter: Comma separated list of
35
+ # account ids
36
+ # @param [XAkoyaInteractionType] x_akoya_interaction_type Optional
37
+ # parameter: Optional but recommended header to include with each data
38
+ # request. Allowed values are `user` or `batch`. `user` indicates a
39
+ # request is prompted by an end-user action. `batch` indicates the request
40
+ # is part of a batch process.
41
+ # @param [Mode] mode Optional parameter: BETA. Default is raw. Use standard
42
+ # for FDX-aligned, standardized data values.
43
+ # @return [ApiResponse] Complete http response with raw body and status code.
44
+ def get_accounts(version,
45
+ provider_id,
46
+ account_ids: ':accountId',
47
+ x_akoya_interaction_type: nil,
48
+ mode: nil)
49
+ @api_call
50
+ .request(new_request_builder(HttpMethodEnum::GET,
51
+ '/accounts/{version}/{providerId}',
52
+ Server::DEFAULT)
53
+ .template_param(new_parameter(version, key: 'version')
54
+ .is_required(true)
55
+ .should_encode(true))
56
+ .template_param(new_parameter(provider_id, key: 'providerId')
57
+ .is_required(true)
58
+ .should_encode(true))
59
+ .query_param(new_parameter(account_ids, key: 'accountIds'))
60
+ .header_param(new_parameter(x_akoya_interaction_type, key: 'x-akoya-interaction-type'))
61
+ .query_param(new_parameter(mode, key: 'mode'))
62
+ .header_param(new_parameter('application/json', key: 'accept'))
63
+ .auth(Single.new('bearerAuth')))
64
+ .response(new_response_handler
65
+ .deserializer(APIHelper.method(:custom_type_deserializer))
66
+ .deserialize_into(Investments.method(:from_hash))
67
+ .is_api_response(true)
68
+ .local_error('400',
69
+ '401 - Invalid input',
70
+ ErrorEntityException)
71
+ .local_error('401',
72
+ '602 - Customer not authorized',
73
+ ErrorEntityException)
74
+ .local_error('404',
75
+ '701 - Account not found',
76
+ ErrorEntityException)
77
+ .local_error('406',
78
+ '1203 - Content Type not Supported',
79
+ ErrorEntityException)
80
+ .local_error('429',
81
+ '1207 - Too many requests',
82
+ ErrorEntityException)
83
+ .local_error('500',
84
+ '500 - Internal server error',
85
+ ErrorEntityException)
86
+ .local_error('501',
87
+ '1106 - Version not supported or not implemented',
88
+ ErrorEntityException)
89
+ .local_error('503',
90
+ '503 - System is down for maintenance',
91
+ ErrorEntityException))
92
+ .execute
93
+ end
94
+ end
95
+ end
@@ -0,0 +1,70 @@
1
+ # akoya
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module Akoya
7
+ # PaymentsController
8
+ class PaymentsController < BaseController
9
+ # This product supports use cases such as payment enablement or account
10
+ # opening. The response includes identifiers necessary to make ACH and RTP
11
+ # payments. Identifiers include account number, routing number, identifier
12
+ # type (actual or tokenized account number), and payment network type such
13
+ # as ACH or RTP.
14
+ # <br>
15
+ # To see the response schema, select the `200` response below. For an
16
+ # example payload response, see the `200` example response below the *Try
17
+ # it* feature.
18
+ # > 🛑
19
+ # >
20
+ # > The *id_token* should be used as the bearer token with this call.
21
+ # @param [String] version Required parameter: Akoya major version number. Do
22
+ # not use minor version numbers. For instance, use v2 and not v2.2
23
+ # @param [String] provider_id Required parameter: Id of provider
24
+ # @param [String] account_id Required parameter: Account Identifier
25
+ # @param [XAkoyaInteractionType] x_akoya_interaction_type Optional
26
+ # parameter: Optional but recommended header to include with each data
27
+ # request. Allowed values are `user` or `batch`. `user` indicates a
28
+ # request is prompted by an end-user action. `batch` indicates the request
29
+ # is part of a batch process.
30
+ # @return [ApiResponse] Complete http response with raw body and status code.
31
+ def payment_networks(version,
32
+ provider_id,
33
+ account_id,
34
+ x_akoya_interaction_type: nil)
35
+ @api_call
36
+ .request(new_request_builder(HttpMethodEnum::GET,
37
+ '/payments/{version}/{providerId}/{accountId}/payment-networks',
38
+ Server::DEFAULT)
39
+ .template_param(new_parameter(version, key: 'version')
40
+ .is_required(true)
41
+ .should_encode(true))
42
+ .template_param(new_parameter(provider_id, key: 'providerId')
43
+ .is_required(true)
44
+ .should_encode(true))
45
+ .template_param(new_parameter(account_id, key: 'accountId')
46
+ .is_required(true)
47
+ .should_encode(true))
48
+ .header_param(new_parameter(x_akoya_interaction_type, key: 'x-akoya-interaction-type'))
49
+ .header_param(new_parameter('application/json', key: 'accept'))
50
+ .auth(Single.new('bearerAuth')))
51
+ .response(new_response_handler
52
+ .deserializer(APIHelper.method(:custom_type_deserializer))
53
+ .deserialize_into(ArrayOfAccountPaymentNetworks.method(:from_hash))
54
+ .is_api_response(true)
55
+ .local_error('401',
56
+ '602 - Customer does not have authorization to perform this'\
57
+ ' action. The customer may have revoked access through provider'\
58
+ ' and would need to reauthenticate.',
59
+ ErrorEntityException)
60
+ .local_error('403',
61
+ '403 - The `providerId` is wrong or your app doesn\'t have a'\
62
+ ' subscription to the provider.',
63
+ ErrorEntityException)
64
+ .local_error('404',
65
+ '701 - Account not found. The `accountId` may be wrong.',
66
+ ErrorEntityException))
67
+ .execute
68
+ end
69
+ end
70
+ end
@@ -0,0 +1,158 @@
1
+ # akoya
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module Akoya
7
+ # StatementsController
8
+ class StatementsController < BaseController
9
+ # Retrieve a list of available statements for the end-user's consented
10
+ # accounts. You may request a date range of up to two years of historical
11
+ # statements (maximum date ranges vary by provider).
12
+ # The paginated response includes an array of statement information with the
13
+ # end-user's account id and statement details such as statement id, date,
14
+ # description, and status. The results also include links to GET the
15
+ # statement image.
16
+ # @param [String] account_id Required parameter: Account Identifier
17
+ # @param [String] version Required parameter: Akoya major version number. Do
18
+ # not use minor version numbers. For instance, use v2 and not v2.2
19
+ # @param [String] provider_id Required parameter: Id of provider
20
+ # @param [Date] start_time Optional parameter: Start date for use in
21
+ # retrieval of statements (ISO 8601)
22
+ # @param [Date] end_time Optional parameter: End date for use in retrieval
23
+ # of statements (ISO 8601)
24
+ # @param [String] offset Optional parameter: The number of items to skip
25
+ # before the first in the response. The default is 0.
26
+ # @param [Integer] limit Optional parameter: The maximum number of items to
27
+ # be returned in the response. The default is 50.
28
+ # @param [XAkoyaInteractionType] x_akoya_interaction_type Optional
29
+ # parameter: Optional but recommended header to include with each data
30
+ # request. Allowed values are `user` or `batch`. `user` indicates a
31
+ # request is prompted by an end-user action. `batch` indicates the request
32
+ # is part of a batch process.
33
+ # @return [ApiResponse] Complete http response with raw body and status code.
34
+ def get_statement_list(account_id,
35
+ version,
36
+ provider_id,
37
+ start_time: nil,
38
+ end_time: nil,
39
+ offset: '0',
40
+ limit: 50,
41
+ x_akoya_interaction_type: nil)
42
+ @api_call
43
+ .request(new_request_builder(HttpMethodEnum::GET,
44
+ '/statements/{version}/{providerId}/{accountId}',
45
+ Server::DEFAULT)
46
+ .template_param(new_parameter(account_id, key: 'accountId')
47
+ .is_required(true)
48
+ .should_encode(true))
49
+ .template_param(new_parameter(version, key: 'version')
50
+ .is_required(true)
51
+ .should_encode(true))
52
+ .template_param(new_parameter(provider_id, key: 'providerId')
53
+ .is_required(true)
54
+ .should_encode(true))
55
+ .query_param(new_parameter(start_time, key: 'startTime'))
56
+ .query_param(new_parameter(end_time, key: 'endTime'))
57
+ .query_param(new_parameter(offset, key: 'offset'))
58
+ .query_param(new_parameter(limit, key: 'limit'))
59
+ .header_param(new_parameter(x_akoya_interaction_type, key: 'x-akoya-interaction-type'))
60
+ .header_param(new_parameter('application/json', key: 'accept'))
61
+ .auth(Single.new('bearerAuth')))
62
+ .response(new_response_handler
63
+ .deserializer(APIHelper.method(:custom_type_deserializer))
64
+ .deserialize_into(AnArrayOfStatements.method(:from_hash))
65
+ .is_api_response(true)
66
+ .local_error('400',
67
+ 'Start or end date value is not in the ISO 8601 format',
68
+ ErrorEntityException)
69
+ .local_error('404',
70
+ '404 - Not found',
71
+ ErrorEntityException)
72
+ .local_error('500',
73
+ '500 - Internal server error',
74
+ ErrorEntityException)
75
+ .local_error('501',
76
+ '1106 - Version not supported or not implemented',
77
+ ErrorEntityException)
78
+ .local_error('503',
79
+ '503 - System is down for maintenance',
80
+ ErrorEntityException))
81
+ .execute
82
+ end
83
+
84
+ # Retrieve a specific account statement file. Use [HTTP Accept
85
+ # request-header](https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html)
86
+ # to specify desired content types.
87
+ # For the initial launch, only PDF statements are supported. PDFs are
88
+ # returned in the response.
89
+ # ### cURL request
90
+ # We recommend using the auto-generated cURL request with the {idToken},
91
+ # accountId, providerId, statementId, and version with an added cURL
92
+ # parameter to return the output to a file. For example:
93
+ # ```curl
94
+ # curl --request GET --url
95
+ # https://sandbox-products.ddp.akoya.com/statements/v2/mikomo/513815781465/P
96
+ # 9CvLPKDaFRMbNDkhu1 --header "accept: application/pdf" --header
97
+ # "authorization: Bearer {idtoken}" --output example.pdf
98
+ # ```
99
+ # @param [String] account_id Required parameter: Account Identifier
100
+ # @param [String] version Required parameter: Akoya major version number. Do
101
+ # not use minor version numbers. For instance, use v2 and not v2.2
102
+ # @param [String] provider_id Required parameter: Id of provider
103
+ # @param [String] statement_id Required parameter: Statement Identifier
104
+ # @param [XAkoyaInteractionType] x_akoya_interaction_type Optional
105
+ # parameter: Optional but recommended header to include with each data
106
+ # request. Allowed values are `user` or `batch`. `user` indicates a
107
+ # request is prompted by an end-user action. `batch` indicates the request
108
+ # is part of a batch process.
109
+ # @return [ApiResponse] Complete http response with raw body and status code.
110
+ def get_statements(account_id,
111
+ version,
112
+ provider_id,
113
+ statement_id,
114
+ x_akoya_interaction_type: nil)
115
+ @api_call
116
+ .request(new_request_builder(HttpMethodEnum::GET,
117
+ '/statements/{version}/{providerId}/{accountId}/{statementId}',
118
+ Server::DEFAULT)
119
+ .template_param(new_parameter(account_id, key: 'accountId')
120
+ .is_required(true)
121
+ .should_encode(true))
122
+ .template_param(new_parameter(version, key: 'version')
123
+ .is_required(true)
124
+ .should_encode(true))
125
+ .template_param(new_parameter(provider_id, key: 'providerId')
126
+ .is_required(true)
127
+ .should_encode(true))
128
+ .template_param(new_parameter(statement_id, key: 'statementId')
129
+ .is_required(true)
130
+ .should_encode(true))
131
+ .header_param(new_parameter(x_akoya_interaction_type, key: 'x-akoya-interaction-type'))
132
+ .header_param(new_parameter('application/json', key: 'accept'))
133
+ .auth(Single.new('bearerAuth')))
134
+ .response(new_response_handler
135
+ .deserializer(APIHelper.method(:dynamic_deserializer))
136
+ .is_api_response(true)
137
+ .local_error('400',
138
+ 'Statement is processing and is not yet available',
139
+ ErrorEntityException)
140
+ .local_error('404',
141
+ 'When account is present with no statements in it',
142
+ ErrorEntityException)
143
+ .local_error('406',
144
+ '1203 - Content Type not Supported',
145
+ ErrorEntityException)
146
+ .local_error('500',
147
+ '500 - Internal server error',
148
+ ErrorEntityException)
149
+ .local_error('501',
150
+ '1106 - Version not supported or not implemented',
151
+ ErrorEntityException)
152
+ .local_error('503',
153
+ '503 - System is down for maintenance',
154
+ ErrorEntityException))
155
+ .execute
156
+ end
157
+ end
158
+ end