All URIs are relative to https://api-sandbox.synctera.com/v0
Method | HTTP request | Description |
---|---|---|
add_internal_accounts | POST /internal_accounts | Add internal accounts |
get_internal_accounts | GET /internal_accounts/{internal_account_id} | Get internal account by id |
list_internal_accounts | GET /internal_accounts | List internal accounts |
patch_internal_account | PATCH /internal_accounts/{internal_account_id} | Patch internal account |
add_internal_accounts(internal_account_post, opts)
Add internal accounts
Add an internal account. Note: In production, this action can only be performed by Synctera administrators.
require 'time'
require 'synctera'
# setup authorization
Synctera.configure do |config|
# Configure Bearer authorization (api_key): bearerAuth
config.access_token = 'YOUR_BEARER_TOKEN'
end
api_instance = Synctera::InternalAccountsApi.new
internal_account_post = Synctera::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 Synctera::ApiError => e
puts "Error when calling InternalAccountsApi->add_internal_accounts: #{e}"
end
This returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> add_internal_accounts_with_http_info(internal_account_post, opts)
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 # => <InternalAccountResponse>
rescue Synctera::ApiError => e
puts "Error when calling InternalAccountsApi->add_internal_accounts_with_http_info: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
internal_account_post | InternalAccountPost | ||
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] |
- Content-Type: application/json
- Accept: application/json, application/problem+json
get_internal_accounts(internal_account_id)
Get internal account by id
Returns an internal account by id
require 'time'
require 'synctera'
# setup authorization
Synctera.configure do |config|
# Configure Bearer authorization (api_key): bearerAuth
config.access_token = 'YOUR_BEARER_TOKEN'
end
api_instance = Synctera::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 Synctera::ApiError => e
puts "Error when calling InternalAccountsApi->get_internal_accounts: #{e}"
end
This returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> get_internal_accounts_with_http_info(internal_account_id)
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 # => <InternalAccountResponse>
rescue Synctera::ApiError => e
puts "Error when calling InternalAccountsApi->get_internal_accounts_with_http_info: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
internal_account_id | String | Unique identifier for the internal account. |
- Content-Type: Not defined
- Accept: application/json, application/problem+json
list_internal_accounts(opts)
List internal accounts
Returns a list of all internal accounts.
require 'time'
require 'synctera'
# setup authorization
Synctera.configure do |config|
# Configure Bearer authorization (api_key): bearerAuth
config.access_token = 'YOUR_BEARER_TOKEN'
end
api_instance = Synctera::InternalAccountsApi.new
opts = {
page_token: 'a8937a0d', # String |
limit: 100, # Integer |
sort_by: 'account_id:desc,name:asc', # String |
id: ['inner_example'] # Array<String> | 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 Synctera::ApiError => e
puts "Error when calling InternalAccountsApi->list_internal_accounts: #{e}"
end
This returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> list_internal_accounts_with_http_info(opts)
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 # => <InternalAccountsList>
rescue Synctera::ApiError => e
puts "Error when calling InternalAccountsApi->list_internal_accounts_with_http_info: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
page_token | String | [optional] | |
limit | Integer | [optional][default to 100] | |
sort_by | String | [optional] | |
id | Array<String> | Internal account ID(s). Multiple IDs can be provided as a comma-separated list. | [optional] |
- Content-Type: Not defined
- Accept: application/json, application/problem+json
patch_internal_account(internal_account_id, internal_account_patch)
Patch internal account
Patch internal account. Note: In production, this action can only be performed by Synctera administrators.
require 'time'
require 'synctera'
# setup authorization
Synctera.configure do |config|
# Configure Bearer authorization (api_key): bearerAuth
config.access_token = 'YOUR_BEARER_TOKEN'
end
api_instance = Synctera::InternalAccountsApi.new
internal_account_id = '7d943c51-e4ff-4e57-9558-08cab6b963c7' # String | Unique identifier for the internal account.
internal_account_patch = Synctera::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 Synctera::ApiError => e
puts "Error when calling InternalAccountsApi->patch_internal_account: #{e}"
end
This returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> patch_internal_account_with_http_info(internal_account_id, internal_account_patch)
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 # => <InternalAccountResponse>
rescue Synctera::ApiError => e
puts "Error when calling InternalAccountsApi->patch_internal_account_with_http_info: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
internal_account_id | String | Unique identifier for the internal account. | |
internal_account_patch | InternalAccountPatch | Internal Account fields to be patched |
- Content-Type: application/json
- Accept: application/json, application/problem+json