(account)
- create_accounting_account - Create an account
- get_accounting_account - Retrieve an account
- list_accounting_accounts - List all accounts
- patch_accounting_account - Update an account
- remove_accounting_account - Remove an account
- update_accounting_account - Update an account
Create an account
require 'unified_ruby_sdk'
s = ::UnifiedRubySDK::UnifiedTo.new
s.config_security(
::UnifiedRubySDK::Shared::Security.new(
jwt: "<YOUR_API_KEY_HERE>",
)
)
res = s.account.create_accounting_account(connection_id="<id>", accounting_account=::UnifiedRubySDK::Shared::AccountingAccount.new(), fields_=[
"<value>",
])
if ! res.accounting_account.nil?
# handle response
end
Parameter | Type | Required | Description |
---|---|---|---|
connection_id |
::String | ✔️ | ID of the connection |
accounting_account |
T.nilable(::UnifiedRubySDK::Shared::AccountingAccount) | ➖ | Chart of accounts |
fields_ |
T::Array<::String> | ➖ | Comma-delimited fields to return |
T.nilable(::UnifiedRubySDK::Operations::CreateAccountingAccountResponse)
Retrieve an account
require 'unified_ruby_sdk'
s = ::UnifiedRubySDK::UnifiedTo.new
s.config_security(
::UnifiedRubySDK::Shared::Security.new(
jwt: "<YOUR_API_KEY_HERE>",
)
)
res = s.account.get_accounting_account(connection_id="<id>", id="<id>", fields_=[
"<value>",
])
if ! res.accounting_account.nil?
# handle response
end
Parameter | Type | Required | Description |
---|---|---|---|
connection_id |
::String | ✔️ | ID of the connection |
id |
::String | ✔️ | ID of the Account |
fields_ |
T::Array<::String> | ➖ | Comma-delimited fields to return |
T.nilable(::UnifiedRubySDK::Operations::GetAccountingAccountResponse)
List all accounts
require 'unified_ruby_sdk'
s = ::UnifiedRubySDK::UnifiedTo.new
s.config_security(
::UnifiedRubySDK::Shared::Security.new(
jwt: "<YOUR_API_KEY_HERE>",
)
)
req = ::UnifiedRubySDK::Operations::ListAccountingAccountsRequest.new(
connection_id: "<id>",
)
res = s.account.list_accounting_accounts(req)
if ! res.accounting_accounts.nil?
# handle response
end
Parameter | Type | Required | Description |
---|---|---|---|
request |
::UnifiedRubySDK::Operations::ListAccountingAccountsRequest | ✔️ | The request object to use for the request. |
T.nilable(::UnifiedRubySDK::Operations::ListAccountingAccountsResponse)
Update an account
require 'unified_ruby_sdk'
s = ::UnifiedRubySDK::UnifiedTo.new
s.config_security(
::UnifiedRubySDK::Shared::Security.new(
jwt: "<YOUR_API_KEY_HERE>",
)
)
res = s.account.patch_accounting_account(connection_id="<id>", id="<id>", accounting_account=::UnifiedRubySDK::Shared::AccountingAccount.new(), fields_=[
"<value>",
])
if ! res.accounting_account.nil?
# handle response
end
Parameter | Type | Required | Description |
---|---|---|---|
connection_id |
::String | ✔️ | ID of the connection |
id |
::String | ✔️ | ID of the Account |
accounting_account |
T.nilable(::UnifiedRubySDK::Shared::AccountingAccount) | ➖ | Chart of accounts |
fields_ |
T::Array<::String> | ➖ | Comma-delimited fields to return |
T.nilable(::UnifiedRubySDK::Operations::PatchAccountingAccountResponse)
Remove an account
require 'unified_ruby_sdk'
s = ::UnifiedRubySDK::UnifiedTo.new
s.config_security(
::UnifiedRubySDK::Shared::Security.new(
jwt: "<YOUR_API_KEY_HERE>",
)
)
res = s.account.remove_accounting_account(connection_id="<id>", id="<id>")
if res.status_code == 200
# handle response
end
Parameter | Type | Required | Description |
---|---|---|---|
connection_id |
::String | ✔️ | ID of the connection |
id |
::String | ✔️ | ID of the Account |
T.nilable(::UnifiedRubySDK::Operations::RemoveAccountingAccountResponse)
Update an account
require 'unified_ruby_sdk'
s = ::UnifiedRubySDK::UnifiedTo.new
s.config_security(
::UnifiedRubySDK::Shared::Security.new(
jwt: "<YOUR_API_KEY_HERE>",
)
)
res = s.account.update_accounting_account(connection_id="<id>", id="<id>", accounting_account=::UnifiedRubySDK::Shared::AccountingAccount.new(), fields_=[
"<value>",
])
if ! res.accounting_account.nil?
# handle response
end
Parameter | Type | Required | Description |
---|---|---|---|
connection_id |
::String | ✔️ | ID of the connection |
id |
::String | ✔️ | ID of the Account |
accounting_account |
T.nilable(::UnifiedRubySDK::Shared::AccountingAccount) | ➖ | Chart of accounts |
fields_ |
T::Array<::String> | ➖ | Comma-delimited fields to return |
T.nilable(::UnifiedRubySDK::Operations::UpdateAccountingAccountResponse)