Skip to content

Latest commit

 

History

History
263 lines (164 loc) · 13.4 KB

README.md

File metadata and controls

263 lines (164 loc) · 13.4 KB

Account

(account)

Overview

Available Operations

create_accounting_account

Create an account

Example Usage

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

Parameters

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

Response

T.nilable(::UnifiedRubySDK::Operations::CreateAccountingAccountResponse)

get_accounting_account

Retrieve an account

Example Usage

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

Parameters

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

Response

T.nilable(::UnifiedRubySDK::Operations::GetAccountingAccountResponse)

list_accounting_accounts

List all accounts

Example Usage

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

Parameters

Parameter Type Required Description
request ::UnifiedRubySDK::Operations::ListAccountingAccountsRequest ✔️ The request object to use for the request.

Response

T.nilable(::UnifiedRubySDK::Operations::ListAccountingAccountsResponse)

patch_accounting_account

Update an account

Example Usage

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

Parameters

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

Response

T.nilable(::UnifiedRubySDK::Operations::PatchAccountingAccountResponse)

remove_accounting_account

Remove an account

Example Usage

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

Parameters

Parameter Type Required Description
connection_id ::String ✔️ ID of the connection
id ::String ✔️ ID of the Account

Response

T.nilable(::UnifiedRubySDK::Operations::RemoveAccountingAccountResponse)

update_accounting_account

Update an account

Example Usage

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

Parameters

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

Response

T.nilable(::UnifiedRubySDK::Operations::UpdateAccountingAccountResponse)