-- Fetch all the Accounts belonging to the Quickbooks
-- org of a particular user.
SELECT *
FROM fiber.quickbooks_account
WHERE org_id = '{user.org_id}'
-- Fetch all the Accounts belonging to the Quickbooks
-- org of a particular user.
SELECT *
FROM fiber.quickbooks_account
WHERE org_id = '{user.org_id}'
Code
CREATE TABLE fiber.quickbooks_account (
id TEXT NOT NULL,
created_at TIMESTAMP WITH TIME ZONE,
updated_at TIMESTAMP WITH TIME ZONE,
org_id TEXT,
current_balance_with_sub_accounts TEXT,
acct_num TEXT,
account_sub_type TEXT,
classification TEXT,
currency_ref JSONB,
name TEXT,
description TEXT,
fully_qualified_name TEXT,
id TEXT,
account_type TEXT,
meta_data JSONB,
current_balance TEXT,
active BOOLEAN,
domain TEXT,
sub_account BOOLEAN,
parent_ref JSONB,
sync_token TEXT,
account_alias TEXT,
txn_location_type TEXT,
tax_code_ref JSONB
)
CREATE TABLE fiber.quickbooks_account (
id TEXT NOT NULL,
created_at TIMESTAMP WITH TIME ZONE,
updated_at TIMESTAMP WITH TIME ZONE,
org_id TEXT,
current_balance_with_sub_accounts TEXT,
acct_num TEXT,
account_sub_type TEXT,
classification TEXT,
currency_ref JSONB,
name TEXT,
description TEXT,
fully_qualified_name TEXT,
id TEXT,
account_type TEXT,
meta_data JSONB,
current_balance TEXT,
active BOOLEAN,
domain TEXT,
sub_account BOOLEAN,
parent_ref JSONB,
sync_token TEXT,
account_alias TEXT,
txn_location_type TEXT,
tax_code_ref JSONB
)
Model definition