# SyncteraRubySdk::InternalAccountsApi All URIs are relative to *https://api.synctera.com/v0* | Method | HTTP request | Description | | ------ | ------------ | ----------- | | [**add_internal_accounts**](InternalAccountsApi.md#add_internal_accounts) | **POST** /internal_accounts | Add internal accounts | | [**get_internal_accounts**](InternalAccountsApi.md#get_internal_accounts) | **GET** /internal_accounts/{internal_account_id} | Get internal account by id | | [**list_internal_accounts**](InternalAccountsApi.md#list_internal_accounts) | **GET** /internal_accounts | List internal accounts | | [**patch_internal_account**](InternalAccountsApi.md#patch_internal_account) | **PATCH** /internal_accounts/{internal_account_id} | Patch internal account | ## add_internal_accounts > add_internal_accounts(internal_account_post, opts) Add internal accounts Add an internal account ### Examples ```ruby require 'time' require 'synctera_ruby_sdk' # setup authorization SyncteraRubySdk.configure do |config| # Configure Bearer authorization (api_key): bearerAuth config.access_token = 'YOUR_BEARER_TOKEN' end api_instance = SyncteraRubySdk::InternalAccountsApi.new internal_account_post = SyncteraRubySdk::InternalAccountPost.new({currency: 'USD', status: 'ACTIVE'}) # InternalAccountPost | opts = { idempotency_key: '7d943c51-e4ff-4e57-9558-08cab6b963c7' # String | An idempotency key is an arbitrary unique value generated by client to detect subsequent retries of the same request. It is recommended that a UUID or a similar random identifier be used as an idempotency key. A different key must be used for each request, unless it is a retry. } begin # Add internal accounts result = api_instance.add_internal_accounts(internal_account_post, opts) p result rescue SyncteraRubySdk::ApiError => e puts "Error when calling InternalAccountsApi->add_internal_accounts: #{e}" end ``` #### Using the add_internal_accounts_with_http_info variant This returns an Array which contains the response data, status code and headers. > , Integer, Hash)> add_internal_accounts_with_http_info(internal_account_post, opts) ```ruby begin # Add internal accounts data, status_code, headers = api_instance.add_internal_accounts_with_http_info(internal_account_post, opts) p status_code # => 2xx p headers # => { ... } p data # => rescue SyncteraRubySdk::ApiError => e puts "Error when calling InternalAccountsApi->add_internal_accounts_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **internal_account_post** | [**InternalAccountPost**](InternalAccountPost.md) | | | | **idempotency_key** | **String** | An idempotency key is an arbitrary unique value generated by client to detect subsequent retries of the same request. It is recommended that a UUID or a similar random identifier be used as an idempotency key. A different key must be used for each request, unless it is a retry. | [optional] | ### Return type [**InternalAccountResponse**](InternalAccountResponse.md) ### Authorization [bearerAuth](../README.md#bearerAuth) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json, application/problem+json ## get_internal_accounts > get_internal_accounts(internal_account_id) Get internal account by id Returns an internal account by id ### Examples ```ruby require 'time' require 'synctera_ruby_sdk' # setup authorization SyncteraRubySdk.configure do |config| # Configure Bearer authorization (api_key): bearerAuth config.access_token = 'YOUR_BEARER_TOKEN' end api_instance = SyncteraRubySdk::InternalAccountsApi.new internal_account_id = '7d943c51-e4ff-4e57-9558-08cab6b963c7' # String | Unique identifier for the internal account. begin # Get internal account by id result = api_instance.get_internal_accounts(internal_account_id) p result rescue SyncteraRubySdk::ApiError => e puts "Error when calling InternalAccountsApi->get_internal_accounts: #{e}" end ``` #### Using the get_internal_accounts_with_http_info variant This returns an Array which contains the response data, status code and headers. > , Integer, Hash)> get_internal_accounts_with_http_info(internal_account_id) ```ruby begin # Get internal account by id data, status_code, headers = api_instance.get_internal_accounts_with_http_info(internal_account_id) p status_code # => 2xx p headers # => { ... } p data # => rescue SyncteraRubySdk::ApiError => e puts "Error when calling InternalAccountsApi->get_internal_accounts_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **internal_account_id** | **String** | Unique identifier for the internal account. | | ### Return type [**InternalAccountResponse**](InternalAccountResponse.md) ### Authorization [bearerAuth](../README.md#bearerAuth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json, application/problem+json ## list_internal_accounts > list_internal_accounts(opts) List internal accounts Returns a list of all internal accounts. ### Examples ```ruby require 'time' require 'synctera_ruby_sdk' # setup authorization SyncteraRubySdk.configure do |config| # Configure Bearer authorization (api_key): bearerAuth config.access_token = 'YOUR_BEARER_TOKEN' end api_instance = SyncteraRubySdk::InternalAccountsApi.new opts = { limit: 100, # Integer | page_token: 'a8937a0d', # String | id: ['inner_example'] # Array | Internal account ID(s). Multiple IDs can be provided as a comma-separated list. } begin # List internal accounts result = api_instance.list_internal_accounts(opts) p result rescue SyncteraRubySdk::ApiError => e puts "Error when calling InternalAccountsApi->list_internal_accounts: #{e}" end ``` #### Using the list_internal_accounts_with_http_info variant This returns an Array which contains the response data, status code and headers. > , Integer, Hash)> list_internal_accounts_with_http_info(opts) ```ruby begin # List internal accounts data, status_code, headers = api_instance.list_internal_accounts_with_http_info(opts) p status_code # => 2xx p headers # => { ... } p data # => rescue SyncteraRubySdk::ApiError => e puts "Error when calling InternalAccountsApi->list_internal_accounts_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **limit** | **Integer** | | [optional][default to 100] | | **page_token** | **String** | | [optional] | | **id** | [**Array<String>**](String.md) | Internal account ID(s). Multiple IDs can be provided as a comma-separated list. | [optional] | ### Return type [**InternalAccountsList**](InternalAccountsList.md) ### Authorization [bearerAuth](../README.md#bearerAuth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json, application/problem+json ## patch_internal_account > patch_internal_account(internal_account_id, internal_account_patch) Patch internal account Patch internal account. ### Examples ```ruby require 'time' require 'synctera_ruby_sdk' # setup authorization SyncteraRubySdk.configure do |config| # Configure Bearer authorization (api_key): bearerAuth config.access_token = 'YOUR_BEARER_TOKEN' end api_instance = SyncteraRubySdk::InternalAccountsApi.new internal_account_id = '7d943c51-e4ff-4e57-9558-08cab6b963c7' # String | Unique identifier for the internal account. internal_account_patch = SyncteraRubySdk::InternalAccountPatch.new # InternalAccountPatch | Internal Account fields to be patched begin # Patch internal account result = api_instance.patch_internal_account(internal_account_id, internal_account_patch) p result rescue SyncteraRubySdk::ApiError => e puts "Error when calling InternalAccountsApi->patch_internal_account: #{e}" end ``` #### Using the patch_internal_account_with_http_info variant This returns an Array which contains the response data, status code and headers. > , Integer, Hash)> patch_internal_account_with_http_info(internal_account_id, internal_account_patch) ```ruby begin # Patch internal account data, status_code, headers = api_instance.patch_internal_account_with_http_info(internal_account_id, internal_account_patch) p status_code # => 2xx p headers # => { ... } p data # => rescue SyncteraRubySdk::ApiError => e puts "Error when calling InternalAccountsApi->patch_internal_account_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **internal_account_id** | **String** | Unique identifier for the internal account. | | | **internal_account_patch** | [**InternalAccountPatch**](InternalAccountPatch.md) | Internal Account fields to be patched | | ### Return type [**InternalAccountResponse**](InternalAccountResponse.md) ### Authorization [bearerAuth](../README.md#bearerAuth) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json, application/problem+json