Skip to content

Latest commit

 

History

History
233 lines (158 loc) · 7.91 KB

SelectiveSyncApi.md

File metadata and controls

233 lines (158 loc) · 7.91 KB

MergeAccountingClient::SelectiveSyncApi

All URIs are relative to https://api.merge.dev/api/accounting/v1

Method HTTP request Description
selective_sync_configurations_list GET /selective-sync/configurations
selective_sync_configurations_update PUT /selective-sync/configurations
selective_sync_meta_list GET /selective-sync/meta

selective_sync_configurations_list

<Array> selective_sync_configurations_list(x_account_token)

Get a linked account's selective syncs.

Examples

require 'time'
require 'merge_accounting_client'
# setup authorization
MergeAccountingClient.configure do |config|
  # Configure API key authorization: tokenAuth
  config.api_key['tokenAuth'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  # config.api_key_prefix['tokenAuth'] = 'Bearer'
end

api_instance = MergeAccountingClient::SelectiveSyncApi.new
x_account_token = 'x_account_token_example' # String | Token identifying the end user.

begin
  
  result = api_instance.selective_sync_configurations_list(x_account_token)
  p result
rescue MergeAccountingClient::ApiError => e
  puts "Error when calling SelectiveSyncApi->selective_sync_configurations_list: #{e}"
end

Using the selective_sync_configurations_list_with_http_info variant

This returns an Array which contains the response data, status code and headers.

<Array(<Array>, Integer, Hash)> selective_sync_configurations_list_with_http_info(x_account_token)

begin
  
  data, status_code, headers = api_instance.selective_sync_configurations_list_with_http_info(x_account_token)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => <Array<LinkedAccountSelectiveSyncConfiguration>>
rescue MergeAccountingClient::ApiError => e
  puts "Error when calling SelectiveSyncApi->selective_sync_configurations_list_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
x_account_token String Token identifying the end user.

Return type

Array<LinkedAccountSelectiveSyncConfiguration>

Authorization

tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

selective_sync_configurations_update

<Array> selective_sync_configurations_update(x_account_token, linked_account_selective_sync_configuration_list_request)

Replace a linked account's selective syncs.

Examples

require 'time'
require 'merge_accounting_client'
# setup authorization
MergeAccountingClient.configure do |config|
  # Configure API key authorization: tokenAuth
  config.api_key['tokenAuth'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  # config.api_key_prefix['tokenAuth'] = 'Bearer'
end

api_instance = MergeAccountingClient::SelectiveSyncApi.new
x_account_token = 'x_account_token_example' # String | Token identifying the end user.
linked_account_selective_sync_configuration_list_request = MergeAccountingClient::LinkedAccountSelectiveSyncConfigurationListRequest.new({sync_configurations: [MergeAccountingClient::LinkedAccountSelectiveSyncConfigurationRequest.new({linked_account_conditions: [MergeAccountingClient::LinkedAccountConditionRequest.new({condition_schema_id: 'condition_schema_id_example', operator: 'operator_example', value: TODO})]})]}) # LinkedAccountSelectiveSyncConfigurationListRequest | 

begin
  
  result = api_instance.selective_sync_configurations_update(x_account_token, linked_account_selective_sync_configuration_list_request)
  p result
rescue MergeAccountingClient::ApiError => e
  puts "Error when calling SelectiveSyncApi->selective_sync_configurations_update: #{e}"
end

Using the selective_sync_configurations_update_with_http_info variant

This returns an Array which contains the response data, status code and headers.

<Array(<Array>, Integer, Hash)> selective_sync_configurations_update_with_http_info(x_account_token, linked_account_selective_sync_configuration_list_request)

begin
  
  data, status_code, headers = api_instance.selective_sync_configurations_update_with_http_info(x_account_token, linked_account_selective_sync_configuration_list_request)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => <Array<LinkedAccountSelectiveSyncConfiguration>>
rescue MergeAccountingClient::ApiError => e
  puts "Error when calling SelectiveSyncApi->selective_sync_configurations_update_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
x_account_token String Token identifying the end user.
linked_account_selective_sync_configuration_list_request LinkedAccountSelectiveSyncConfigurationListRequest

Return type

Array<LinkedAccountSelectiveSyncConfiguration>

Authorization

tokenAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

selective_sync_meta_list

selective_sync_meta_list(x_account_token, opts)

Get metadata for the conditions available to a linked account.

Examples

require 'time'
require 'merge_accounting_client'
# setup authorization
MergeAccountingClient.configure do |config|
  # Configure API key authorization: tokenAuth
  config.api_key['tokenAuth'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  # config.api_key_prefix['tokenAuth'] = 'Bearer'
end

api_instance = MergeAccountingClient::SelectiveSyncApi.new
x_account_token = 'x_account_token_example' # String | Token identifying the end user.
opts = {
  common_model: 'common_model_example', # String | 
  cursor: 'cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw', # String | The pagination cursor value.
  page_size: 56 # Integer | Number of results to return per page.
}

begin
  
  result = api_instance.selective_sync_meta_list(x_account_token, opts)
  p result
rescue MergeAccountingClient::ApiError => e
  puts "Error when calling SelectiveSyncApi->selective_sync_meta_list: #{e}"
end

Using the selective_sync_meta_list_with_http_info variant

This returns an Array which contains the response data, status code and headers.

<Array(, Integer, Hash)> selective_sync_meta_list_with_http_info(x_account_token, opts)

begin
  
  data, status_code, headers = api_instance.selective_sync_meta_list_with_http_info(x_account_token, opts)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => <PaginatedConditionSchemaList>
rescue MergeAccountingClient::ApiError => e
  puts "Error when calling SelectiveSyncApi->selective_sync_meta_list_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
x_account_token String Token identifying the end user.
common_model String [optional]
cursor String The pagination cursor value. [optional]
page_size Integer Number of results to return per page. [optional]

Return type

PaginatedConditionSchemaList

Authorization

tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json