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.
- checksums.yaml +7 -0
- data/LICENSE +28 -0
- data/README.md +190 -0
- data/bin/console +15 -0
- data/lib/akoya/api_helper.rb +10 -0
- data/lib/akoya/client.rb +117 -0
- data/lib/akoya/configuration.rb +195 -0
- data/lib/akoya/controllers/account_information_controller.rb +93 -0
- data/lib/akoya/controllers/balances_controller.rb +92 -0
- data/lib/akoya/controllers/base_controller.rb +65 -0
- data/lib/akoya/controllers/customers_controller.rb +112 -0
- data/lib/akoya/controllers/investments_controller.rb +95 -0
- data/lib/akoya/controllers/payments_controller.rb +70 -0
- data/lib/akoya/controllers/statements_controller.rb +158 -0
- data/lib/akoya/controllers/tokens_controller.rb +122 -0
- data/lib/akoya/controllers/transactions_controller.rb +108 -0
- data/lib/akoya/exceptions/api_exception.rb +21 -0
- data/lib/akoya/exceptions/error_entity_exception.rb +54 -0
- data/lib/akoya/exceptions/error_response_exception.rb +53 -0
- data/lib/akoya/http/api_response.rb +19 -0
- data/lib/akoya/http/auth/basic_auth.rb +62 -0
- data/lib/akoya/http/auth/bearer_auth.rb +53 -0
- data/lib/akoya/http/http_call_back.rb +10 -0
- data/lib/akoya/http/http_method_enum.rb +10 -0
- data/lib/akoya/http/http_request.rb +10 -0
- data/lib/akoya/http/http_response.rb +10 -0
- data/lib/akoya/http/proxy_settings.rb +22 -0
- data/lib/akoya/logging/configuration/api_logging_configuration.rb +186 -0
- data/lib/akoya/logging/sdk_logger.rb +17 -0
- data/lib/akoya/models/account.rb +86 -0
- data/lib/akoya/models/account_category.rb +50 -0
- data/lib/akoya/models/account_contact_entity.rb +132 -0
- data/lib/akoya/models/account_holder_entity.rb +178 -0
- data/lib/akoya/models/account_holder_relationship.rb +110 -0
- data/lib/akoya/models/account_holder_relationship_account_holder_entity.rb +110 -0
- data/lib/akoya/models/account_information.rb +335 -0
- data/lib/akoya/models/action.rb +48 -0
- data/lib/akoya/models/address.rb +144 -0
- data/lib/akoya/models/akoya_account_info_product.rb +88 -0
- data/lib/akoya/models/an_array_of_statements.rb +95 -0
- data/lib/akoya/models/an_investment_holding.rb +493 -0
- data/lib/akoya/models/annual_increase_type.rb +40 -0
- data/lib/akoya/models/annuity_account.rb +370 -0
- data/lib/akoya/models/annuity_account_info.rb +86 -0
- data/lib/akoya/models/annuity_balance_details.rb +87 -0
- data/lib/akoya/models/annuity_balances.rb +477 -0
- data/lib/akoya/models/annuity_product_type.rb +36 -0
- data/lib/akoya/models/annuity_value_basis.rb +36 -0
- data/lib/akoya/models/array_of_account_payment_networks.rb +85 -0
- data/lib/akoya/models/asset_class.rb +95 -0
- data/lib/akoya/models/asset_class_an_investment_holding.rb +85 -0
- data/lib/akoya/models/asset_class_asset_class.rb +56 -0
- data/lib/akoya/models/asset_class_citi_bank_investment_holdings.rb +86 -0
- data/lib/akoya/models/balance_type.rb +37 -0
- data/lib/akoya/models/balance_type_investment_balance_list.rb +36 -0
- data/lib/akoya/models/balances.rb +88 -0
- data/lib/akoya/models/base_model.rb +110 -0
- data/lib/akoya/models/business_customer_entity.rb +127 -0
- data/lib/akoya/models/business_customer_entity_account_holder_entity.rb +126 -0
- data/lib/akoya/models/business_customer_entity_customer.rb +126 -0
- data/lib/akoya/models/call_type.rb +44 -0
- data/lib/akoya/models/citi_bank_investment.rb +535 -0
- data/lib/akoya/models/citi_bank_investment_details.rb +75 -0
- data/lib/akoya/models/citi_bank_investment_holdings.rb +210 -0
- data/lib/akoya/models/compounding_period.rb +56 -0
- data/lib/akoya/models/contribution_entity.rb +266 -0
- data/lib/akoya/models/coupon_mature_frequency.rb +48 -0
- data/lib/akoya/models/currency.rb +108 -0
- data/lib/akoya/models/currency_citi_bank_investment_holdings.rb +86 -0
- data/lib/akoya/models/currency_entity.rb +109 -0
- data/lib/akoya/models/current_customer.rb +75 -0
- data/lib/akoya/models/customer.rb +164 -0
- data/lib/akoya/models/customer_current_customer.rb +164 -0
- data/lib/akoya/models/customer_name.rb +127 -0
- data/lib/akoya/models/customer_name_account_holder_entity.rb +127 -0
- data/lib/akoya/models/customer_name_customer.rb +127 -0
- data/lib/akoya/models/debit_credit_memo.rb +37 -0
- data/lib/akoya/models/debt_class.rb +44 -0
- data/lib/akoya/models/debt_security.rb +137 -0
- data/lib/akoya/models/debt_security_entity.rb +216 -0
- data/lib/akoya/models/debt_type.rb +36 -0
- data/lib/akoya/models/delivery_address.rb +153 -0
- data/lib/akoya/models/deposit_account.rb +375 -0
- data/lib/akoya/models/deposit_account_info.rb +86 -0
- data/lib/akoya/models/deposit_balance_details.rb +87 -0
- data/lib/akoya/models/deposit_balances.rb +438 -0
- data/lib/akoya/models/deposit_transaction.rb +369 -0
- data/lib/akoya/models/deposit_transaction_details.rb +87 -0
- data/lib/akoya/models/domicile.rb +85 -0
- data/lib/akoya/models/equity_grant.rb +199 -0
- data/lib/akoya/models/error_entity_account_information.rb +97 -0
- data/lib/akoya/models/error_entity_annuity_account.rb +97 -0
- data/lib/akoya/models/error_entity_annuity_balances.rb +97 -0
- data/lib/akoya/models/error_entity_citi_bank_investment.rb +97 -0
- data/lib/akoya/models/error_entity_deposit_account.rb +97 -0
- data/lib/akoya/models/error_entity_deposit_balances.rb +97 -0
- data/lib/akoya/models/error_entity_insurance_account.rb +97 -0
- data/lib/akoya/models/error_entity_insurance_balances.rb +97 -0
- data/lib/akoya/models/error_entity_investment_account.rb +97 -0
- data/lib/akoya/models/error_entity_investment_balances.rb +97 -0
- data/lib/akoya/models/error_entity_line_of_credit_balances.rb +97 -0
- data/lib/akoya/models/error_entity_loan_account.rb +97 -0
- data/lib/akoya/models/error_entity_loan_balances.rb +97 -0
- data/lib/akoya/models/error_entity_us_bank_investment.rb +97 -0
- data/lib/akoya/models/fi_asset_class.rb +95 -0
- data/lib/akoya/models/fi_asset_class_an_investment_holding.rb +85 -0
- data/lib/akoya/models/fi_attribute.rb +95 -0
- data/lib/akoya/models/fi_attribute_entity.rb +95 -0
- data/lib/akoya/models/frequency.rb +56 -0
- data/lib/akoya/models/hateoas_link.rb +105 -0
- data/lib/akoya/models/held_in_account.rb +44 -0
- data/lib/akoya/models/holding_sub_type.rb +36 -0
- data/lib/akoya/models/holding_type.rb +56 -0
- data/lib/akoya/models/income_type.rb +41 -0
- data/lib/akoya/models/industry_code.rb +85 -0
- data/lib/akoya/models/insurance_account.rb +349 -0
- data/lib/akoya/models/insurance_account_info.rb +87 -0
- data/lib/akoya/models/insurance_balance_details.rb +87 -0
- data/lib/akoya/models/insurance_balances.rb +420 -0
- data/lib/akoya/models/insurance_transaction.rb +351 -0
- data/lib/akoya/models/insurance_transaction_details.rb +87 -0
- data/lib/akoya/models/interest_rate_type.rb +36 -0
- data/lib/akoya/models/inv401_k_source.rb +56 -0
- data/lib/akoya/models/inv401_k_source_open_order_entity.rb +57 -0
- data/lib/akoya/models/inv401_k_surce.rb +56 -0
- data/lib/akoya/models/investment_account.rb +411 -0
- data/lib/akoya/models/investment_account_annuity_balance.rb +87 -0
- data/lib/akoya/models/investment_account_deposit_balance.rb +87 -0
- data/lib/akoya/models/investment_account_info.rb +87 -0
- data/lib/akoya/models/investment_account_insurance_balance.rb +87 -0
- data/lib/akoya/models/investment_account_loan_balance.rb +86 -0
- data/lib/akoya/models/investment_account_loc_balance.rb +86 -0
- data/lib/akoya/models/investment_balance_details.rb +87 -0
- data/lib/akoya/models/investment_balance_list.rb +148 -0
- data/lib/akoya/models/investment_balances.rb +525 -0
- data/lib/akoya/models/investment_details.rb +88 -0
- data/lib/akoya/models/investment_loan_entity.rb +271 -0
- data/lib/akoya/models/investment_transaction.rb +783 -0
- data/lib/akoya/models/investment_transaction_details.rb +87 -0
- data/lib/akoya/models/investments.rb +88 -0
- data/lib/akoya/models/line_item.rb +156 -0
- data/lib/akoya/models/line_of_credit_balances.rb +601 -0
- data/lib/akoya/models/links.rb +95 -0
- data/lib/akoya/models/loan_account.rb +417 -0
- data/lib/akoya/models/loan_account_info.rb +86 -0
- data/lib/akoya/models/loan_balance_details.rb +86 -0
- data/lib/akoya/models/loan_balances.rb +556 -0
- data/lib/akoya/models/loan_payment_frequency.rb +68 -0
- data/lib/akoya/models/loan_transaction.rb +360 -0
- data/lib/akoya/models/loan_transaction_details.rb +87 -0
- data/lib/akoya/models/loc_account_info.rb +86 -0
- data/lib/akoya/models/loc_balance_details.rb +86 -0
- data/lib/akoya/models/loc_transaction.rb +372 -0
- data/lib/akoya/models/loc_transaction_details.rb +86 -0
- data/lib/akoya/models/mnext.rb +84 -0
- data/lib/akoya/models/mode.rb +36 -0
- data/lib/akoya/models/mutual_fund_security.rb +99 -0
- data/lib/akoya/models/mutual_fund_security_entity.rb +150 -0
- data/lib/akoya/models/mutual_fund_type.rb +40 -0
- data/lib/akoya/models/obtain_tokens.rb +99 -0
- data/lib/akoya/models/open_order_entity.rb +228 -0
- data/lib/akoya/models/option_security.rb +125 -0
- data/lib/akoya/models/option_security_entity.rb +127 -0
- data/lib/akoya/models/option_type.rb +36 -0
- data/lib/akoya/models/order_duration.rb +40 -0
- data/lib/akoya/models/order_type.rb +60 -0
- data/lib/akoya/models/other_security_entity.rb +77 -0
- data/lib/akoya/models/paginated_array.rb +75 -0
- data/lib/akoya/models/payment_details.rb +142 -0
- data/lib/akoya/models/payment_frequency.rb +56 -0
- data/lib/akoya/models/payment_frequency_annuity_account.rb +44 -0
- data/lib/akoya/models/payment_frequency_annuity_balances.rb +44 -0
- data/lib/akoya/models/payment_network_supported_by_account.rb +129 -0
- data/lib/akoya/models/pension_source_entity.rb +143 -0
- data/lib/akoya/models/period_certain_guarantee.rb +48 -0
- data/lib/akoya/models/policy_premium_term.rb +36 -0
- data/lib/akoya/models/position_type.rb +36 -0
- data/lib/akoya/models/postion_type.rb +36 -0
- data/lib/akoya/models/prev.rb +84 -0
- data/lib/akoya/models/refresh_tokens.rb +103 -0
- data/lib/akoya/models/secured.rb +36 -0
- data/lib/akoya/models/security_id_type.rb +52 -0
- data/lib/akoya/models/security_id_type_investment_transaction.rb +52 -0
- data/lib/akoya/models/security_type.rb +56 -0
- data/lib/akoya/models/statement_entity.rb +136 -0
- data/lib/akoya/models/status.rb +56 -0
- data/lib/akoya/models/status_deposit_transaction.rb +44 -0
- data/lib/akoya/models/status_insurance_transaction.rb +44 -0
- data/lib/akoya/models/status_investment_transaction.rb +44 -0
- data/lib/akoya/models/status_loan_transaction.rb +44 -0
- data/lib/akoya/models/status_loc_transaction.rb +44 -0
- data/lib/akoya/models/status_statement_entity.rb +40 -0
- data/lib/akoya/models/status_transaction.rb +44 -0
- data/lib/akoya/models/stock_security_entity.rb +137 -0
- data/lib/akoya/models/stock_type.rb +56 -0
- data/lib/akoya/models/sub_account.rb +44 -0
- data/lib/akoya/models/sub_account_fund.rb +44 -0
- data/lib/akoya/models/sub_account_sec.rb +44 -0
- data/lib/akoya/models/sweep_security_entity.rb +118 -0
- data/lib/akoya/models/tax_lot.rb +137 -0
- data/lib/akoya/models/tax_lot_an_investment_holding.rb +139 -0
- data/lib/akoya/models/telephone.rb +95 -0
- data/lib/akoya/models/telephone_number.rb +95 -0
- data/lib/akoya/models/token_example_response.rb +101 -0
- data/lib/akoya/models/transaction.rb +328 -0
- data/lib/akoya/models/transaction_reason.rb +41 -0
- data/lib/akoya/models/transaction_type.rb +84 -0
- data/lib/akoya/models/transaction_type_insurance_transaction.rb +44 -0
- data/lib/akoya/models/transaction_type_investment_transaction.rb +192 -0
- data/lib/akoya/models/transaction_type_loan_transaction.rb +44 -0
- data/lib/akoya/models/transaction_type_loc_transaction.rb +84 -0
- data/lib/akoya/models/transactions_entity.rb +98 -0
- data/lib/akoya/models/transfer_action.rb +36 -0
- data/lib/akoya/models/type.rb +44 -0
- data/lib/akoya/models/type_hateoas_link.rb +52 -0
- data/lib/akoya/models/type_telephone_number.rb +44 -0
- data/lib/akoya/models/unit_type.rb +36 -0
- data/lib/akoya/models/unit_type_open_order_entity.rb +36 -0
- data/lib/akoya/models/us_bank_investment.rb +535 -0
- data/lib/akoya/models/us_bank_investment_details.rb +75 -0
- data/lib/akoya/models/us_bank_investment_holdings.rb +403 -0
- data/lib/akoya/models/vesting.rb +135 -0
- data/lib/akoya/models/vesting_entity.rb +185 -0
- data/lib/akoya/models/x_akoya_interaction_type.rb +36 -0
- data/lib/akoya/utilities/date_time_helper.rb +11 -0
- data/lib/akoya/utilities/file_wrapper.rb +28 -0
- data/lib/akoya/utilities/union_type_lookup.rb +91 -0
- data/lib/akoya.rb +250 -0
- metadata +312 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: f6a94449d48e44a1f094ac91168e23a80e10a2665e51fda3df438ee583c0ce24
|
|
4
|
+
data.tar.gz: ce62dbba9555bea1eaa2d3983d372415d47449b43428b039334be8999bf02b9b
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 2050e37cc0eb2ab392bd3cc23e8a6aaf929965b507b8e5846b49d905988953228df1e6aa135a79033e9b41d93d69f7cccf45bc0c89aae2fdc95a87fb8106f795
|
|
7
|
+
data.tar.gz: c14099d225ca6bddae0528dbd503d7fce2127a1c816e56f6f6f505a334ea4d53eb4d5bb5c0c3f28f17fc0170ac1c09cc22391368343736ba1a280caec568a88f
|
data/LICENSE
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
License:
|
|
2
|
+
========
|
|
3
|
+
The MIT License (MIT)
|
|
4
|
+
http://opensource.org/licenses/MIT
|
|
5
|
+
|
|
6
|
+
Copyright (c) 2014 - 2026 APIMATIC Limited
|
|
7
|
+
|
|
8
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
9
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
10
|
+
in the Software without restriction, including without limitation the rights
|
|
11
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
12
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
13
|
+
furnished to do so, subject to the following conditions:
|
|
14
|
+
|
|
15
|
+
The above copyright notice and this permission notice shall be included in
|
|
16
|
+
all copies or substantial portions of the Software.
|
|
17
|
+
|
|
18
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
19
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
20
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
21
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
22
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
23
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
24
|
+
THE SOFTWARE.
|
|
25
|
+
|
|
26
|
+
Trade Mark:
|
|
27
|
+
==========
|
|
28
|
+
APIMATIC is a trade mark for APIMATIC Limited
|
data/README.md
ADDED
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
|
|
2
|
+
# Getting Started with Akoya
|
|
3
|
+
|
|
4
|
+
## Introduction
|
|
5
|
+
|
|
6
|
+
Akoya product APIs for data access. Default servers are set for the Akoya sandbox environment.
|
|
7
|
+
|
|
8
|
+
Akoya APIs include the following updates:
|
|
9
|
+
|
|
10
|
+
- v2.2.2
|
|
11
|
+
- Added mode query parameter to Account Information, Balances, Investments, and Transactions to support standard mode.
|
|
12
|
+
- Edited callouts for Account Holder endpoint
|
|
13
|
+
- v2.2.1
|
|
14
|
+
- Fixed typo in `accountIds` query parameter for `/accounts-info`, `/balances`, `/accounts`
|
|
15
|
+
- Added security method for `Account holder information` to bear token. Missing method defaulted to basic auth.
|
|
16
|
+
- Added examples and descriptions to some schemas
|
|
17
|
+
- Added HTTP status `429` FDX error `1207`.
|
|
18
|
+
- v2.2 Additions
|
|
19
|
+
- Added optional `x-akoya-interaction-type` header to all endpoints to specify if a request is part of a batch process
|
|
20
|
+
- Update of tags to organize endpoints by Akoya product
|
|
21
|
+
- `206` response added to `/accounts-info`, `/balances`, `/accounts`
|
|
22
|
+
- v2.1 New Statements product and Customers product updated with additional endpoint, `Account holder information`.
|
|
23
|
+
- v2.0 Launch of Akoya products: Account Info, Balances, Investments, Transactions, Payments, Customers.
|
|
24
|
+
|
|
25
|
+
## Install the Package
|
|
26
|
+
|
|
27
|
+
Install the gem from the command line:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
gem install apimatic-ak-sdk -v 0.0.1
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Or add the gem to your Gemfile and run `bundle`:
|
|
34
|
+
|
|
35
|
+
```ruby
|
|
36
|
+
gem 'apimatic-ak-sdk', '0.0.1'
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
For additional gem details, see the [RubyGems page for the apimatic-ak-sdk gem](https://rubygems.org/gems/apimatic-ak-sdk/versions/0.0.1).
|
|
40
|
+
|
|
41
|
+
## IRB Console Usage
|
|
42
|
+
|
|
43
|
+
You can explore the SDK interactively using IRB in two ways
|
|
44
|
+
|
|
45
|
+
### 1. Use IRB with Installed Gem
|
|
46
|
+
|
|
47
|
+
Open your system terminal (Command Prompt, Git Bash or macOS Terminal) and type the following command to start the irb console.
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
irb
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Now you can load the SDK in the IRB
|
|
54
|
+
|
|
55
|
+
```ruby
|
|
56
|
+
require 'akoya'
|
|
57
|
+
include Akoya
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### 2. Use IRB within SDK
|
|
61
|
+
|
|
62
|
+
Open your system terminal (Command Prompt, Git Bash or macOS Terminal) and navigate to the root folder of SDK.
|
|
63
|
+
|
|
64
|
+
```
|
|
65
|
+
cd path/to/akoya
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Now you can start the preconfigured irb console by running the following command
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
ruby bin/console
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
**_Note:_** This automatically loads the SDK from lib/
|
|
75
|
+
|
|
76
|
+
## Initialize the API Client
|
|
77
|
+
|
|
78
|
+
**_Note:_** Documentation for the client can be found [here.](https://www.github.com/sdks-io/apimatic-ak-ruby-sdk/tree/0.0.1/doc/client.md)
|
|
79
|
+
|
|
80
|
+
The following parameters are configurable for the API Client:
|
|
81
|
+
|
|
82
|
+
| Parameter | Type | Description |
|
|
83
|
+
| --- | --- | --- |
|
|
84
|
+
| environment | [`Environment`](https://www.github.com/sdks-io/apimatic-ak-ruby-sdk/tree/0.0.1/README.md#environments) | The API environment. <br> **Default: `Environment.PRODUCTION`** |
|
|
85
|
+
| connection | `Faraday::Connection` | The Faraday connection object passed by the SDK user for making requests |
|
|
86
|
+
| adapter | `Faraday::Adapter` | The Faraday adapter object passed by the SDK user for performing http requests |
|
|
87
|
+
| timeout | `Float` | The value to use for connection timeout. <br> **Default: 60** |
|
|
88
|
+
| max_retries | `Integer` | The number of times to retry an endpoint call if it fails. <br> **Default: 0** |
|
|
89
|
+
| retry_interval | `Float` | Pause in seconds between retries. <br> **Default: 1** |
|
|
90
|
+
| backoff_factor | `Float` | The amount to multiply each successive retry's interval amount by in order to provide backoff. <br> **Default: 2** |
|
|
91
|
+
| retry_statuses | `Array` | A list of HTTP statuses to retry. <br> **Default: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524]** |
|
|
92
|
+
| retry_methods | `Array` | A list of HTTP methods to retry. <br> **Default: %i[get put]** |
|
|
93
|
+
| http_callback | `HttpCallBack` | The Http CallBack allows defining callables for pre and post API calls. |
|
|
94
|
+
| proxy_settings | [`ProxySettings`](https://www.github.com/sdks-io/apimatic-ak-ruby-sdk/tree/0.0.1/doc/proxy-settings.md) | Optional proxy configuration to route HTTP requests through a proxy server. |
|
|
95
|
+
| logging_configuration | [`LoggingConfiguration`](https://www.github.com/sdks-io/apimatic-ak-ruby-sdk/tree/0.0.1/doc/logging-configuration.md) | The SDK logging configuration for API calls |
|
|
96
|
+
| basic_auth_credentials | [`BasicAuthCredentials`](https://www.github.com/sdks-io/apimatic-ak-ruby-sdk/tree/0.0.1/doc/auth/basic-authentication.md) | The credential object for Basic Authentication |
|
|
97
|
+
| bearer_auth_credentials | [`BearerAuthCredentials`](https://www.github.com/sdks-io/apimatic-ak-ruby-sdk/tree/0.0.1/doc/auth/oauth-2-bearer-token.md) | The credential object for OAuth 2 Bearer token |
|
|
98
|
+
|
|
99
|
+
The API client can be initialized as follows:
|
|
100
|
+
|
|
101
|
+
### Code-Based Client Initialization
|
|
102
|
+
|
|
103
|
+
```ruby
|
|
104
|
+
require 'akoya'
|
|
105
|
+
include Akoya
|
|
106
|
+
|
|
107
|
+
client = Client.new(
|
|
108
|
+
basic_auth_credentials: BasicAuthCredentials.new(
|
|
109
|
+
username: 'Username',
|
|
110
|
+
password: 'Password'
|
|
111
|
+
),
|
|
112
|
+
bearer_auth_credentials: BearerAuthCredentials.new(
|
|
113
|
+
access_token: 'AccessToken'
|
|
114
|
+
),
|
|
115
|
+
environment: Environment::PRODUCTION,
|
|
116
|
+
logging_configuration: LoggingConfiguration.new(
|
|
117
|
+
log_level: Logger::INFO,
|
|
118
|
+
request_logging_config: RequestLoggingConfiguration.new(
|
|
119
|
+
log_body: true
|
|
120
|
+
),
|
|
121
|
+
response_logging_config: ResponseLoggingConfiguration.new(
|
|
122
|
+
log_headers: true
|
|
123
|
+
)
|
|
124
|
+
)
|
|
125
|
+
)
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
### Environment-Based Client Initialization
|
|
129
|
+
|
|
130
|
+
```ruby
|
|
131
|
+
require 'akoya'
|
|
132
|
+
include Akoya
|
|
133
|
+
|
|
134
|
+
# Create client from environment
|
|
135
|
+
client = Client.from_env
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
See the [`Environment-Based Client Initialization`](https://www.github.com/sdks-io/apimatic-ak-ruby-sdk/tree/0.0.1/doc/environment-based-client-initialization.md) section for details.
|
|
139
|
+
|
|
140
|
+
## Environments
|
|
141
|
+
|
|
142
|
+
The SDK can be configured to use a different environment for making API calls. Available environments are:
|
|
143
|
+
|
|
144
|
+
### Fields
|
|
145
|
+
|
|
146
|
+
| Name | Description |
|
|
147
|
+
| --- | --- |
|
|
148
|
+
| PRODUCTION | **Default** Sandbox server |
|
|
149
|
+
| ENVIRONMENT2 | Products server |
|
|
150
|
+
|
|
151
|
+
## Authorization
|
|
152
|
+
|
|
153
|
+
This API uses the following authentication schemes.
|
|
154
|
+
|
|
155
|
+
* [`basicAuth (Basic Authentication)`](https://www.github.com/sdks-io/apimatic-ak-ruby-sdk/tree/0.0.1/doc/auth/basic-authentication.md)
|
|
156
|
+
* [`bearerAuth (OAuth 2 Bearer token)`](https://www.github.com/sdks-io/apimatic-ak-ruby-sdk/tree/0.0.1/doc/auth/oauth-2-bearer-token.md)
|
|
157
|
+
|
|
158
|
+
## List of APIs
|
|
159
|
+
|
|
160
|
+
* [Accountinformation](https://www.github.com/sdks-io/apimatic-ak-ruby-sdk/tree/0.0.1/doc/controllers/accountinformation.md)
|
|
161
|
+
* [Balances](https://www.github.com/sdks-io/apimatic-ak-ruby-sdk/tree/0.0.1/doc/controllers/balances.md)
|
|
162
|
+
* [Customers](https://www.github.com/sdks-io/apimatic-ak-ruby-sdk/tree/0.0.1/doc/controllers/customers.md)
|
|
163
|
+
* [Investments](https://www.github.com/sdks-io/apimatic-ak-ruby-sdk/tree/0.0.1/doc/controllers/investments.md)
|
|
164
|
+
* [Payments](https://www.github.com/sdks-io/apimatic-ak-ruby-sdk/tree/0.0.1/doc/controllers/payments.md)
|
|
165
|
+
* [Statements](https://www.github.com/sdks-io/apimatic-ak-ruby-sdk/tree/0.0.1/doc/controllers/statements.md)
|
|
166
|
+
* [Transactions](https://www.github.com/sdks-io/apimatic-ak-ruby-sdk/tree/0.0.1/doc/controllers/transactions.md)
|
|
167
|
+
* [Tokens](https://www.github.com/sdks-io/apimatic-ak-ruby-sdk/tree/0.0.1/doc/controllers/tokens.md)
|
|
168
|
+
|
|
169
|
+
## SDK Infrastructure
|
|
170
|
+
|
|
171
|
+
### Configuration
|
|
172
|
+
|
|
173
|
+
* [ProxySettings](https://www.github.com/sdks-io/apimatic-ak-ruby-sdk/tree/0.0.1/doc/proxy-settings.md)
|
|
174
|
+
* [Environment-Based Client Initialization](https://www.github.com/sdks-io/apimatic-ak-ruby-sdk/tree/0.0.1/doc/environment-based-client-initialization.md)
|
|
175
|
+
* [AbstractLogger](https://www.github.com/sdks-io/apimatic-ak-ruby-sdk/tree/0.0.1/doc/abstract-logger.md)
|
|
176
|
+
* [LoggingConfiguration](https://www.github.com/sdks-io/apimatic-ak-ruby-sdk/tree/0.0.1/doc/logging-configuration.md)
|
|
177
|
+
* [RequestLoggingConfiguration](https://www.github.com/sdks-io/apimatic-ak-ruby-sdk/tree/0.0.1/doc/request-logging-configuration.md)
|
|
178
|
+
* [ResponseLoggingConfiguration](https://www.github.com/sdks-io/apimatic-ak-ruby-sdk/tree/0.0.1/doc/response-logging-configuration.md)
|
|
179
|
+
|
|
180
|
+
### HTTP
|
|
181
|
+
|
|
182
|
+
* [HttpResponse](https://www.github.com/sdks-io/apimatic-ak-ruby-sdk/tree/0.0.1/doc/http-response.md)
|
|
183
|
+
* [HttpRequest](https://www.github.com/sdks-io/apimatic-ak-ruby-sdk/tree/0.0.1/doc/http-request.md)
|
|
184
|
+
|
|
185
|
+
### Utilities
|
|
186
|
+
|
|
187
|
+
* [ApiResponse](https://www.github.com/sdks-io/apimatic-ak-ruby-sdk/tree/0.0.1/doc/api-response.md)
|
|
188
|
+
* [ApiHelper](https://www.github.com/sdks-io/apimatic-ak-ruby-sdk/tree/0.0.1/doc/api-helper.md)
|
|
189
|
+
* [DateTimeHelper](https://www.github.com/sdks-io/apimatic-ak-ruby-sdk/tree/0.0.1/doc/date-time-helper.md)
|
|
190
|
+
|
data/bin/console
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
|
|
3
|
+
# Load the lib folder into Ruby's load path
|
|
4
|
+
$LOAD_PATH.unshift(File.expand_path('../lib', __dir__))
|
|
5
|
+
|
|
6
|
+
# Require the gem
|
|
7
|
+
require 'akoya'
|
|
8
|
+
|
|
9
|
+
puts 'Akoya SDK loaded!'
|
|
10
|
+
puts 'You can now create a client with: client = Akoya::Client.new'
|
|
11
|
+
puts 'Or use from_env: client = Akoya::Client.from_env'
|
|
12
|
+
|
|
13
|
+
# Start an interactive IRB session
|
|
14
|
+
require 'irb'
|
|
15
|
+
IRB.start
|
data/lib/akoya/client.rb
ADDED
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
# akoya
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module Akoya
|
|
7
|
+
# akoya 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 account_information controller.
|
|
17
|
+
# @return [AccountInformationController] Returns the controller instance.
|
|
18
|
+
def account_information
|
|
19
|
+
@account_information ||= AccountInformationController.new @global_configuration
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
# Access to balances controller.
|
|
23
|
+
# @return [BalancesController] Returns the controller instance.
|
|
24
|
+
def balances
|
|
25
|
+
@balances ||= BalancesController.new @global_configuration
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# Access to customers controller.
|
|
29
|
+
# @return [CustomersController] Returns the controller instance.
|
|
30
|
+
def customers
|
|
31
|
+
@customers ||= CustomersController.new @global_configuration
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
# Access to investments controller.
|
|
35
|
+
# @return [InvestmentsController] Returns the controller instance.
|
|
36
|
+
def investments
|
|
37
|
+
@investments ||= InvestmentsController.new @global_configuration
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# Access to payments controller.
|
|
41
|
+
# @return [PaymentsController] Returns the controller instance.
|
|
42
|
+
def payments
|
|
43
|
+
@payments ||= PaymentsController.new @global_configuration
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# Access to statements controller.
|
|
47
|
+
# @return [StatementsController] Returns the controller instance.
|
|
48
|
+
def statements
|
|
49
|
+
@statements ||= StatementsController.new @global_configuration
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# Access to transactions controller.
|
|
53
|
+
# @return [TransactionsController] Returns the controller instance.
|
|
54
|
+
def transactions
|
|
55
|
+
@transactions ||= TransactionsController.new @global_configuration
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# Access to tokens controller.
|
|
59
|
+
# @return [TokensController] Returns the controller instance.
|
|
60
|
+
def tokens
|
|
61
|
+
@tokens ||= TokensController.new @global_configuration
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
def initialize(
|
|
65
|
+
connection: nil, adapter: :net_http_persistent, timeout: 60,
|
|
66
|
+
max_retries: 0, retry_interval: 1, backoff_factor: 2,
|
|
67
|
+
retry_statuses: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524],
|
|
68
|
+
retry_methods: %i[get put], http_callback: nil, proxy_settings: nil,
|
|
69
|
+
logging_configuration: nil, environment: Environment::PRODUCTION,
|
|
70
|
+
basic_auth_credentials: nil, bearer_auth_credentials: nil, config: nil
|
|
71
|
+
)
|
|
72
|
+
@config = if config.nil?
|
|
73
|
+
Configuration.new(
|
|
74
|
+
connection: connection, adapter: adapter, timeout: timeout,
|
|
75
|
+
max_retries: max_retries, retry_interval: retry_interval,
|
|
76
|
+
backoff_factor: backoff_factor,
|
|
77
|
+
retry_statuses: retry_statuses,
|
|
78
|
+
retry_methods: retry_methods, http_callback: http_callback,
|
|
79
|
+
proxy_settings: proxy_settings,
|
|
80
|
+
logging_configuration: logging_configuration,
|
|
81
|
+
environment: environment,
|
|
82
|
+
basic_auth_credentials: basic_auth_credentials,
|
|
83
|
+
bearer_auth_credentials: bearer_auth_credentials
|
|
84
|
+
)
|
|
85
|
+
else
|
|
86
|
+
config
|
|
87
|
+
end
|
|
88
|
+
user_agent_params = BaseController.user_agent_parameters
|
|
89
|
+
|
|
90
|
+
@global_configuration = GlobalConfiguration.new(client_configuration: @config)
|
|
91
|
+
.base_uri_executor(@config.method(:get_base_uri))
|
|
92
|
+
.global_errors(BaseController::GLOBAL_ERRORS)
|
|
93
|
+
.user_agent(BaseController.user_agent,
|
|
94
|
+
agent_parameters: user_agent_params)
|
|
95
|
+
|
|
96
|
+
initialize_auth_managers(@global_configuration)
|
|
97
|
+
@global_configuration = @global_configuration.auth_managers(@auth_managers)
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
# Initializes the auth managers hash used for authenticating API calls.
|
|
101
|
+
# @param [GlobalConfiguration] global_config The global configuration of the SDK)
|
|
102
|
+
def initialize_auth_managers(global_config)
|
|
103
|
+
@auth_managers = {}
|
|
104
|
+
http_client_config = global_config.client_configuration
|
|
105
|
+
%w[basicAuth bearerAuth].each { |auth| @auth_managers[auth] = nil }
|
|
106
|
+
@auth_managers['basicAuth'] = BasicAuth.new(http_client_config.basic_auth_credentials)
|
|
107
|
+
@auth_managers['bearerAuth'] = BearerAuth.new(http_client_config.bearer_auth_credentials)
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# Creates a client directly from environment variables.
|
|
111
|
+
def self.from_env(**overrides)
|
|
112
|
+
default_config = Configuration.build_default_config_from_env
|
|
113
|
+
new_config = default_config.clone_with(**overrides)
|
|
114
|
+
new(config: new_config)
|
|
115
|
+
end
|
|
116
|
+
end
|
|
117
|
+
end
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
# akoya
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module Akoya
|
|
7
|
+
# An enum for SDK environments.
|
|
8
|
+
class Environment
|
|
9
|
+
# PRODUCTION: Sandbox server
|
|
10
|
+
# ENVIRONMENT2: Products server
|
|
11
|
+
ENVIRONMENT = [
|
|
12
|
+
PRODUCTION = 'production'.freeze,
|
|
13
|
+
ENVIRONMENT2 = 'environment2'.freeze
|
|
14
|
+
].freeze
|
|
15
|
+
|
|
16
|
+
# Converts a string or symbol into a valid Environment constant.
|
|
17
|
+
def self.from_value(value, default_value = PRODUCTION)
|
|
18
|
+
return default_value if value.nil?
|
|
19
|
+
|
|
20
|
+
str = value.to_s.strip.downcase
|
|
21
|
+
case str
|
|
22
|
+
when 'production' then PRODUCTION
|
|
23
|
+
when 'environment2' then ENVIRONMENT2
|
|
24
|
+
|
|
25
|
+
else
|
|
26
|
+
warn "[Environment] Unknown environment '#{value}', falling back to #{default_value} "
|
|
27
|
+
default_value
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# An enum for API servers.
|
|
33
|
+
class Server
|
|
34
|
+
SERVER = [
|
|
35
|
+
DEFAULT = 'default'.freeze,
|
|
36
|
+
DEFAULT1 = 'default1'.freeze
|
|
37
|
+
].freeze
|
|
38
|
+
|
|
39
|
+
# Converts a string or symbol into a valid Server constant.
|
|
40
|
+
def self.from_value(value, default_value = DEFAULT)
|
|
41
|
+
return default_value if value.nil?
|
|
42
|
+
|
|
43
|
+
str = value.to_s.strip.downcase
|
|
44
|
+
case str
|
|
45
|
+
when 'default' then DEFAULT
|
|
46
|
+
when 'default1' then DEFAULT1
|
|
47
|
+
|
|
48
|
+
else
|
|
49
|
+
warn "[Server] Unknown server '#{value}', falling back to #{default_value} "
|
|
50
|
+
default_value
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# All configuration including auth info and base URI for the API access
|
|
56
|
+
# are configured in this class.
|
|
57
|
+
class Configuration < CoreLibrary::HttpClientConfiguration
|
|
58
|
+
# The attribute readers for properties.
|
|
59
|
+
attr_reader :environment, :basic_auth_credentials, :bearer_auth_credentials
|
|
60
|
+
|
|
61
|
+
class << self
|
|
62
|
+
attr_reader :environments
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
def initialize(
|
|
66
|
+
connection: nil, adapter: :net_http_persistent, timeout: 60,
|
|
67
|
+
max_retries: 0, retry_interval: 1, backoff_factor: 2,
|
|
68
|
+
retry_statuses: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524],
|
|
69
|
+
retry_methods: %i[get put], http_callback: nil, proxy_settings: nil,
|
|
70
|
+
logging_configuration: nil, environment: Environment::PRODUCTION,
|
|
71
|
+
basic_auth_credentials: nil, bearer_auth_credentials: nil
|
|
72
|
+
)
|
|
73
|
+
super connection: connection, adapter: adapter, timeout: timeout,
|
|
74
|
+
max_retries: max_retries, retry_interval: retry_interval,
|
|
75
|
+
backoff_factor: backoff_factor, retry_statuses: retry_statuses,
|
|
76
|
+
retry_methods: retry_methods, http_callback: http_callback,
|
|
77
|
+
proxy_settings: proxy_settings,
|
|
78
|
+
logging_configuration: logging_configuration
|
|
79
|
+
|
|
80
|
+
# Current API environment
|
|
81
|
+
@environment = String(environment)
|
|
82
|
+
|
|
83
|
+
# The object holding Basic Authentication credentials
|
|
84
|
+
@basic_auth_credentials = basic_auth_credentials
|
|
85
|
+
|
|
86
|
+
# The object holding OAuth 2 Bearer token credentials
|
|
87
|
+
@bearer_auth_credentials = bearer_auth_credentials
|
|
88
|
+
|
|
89
|
+
# The Http Client to use for making requests.
|
|
90
|
+
set_http_client CoreLibrary::FaradayClient.new(self)
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
def clone_with(connection: nil, adapter: nil, timeout: nil,
|
|
94
|
+
max_retries: nil, retry_interval: nil, backoff_factor: nil,
|
|
95
|
+
retry_statuses: nil, retry_methods: nil, http_callback: nil,
|
|
96
|
+
proxy_settings: nil, logging_configuration: nil,
|
|
97
|
+
environment: nil, basic_auth_credentials: nil,
|
|
98
|
+
bearer_auth_credentials: nil)
|
|
99
|
+
connection ||= self.connection
|
|
100
|
+
adapter ||= self.adapter
|
|
101
|
+
timeout ||= self.timeout
|
|
102
|
+
max_retries ||= self.max_retries
|
|
103
|
+
retry_interval ||= self.retry_interval
|
|
104
|
+
backoff_factor ||= self.backoff_factor
|
|
105
|
+
retry_statuses ||= self.retry_statuses
|
|
106
|
+
retry_methods ||= self.retry_methods
|
|
107
|
+
http_callback ||= self.http_callback
|
|
108
|
+
proxy_settings ||= self.proxy_settings
|
|
109
|
+
logging_configuration ||= self.logging_configuration
|
|
110
|
+
environment ||= self.environment
|
|
111
|
+
basic_auth_credentials ||= self.basic_auth_credentials
|
|
112
|
+
bearer_auth_credentials ||= self.bearer_auth_credentials
|
|
113
|
+
|
|
114
|
+
Configuration.new(connection: connection, adapter: adapter,
|
|
115
|
+
timeout: timeout, max_retries: max_retries,
|
|
116
|
+
retry_interval: retry_interval,
|
|
117
|
+
backoff_factor: backoff_factor,
|
|
118
|
+
retry_statuses: retry_statuses,
|
|
119
|
+
retry_methods: retry_methods,
|
|
120
|
+
http_callback: http_callback,
|
|
121
|
+
proxy_settings: proxy_settings,
|
|
122
|
+
logging_configuration: logging_configuration,
|
|
123
|
+
environment: environment,
|
|
124
|
+
basic_auth_credentials: basic_auth_credentials,
|
|
125
|
+
bearer_auth_credentials: bearer_auth_credentials)
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
# All the environments the SDK can run in.
|
|
130
|
+
ENVIRONMENTS = {
|
|
131
|
+
Environment::PRODUCTION => {
|
|
132
|
+
Server::DEFAULT => 'https://sandbox-products.ddp.akoya.com',
|
|
133
|
+
Server::DEFAULT1 => 'https://sandbox-idp.ddp.akoya.com'
|
|
134
|
+
},
|
|
135
|
+
Environment::ENVIRONMENT2 => {
|
|
136
|
+
Server::DEFAULT => 'https://products.ddp.akoya.com',
|
|
137
|
+
Server::DEFAULT1 => 'https://idp.ddp.akoya.com'
|
|
138
|
+
}
|
|
139
|
+
}.freeze
|
|
140
|
+
|
|
141
|
+
# Generates the appropriate base URI for the environment and the server.
|
|
142
|
+
# @param [Configuration::Server] server The server enum for which the base URI is
|
|
143
|
+
# required.
|
|
144
|
+
# @return [String] The base URI.
|
|
145
|
+
def get_base_uri(server = Server::DEFAULT)
|
|
146
|
+
ENVIRONMENTS[environment][server].clone
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
# Builds a Configuration instance using environment variables.
|
|
150
|
+
def self.build_default_config_from_env
|
|
151
|
+
# === Core environment ===
|
|
152
|
+
environment = Environment.from_value(ENV.fetch('ENVIRONMENT', 'production'))
|
|
153
|
+
timeout = (ENV['TIMEOUT'] || 60).to_f
|
|
154
|
+
max_retries = (ENV['MAX_RETRIES'] || 0).to_i
|
|
155
|
+
retry_interval = (ENV['RETRY_INTERVAL'] || 1).to_f
|
|
156
|
+
backoff_factor = (ENV['BACKOFF_FACTOR'] || 2).to_f
|
|
157
|
+
retry_statuses = ENV.fetch('RETRY_STATUSES',
|
|
158
|
+
'[408, 413, 429, 500, 502, 503, 504, 521, 522, 524]').gsub(/[\[\]]/, '')
|
|
159
|
+
.split(',')
|
|
160
|
+
.map(&:strip)
|
|
161
|
+
.map do |item|
|
|
162
|
+
item.match?(/\A\d+\z/) ? item.to_i : item.downcase
|
|
163
|
+
end
|
|
164
|
+
retry_methods = ENV.fetch('RETRY_METHODS', '%i[get put]').gsub(/[\[\]]/, '')
|
|
165
|
+
.split(',')
|
|
166
|
+
.map(&:strip)
|
|
167
|
+
.map do |item|
|
|
168
|
+
item.match?(/\A\d+\z/) ? item.to_i : item.downcase
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
# === Authentication credentials ===
|
|
172
|
+
basic_auth_credentials = BasicAuthCredentials.from_env
|
|
173
|
+
bearer_auth_credentials = BearerAuthCredentials.from_env
|
|
174
|
+
|
|
175
|
+
# === Proxy settings ===
|
|
176
|
+
proxy_settings = ProxySettings.from_env
|
|
177
|
+
# === Logging Configuration ===
|
|
178
|
+
logging_configuration = LoggingConfiguration.from_env if LoggingConfiguration.any_logging_configured?
|
|
179
|
+
|
|
180
|
+
Configuration.new(
|
|
181
|
+
environment: environment,
|
|
182
|
+
timeout: timeout,
|
|
183
|
+
max_retries: max_retries,
|
|
184
|
+
retry_interval: retry_interval,
|
|
185
|
+
backoff_factor: backoff_factor,
|
|
186
|
+
retry_statuses: retry_statuses,
|
|
187
|
+
retry_methods: retry_methods,
|
|
188
|
+
basic_auth_credentials: basic_auth_credentials,
|
|
189
|
+
bearer_auth_credentials: bearer_auth_credentials,
|
|
190
|
+
proxy_settings: proxy_settings,
|
|
191
|
+
logging_configuration: logging_configuration
|
|
192
|
+
)
|
|
193
|
+
end
|
|
194
|
+
end
|
|
195
|
+
end
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# akoya
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module Akoya
|
|
7
|
+
# AccountInformationController
|
|
8
|
+
class AccountInformationController < BaseController
|
|
9
|
+
# Get basic account information including accountId, masked account number,
|
|
10
|
+
# type, description, etc.
|
|
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/accounts-info/v2/mikomo?mode=stand
|
|
23
|
+
# ard`
|
|
24
|
+
# `mode` is available in both sandbox and production.
|
|
25
|
+
# `mode` is supported by a subset of providers. Log into the [Data Recipient
|
|
26
|
+
# Hub](https://recipient.ddp.akoya.com/login) and click
|
|
27
|
+
# [here](https://recipient.ddp.akoya.com/support/article/kA0Uw00000015GzKAI)
|
|
28
|
+
# to view a list of all providers supporting the `mode` parameter.
|
|
29
|
+
# @param [String] version Required parameter: Akoya major version number. Do
|
|
30
|
+
# not use minor version numbers. For instance, use v2 and not v2.2
|
|
31
|
+
# @param [String] provider_id Required parameter: Id of provider
|
|
32
|
+
# @param [String] account_ids Optional parameter: Comma separated list of
|
|
33
|
+
# account ids
|
|
34
|
+
# @param [XAkoyaInteractionType] x_akoya_interaction_type Optional
|
|
35
|
+
# parameter: Optional but recommended header to include with each data
|
|
36
|
+
# request. Allowed values are `user` or `batch`. `user` indicates a
|
|
37
|
+
# request is prompted by an end-user action. `batch` indicates the request
|
|
38
|
+
# is part of a batch process.
|
|
39
|
+
# @param [Mode] mode Optional parameter: BETA. Default is raw. Use standard
|
|
40
|
+
# for FDX-aligned, standardized data values.
|
|
41
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
42
|
+
def get_accounts_info(version,
|
|
43
|
+
provider_id,
|
|
44
|
+
account_ids: ':accountId',
|
|
45
|
+
x_akoya_interaction_type: nil,
|
|
46
|
+
mode: nil)
|
|
47
|
+
@api_call
|
|
48
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
49
|
+
'/accounts-info/{version}/{providerId}',
|
|
50
|
+
Server::DEFAULT)
|
|
51
|
+
.template_param(new_parameter(version, key: 'version')
|
|
52
|
+
.is_required(true)
|
|
53
|
+
.should_encode(true))
|
|
54
|
+
.template_param(new_parameter(provider_id, key: 'providerId')
|
|
55
|
+
.is_required(true)
|
|
56
|
+
.should_encode(true))
|
|
57
|
+
.query_param(new_parameter(account_ids, key: 'accountIds'))
|
|
58
|
+
.header_param(new_parameter(x_akoya_interaction_type, key: 'x-akoya-interaction-type'))
|
|
59
|
+
.query_param(new_parameter(mode, key: 'mode'))
|
|
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(AkoyaAccountInfoProduct.method(:from_hash))
|
|
65
|
+
.is_api_response(true)
|
|
66
|
+
.local_error('400',
|
|
67
|
+
'401 - Invalid input',
|
|
68
|
+
ErrorEntityException)
|
|
69
|
+
.local_error('401',
|
|
70
|
+
'602 - Customer not authorized',
|
|
71
|
+
ErrorEntityException)
|
|
72
|
+
.local_error('404',
|
|
73
|
+
'701 - Account not found',
|
|
74
|
+
ErrorEntityException)
|
|
75
|
+
.local_error('406',
|
|
76
|
+
'1203 - Content Type not Supported',
|
|
77
|
+
ErrorEntityException)
|
|
78
|
+
.local_error('429',
|
|
79
|
+
'1207 - Too many requests',
|
|
80
|
+
ErrorEntityException)
|
|
81
|
+
.local_error('500',
|
|
82
|
+
'500 - Internal server error',
|
|
83
|
+
ErrorEntityException)
|
|
84
|
+
.local_error('501',
|
|
85
|
+
'1106 - Version not supported or not implemented',
|
|
86
|
+
ErrorEntityException)
|
|
87
|
+
.local_error('503',
|
|
88
|
+
'503 - System is down for maintenance',
|
|
89
|
+
ErrorEntityException))
|
|
90
|
+
.execute
|
|
91
|
+
end
|
|
92
|
+
end
|
|
93
|
+
end
|